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

Scorm skip view improvement

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.10
    • Component/s: SCORM
    • Labels:
      None
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      If a scorm package is set with the skipview parameter to "Always" or "First time", the view is skipped for everyone including someone with "mod/scorm:viewreport" capability. The problem is that reports can't be read by this person.

      In locallib.php, function scorm_simple_play, the following condition can be modified :
      original : if ($scoes) {
      proposal : if ($scoes && has_capability('mod/scorm:viewreport', $context)===false) {
      for doing this, the $context must be passed as a parameter to the scorm_simple_play function

      Another thing : if the view is skipped, the student is redirect to the first sco retrieved by the sql query :
      $scoes = get_records_select('scorm_scoes','scorm='.$scorm->id.' AND launch<>\''.sql_empty().'\'');

      I think, an order can be added to the sql query to ensure that the taken sco is really the first in the package :
      $scoes = get_records_select('scorm_scoes','scorm='.$scorm->id.' AND launch<>\''.sql_empty().'\'', 'id', 'id');

      I've attached a patch for this.

        Attachments

          Activity

            People

            • Assignee:
              danmarsden Dan Marsden
              Reporter:
              valerian valerian
              Tester:
              valerian
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Oct/10