Skip to content

Commit 913abd4

Browse files
author
David Monllao
committed
Merge branch 'MDL-51089-34' of https://github.com/lucaboesch/moodle into MOODLE_34_STABLE
2 parents dfe9aa2 + 237e1a8 commit 913abd4

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

mod/quiz/classes/output/edit_renderer.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -632,17 +632,6 @@ public function edit_menu_actions(structure $structure, $page,
632632
// Get section, page, slotnumber and maxmark.
633633
$actions = array();
634634

635-
// Add a new section to the add_menu if possible. This is always added to the HTML
636-
// then hidden with CSS when no needed, so that as things are re-ordered, etc. with
637-
// Ajax it can be relevaled again when necessary.
638-
$params = array('cmid' => $structure->get_cmid(), 'addsectionatpage' => $page);
639-
640-
$actions['addasection'] = new \action_menu_link_secondary(
641-
new \moodle_url($pageurl, $params),
642-
new \pix_icon('t/add', $str->addasection, 'moodle', array('class' => 'iconsmall', 'title' => '')),
643-
$str->addasection, array('class' => 'cm-edit-action addasection', 'data-action' => 'addasection')
644-
);
645-
646635
// Add a new question to the quiz.
647636
$returnurl = new \moodle_url($pageurl, array('addonpage' => $page));
648637
$params = array('returnurl' => $returnurl->out_as_local_url(false),
@@ -680,6 +669,17 @@ public function edit_menu_actions(structure $structure, $page,
680669
$attributes = array_merge(array('data-header' => $title, 'data-addonpage' => $page), $attributes);
681670
$actions['addarandomquestion'] = new \action_menu_link_secondary($url, $icon, $str->addarandomquestion, $attributes);
682671

672+
// Add a new section to the add_menu if possible. This is always added to the HTML
673+
// then hidden with CSS when no needed, so that as things are re-ordered, etc. with
674+
// Ajax it can be relevaled again when necessary.
675+
$params = array('cmid' => $structure->get_cmid(), 'addsectionatpage' => $page);
676+
677+
$actions['addasection'] = new \action_menu_link_secondary(
678+
new \moodle_url($pageurl, $params),
679+
new \pix_icon('t/add', $str->addasection, 'moodle', array('class' => 'iconsmall', 'title' => '')),
680+
$str->addasection, array('class' => 'cm-edit-action addasection', 'data-action' => 'addasection')
681+
);
682+
683683
return $actions;
684684
}
685685

mod/quiz/styles.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ table.quizreviewsummary td.cell {
659659
}
660660

661661
#page-mod-quiz-edit ul.section li.pagenumber:first-child .add-menu-outer .menu > :first-child,
662-
#page-mod-quiz-edit .last-add-menu .add-menu-outer .menu > :first-child {
662+
#page-mod-quiz-edit .last-add-menu .add-menu-outer .menu > :last-child {
663663
display: none;
664664
}
665665

0 commit comments

Comments
 (0)