Moodle
  1. Moodle
  2. MDL-25850

Scorm score not checking for mod/scorm:viewscores

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.10
    • Fix Version/s: 2.0.2
    • Component/s: SCORM
    • Labels:
    • Environment:
      linux, apache2, mysql, php5
    • Database:
      MySQL
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      15732

      Description

      There is no check for mod/scorm:viewscores called when looking at the page: your_url/mod/scorm/view.php?id=##

      when the capability mod/scorm:viewscores is set to prohibit or prevent there is no check to ensure that the score should be displayed.

      view.php calls - scorm_view_display() from locallib.php

      locallib.php has the following:

      $result = scorm_get_toc($user,$scorm,'structlist',$orgidentifier);
      ...
      echo $result->toc;

      scorm_get_toc() is called from the corresponding version of scorm in mod/scorm/datamodels/

      somewhere before $result is passed back should be a check to see:
      if (has_capability('mod/scorm:viewscores', $context))

      or once it is passed back $result->sco could be cleared out if the capability is not allowed

        Activity

        Hide
        Dan Marsden added a comment -

        Hi Miguel, thanks for the report - I haven't got a lot of time to spend on this at the moment, but will try to put together a fix sometime later this month.

        Show
        Dan Marsden added a comment - Hi Miguel, thanks for the report - I haven't got a lot of time to spend on this at the moment, but will try to put together a fix sometime later this month.
        Hide
        Dan Marsden added a comment -

        A Pull request has been submitted for this bug for 2.0 - it will hopefully get pushed into the next weekly - please see the attached pull request for more info - haven't got to doing this for 1.9Stable yet but will hopefully get round to it soon.

        Show
        Dan Marsden added a comment - A Pull request has been submitted for this bug for 2.0 - it will hopefully get pushed into the next weekly - please see the attached pull request for more info - haven't got to doing this for 1.9Stable yet but will hopefully get round to it soon.
        Hide
        Petr Škoda added a comment -

        Thanks for the report and fix.

        Show
        Petr Škoda added a comment - Thanks for the report and fix.

          People

          • Votes:
            8 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: