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

Assets should be launched w/o waiting for the RTE support

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.5
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      (Difficulty: easy, requires administrator to configure SCORM debuggign and access to a course)

      1. Open Internet Explorer and cleanup its cache
      2. Log as Administrator and activate SCORM API Debugging
      3. Log into a Course, e.g. a Topics one, and Turn Editing on.
      4. Create a new SCORM activity with the attached SCORM package v2, MDL-38678_v2.zip e.g. DnD the file into a Topic.
      5. Click on this new SCORM activity and attend to it: a new popup|tab will be opened too (the SCORM API Activity Log)
      6. The first item will be launched: the Prodding SCO will appear
      7. Click on the API Prodder tab of the SCO
      8. Click Initialize button
      9. Click the SetValue session time: 0000:hh:mm:ss.ss link
      10. Click the Terminate button
      11. Click on the Next button in the navigation bar: the PDF will appear inline.
      12. Click on the Next button in the navigation bar: the Prodding SCO will appear after few seconds, there's no icon status in the TOC (SCO being declared as Asset).
      13. Click on the API Prodder tab of the SCO
      14. Click Initialize button
      15. Click the SetValue session time: 0000:hh:mm:ss.ss link
      16. Click the Terminate button
      17. check the SCORM API Activity Log tab/popup to make sure the error "Item ITEM3 has been defined as an Asset: it should never call the SCORM API" appears in the activity log
      18. Exit the Activity
      19. Open the SCORM Basic report and look at the attempt of the user above to see tracking data for the 3 items, the 2nd just completed
      Show
      (Difficulty: easy, requires administrator to configure SCORM debuggign and access to a course) Open Internet Explorer and cleanup its cache Log as Administrator and activate SCORM API Debugging Log into a Course, e.g. a Topics one, and Turn Editing on. Create a new SCORM activity with the attached SCORM package v2 , MDL-38678 _v2.zip e.g. DnD the file into a Topic. Click on this new SCORM activity and attend to it: a new popup|tab will be opened too (the SCORM API Activity Log ) The first item will be launched: the Prodding SCO will appear Click on the API Prodder tab of the SCO Click Initialize button Click the SetValue session time: 0000:hh:mm:ss.ss link Click the Terminate button Click on the Next button in the navigation bar: the PDF will appear inline. Click on the Next button in the navigation bar: the Prodding SCO will appear after few seconds, there's no icon status in the TOC (SCO being declared as Asset). Click on the API Prodder tab of the SCO Click Initialize button Click the SetValue session time: 0000:hh:mm:ss.ss link Click the Terminate button check the SCORM API Activity Log tab/popup to make sure the error "Item ITEM3 has been defined as an Asset: it should never call the SCORM API" appears in the activity log Exit the Activity Open the SCORM Basic report and look at the attempt of the user above to see tracking data for the 3 items, the 2nd just completed
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      m25_MDL-38678_SCORM_RTE_not_required_for_SCO_Assets

      Description

      The current implementation in mod/scorm/loadSCO.php wait for RTE to be ready to accept tracking data for Assets too: it is nicer (read better, see below) to directly jump to the untracked resource.

      This improvement will also resolve a bug when using PDF assets under IE: see https://moodle.org/mod/forum/discuss.php?d=224887 for details.

        Gliffy Diagrams

        1. Screenshot from 2013-04-04 13.50.55.png
          57 kB

          Issue Links

            Activity

            Hide
            matteo Matteo Scaramuccia added a comment -

            Here is my first patch proposal, waiting for the confirm from the OP too.

            Show
            matteo Matteo Scaramuccia added a comment - Here is my first patch proposal, waiting for the confirm from the OP too.
            Hide
            danmarsden Dan Marsden added a comment -

            this would only work if people use "asset" correctly in their manifest right? - what happens when someone sets something as an asset incorrectly? - should we add another sanity check to make sure it's not an html/htm file etc?

            Show
            danmarsden Dan Marsden added a comment - this would only work if people use "asset" correctly in their manifest right? - what happens when someone sets something as an asset incorrectly? - should we add another sanity check to make sure it's not an html/htm file etc?
            Hide
            matteo Matteo Scaramuccia added a comment -

            Hi Dan,
            yes, they must write a SCORM Manifest file thinking at the type of resources they're using as items. At this time even a single SWF (not wrapped in an HTML file) could be a SCO (i.e. capable of SCORM API calls) before being an Asset: in my own experience this reinforcement against the specs should be done maybe adding a comment inline to the code but w/o any sanity check. Read as: Content Providers must be aware of the difference between Asset and SCO.

            What happens in case of errors? In 2.4+ there is the real chance to be tracked 'cause the API is already available outside the SCO window helper (the iframe/object): I'll make some tests... probably it could be also useful to add an error in the API logging when an Asset fires SCORM calls.

            Show
            matteo Matteo Scaramuccia added a comment - Hi Dan, yes, they must write a SCORM Manifest file thinking at the type of resources they're using as items. At this time even a single SWF (not wrapped in an HTML file) could be a SCO (i.e. capable of SCORM API calls) before being an Asset: in my own experience this reinforcement against the specs should be done maybe adding a comment inline to the code but w/o any sanity check. Read as: Content Providers must be aware of the difference between Asset and SCO . What happens in case of errors? In 2.4+ there is the real chance to be tracked 'cause the API is already available outside the SCO window helper (the iframe/object): I'll make some tests... probably it could be also useful to add an error in the API logging when an Asset fires SCORM calls.
            Hide
            matteo Matteo Scaramuccia added a comment -

            Hi Dan,
            here is the final proposal: the improvement plus two minor fixes not really related to this issue but found during the tests (need of a separate issue, e.g., debug logging cleanup?)

            Show
            matteo Matteo Scaramuccia added a comment - Hi Dan, here is the final proposal: the improvement plus two minor fixes not really related to this issue but found during the tests (need of a separate issue, e.g., debug logging cleanup?)
            Hide
            danmarsden Dan Marsden added a comment -

            cool - we do probably need a separate issue for that so it can be tested - I've seen that issue before but haven't done anything about it.

            we probably need to change "sHint" to shint" in your code too - coding guidelines AFAIK state that vars must be in lowercase (plenty of code that breaks that in that file but we should probably follow good practice for new vars)

            once those are sorted +1 for integration - thanks Matteo!

            Show
            danmarsden Dan Marsden added a comment - cool - we do probably need a separate issue for that so it can be tested - I've seen that issue before but haven't done anything about it. we probably need to change "sHint" to shint" in your code too - coding guidelines AFAIK state that vars must be in lowercase (plenty of code that breaks that in that file but we should probably follow good practice for new vars) once those are sorted +1 for integration - thanks Matteo!
            Hide
            matteo Matteo Scaramuccia added a comment -

            Hi Dan,
            here is the split of the previous commits between this issue and MDL-38745.
            Being marked as STABLE backlog, should this improvement land to 2.4 too? If yes I'll prepare the 2.4 pull.

            TIA,
            Matteo

            Show
            matteo Matteo Scaramuccia added a comment - Hi Dan, here is the split of the previous commits between this issue and MDL-38745 . Being marked as STABLE backlog , should this improvement land to 2.4 too? If yes I'll prepare the 2.4 pull. TIA, Matteo
            Hide
            danmarsden Dan Marsden added a comment -

            Thanks Matteo - I'm leaning towards pushing this for master only - if we get a lot more people having related issues in stable we can look at backporting later.

            INTEGRATORS: Master only please.

            Show
            danmarsden Dan Marsden added a comment - Thanks Matteo - I'm leaning towards pushing this for master only - if we get a lot more people having related issues in stable we can look at backporting later. INTEGRATORS: Master only please.
            Hide
            damyon Damyon Wiese added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            Thanks!

            Show
            damyon Damyon Wiese added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. Thanks!
            Hide
            matteo Matteo Scaramuccia added a comment -

            Rebased.

            Show
            matteo Matteo Scaramuccia added a comment - Rebased.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master only. Thanks Matteo and Dan

            Show
            poltawski Dan Poltawski added a comment - Integrated to master only. Thanks Matteo and Dan
            Hide
            phalacee Jason Fowler added a comment -

            Attaching screen shot of the failure at point number 6

            Show
            phalacee Jason Fowler added a comment - Attaching screen shot of the failure at point number 6
            Hide
            phalacee Jason Fowler added a comment -

            Failed at item 6 in the testing instructions. No popup/tab appeared. the page failed to render correctly too.

            Show
            phalacee Jason Fowler added a comment - Failed at item 6 in the testing instructions. No popup/tab appeared. the page failed to render correctly too.
            Hide
            danmarsden Dan Marsden added a comment -

            Hi Jason - that screenshot looks really dodgy - are there any JS errors being caused by other changes currently in integration? - also have you tried clearing cache to see if that makes any difference?

            Show
            danmarsden Dan Marsden added a comment - Hi Jason - that screenshot looks really dodgy - are there any JS errors being caused by other changes currently in integration? - also have you tried clearing cache to see if that makes any difference?
            Hide
            damyon Damyon Wiese added a comment -

            Retesting...

            Show
            damyon Damyon Wiese added a comment - Retesting...
            Hide
            danmarsden Dan Marsden added a comment -

            just updated the testing instructions - they missed the check for the error that now shows in the api activity log.

            Show
            danmarsden Dan Marsden added a comment - just updated the testing instructions - they missed the check for the error that now shows in the api activity log.
            Hide
            damyon Damyon Wiese added a comment -

            This works as expected for me. I do get one javascript error in the console - but I checked that against 24 stable and I get the same error.

            Posting it here:
            TypeError: Object #<error> has no method 'getUnitByPosition' module.js:612

            Given that this js error is existing and doesn't look related to the patch my vote is to pass.

            Show
            damyon Damyon Wiese added a comment - This works as expected for me. I do get one javascript error in the console - but I checked that against 24 stable and I get the same error. Posting it here: TypeError: Object #<error> has no method 'getUnitByPosition' module.js:612 Given that this js error is existing and doesn't look related to the patch my vote is to pass.
            Hide
            damyon Damyon Wiese added a comment -

            Re: the updated instructions - no I don't see that error in the api log window.

            Show
            damyon Damyon Wiese added a comment - Re: the updated instructions - no I don't see that error in the api log window.
            Hide
            damyon Damyon Wiese added a comment -

            More info - clicking on the 3rd item sometimes give a green "API 1.2" and sometimes a red API with a cross - if it's green - no error gets reported, if it's red - clicking Initialize gives "LMSInitialize("") returns "???" Error NaN" error.

            Show
            damyon Damyon Wiese added a comment - More info - clicking on the 3rd item sometimes give a green "API 1.2" and sometimes a red API with a cross - if it's green - no error gets reported, if it's red - clicking Initialize gives "LMSInitialize("") returns "???" Error NaN" error.
            Hide
            danmarsden Dan Marsden added a comment -

            thansk Damyon - js error is the existing bug MDL-37844 (which I was actually working on tonight)

            you should get those errors in the api log window when using the MDL-38678.zip SCORM package and when making SCORM calls on the 3rd sco in the package

            Show
            danmarsden Dan Marsden added a comment - thansk Damyon - js error is the existing bug MDL-37844 (which I was actually working on tonight) you should get those errors in the api log window when using the MDL-38678 .zip SCORM package and when making SCORM calls on the 3rd sco in the package
            Hide
            danmarsden Dan Marsden added a comment -

            yeah - you have to get the sequence exactly the same as the testing instructions - that SCO is used for testing and can cause all sorts of "Bad things"

            Show
            danmarsden Dan Marsden added a comment - yeah - you have to get the sequence exactly the same as the testing instructions - that SCO is used for testing and can cause all sorts of "Bad things"
            Hide
            damyon Damyon Wiese added a comment -

            Even if I follow the instructions exactly I dont get the expected error - I get:

            LMSInitialize("") returns "true"
            LMSSetValue("cmi.core.session_time","0000:00:03.58")
            Returns "true"
            LMSFinish("") returns "true"

            Show
            damyon Damyon Wiese added a comment - Even if I follow the instructions exactly I dont get the expected error - I get: LMSInitialize("") returns "true" LMSSetValue("cmi.core.session_time","0000:00:03.58") Returns "true" LMSFinish("") returns "true"
            Hide
            danmarsden Dan Marsden added a comment -

            weird - SCO 1 and SCO 3 look exactly the same (prodding SCO) but only SCO 3 should generate those errors in the log - It worked for me earlier using FF - not sure why Matteo has said this should be tested using IE though.

            Here's what your testing log should show from following the sequence above: (I've just run this on the integration/master branch)

            hu, 04 Apr 2013 09:08:26 GMT: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM1
            Thu, 04 Apr 2013 09:08:33 GMT: LMSInitialize("", "") => 0
            Thu, 04 Apr 2013 09:08:34 GMT: LMSSetValue("cmi.core.session_time", "0000:00:01.02") => 0
            Thu, 04 Apr 2013 09:08:35 GMT: LMSFinish("AJAXResult", "true") => 0
            Thu, 04 Apr 2013 09:08:35 GMT: LMSFinish("result", "true") => 0
            Thu, 04 Apr 2013 09:08:35 GMT: LMSFinish("", "") => 0
            Thu, 04 Apr 2013 09:08:38 GMT: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2
            Thu, 04 Apr 2013 09:08:51 GMT: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM3
            Thu, 04 Apr 2013 09:08:56 GMT: LMSInitialize("", "") => 0
            Thu, 04 Apr 2013 09:08:56 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Thu, 04 Apr 2013 09:08:57 GMT: LMSSetValue("cmi.core.session_time", "0000:00:01.24") => 0
            Thu, 04 Apr 2013 09:08:57 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Thu, 04 Apr 2013 09:08:58 GMT: LMSFinish("AJAXResult", "true") => 0
            Thu, 04 Apr 2013 09:08:58 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Thu, 04 Apr 2013 09:08:58 GMT: LMSFinish("result", "true") => 0
            Thu, 04 Apr 2013 09:08:58 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Thu, 04 Apr 2013 09:08:58 GMT: LMSFinish("", "") => 0
            Thu, 04 Apr 2013 09:08:58 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API

            Show
            danmarsden Dan Marsden added a comment - weird - SCO 1 and SCO 3 look exactly the same (prodding SCO) but only SCO 3 should generate those errors in the log - It worked for me earlier using FF - not sure why Matteo has said this should be tested using IE though. Here's what your testing log should show from following the sequence above: (I've just run this on the integration/master branch) hu, 04 Apr 2013 09:08:26 GMT: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678 , SCO: ITEM1 Thu, 04 Apr 2013 09:08:33 GMT: LMSInitialize("", "") => 0 Thu, 04 Apr 2013 09:08:34 GMT: LMSSetValue("cmi.core.session_time", "0000:00:01.02") => 0 Thu, 04 Apr 2013 09:08:35 GMT: LMSFinish("AJAXResult", "true") => 0 Thu, 04 Apr 2013 09:08:35 GMT: LMSFinish("result", "true") => 0 Thu, 04 Apr 2013 09:08:35 GMT: LMSFinish("", "") => 0 Thu, 04 Apr 2013 09:08:38 GMT: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678 , SCO: ITEM2 Thu, 04 Apr 2013 09:08:51 GMT: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678 , SCO: ITEM3 Thu, 04 Apr 2013 09:08:56 GMT: LMSInitialize("", "") => 0 Thu, 04 Apr 2013 09:08:56 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Thu, 04 Apr 2013 09:08:57 GMT: LMSSetValue("cmi.core.session_time", "0000:00:01.24") => 0 Thu, 04 Apr 2013 09:08:57 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Thu, 04 Apr 2013 09:08:58 GMT: LMSFinish("AJAXResult", "true") => 0 Thu, 04 Apr 2013 09:08:58 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Thu, 04 Apr 2013 09:08:58 GMT: LMSFinish("result", "true") => 0 Thu, 04 Apr 2013 09:08:58 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Thu, 04 Apr 2013 09:08:58 GMT: LMSFinish("", "") => 0 Thu, 04 Apr 2013 09:08:58 GMT: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Hide
            matteo Matteo Scaramuccia added a comment -

            Hi All,
            IE is used to demonstrate that the PDF Asset will not be shown (as per the OP in the Community)) due to the preloading of HTML required to <prepare>/<get the correct timing to> the RTE stuff which drives to the HTML-side redirection. For testing purposes, given the issue summary, any browser could be used.

            What happens to Damyon sounds like debug.js.php has not been changed so no change has been pushed to the browser hosting the SCORM API activity Log popup. Is it possible?

            Show
            matteo Matteo Scaramuccia added a comment - Hi All, IE is used to demonstrate that the PDF Asset will not be shown (as per the OP in the Community)) due to the preloading of HTML required to <prepare>/<get the correct timing to> the RTE stuff which drives to the HTML-side redirection. For testing purposes, given the issue summary, any browser could be used. What happens to Damyon sounds like debug.js.php has not been changed so no change has been pushed to the browser hosting the SCORM API activity Log popup. Is it possible?
            Show
            poltawski Dan Poltawski added a comment - Its definitely there: http://git.moodle.org/gw?p=integration.git;a=commit;h=fe104762c9acb0e178ae1d5ffe514c8109f48f0a
            Hide
            matteo Matteo Scaramuccia added a comment -

            Oh gosh! TNX Dan.
            Tested againg using a new user starting from master in moodle.git, then applying this pull:

            SCORM API Activity Log
             
            Fri, 5 Apr 2013 05:34:29 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM1
            Fri, 5 Apr 2013 05:34:38 UTC: LMSInitialize("", "") => 0
            Fri, 5 Apr 2013 05:34:46 UTC: LMSSetValue("cmi.core.session_time", "0000:00:07.24") => 0
            Fri, 5 Apr 2013 05:34:48 UTC: LMSFinish("AJAXResult", "true") => 0
            Fri, 5 Apr 2013 05:34:48 UTC: LMSFinish("result", "true") => 0
            Fri, 5 Apr 2013 05:34:48 UTC: LMSFinish("", "") => 0
            Fri, 5 Apr 2013 05:34:52 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2
            Fri, 5 Apr 2013 05:35:10 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM3
            Fri, 5 Apr 2013 05:35:14 UTC: LMSInitialize("", "") => 0
            Fri, 5 Apr 2013 05:35:14 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Fri, 5 Apr 2013 05:35:19 UTC: LMSSetValue("cmi.core.session_time", "0000:00:05.13") => 0
            Fri, 5 Apr 2013 05:35:19 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Fri, 5 Apr 2013 05:35:21 UTC: LMSFinish("AJAXResult", "true") => 0
            Fri, 5 Apr 2013 05:35:21 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Fri, 5 Apr 2013 05:35:21 UTC: LMSFinish("result", "true") => 0
            Fri, 5 Apr 2013 05:35:21 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API
            Fri, 5 Apr 2013 05:35:21 UTC: LMSFinish("", "") => 0
            Fri, 5 Apr 2013 05:35:21 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API

            The things already seen at the time of my coding are:

            1. sometime ITEM3 is not able to track 'cause of the conflicting timing between loading the item and creating the JS in the player to expose the SCORM API. That's the reason why loadSCO.php is used, for item marked as sco, to loop untile the API will be available BEFORE loading the SCO. The test just shows that, if timing will be lucky, even if a SCO will be declared as an Asset (this is an ERROR in packaging the SCORM course, outside the Moodle boundaries) there will be chances that the item will be tracked most of the times;
            2. (more than accidental) if you select the item using the TOC instead of the Next navigation button you'll end up in clicking over the ITEM3 and the system will serve you ITEM2. This is a separate issue not already filed into the Tracker: I'd like to have the time to understand why and where is a flaw in the SCORM code, not related to this pull 1.

            Unfortunately it seems that the only reasonable thing is to leave this issue out and I'll try to understand what happened for the next week .

            1 Logs when clicking on the TOC:

            SCORM API Activity Log
            Fri, 5 Apr 2013 05:49:48 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM1
            Fri, 5 Apr 2013 05:50:11 UTC: LMSInitialize("", "") => 0
            Fri, 5 Apr 2013 05:50:14 UTC: LMSSetValue("cmi.core.session_time", "0000:00:03.43") => 0
            Fri, 5 Apr 2013 05:50:18 UTC: LMSFinish("AJAXResult", "true") => 0
            Fri, 5 Apr 2013 05:50:18 UTC: LMSFinish("result", "true") => 0
            Fri, 5 Apr 2013 05:50:18 UTC: LMSFinish("", "") => 0
            Fri, 5 Apr 2013 05:50:29 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2
            Fri, 5 Apr 2013 05:50:37 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2

            Show
            matteo Matteo Scaramuccia added a comment - Oh gosh! TNX Dan. Tested againg using a new user starting from master in moodle.git, then applying this pull: SCORM API Activity Log   Fri, 5 Apr 2013 05:34:29 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM1 Fri, 5 Apr 2013 05:34:38 UTC: LMSInitialize("", "") => 0 Fri, 5 Apr 2013 05:34:46 UTC: LMSSetValue("cmi.core.session_time", "0000:00:07.24") => 0 Fri, 5 Apr 2013 05:34:48 UTC: LMSFinish("AJAXResult", "true") => 0 Fri, 5 Apr 2013 05:34:48 UTC: LMSFinish("result", "true") => 0 Fri, 5 Apr 2013 05:34:48 UTC: LMSFinish("", "") => 0 Fri, 5 Apr 2013 05:34:52 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2 Fri, 5 Apr 2013 05:35:10 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM3 Fri, 5 Apr 2013 05:35:14 UTC: LMSInitialize("", "") => 0 Fri, 5 Apr 2013 05:35:14 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Fri, 5 Apr 2013 05:35:19 UTC: LMSSetValue("cmi.core.session_time", "0000:00:05.13") => 0 Fri, 5 Apr 2013 05:35:19 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Fri, 5 Apr 2013 05:35:21 UTC: LMSFinish("AJAXResult", "true") => 0 Fri, 5 Apr 2013 05:35:21 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Fri, 5 Apr 2013 05:35:21 UTC: LMSFinish("result", "true") => 0 Fri, 5 Apr 2013 05:35:21 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API Fri, 5 Apr 2013 05:35:21 UTC: LMSFinish("", "") => 0 Fri, 5 Apr 2013 05:35:21 UTC: Item ITEM3 has been defined as an Asset: it should never call the SCORM API The things already seen at the time of my coding are: sometime ITEM3 is not able to track 'cause of the conflicting timing between loading the item and creating the JS in the player to expose the SCORM API. That's the reason why loadSCO.php is used, for item marked as sco , to loop untile the API will be available BEFORE loading the SCO. The test just shows that, if timing will be lucky, even if a SCO will be declared as an Asset (this is an ERROR in packaging the SCORM course, outside the Moodle boundaries) there will be chances that the item will be tracked most of the times; (more than accidental) if you select the item using the TOC instead of the Next navigation button you'll end up in clicking over the ITEM3 and the system will serve you ITEM2. This is a separate issue not already filed into the Tracker: I'd like to have the time to understand why and where is a flaw in the SCORM code, not related to this pull 1 . Unfortunately it seems that the only reasonable thing is to leave this issue out and I'll try to understand what happened for the next week . 1 Logs when clicking on the TOC: SCORM API Activity Log Fri, 5 Apr 2013 05:49:48 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM1 Fri, 5 Apr 2013 05:50:11 UTC: LMSInitialize("", "") => 0 Fri, 5 Apr 2013 05:50:14 UTC: LMSSetValue("cmi.core.session_time", "0000:00:03.43") => 0 Fri, 5 Apr 2013 05:50:18 UTC: LMSFinish("AJAXResult", "true") => 0 Fri, 5 Apr 2013 05:50:18 UTC: LMSFinish("result", "true") => 0 Fri, 5 Apr 2013 05:50:18 UTC: LMSFinish("", "") => 0 Fri, 5 Apr 2013 05:50:29 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2 Fri, 5 Apr 2013 05:50:37 UTC: Moodle SCORM 1.2 API Loaded, Activity: MDL-38678, SCO: ITEM2
            Hide
            poltawski Dan Poltawski added a comment -

            OK, thanks Matteo. I've reverted this and reopening the issue.

            Show
            poltawski Dan Poltawski added a comment - OK, thanks Matteo. I've reverted this and reopening the issue.
            Hide
            cibot CiBoT added a comment -

            Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

            Show
            cibot CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
            Hide
            cibot CiBoT added a comment -

            Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.

            Show
            cibot CiBoT added a comment - Moving this reopened issue out from current integration. Please, re-submit it for integration once ready.
            Hide
            matteo Matteo Scaramuccia added a comment -

            I've rebased the commit and reviewed the test package adding, on the 3rd SCO side, the delay to wait for the RTE to be available: this will help the load syncing. Please note that testing the 3rd item will confirm that even if an Item will be declared as an Asset, Moodle will be able to track it, under some circumstance AND it triggers the tip/error in the SCORM debugging window that an Asset, which has been added with this PR.

            Show
            matteo Matteo Scaramuccia added a comment - I've rebased the commit and reviewed the test package adding, on the 3rd SCO side, the delay to wait for the RTE to be available: this will help the load syncing. Please note that testing the 3rd item will confirm that even if an Item will be declared as an Asset, Moodle will be able to track it, under some circumstance AND it triggers the tip/error in the SCORM debugging window that an Asset, which has been added with this PR.
            Hide
            matteo Matteo Scaramuccia added a comment -

            Hi Dan,
            I've requested a peer review not for the code (just rebased) but for eventually a test from your side (again, I'm sorry) and because I'm not able to change the status for the integration review to go further in the process.

            TIA,
            Matteo

            Show
            matteo Matteo Scaramuccia added a comment - Hi Dan, I've requested a peer review not for the code (just rebased) but for eventually a test from your side (again, I'm sorry) and because I'm not able to change the status for the integration review to go further in the process. TIA, Matteo
            Hide
            danmarsden Dan Marsden added a comment -

            looks good to me - note - There is no change to the code/patch since last integration, only the test SCORM package and Testing instructions have been updated.

            Show
            danmarsden Dan Marsden added a comment - looks good to me - note - There is no change to the code/patch since last integration, only the test SCORM package and Testing instructions have been updated.
            Hide
            matteo Matteo Scaramuccia added a comment -

            Rebased.

            Show
            matteo Matteo Scaramuccia added a comment - Rebased.
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master - thanks

            Show
            poltawski Dan Poltawski added a comment - Integrated to master - thanks
            Hide
            phalacee Jason Fowler added a comment -

            All Good now Matteo, thanks

            Show
            phalacee Jason Fowler added a comment - All Good now Matteo, thanks
            Hide
            matteo Matteo Scaramuccia added a comment -


            @Jason Fowler: TNX to you too!

            Show
            matteo Matteo Scaramuccia added a comment - @ Jason Fowler : TNX to you too!
            Hide
            danmarsden Dan Marsden added a comment -

            phew - thanks everyone... SCORM is such a PITA to test

            Show
            danmarsden Dan Marsden added a comment - phew - thanks everyone... SCORM is such a PITA to test
            Hide
            poltawski Dan Poltawski added a comment -

            Blooming Marvelous! It's time for a knees up - your changes are upstream!

            Thanks for making Moodle better!

            Toodle pip

            Show
            poltawski Dan Poltawski added a comment - Blooming Marvelous! It's time for a knees up - your changes are upstream! Thanks for making Moodle better! Toodle pip

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/13