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

Auto-Continue and Prerequisites bug

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.4
    • Fix Version/s: 2.4.2
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      Ask Dan for a SCORM file that uses pre-reqs that allows you to Test this (don't use zip attached to this bug).
      clear browser and moodle cache first (changes to js files)

      Add the scorm to your course and set
      Autocontinue = true
      Don't use the links in the TOC becuase there is another bug related to auto-continue and TOC - only use navigation within scorm package.
      progress through the scorm and at the end of the SCO press "continue" or "next module" link inside the pacakge (depends on the package)
      It should take you to the next sco automatically.

      Warning: If looking at the JS console ignore this error which comes from MDL-37844:
      Error: TypeError: scorm_layout_widget.getUnitByPosition is not a function
      Source File: mod/scorm/loaddatamodel.php?a=448&scoid=2991&currentorg=&attempt=1
      Line: 219

      Show
      Ask Dan for a SCORM file that uses pre-reqs that allows you to Test this (don't use zip attached to this bug). clear browser and moodle cache first (changes to js files) Add the scorm to your course and set Autocontinue = true Don't use the links in the TOC becuase there is another bug related to auto-continue and TOC - only use navigation within scorm package. progress through the scorm and at the end of the SCO press "continue" or "next module" link inside the pacakge (depends on the package) It should take you to the next sco automatically. Warning: If looking at the JS console ignore this error which comes from MDL-37844 : Error: TypeError: scorm_layout_widget.getUnitByPosition is not a function Source File: mod/scorm/loaddatamodel.php?a=448&scoid=2991&currentorg=&attempt=1 Line: 219
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull Master Branch:
      master_MDL-29207

      Description

      When you use SCORM Auto-Continue to "Yes" and you use Prerequisites the ToC doesn't refresh correctly and the user doesn't progress to the next SCO

      Also - the callback.js.php is basically pure js so we should shift it to module.js so it can be cached better. If we add error handling again at some point we shold do it using js instead of php anyway.

      it throws the following JS error during TOC refresh:
      Error: TypeError: scorm_tree_node is null
      mod/scorm/loaddatamodel.php?a=448&scoid=2991&currentorg=&attempt=1
      Line: 191

      Error: TypeError: scorm_tree_node is null
      Source File: mod/scorm/module.js
      Line: 408

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            Hi Silvia,

            we've rewritten a lot of the navigation code in Moodle 2.4 and it's almost working now - MDL-36800 gets in the way but it should land in core next week - there's also another bug in callback.js.php that I have a fix for and will push through on this bug.

            There is still an issue with auto-continue when clicking links in the TOC and probably the Moodle navigation buttons but I haven't got to those quite yet.

            btw - the zip package you have attached here has a JS error when hitting the continue button so it doesn't work. If you have a test package that works correctly and could add it to this tracker it would help a lot.

            Show
            danmarsden Dan Marsden added a comment - Hi Silvia, we've rewritten a lot of the navigation code in Moodle 2.4 and it's almost working now - MDL-36800 gets in the way but it should land in core next week - there's also another bug in callback.js.php that I have a fix for and will push through on this bug. There is still an issue with auto-continue when clicking links in the TOC and probably the Moodle navigation buttons but I haven't got to those quite yet. btw - the zip package you have attached here has a JS error when hitting the continue button so it doesn't work. If you have a test package that works correctly and could add it to this tracker it would help a lot.
            Hide
            danmarsden Dan Marsden added a comment -

            NOTE TO INTEGRATOR:
            This affects earlier versions but this fix only applies to 2.4 and higher - These branches conflict with the patch in MDL-36800 so those fixes are also included - please integrate MDL-36800 first (or check that patch and just integrate this branch) - thanks.

            Show
            danmarsden Dan Marsden added a comment - NOTE TO INTEGRATOR: This affects earlier versions but this fix only applies to 2.4 and higher - These branches conflict with the patch in MDL-36800 so those fixes are also included - please integrate MDL-36800 first (or check that patch and just integrate this branch) - thanks.
            Hide
            silviabastos Silvia Bastos added a comment -

            Dear Dan,

            I'm not working with Moodle at this moment, so I can't help you.

            Best regards.

            Show
            silviabastos Silvia Bastos added a comment - Dear Dan, I'm not working with Moodle at this moment, so I can't help you. Best regards.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master and 24, thanks Dan.

            (I was a little uneasy about the JS move to module.js on the stable branch, but decided to trust you to have not introduced any regressions )

            Show
            poltawski Dan Poltawski added a comment - Integrated to master and 24, thanks Dan. (I was a little uneasy about the JS move to module.js on the stable branch, but decided to trust you to have not introduced any regressions )
            Hide
            danmarsden Dan Marsden added a comment -

            fair call - if you would prefer to revert that commit on stable that's fine by me. I kept it as a seperate commit to help with review.

            Show
            danmarsden Dan Marsden added a comment - fair call - if you would prefer to revert that commit on stable that's fine by me. I kept it as a seperate commit to help with review.
            Hide
            danmarsden Dan Marsden added a comment -

            thanks for the update Silvia!

            Show
            danmarsden Dan Marsden added a comment - thanks for the update Silvia!
            Hide
            poltawski Dan Poltawski added a comment -

            Np, its done now

            Show
            poltawski Dan Poltawski added a comment - Np, its done now
            Hide
            abgreeve Adrian Greeve added a comment -

            Tested on the 2.4 and master integration branches.
            The auto-continue feature worked and moved onto the next section.
            turning off the auto-continue would stop the progression to the next section.
            No errors found (besides the one mentioned in the testing instructions).
            Test passed.

            Show
            abgreeve Adrian Greeve added a comment - Tested on the 2.4 and master integration branches. The auto-continue feature worked and moved onto the next section. turning off the auto-continue would stop the progression to the next section. No errors found (besides the one mentioned in the testing instructions). Test passed.
            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:
                5 Start watching this issue

                Dates

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