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

Scorm skip view improvement

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.7
    • 1.9.10
    • SCORM
    • None
    • MySQL
    • MOODLE_19_STABLE
    • 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

            danmarsden Dan Marsden
            valerian valerian
            valerian valerian
            Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              25/Oct/10