// Call question bank.
$icon = new \pix_icon('t/add', $str->questionbank, 'moodle', array('class' => 'iconsmall', 'title' => ''));
- $title = get_string('addquestionfrombanktopage', 'quiz', $page);
+ if ($page) {
+ $title = get_string('addquestionfrombanktopage', 'quiz', $page);
+ } else {
+ $title = get_string('addquestionfrombankatend', 'quiz');
+ }
$attributes = array('class' => 'cm-edit-action questionbank',
'data-header' => $title, 'data-action' => 'questionbank', 'data-addonpage' => $page);
$actions['questionbank'] = new \action_menu_link_secondary($pageurl, $icon, $str->questionbank, $attributes);
$url = new \moodle_url('/mod/quiz/addrandom.php', $params);
$icon = new \pix_icon('t/add', $str->addarandomquestion, 'moodle', array('class' => 'iconsmall', 'title' => ''));
$attributes = array('class' => 'cm-edit-action addarandomquestion', 'data-action' => 'addarandomquestion');
- $title = get_string('addrandomquestiontopage', 'quiz', $page);
+ if ($page) {
+ $title = get_string('addrandomquestiontopage', 'quiz', $page);
+ } else {
+ $title = get_string('addrandomquestionatend', 'quiz');
+ }
$attributes = array_merge(array('data-header' => $title, 'data-addonpage' => $page), $attributes);
$actions['addarandomquestion'] = new \action_menu_link_secondary($url, $icon, $str->addarandomquestion, $attributes);
$string['addpagebreak'] = 'Add page break';
$string['addpagehere'] = 'Add page here';
$string['addquestion'] = 'Add question';
+$string['addquestionfrombankatend'] = 'Add from the question bank at the end';
$string['addquestionfrombanktopage'] = 'Add from the question bank to page {$a}';
$string['addquestions'] = 'Add questions';
$string['addquestionstoquiz'] = 'Add questions to current quiz';
$string['addrandomfromcategory'] = 'Add random questions from category:';
$string['addrandomquestion'] = 'Add random question';
$string['addarandomquestion_help'] = 'When a random question is added, it results in a randomly-chosen question from the category being inserted into the quiz. This means that different students are likely to get a different selection of questions, and when a quiz allows multiple attempts then each attempt is likely to contain a new selection of questions.';
+$string['addrandomquestionatend'] = 'Add a random question at the end';
$string['addrandomquestiontopage'] = 'Add a random question to page {$a}';
$string['addrandomquestiontoquiz'] = 'Add a random question to quiz {$a}';
$string['addrandom1'] = '<< Add';