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.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            danmarsden Dan Marsden added a comment -

            fix now in 1.9Stable and Head - would be good if you could QA the commit and post back here to let me know just in case I've missed something - thanks!

            Show
            danmarsden Dan Marsden added a comment - fix now in 1.9Stable and Head - would be good if you could QA the commit and post back here to let me know just in case I've missed something - thanks!
            Hide
            valerian valerian added a comment -

            Hi Dan, seems to be good for me, i've tested it on my server.

            Show
            valerian valerian added a comment - Hi Dan, seems to be good for me, i've tested it on my server.
            Hide
            danmarsden Dan Marsden added a comment -

            thanks Valerian - closing bug.

            Show
            danmarsden Dan Marsden added a comment - thanks Valerian - closing bug.

              People

              • Assignee:
                danmarsden Dan Marsden
                Reporter:
                valerian valerian
                Tester:
                valerian
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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