Merge branch 'MDL-36587-master' of git://github.com/damyon/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 15 Jan 2013 03:19:40 +0000 (11:19 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 15 Jan 2013 03:19:40 +0000 (11:19 +0800)
Conflicts:
mod/assign/locallib.php

1  2 
mod/assign/locallib.php

@@@ -2540,13 -2303,12 +2540,13 @@@ class assign 
              $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) {