Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-27952

quiz_extend_settings_navigation() failing for users having 0 options in activity settings

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1
    • 2.1
    • Navigation, Quiz
    • None
    • MOODLE_21_STABLE
    • MOODLE_21_STABLE
    • Hide
      • Debug enabled toDEVELOPER
      • Login as student and go to quiz/view.php page
      • TEST: No notices/warnings are shown
      • TEST: Student have no options in the quiz, so the quiz navigation block is not shown
      • Login as teacher and go to quiz/view.php page
      • TEST: No notices/warnings are shown
      • TEST: Teacher sees all the quiz-own-options on top of the quiz navigation block, after them the standard ones are shown (roles, permissions...)
      Show
      Debug enabled toDEVELOPER Login as student and go to quiz/view.php page TEST: No notices/warnings are shown TEST: Student have no options in the quiz, so the quiz navigation block is not shown Login as teacher and go to quiz/view.php page TEST: No notices/warnings are shown TEST: Teacher sees all the quiz-own-options on top of the quiz navigation block, after them the standard ones are shown (roles, permissions...)

    Description

      Was testing some other quiz issues when logged as student I got:

      Notice: Undefined offset: 0 in /Users/stronk7/git_moodle/integration/mod/quiz/lib.php on line 1576

      It seems that the code introduced by MDL-27908 (commit bc502c16) does not handle the situations where there are 0 nodes in the $quiznode.

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Sam Hemelryk Sam Hemelryk
              Sam Hemelryk Sam Hemelryk
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1/Jul/11