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

cannotfindpages error when trying to enter lesson cluster where all questions have been seen



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.5, 3.8.2
    • Fix Version/s: None
    • Component/s: Lesson
    • Labels:
    • Affected Branches:


      A lesson activity has a cluster containing several questions.  The cluster page and all answer choices are configured to jump to an "Unseen question with a cluster".  In most circumstances, it is okay for a student enter the cluster, exit the lesson, and later return to the lesson.  Upon resuming, the student is presented with a message, "You have seen more than one page of this lesson already.  Do you want to start at the last page you saw?"   If the student selects "Yes", he is taken back into the cluster, receiving a question to which he has not previously responded. 

      However, if a student responds to all questions in a cluster, but exits the lesson without first exiting the cluster (This happens by not clicking the Continue button on the question feedback page for the last question in the cluster.), upon returning to the lesson the student is returned to the beginning of the lesson.  When the student reaches the cluster again a "could not find lesson pages" error is received because the lesson is unable to find any unseen question for the student.

      Could not find lesson pages
      More information about this error
      ×Debug info:
      Error code: cannotfindpages
      ×Stack trace:
      line 494 of /lib/setuplib.php: moodle_exception thrown
      line 5177 of /mod/lesson/locallib.php: call to print_error()
      line 2335 of /mod/lesson/locallib.php: call to lesson_page_type_manager->load_page()
      line 3284 of /mod/lesson/locallib.php: call to lesson->load_page()
      line 217 of /mod/lesson/view.php: call to lesson->prepare_page_and_contents()



      1. Create a new lesson activity.
      2. Add a few content pages with jumps to the next and previous pages.
      3. Add a cluster.  Confirm that the jump defaults to "Unseen question within a cluster."
      4. Add four question pages within the cluster.  Set the jump on all answer choices to "Unseen question within a cluster."
      5. Add an end of cluster.  Edit the end of cluster and set the jump to "End of lesson".
      6. Enroll a student in the course.
      7. Login as the student and open the lesson activity.
      8. Advance through the content pages and answer the first three questions.
      9. Answer the fourth question but DO NOT click the continue button on the question feedback page.  Instead navigate away from the lesson.
      10. Return to the lesson activity.  Observe that you are automatically taken to the beginning of the lesson (no choice to resume from the last page seen).
      11. Advance through the first few content pages.
      12. On the last content page, click the Next button to advance into the question cluster.

      A "Could not find lesson pages" error is received. 

      When student resumes the lesson activity having responded to all questions in a cluster, take the student to the target of the end of cluster jump.  If there are concerns with that approach, return the user to the last question in the cluster to which he responded (preferably with response still saved).


      Once in this state there is no way for the student to be able to continue the lesson.  The instructor must delete the attempt and have the student start over.

      backup-moodle2-course-5-test-00001-20200504-1341-nu.mbz - course backup containing sample lesson the replicate issue.




            Unassigned Unassigned
            brian.winstead Brian Winstead
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            0 Vote for this issue
            2 Start watching this issue