Skip to content

Commit

Permalink
Merge branch 'MDL-51089-master' of https://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Dec 27, 2017
2 parents ffd392a + 11f2cec commit 8b36f14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions mod/quiz/classes/output/edit_renderer.php
Expand Up @@ -632,17 +632,6 @@ public function edit_menu_actions(structure $structure, $page,
// Get section, page, slotnumber and maxmark. // Get section, page, slotnumber and maxmark.
$actions = array(); $actions = array();


// Add a new section to the add_menu if possible. This is always added to the HTML
// then hidden with CSS when no needed, so that as things are re-ordered, etc. with
// Ajax it can be relevaled again when necessary.
$params = array('cmid' => $structure->get_cmid(), 'addsectionatpage' => $page);

$actions['addasection'] = new \action_menu_link_secondary(
new \moodle_url($pageurl, $params),
new \pix_icon('t/add', $str->addasection, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$str->addasection, array('class' => 'cm-edit-action addasection', 'data-action' => 'addasection')
);

// Add a new question to the quiz. // Add a new question to the quiz.
$returnurl = new \moodle_url($pageurl, array('addonpage' => $page)); $returnurl = new \moodle_url($pageurl, array('addonpage' => $page));
$params = array('returnurl' => $returnurl->out_as_local_url(false), $params = array('returnurl' => $returnurl->out_as_local_url(false),
Expand Down Expand Up @@ -680,6 +669,17 @@ public function edit_menu_actions(structure $structure, $page,
$attributes = array_merge(array('data-header' => $title, 'data-addonpage' => $page), $attributes); $attributes = array_merge(array('data-header' => $title, 'data-addonpage' => $page), $attributes);
$actions['addarandomquestion'] = new \action_menu_link_secondary($url, $icon, $str->addarandomquestion, $attributes); $actions['addarandomquestion'] = new \action_menu_link_secondary($url, $icon, $str->addarandomquestion, $attributes);


// Add a new section to the add_menu if possible. This is always added to the HTML
// then hidden with CSS when no needed, so that as things are re-ordered, etc. with
// Ajax it can be relevaled again when necessary.
$params = array('cmid' => $structure->get_cmid(), 'addsectionatpage' => $page);

$actions['addasection'] = new \action_menu_link_secondary(
new \moodle_url($pageurl, $params),
new \pix_icon('t/add', $str->addasection, 'moodle', array('class' => 'iconsmall', 'title' => '')),
$str->addasection, array('class' => 'cm-edit-action addasection', 'data-action' => 'addasection')
);

return $actions; return $actions;
} }


Expand Down
2 changes: 1 addition & 1 deletion mod/quiz/styles.css
Expand Up @@ -659,7 +659,7 @@ table.quizreviewsummary td.cell {
} }


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


Expand Down

0 comments on commit 8b36f14

Please sign in to comment.