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

Provide feedback to user about redirect delay in loadsco.php

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.7, 1.9.3, 2.0
    • 1.8.5
    • SCORM
    • None
    • MOODLE_18_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

      At the moment when a user opens a piece of content there is a 2 second delay in the loadsco.php page to allow API's etc to start, however there is no notification of this to the user so they may repeatedly click to launch course.

      I suggest an enhancement to the .mod/scorm/loadsco.php to include a message and countdown timer.

      Change the HTML at the end of the page to this:

      <html>
      <head>
      <title>LoadSCO</title>
      <script type="text/javascript">
      function doredirect() {
      var e = document.getElementById("COUNTDOWN");
      var cSeconds = parseInt(e.innerHTML);
      var timer = setInterval(function()
      {
      if( cSeconds )

      { e.innerHTML = --cSeconds; }

      else

      { clearInterval(timer); document.body.innerHTML = "Redirecting...."; location = "<?php echo $result ?>"; }

      }, 1000);
      }
      //<![CDATA[
      //setTimeout('document.location = "<?php echo $result ?>";',<?php echo $delayseconds ?>000);
      //]]>
      </script>
      <noscript>
      <meta http-equiv="refresh" content="<?php echo $delayseconds ?>;url=<?php echo $result ?>" />
      </noscript>
      </head>
      <body onload="doredirect();">
      <p>You will be automatically redirected to the content in <span id="COUNTDOWN"><?php echo $delayseconds ?></span> second(s).<p>
      </body>
      </html>

      Will provide messaging and for JavaScript enabled browsers it will actually countdown the time.

            piers Piers Harding (Inactive)
            jirauser25334 user-4b423 (Inactive)
            Dan Marsden Dan Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.