MDL-12149 Added code to check for selected group as well, so that privileged users get correct count when changing groups.
This commit is contained in:
@@ -155,7 +155,7 @@ class assignment_base {
|
||||
navmenu($this->course, $this->cm));
|
||||
|
||||
$groupmode = groupmode($this->course, $this->cm);
|
||||
$currentgroup = setup_and_print_groups($this->course, $groupmode, 'view.php?id=' . $this->cm->id);
|
||||
$this->currentgroup = setup_and_print_groups($this->course, $groupmode, 'view.php?id=' . $this->cm->id);
|
||||
|
||||
echo '<div class="reportlink">'.$this->submittedlink().'</div>';
|
||||
echo '<div class="clearer"></div>';
|
||||
@@ -293,7 +293,7 @@ class assignment_base {
|
||||
if (!has_capability('moodle/course:managegroups', $context) and (groupmode($this->course, $this->cm) == SEPARATEGROUPS)) {
|
||||
$count = $this->count_real_submissions($this->currentgroup); // Only their groups
|
||||
} else {
|
||||
$count = $this->count_real_submissions(); // Everyone
|
||||
$count = $this->count_real_submissions($this->currentgroup); // Everyone
|
||||
}
|
||||
$submitted = '<a href="submissions.php?id='.$this->cm->id.'">'.
|
||||
get_string('viewsubmissions', 'assignment', $count).'</a>';
|
||||
|
||||
Reference in New Issue
Block a user