diff --git a/mod/quiz/addrandom.php b/mod/quiz/addrandom.php index bd8c25c454a1c..5568bd0fd50a6 100644 --- a/mod/quiz/addrandom.php +++ b/mod/quiz/addrandom.php @@ -69,7 +69,7 @@ // Print basic page layout. $strupdatemodule = ''; if (has_capability('moodle/course:manageactivities', $contexts->lowest())) { - $strupdatemodule = update_module_button($cm->id, $course->id, get_string('modulename', 'quiz')); + $strupdatemodule = $OUTPUT->update_module_button($cm->id, 'quiz'); } $PAGE->navbar->add($streditingquiz); $PAGE->set_title($streditingquiz); diff --git a/mod/quiz/attemptlib.php b/mod/quiz/attemptlib.php index 93419d9f21f87..fad5514c22df9 100644 --- a/mod/quiz/attemptlib.php +++ b/mod/quiz/attemptlib.php @@ -322,7 +322,7 @@ public function review_url($attemptid) { public function update_module_button() { if (has_capability('moodle/course:manageactivities', get_context_instance(CONTEXT_COURSE, $this->course->id))) { - return update_module_button($this->cm->id, $this->course->id, get_string('modulename', 'quiz')); + return $OUTPUT->update_module_button($cm->id, 'quiz'); } else { return ''; } diff --git a/mod/quiz/edit.php b/mod/quiz/edit.php index 4d8f114786450..8c426624b5a91 100644 --- a/mod/quiz/edit.php +++ b/mod/quiz/edit.php @@ -440,8 +440,7 @@ function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmo get_string('questionbankmanagement', 'quiz').' '; $strupdatemodule = has_capability('moodle/course:manageactivities', $contexts->lowest()) ? - update_module_button($cm->id, $course->id, - get_string('modulename', 'quiz')) : + $OUTPUT->update_module_button($cm->id, 'quiz') : ""; $PAGE->navbar->add($pagetitle); diff --git a/mod/quiz/report/default.php b/mod/quiz/report/default.php index dd56064468a1d..cda0d1a4978c2 100644 --- a/mod/quiz/report/default.php +++ b/mod/quiz/report/default.php @@ -28,7 +28,7 @@ function print_header_and_tabs($cm, $course, $quiz, $reportmode="overview") { $strquiz = get_string("modulename", "quiz"); /// Print the page header $PAGE->set_title(format_string($quiz->name)); - $PAGE->set_button(update_module_button($cm->id, $course->id, $strquiz)); + $PAGE->set_button($OUTPUT->update_module_button($cm->id, 'quiz')); echo $OUTPUT->header(); /// Print the tabs $currenttab = 'reports';