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

Review / browse mode not passed correctly

XMLWordPrintable

    • MOODLE_24_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • master_MDL-37524
    • Easy
    • Hide

      make sure SCORM debugger is enabled
      Add the attached SCORM file to your course.
      Enter the SCORM in normal mode as a student and make sure you answer both questions correctly.
      Finish/exit the SCORM
      Return to the SCORM again and enter it but make sure "start new attempt" checkbox is not ticked and normal mode is selected.
      Review mode text will show in header of player.
      In the SCORM debugger select cmi.core.lesson_status and hit the LMSGetValue Button
      a line like this should appear in the debugger:

      Thu, 12 Sep 2013 22:58:02 GMT: LMSGetValue("cmi.core.lesson_mode") - review => 0

      make sure that line states "Review" and not "normal" or "preview" and no Red errors occur in the debugger window.

      Show
      make sure SCORM debugger is enabled Add the attached SCORM file to your course. Enter the SCORM in normal mode as a student and make sure you answer both questions correctly. Finish/exit the SCORM Return to the SCORM again and enter it but make sure "start new attempt" checkbox is not ticked and normal mode is selected. Review mode text will show in header of player. In the SCORM debugger select cmi.core.lesson_status and hit the LMSGetValue Button a line like this should appear in the debugger: Thu, 12 Sep 2013 22:58:02 GMT: LMSGetValue("cmi.core.lesson_mode") - review => 0 make sure that line states "Review" and not "normal" or "preview" and no Red errors occur in the debugger window.

      In mod/scorm/player.php line #136, the $mode ('normal', 'review', or 'browse') is an argument to scorm_get_toc:

      $result = scorm_get_toc($USER, $scorm, $cm->id, TOCJSLINK, $currentorg, $scoid, $mode, $attempt, true, true);

      However, $mode isn't actualy set until nine lines later:
      if (($trackdata->status == 'completed') || ($trackdata->status == 'passed') || ($trackdata->status == 'failed'))

      { $mode = 'review'; }

      By the time $mode is set, the loadSCO.php URL has already been stashed in the toc title attribute by scorm_get_toc, so it's too late. The mode=review isn't passed to loadSCO.php and cmi.mode isn't set correctly.

      The attached patch re-calls scorm_get_toc if $mode=review nine lines later.

      Also in the patch are two other minor and self-explanatory fixes for places $mode isn't passed.

        1. scorm_review_mode.patch
          2 kB
          Ray Morris

            danmarsden Dan Marsden
            raymor Ray Morris
            Frédéric Massart Frédéric Massart
            Sam Hemelryk Sam Hemelryk
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

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