$gradebookurl = '/grade/report/grader/index.php?id=' . $this->get_course()->id;
$links[$gradebookurl] = get_string('viewgradebook', 'assign');
}
- if ($this->is_any_submission_plugin_enabled()) {
+ if ($this->is_any_submission_plugin_enabled() && $this->count_submissions()) {
- $downloadurl = '/mod/assign/view.php?id=' . $this->get_course_module()->id . '&action=downloadall';
+ $downloadurl = '/mod/assign/view.php?id=' . $cmid . '&action=downloadall';
$links[$downloadurl] = get_string('downloadall', 'assign');
}
- if ($this->is_blind_marking() && has_capability('mod/assign:revealidentities', $this->get_context())) {
- $revealidentitiesurl = '/mod/assign/view.php?id=' . $this->get_course_module()->id . '&action=revealidentities';
+ if ($this->is_blind_marking() &&
+ has_capability('mod/assign:revealidentities', $this->get_context())) {
+ $revealidentitiesurl = '/mod/assign/view.php?id=' . $cmid . '&action=revealidentities';
$links[$revealidentitiesurl] = get_string('revealidentities', 'assign');
}
foreach ($this->get_feedback_plugins() as $plugin) {