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

"Start at last page seen" function broken in Moodle 2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.7, 2.1.5, 2.2.2
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide

      Create a Lesson
      Settings:
      Practice lesson No
      Re-takes allowed Yes.

      Create 5 question pages
      On each page, create a multiple choice question with Answer 1 (correct) Jump to next page
      and Answer 2 (incorrect) Jump to this page

      Log in as student and attempt lesson
      Answer the questions on pages 1 through 3 (always select the correct choice).
      On page 4, log out.

      Log again and re-attempt Lesson
      You should see this message:
      "You have seen more than one page of this lesson already. Do you want to start at the last page you saw?" answer Yes
      Check that you are taken to page 4.

      Show
      Create a Lesson Settings: Practice lesson No Re-takes allowed Yes. Create 5 question pages On each page, create a multiple choice question with Answer 1 (correct) Jump to next page and Answer 2 (incorrect) Jump to this page Log in as student and attempt lesson Answer the questions on pages 1 through 3 (always select the correct choice). On page 4, log out. Log again and re-attempt Lesson You should see this message: "You have seen more than one page of this lesson already. Do you want to start at the last page you saw?" answer Yes Check that you are taken to page 4.
    • Workaround:
      Hide

      in <yourmoodle>/mod/lesson/locallib.php, around line 1029, in:
      public function get_attempts($retries, $correct=false, $pageid=null, $userid=null)
      replace
      return $DB->get_records('lesson_attempts', $params, 'timeseen ASC');
      with
      return $DB->get_records('lesson_attempts', $params, 'timeseen DESC');
      but this needs more testing

      Show
      in <yourmoodle>/mod/lesson/locallib.php, around line 1029, in: public function get_attempts($retries, $correct=false, $pageid=null, $userid=null) replace return $DB->get_records('lesson_attempts', $params, 'timeseen ASC'); with return $DB->get_records('lesson_attempts', $params, 'timeseen DESC'); but this needs more testing
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      "Start at last page seen" function broken in Moodle 2.
      See this discussion http://moodle.org/mod/forum/discuss.php?d=196918

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rwijaya Rossiani Wijaya
              Reporter:
              rezeau Joseph Rézeau
              Peer reviewer:
              Ankit Agarwal
              Integrator:
              Dan Poltawski
              Tester:
              Jason Fowler
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/May/12