Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-27952' of git://github.com/stronk7/moodle

  • Loading branch information...
commit a0977339b015bd6120bc12321f03064b84ab48a0 2 parents 115910d + 1b8655a
Sam Hemelryk samhemelryk authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 mod/quiz/lib.php
5 mod/quiz/lib.php
View
@@ -1571,13 +1571,12 @@ function quiz_extend_settings_navigation($settings, $quiznode) {
// We want to add these new nodes after the Edit settings node, and before the
// Locally assigned roles node. Of course, both of those are controlled by capabilities.
$keys = $quiznode->get_children_key_list();
+ $beforekey = null;
$i = array_search('modedit', $keys);
- if ($i === false) {
+ if ($i === false and array_key_exists(0, $keys)) {
$beforekey = $keys[0];
} else if (array_key_exists($i + 1, $keys)) {
$beforekey = $keys[$i + 1];
- } else {
- $beforekey = null;
}
if (has_capability('mod/quiz:manageoverrides', $PAGE->cm->context)) {
Please sign in to comment.
Something went wrong with that request. Please try again.