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

SCORM Player - TOC Refresh problem

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2, 2.3.4, 2.4.1, 2.5
    • Fix Version/s: 2.4.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      Add the SCORM package attached to this bug to your Moodle site.

      enter the SCORM package
      click the init button first.
      set lesson status == completed or passed
      click Finish button
      TOC on left should update and Module 2 will be selectable (it's not always obvious but a mouse rollover should confirm that the link is now active.
      Exit SCORM
      Delete all users SCORM attempts
      enter the SCORM package again
      click the init button first.
      set lesson status == completed or passed
      click commit button
      TOC on left should update and Module 2 will be selectable (it's not always obvious but a mouse rollover should confirm that the link is now active.

      Show
      Add the SCORM package attached to this bug to your Moodle site. enter the SCORM package click the init button first. set lesson status == completed or passed click Finish button TOC on left should update and Module 2 will be selectable (it's not always obvious but a mouse rollover should confirm that the link is now active. Exit SCORM Delete all users SCORM attempts enter the SCORM package again click the init button first. set lesson status == completed or passed click commit button TOC on left should update and Module 2 will be selectable (it's not always obvious but a mouse rollover should confirm that the link is now active.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      master_MDL-33078

      Description

      Currently only the TOC is updated after each call to LMSFinish(), but not after each LMSCommit().

      If a SCORM package is configured with "<adlcp:prerequisites>" the user has no way to continue to the next menu item after completing the prerequisites.

      Posible fix: add this to scorm_12.js.php line 449

      // trigger TOC update
      var sURL = "<?php echo $CFG->wwwroot; ?>" + "/mod/scorm/prereqs.php?a=<?php echo $scorm->id ?>&scoid=<?php echo $scoid ?>&attempt=<?php echo $attempt ?>&mode=<?php echo $mode ?>&currentorg=<?php echo $currentorg ?>&sesskey=<?php echo sesskey(); ?>";
      YAHOO.util.Connect.asyncRequest('GET', sURL, this.connectPrereqCallback, null);

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            thanks for the report - MDL-29207 is a similar issue that I keep meaning to take a look at.

            can you please provide a SCORM package that uses pre-reqs that allows us to reproduce the issue? - There's a package in MDL-29207 but I'd prefer to have mulitple packages to make sure that the fix works in your case and with the package attached to MDL-29207

            thanks,

            Show
            danmarsden Dan Marsden added a comment - thanks for the report - MDL-29207 is a similar issue that I keep meaning to take a look at. can you please provide a SCORM package that uses pre-reqs that allows us to reproduce the issue? - There's a package in MDL-29207 but I'd prefer to have mulitple packages to make sure that the fix works in your case and with the package attached to MDL-29207 thanks,
            Hide
            fwelz Federico Welz added a comment - - edited

            Sure, here you have a SCORM 1.2 Package for testing.

            Thanks!

            Show
            fwelz Federico Welz added a comment - - edited Sure, here you have a SCORM 1.2 Package for testing. Thanks!
            Hide
            fwelz Federico Welz added a comment -

            Hi Dan, I was reviewing MDL-29207, I think that this issue it isn't a duplicate. The concrete issue is that TOC is not refreshing on commit it is just refreshing on finish. The "prerequisites" is just one way to demostrate the consecuences of this issue.

            Show
            fwelz Federico Welz added a comment - Hi Dan, I was reviewing MDL-29207 , I think that this issue it isn't a duplicate. The concrete issue is that TOC is not refreshing on commit it is just refreshing on finish. The "prerequisites" is just one way to demostrate the consecuences of this issue.
            Hide
            danmarsden Dan Marsden added a comment -

            took a look at this again today as part of the work I'm doing on auto-continue. I wonder if we should move the toc update code into the StoreData function rather than duplicating in commit/finish. need to check to see if this is possible.

            Show
            danmarsden Dan Marsden added a comment - took a look at this again today as part of the work I'm doing on auto-continue. I wonder if we should move the toc update code into the StoreData function rather than duplicating in commit/finish. need to check to see if this is possible.
            Hide
            danmarsden Dan Marsden added a comment -

            we may need to do it more than just in storedata too -MDL-29193 suggests we need to update the toc during initialize too.

            Show
            danmarsden Dan Marsden added a comment - we may need to do it more than just in storedata too - MDL-29193 suggests we need to update the toc during initialize too.
            Hide
            danmarsden Dan Marsden added a comment -

            no - shifting it to storeData would fix MDL-29193 too I think - kep an eye on that bug I might push a fix through soon.

            Show
            danmarsden Dan Marsden added a comment - no - shifting it to storeData would fix MDL-29193 too I think - kep an eye on that bug I might push a fix through soon.
            Hide
            danmarsden Dan Marsden added a comment -

            fix for MDL-29193 will be different. - Thanks for the test package it makes this much easier to test.

            NOTE TO INTEGRATOR - this builds on patches in MDL-29207 which must be integrated first.

            Show
            danmarsden Dan Marsden added a comment - fix for MDL-29193 will be different. - Thanks for the test package it makes this much easier to test. NOTE TO INTEGRATOR - this builds on patches in MDL-29207 which must be integrated first.
            Hide
            danmarsden Dan Marsden added a comment -

            I know we're adding more YUI2 here but this is consistent with the other SCORM code (unfortunately) - we do have a bug open to migrate to yui3 (MDL-36374) (volunteers anyone?)

            Show
            danmarsden Dan Marsden added a comment - I know we're adding more YUI2 here but this is consistent with the other SCORM code (unfortunately) - we do have a bug open to migrate to yui3 ( MDL-36374 ) (volunteers anyone?)
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (24 & master), thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (24 & master), thanks!
            Hide
            markn Mark Nelson added a comment -

            Works as expected, thanks Dan. Passing.

            Show
            markn Mark Nelson added a comment - Works as expected, thanks Dan. Passing.
            Hide
            markn Mark Nelson added a comment -

            Hi Dan, quick note. I did receive a JS error when testing this, but it did not prevent me from completing the testing instructions. I have created a new issue MDL-37887 for the issue I found. Thanks.

            Show
            markn Mark Nelson added a comment - Hi Dan, quick note. I did receive a JS error when testing this, but it did not prevent me from completing the testing instructions. I have created a new issue MDL-37887 for the issue I found. Thanks.
            Hide
            danmarsden Dan Marsden added a comment -

            thanks - that's already a known issue

            Show
            danmarsden Dan Marsden added a comment - thanks - that's already a known issue
            Hide
            markn Mark Nelson added a comment -

            Doh! I should really get into the habit of checking tracker before creating an issue.

            Show
            markn Mark Nelson added a comment - Doh! I should really get into the habit of checking tracker before creating an issue.
            Hide
            danmarsden Dan Marsden added a comment -

            that sounds like a good thing to do

            Show
            danmarsden Dan Marsden added a comment - that sounds like a good thing to do
            Hide
            damyon Damyon Wiese added a comment -

            Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone!

            Regards, Damyon

            Show
            damyon Damyon Wiese added a comment - Congratulations! This issue has been resolved. Thanks for helping to make Moodle better for everyone! Regards, Damyon

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Mar/13