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

Lessons: Always continue at second question

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.7.6, 2.8.4
    • 2.2.3, 2.8.2
    • Lesson
    • MOODLE_22_STABLE, MOODLE_28_STABLE
    • MOODLE_27_STABLE, MOODLE_28_STABLE
    • MDL-34006_m29v6
    • Hide

      1. Run all unit and behat tests for mod_lesson
      2. As a teacher Create a lesson with 4 content pages.
      3. As a student view the first 3 content pages of the lesson.
      4. As a teacher Backup the course with user data
      5. As a teacher Restore the data to a new course
      6. As the student view the new course and resume the lesson. You should resume on the page you last viewed.

      Show
      1. Run all unit and behat tests for mod_lesson 2. As a teacher Create a lesson with 4 content pages. 3. As a student view the first 3 content pages of the lesson. 4. As a teacher Backup the course with user data 5. As a teacher Restore the data to a new course 6. As the student view the new course and resume the lesson. You should resume on the page you last viewed.

      Whenever one of our students starts a lesson and, for some reason, quits halfway he gets the option to continue where he left off when he restarts the lesson. But when he does that he always continues at the second question.

      After some digging I found that the problem seems to be in the file 'mod/lesson/view.php'
      In line 195 the program gets all the previous attempts at this lessons questions and loops through it in line 197 to 211. Except that he breaks in line 210 after evaluating the first attemptquestion of the list.
      The problem, as far as I see, is that the list of attempts starts by the oldest and therefor first question of the lesson. Taking that attempt the next question my student student should be seeing is indeed the second question (being the question after this attempt).

      I made a quick fix on this problem by simply removing the break on line 210 and making moodle loop though all the question attempts until it reaches the last but this is not safe for me in case of future updates.

      Now I may have done at some part in the setup of my moodle site or my lesson, but in that case I can't find it. Please Help.

            sbourget Stephen Bourget
            eriksnippe Erik Snippe
            Adrian Greeve Adrian Greeve
            Dan Poltawski Dan Poltawski
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.