Skip to content

Commit

Permalink
MDL-12149 Added code to check for selected group as well, so that pri…
Browse files Browse the repository at this point in the history
…vileged users get correct count when changing groups.
  • Loading branch information
mchurch committed Nov 13, 2007
1 parent 717f432 commit 57b6a70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/assignment/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function view_header($subpage='') {
navmenu($this->course, $this->cm));

$groupmode = groups_get_activity_groupmode($this->cm);
$currentgroup = groups_get_activity_group($this->cm);
$this->currentgroup = groups_get_activity_group($this->cm);
groups_print_activity_menu($this->cm, 'view.php?id=' . $this->cm->id);

echo '<div class="reportlink">'.$this->submittedlink().'</div>';
Expand Down Expand Up @@ -309,7 +309,7 @@ function submittedlink() {
if (!has_capability('moodle/course:managegroups', $context) and (groups_get_activity_groupmode($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>';
Expand Down

0 comments on commit 57b6a70

Please sign in to comment.