mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-38128 mod_assign: Adding group selector to grading summary page
Thanks to Pau Ferrer Ocaña and Avi Levy for their work on this issue.
This commit is contained in:
parent
8f06fffbe1
commit
184f3b6814
@ -4132,6 +4132,11 @@ class assign {
|
||||
if ($this->can_view_grades()) {
|
||||
$draft = ASSIGN_SUBMISSION_STATUS_DRAFT;
|
||||
$submitted = ASSIGN_SUBMISSION_STATUS_SUBMITTED;
|
||||
|
||||
// Group selector will only be displayed if necessary.
|
||||
$currenturl = new moodle_url('/mod/assign/view.php', array('id' => $this->get_course_module()->id));
|
||||
$o .= groups_print_activity_menu($this->get_course_module(), $currenturl->out(), true);
|
||||
|
||||
if ($instance->teamsubmission) {
|
||||
$summary = new assign_grading_summary($this->count_teams(),
|
||||
$instance->submissiondrafts,
|
||||
@ -4145,7 +4150,9 @@ class assign {
|
||||
$instance->teamsubmission);
|
||||
$o .= $this->get_renderer()->render($summary);
|
||||
} else {
|
||||
$summary = new assign_grading_summary($this->count_participants(0),
|
||||
// The active group has already been updated in groups_print_activity_menu().
|
||||
$countparticipants = $this->count_participants(groups_get_activity_group($this->get_course_module()));
|
||||
$summary = new assign_grading_summary($countparticipants,
|
||||
$instance->submissiondrafts,
|
||||
$this->count_submissions_with_status($draft),
|
||||
$this->is_any_submission_plugin_enabled(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user