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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: Navigation, Quiz
    • Labels:
      None
    • Testing Instructions:
      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...)
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Jul/11