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

New attempts always overwrite the first attempt

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.8.12, 1.9.8
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      LAMP, PHP 5.2.11
    • Database:
      MySQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      After the completion of a tracked activity you can launch a new attempt.
      While x.start.time correctly tracks the starting of a new attempt, everything related to the datamodel will be assigned to the first attempt (attempt = 1) 'cause of a typo in accessing the session variable charged to store the attempt number.
      1. Creation of the session scope, mod/scorm/player.php:

      ...
          $SESSION->scorm_attempt = $attempt;
      ...

      2. Accessing the session scope missing the prefix "scorm_", mod/scorm/aicc.php:

      ...
              if (isset($SESSION->attempt)) {
                  $attempt = $SESSION->attempt;
              } else {
                  $attempt = 1;
              }
      ...

        Attachments

          Activity

            People

            Assignee:
            danmarsden Dan Marsden
            Reporter:
            matteo Matteo Scaramuccia
            Tester:
            Nobody
            Participants:
            Component watchers:
            Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Mar/10