Details

      Description

      webserver_chrome:17669:[Wed May 08 06:55:07.932594 2019] [php7:notice] [pid 563] [client 172.21.0.21:35100]
      Default exception handler: Invalid course module ID Debug:
      Error code: invalidcoursemodule
      * line 494 of /lib/setuplib.php: moodle_exception thrown
      * line 27 of /mod/scorm/datamodel.php: call to print_error()
      , referer: http://run2af307a796fecb0b/behatrun3/mod/scorm/player.php
      

      The first time that the BeforeStep hook is called for the next scenario calls, the session is told to open the path for /:

      $session->visit($this->locate_path('/'));
      

      However, in the case of the scorm player there is an "onbeforeunload" event to update the user's current state within the session.
      This is only triggered when navigating away from the page.

      Because the first navigation away from the scorm player is in the start of another scenario. the attempt to save state fails because the scorm object being saved no longer exists after the database has been reset.

      This is also evident from the following chromedriver logs:

      [1557726283.550][INFO]: Done waiting for pending navigations. Status: ok
      [1557726283.550][DEBUG]: DevTools WebSocket Command: Page.navigate (id=1610) 846E574D0A1F3AB114E987DDA1A10732 {
         "url": "http://127.0.0.1/sm/"
      }
      [0513/134443.553437:INFO:CONSOLE(3)] "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.", source: http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/request.js (3)
      [1557726283.554][DEBUG]: DevTools WebSocket Event: Log.entryAdded 846E574D0A1F3AB114E987DDA1A10732 {
         "entry": {
            "level": "warning",
            "lineNumber": 2,
            "source": "deprecation",
            "stackTrace": {
               "callFrames": [ {
                  "columnNumber": 46,
                  "functionName": "DoRequest",
                  "lineNumber": 2,
                  "scriptId": "416",
                  "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/request.js"
               }, {
                  "columnNumber": 34,
                  "functionName": "StoreData",
                  "lineNumber": 66,
                  "scriptId": "418",
                  "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/datamodels/scorm_12.js"
               }, {
                  "columnNumber": 92,
                  "functionName": "LMSFinish",
                  "lineNumber": 7,
                  "scriptId": "418",
                  "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/datamodels/scorm_12.js"
               }, {
                  "columnNumber": 17,
                  "functionName": "ScormProcessFinish",
                  "lineNumber": 130,
                  "scriptId": "436",
                  "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/scormfunctions.js"
               }, {
                  "columnNumber": 8,
                  "functionName": "doUnload",
                  "lineNumber": 153,
                  "scriptId": "437",
                  "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/launchpage.html"
               }, {
                  "columnNumber": 88,
                  "functionName": "onbeforeunload",
                  "lineNumber": 304,
                  "scriptId": "499",
                  "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/launchpage.html"
               } ]
            },
            "text": "Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.",
            "timestamp": 1557726283552.73,
            "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/request.js"
         }
      }
      [1557726283.790][DEBUG]: DevTools WebSocket Event: Log.entryAdded 846E574D0A1F3AB114E987DDA1A10732 {
         "entry": {
            "level": "error",
            "lineNumber": 2,
            "networkRequestId": "1000044058.540",
            "source": "network",
            "stackTrace": {
               "callFrames": [ {
                  "columnNumber": 155,
                  "functionName": "DoRequest",
                  "lineNumber": 2,
                  "scriptId": "416",
                  "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/request.js"
               }, {
                  "columnNumber": 34,
                  "functionName": "StoreData",
                  "lineNumber": 66,
                  "scriptId": "418",
                  "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/datamodels/scorm_12.js"
               }, {
                  "columnNumber": 92,
                  "functionName": "LMSFinish",
                  "lineNumber": 7,
                  "scriptId": "418",
                  "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/datamodels/scorm_12.js"
               }, {
                  "columnNumber": 17,
                  "functionName": "ScormProcessFinish",
                  "lineNumber": 130,
                  "scriptId": "436",
                  "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/scormfunctions.js"
               }, {
                  "columnNumber": 8,
                  "functionName": "doUnload",
                  "lineNumber": 153,
                  "scriptId": "437",
                  "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/launchpage.html"
               }, {
                  "columnNumber": 88,
                  "functionName": "onbeforeunload",
                  "lineNumber": 304,
                  "scriptId": "499",
                  "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/launchpage.html"
               } ]
            },
            "text": "Failed to load resource: the server responded with a status of 404 (Not Found)",
            "timestamp": 1557726283789.83,
            "url": "http://127.0.0.1/sm/lib/javascript.php/1557710522/mod/scorm/request.js"
         }
      }
      [0513/134443.794688:INFO:CONSOLE(0)] "Blocked alert('Error - Could not terminate communication with the LMS.
       
      Your results may not be recorded.
       
      Number: 101
      Description: General exception
      Diagnostic: 101') during beforeunload.", source: http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/launchpage.html (0)
      [1557726283.795][DEBUG]: DevTools WebSocket Event: Log.entryAdded 846E574D0A1F3AB114E987DDA1A10732 {
         "entry": {
            "level": "error",
            "source": "other",
            "text": "Blocked alert('Error - Could not terminate communication with the LMS.\n\nYour results may not be recorded.\n\nNumber: 101\nDescription: General exception\nDiagnostic: 101') during beforeunload.",
            "timestamp": 1557726283794.34,
            "url": "http://127.0.0.1/sm/pluginfile.php/105012/mod_scorm/content/1/sso/launchpage.html"
         }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Dan Marsden
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/19

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 16 minutes
                5h 16m