Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'MDL-37148-master' of git://github.com/damyon/moodle
[moodle.git]
/
mod
/
assign
/
locallib.php
diff --git
a/mod/assign/locallib.php
b/mod/assign/locallib.php
index
3cbccaf
..
62f0678
100644
(file)
--- a/
mod/assign/locallib.php
+++ b/
mod/assign/locallib.php
@@
-1260,12
+1260,21
@@
class assign {
*/
public function list_participants($currentgroup, $idsonly) {
if ($idsonly) {
*/
public function list_participants($currentgroup, $idsonly) {
if ($idsonly) {
-
return
get_enrolled_users($this->context, 'mod/assign:submit', $currentgroup, 'u.id', null, null, null,
+
$users =
get_enrolled_users($this->context, 'mod/assign:submit', $currentgroup, 'u.id', null, null, null,
$this->show_only_active_users());
} else {
$this->show_only_active_users());
} else {
-
return
get_enrolled_users($this->context, 'mod/assign:submit', $currentgroup, 'u.*', null, null, null,
+
$users =
get_enrolled_users($this->context, 'mod/assign:submit', $currentgroup, 'u.*', null, null, null,
$this->show_only_active_users());
}
$this->show_only_active_users());
}
+
+ $cm = $this->get_course_module();
+ foreach ($users as $userid => $user) {
+ if (!groups_course_module_visible($cm, $userid)) {
+ unset($users[$userid]);
+ }
+ }
+
+ return $users;
}
/**
}
/**
@@
-1297,7
+1306,7
@@
class assign {
* @return int number of matching users
*/
public function count_participants($currentgroup) {
* @return int number of matching users
*/
public function count_participants($currentgroup) {
- return count
_enrolled_users($this->context, 'mod/assign:submit', $currentgroup, true
);
+ return count
($this->list_participants($currentgroup, true)
);
}
/**
}
/**