Moodle
  1. Moodle
  2. MDL-14620

Browse repository button doesn't appear on SCORM resource

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.3, 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Rank:
      30960

      Description

      When adding a SCORM to a course from the "Add an activity..." dropdown in Moodle 1.9 there's no "Browse repository" button, only "Choose or upload a file". The repository button appears correctly in 1.7 (I have no 1.8 installation to test).

      This problem is similar to MDL-10036, which affected the IMS module.

      I've raised this in the Forums at http://moodle.org/mod/forum/discuss.php?d=96029, but some relevant information is reproduced below.

      I've done some experimenting, setting tell-tales in the PHP code so I can see when different bits of code are being triggered, and it appears that the \mod\resource\type\ims\repository_config.php file, and the value of repositoryactivate, are now only being accessed by the IMS module (under 'Add a resource') and not by the SCORM module (under 'Add an activity') at all.

      Changing the value of repositoryactivate in repository_config.php makes no difference, in fact renaming the repository_config.php file so it's not found has no effect, though renaming it in 1.7 correctly triggers a "No such file or directory" error message from the PHP interpreter.

      SCORMs in the repository which were added in 1.7 before this Moodle was upgraded to 1.9 still seem to work correctly, but it's now not possible to add new SCORMs from the same repository.

        Issue Links

          Activity

          Hide
          Chris Lamb added a comment -

          I've just installed Moodle 1.8 for test purposes, and this problem also affects 1.8 in the same way.

          Show
          Chris Lamb added a comment - I've just installed Moodle 1.8 for test purposes, and this problem also affects 1.8 in the same way.
          Hide
          Veronica Adamson added a comment -

          I tried 1.8 and it doesn't work but 1.7+ does.
          Have done some digging and posted the result plus some code comparisons in the forum discussion that relates to this issue http://moodle.org/mod/forum/discuss.php?d=96029

          Show
          Veronica Adamson added a comment - I tried 1.8 and it doesn't work but 1.7+ does. Have done some digging and posted the result plus some code comparisons in the forum discussion that relates to this issue http://moodle.org/mod/forum/discuss.php?d=96029
          Hide
          Dan Marsden added a comment -

          adding Eloy to this issue.

          Eloy - it looks like all that needs changing for this to work in scorm is to change this line in mod/scorm/mod_form.php
          $mform->addElement('choosecoursefile', 'reference', get_string('package','scorm'));
          to this:
          $mform->addElement('choosecoursefileorimsrepo', 'reference', get_string('package','scorm'));

          but I notice that the config settings for the repo are set in mod/resource/ims/repository_config.php We shouldn't need to include this file in Scorm as the config vars should be stored in the db or in config.php - is it set in it's own config file for any particular reason?

          thanks!

          Dan

          Show
          Dan Marsden added a comment - adding Eloy to this issue. Eloy - it looks like all that needs changing for this to work in scorm is to change this line in mod/scorm/mod_form.php $mform->addElement('choosecoursefile', 'reference', get_string('package','scorm')); to this: $mform->addElement('choosecoursefileorimsrepo', 'reference', get_string('package','scorm')); but I notice that the config settings for the repo are set in mod/resource/ims/repository_config.php We shouldn't need to include this file in Scorm as the config vars should be stored in the db or in config.php - is it set in it's own config file for any particular reason? thanks! Dan
          Hide
          Dan Marsden added a comment -

          this is now fixed in 19Stable and HEAD - I've decided not to backport this to 18Stable as the code changes a bit at that point.

          Please note: - there is currently an outstanding issue with IMS resource that affects this. - see MDL-16147 - This patch in SCORM relies on the $CFG data being set in either the config table or the config.php file - it does not read from the resource/type/ims/repository_config.php file.

          thanks!

          Dan

          Show
          Dan Marsden added a comment - this is now fixed in 19Stable and HEAD - I've decided not to backport this to 18Stable as the code changes a bit at that point. Please note: - there is currently an outstanding issue with IMS resource that affects this. - see MDL-16147 - This patch in SCORM relies on the $CFG data being set in either the config table or the config.php file - it does not read from the resource/type/ims/repository_config.php file. thanks! Dan
          Hide
          Jérôme Mouneyrac added a comment - - edited

          Tested on 1.9: I added $CFG->repositoryactivate = "yes"; in the config.php => "Browse Repository" button appears. Fixed.

          Dan: I didn't try to browse a repository as I don't know how much about that. if you can let me know if there is an easy way to browse a repository, it would be great BTW which repository to you browse? Hive?

          Show
          Jérôme Mouneyrac added a comment - - edited Tested on 1.9: I added $CFG->repositoryactivate = "yes"; in the config.php => "Browse Repository" button appears. Fixed. Dan: I didn't try to browse a repository as I don't know how much about that. if you can let me know if there is an easy way to browse a repository, it would be great BTW which repository to you browse? Hive?

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: