Moodle
  1. Moodle
  2. MDL-31611

SCORM: user results get "lost" when two (or more) users are doing a SCORM test at the same time

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.16, 2.2
    • Fix Version/s: 2.6
    • Component/s: SCORM
    • Environment:
      Any
    • Database:
      Any
    • Testing Instructions:
      Hide

      You need 2 different browsers for this, and 2 student accounts.

      1. set 'Auto-update frequency' for the scorm activity to 'every time it's used'
      2. on browser#1 log in as user#1 and start the scorm activity.
      3. check the scorm_scoes_track table that the first entries for this attempt have been recorded
      4. on browser#2 log in als user#2 and start the same scorm activity
      5. check the scorm_scoes_track table. You'll notice that all existing entries for user#1 have been updated to a new scoid value
      6. continue in the browser for user#1, finish and close the scorm-activity.
      7. check scorm_scoes_track again. all entries made after user#2 has started the scorm will have an outdated scoid. I.e. the scoid that was current when user#1 started the scorm session. You'll see a result that is very similar to the image Bas Brands has posted in http://moodle.org/mod/forum/discuss.php?d=173471#p845325
      Show
      You need 2 different browsers for this, and 2 student accounts. set 'Auto-update frequency' for the scorm activity to 'every time it's used' on browser#1 log in as user#1 and start the scorm activity. check the scorm_scoes_track table that the first entries for this attempt have been recorded on browser#2 log in als user#2 and start the same scorm activity check the scorm_scoes_track table. You'll notice that all existing entries for user#1 have been updated to a new scoid value continue in the browser for user#1, finish and close the scorm-activity. check scorm_scoes_track again. all entries made after user#2 has started the scorm will have an outdated scoid. I.e. the scoid that was current when user#1 started the scorm session. You'll see a result that is very similar to the image Bas Brands has posted in http://moodle.org/mod/forum/discuss.php?d=173471#p845325
    • Workaround:
      Hide

      set 'Auto-update frequency' to 'never' or 'every day'

      Show
      set 'Auto-update frequency' to 'never' or 'every day'
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Rank:
      38179

      Description

      Situation:
      Occasionally, a student finishes a scorm activity successfully but in gradebook the grade turns out to be set to 0.0.

      Occurrence:
      It turns out that this will happen when

      1. The setting 'Auto-update frequency' for the scorm instance is set to 'every time it's used'
      2. A second user opens the same scorm activity while the first user is still using it

      After finishing the scorm the grade for the first user will be set to 0.0 regardless of the actual grade passed by the scorm

      Analysis
      when 'Auto-update frequency' is set to 'every time it's used', the scorm player in Moodle will update scoid values in the scorm_scoes and scorm_scoes_track tables every time a user opens the activity.

      1. user#1 starts the scorm, scoids get updated to scold#1
      2. user#2 starts the scorm a little later and all scoids get updated to scoid#2 including all entries already in scorm_scoes_track for user#1
      3. user#1 continues but all new entries in scorm_scoes_track for this scorm session will still have the value for scoid set to the original scold#1

      Result of all this is that only the steps user#1 has done before user#2 started will be considered when user#1 is graded. Later steps stored in scorm_scoes_track have an outdated scoid and will be ignored. Effectively, user#1 ends up with an incomplete attempt.

      Refer to forum post: http://moodle.org/mod/forum/discuss.php?d=173471#p845325 for an illustration

        Issue Links

          Activity

          Hide
          Dan Marsden added a comment -

          interesting - well done tracking that one down!

          I'd suggest high use SCORMS shouldn't use that setting as it will cause extra unnecessary load on the server - but we should mitigate the effects of this somehow - adding this to my stable backlog and increasing priority. - thanks.

          Show
          Dan Marsden added a comment - interesting - well done tracking that one down! I'd suggest high use SCORMS shouldn't use that setting as it will cause extra unnecessary load on the server - but we should mitigate the effects of this somehow - adding this to my stable backlog and increasing priority. - thanks.
          Hide
          Dan Marsden added a comment -

          btw – thanks for the really high quality bug report - you've given really specific information to help test/diagnose the issue.

          Show
          Dan Marsden added a comment - btw – thanks for the really high quality bug report - you've given really specific information to help test/diagnose the issue.
          Hide
          Michiel Boerman added a comment -

          You're welcome, and I'll pass on your advice. I think a more elaborate explanation on this setting in the documentation would be useful. Should I create another issue for that?

          Show
          Michiel Boerman added a comment - You're welcome, and I'll pass on your advice. I think a more elaborate explanation on this setting in the documentation would be useful. Should I create another issue for that?
          Hide
          Dan Marsden added a comment -

          well.... what would be more helpful is if you just improved the docs yourself - it's a wiki so anyone can improve it.

          We should be disabling this option when a normal uploaded file is used as there's no point in updating the SCORM unless it's changed - and if you're using a normal uploaded SCORM it won't change unless you upload a new one which will trigger the update anyway.

          Show
          Dan Marsden added a comment - well.... what would be more helpful is if you just improved the docs yourself - it's a wiki so anyone can improve it. We should be disabling this option when a normal uploaded file is used as there's no point in updating the SCORM unless it's changed - and if you're using a normal uploaded SCORM it won't change unless you upload a new one which will trigger the update anyway.
          Hide
          Michiel Boerman added a comment - - edited

          Ik wouldn't mind doing that, but my point was that the purpose of this setting was unclear to myself and there's not much to go on if you try to find out what it's for.
          Moreover, there's no help text for this option in the settings form. I don't know why the administrator of the site that had this problem altered the default setting, but I did speak to another administrator and he told me he used that setting because 'No idea what it's for, but it sounds like the safest option'.

          Show
          Michiel Boerman added a comment - - edited Ik wouldn't mind doing that, but my point was that the purpose of this setting was unclear to myself and there's not much to go on if you try to find out what it's for. Moreover, there's no help text for this option in the settings form. I don't know why the administrator of the site that had this problem altered the default setting, but I did speak to another administrator and he told me he used that setting because 'No idea what it's for, but it sounds like the safest option'.
          Hide
          Michiel Boerman added a comment -

          As I understand it now, the only reason to set it to anything else but never is when the package is loaded from a repository, because then the scorm player can't automatically detect when the package is updated.
          Is that correct?

          Show
          Michiel Boerman added a comment - As I understand it now, the only reason to set it to anything else but never is when the package is loaded from a repository, because then the scorm player can't automatically detect when the package is updated. Is that correct?
          Hide
          Dan Marsden added a comment -

          yes that's correct.

          contextual help missing is a bug - I'll make sure I add something when I refactor this a bit. Hiding this setting/disabling it when uploaded package is used will hopefully help prevent it from being used unnecessarily too.

          thanks,

          Show
          Dan Marsden added a comment - yes that's correct. contextual help missing is a bug - I'll make sure I add something when I refactor this a bit. Hiding this setting/disabling it when uploaded package is used will hopefully help prevent it from being used unnecessarily too. thanks,
          Hide
          Dan Marsden added a comment -

          FYI - I've just pushed an improvement in as part of the linked bug which includes contextual help.

          Show
          Dan Marsden added a comment - FYI - I've just pushed an improvement in as part of the linked bug which includes contextual help.
          Hide
          Dan Marsden added a comment -

          Just a note for anyone else that wants to work on this (and for my reference) - scormlib.php scorm_parse_scorm is the cause of this - we need to be careful not to revert back to the old way and introduce the issue I've linked here.

          Show
          Dan Marsden added a comment - Just a note for anyone else that wants to work on this (and for my reference) - scormlib.php scorm_parse_scorm is the cause of this - we need to be careful not to revert back to the old way and introduce the issue I've linked here.
          Hide
          Dan Marsden added a comment -

          closing this as fixed in 2.6 due to the changes in MDL-41434 - unfortunately there's not an easy way to fix this in stable releases as it requires a db level change.

          Show
          Dan Marsden added a comment - closing this as fixed in 2.6 due to the changes in MDL-41434 - unfortunately there's not an easy way to fix this in stable releases as it requires a db level change.

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: