MDL-71915 mod_quiz: Render add question when user can edit the quiz

This commit is contained in:
Jun Pataleta
2021-12-07 20:37:36 +08:00
parent 24e9358ed7
commit 29ebc9f153
@@ -91,7 +91,9 @@ class previeweditaction implements templatable, renderable {
(new moodle_url('/mod/quiz/startattempt.php', ['cmid' => $this->cmid, 'sesskey' => sesskey()]))->out(false);
}
} else {
$data['addquestionlink'] = (new moodle_url('/mod/quiz/edit.php', ['cmid' => $this->cmid]))->out(false);
if ($this->canedit) {
$data['addquestionlink'] = (new moodle_url('/mod/quiz/edit.php', ['cmid' => $this->cmid]))->out(false);
}
}
return $data;