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

New attempts always overwrite the first attempt

    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;
              }
      ...

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            fix now in 1.8Stable 1.9Stable and HEAD - thanks for the report!

            Show
            danmarsden Dan Marsden added a comment - fix now in 1.8Stable 1.9Stable and HEAD - thanks for the report!

              People

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

                Dates

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