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

Error code: cannotfindpages when leaving in a cluster and resuming after a wrong answer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.5, 2.9.1, 2.9.2
    • Fix Version/s: 2.9.4, 3.0.1
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide

      1. Create a lesson containing a cluster with 4 question pages. (The attached backup will do this for Moodle 3.1)
      2. Set each question to jump to "End of cluster" when correct, and jump to "Unseen question within a cluster" when wrong
      3. Start the lesson as a student
      4. Answer the first question wrong
      5. Exit the lesson
      6. Resume the lesson and verify that no errors are displayed

      Show
      1. Create a lesson containing a cluster with 4 question pages. (The attached backup will do this for Moodle 3.1) 2. Set each question to jump to "End of cluster" when correct, and jump to "Unseen question within a cluster" when wrong 3. Start the lesson as a student 4. Answer the first question wrong 5. Exit the lesson 6. Resume the lesson and verify that no errors are displayed
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE, MOODLE_30_STABLE
    • Pull Master Branch:
      MDL-51097_m31v1

      Description

      Hello,

      My issue is with the lesson module. I am using clusters that present a random unseen question. If the question is answered correctly, a page is displayed saying the question was answered correctly along with a continue button that will bring up a new unseen question from a different cluster. If the question is answered incorrectly, the screen with the continue button is shown, along with a video which can be watched or not, then upon hitting continue, the student is given another unseen question from within that same cluster. My problem arises when a student leaves the lesson, then re-enters. They are presented with the option of continuing where they left off, or starting over. Starting over always works properly, however continuing where they left off only functions if the last page seen was after a question was answered correctly. If they leave after an incorrect question, either at the "sorry that's incorrect" screen, or after hitting continue and being presented with a new question screen, when they attempt to re-enter where they left off, they are given the following error:

      Could not find lesson pages

      More information about this error

      Debug info:
      Error code: cannotfindpages

      Stack trace: •line 481 of /lib/setuplib.php: moodle_exception thrown
      •line 3328 of /mod/lesson/locallib.php: call to print_error()
      •line 1649 of /mod/lesson/locallib.php: call to lesson_page_type_manager->load_page()
      •line 318 of /mod/lesson/view.php: call to lesson->load_page()

      I noticed this issue around version 2.7, and I've currently upgraded a test environment from 2.8.5 to 2.9.1 and the issue is still present. I've searched everywhere and have yet to find a solution. Any assistance would be GREATLY appreciated. This is causing students a lot of headache when they have to start the lesson over completely, despite their previous progress, due to having left after an incorrect answer. We've asked that all students leave after answering a correct question, but there's always a few that end up in this situation.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                21/Dec/15