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

New setting in the SCORM module to allow downloading the zip package

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.0
    • 2.9.2
    • SCORM, Web Services
    • MOODLE_29_STABLE
    • MOODLE_30_STABLE
    • MDL-51434-master
    • Hide
      1. Version number is bumped because a new global option is added to the SCORM setting module
      2. Set the protectpackagedownloads global SCORM setting to On (enabled)
      3. Create a course, enrol one user as student
      4. Add a couple of SCORM packages in the course (you can use the SCORM zips in the mod/scorm/tests)
      5. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      6. Create a Token for the student user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      7. Next, you can do a CURL REST call simulating a WS client with the student user.
        • You need to replace the wstoken, courseids and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_scorm_get_scorms_by_courses&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool"

      8. Confirm that:
      9. * In the WS response you see the protectpackagedownloads set to true
      10. * If you try to download a package using the packageurl (you need to append to that url: ?token=YOUR_TOKEN_HERE) you will get file not found moodle_exception
      11. Now, change the protectpackagedownloads global setting to Off
      12. Confirm that:
      13. * In the WS response you see the protectpackagedownloads set to false
      14. * If you try to download a package using the packageurl (you need to append to that url: ?token=YOUR_TOKEN_HERE) you will be able to download the file successfully
      Show
      Version number is bumped because a new global option is added to the SCORM setting module Set the protectpackagedownloads global SCORM setting to On (enabled) Create a course, enrol one user as student Add a couple of SCORM packages in the course (you can use the SCORM zips in the mod/scorm/tests) As admin, enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the student user: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student user. You need to replace the wstoken, courseids and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'courseids%5B0%5D=4&wsfunction=mod_scorm_get_scorms_by_courses&wstoken=ffbe3a3002f235bf9d01fd9369e10b66' | python -m "json.tool" Confirm that: * In the WS response you see the protectpackagedownloads set to true * If you try to download a package using the packageurl (you need to append to that url: ?token=YOUR_TOKEN_HERE) you will get file not found moodle_exception Now, change the protectpackagedownloads global setting to Off Confirm that: * In the WS response you see the protectpackagedownloads set to false * If you try to download a package using the packageurl (you need to append to that url: ?token=YOUR_TOKEN_HERE) you will be able to download the file successfully

      As mentioned in the SCORM player in the Mobile app spec:
      https://docs.google.com/document/d/1x9FttwcPkPF45y3_qzLDXtMUtFATPImGviUBeFFIlcA/edit#heading=h.s3gt1oac0o4d

      We need to add a new setting in the SCORM configuration form for allowing the download of the zip package (currently, it can be downloaded only by admins).

      This settings will be disabled when the SCORM is configured to point an extenral imsmanifest.xml file and in other cases.

            jleyva Juan Leyva
            jleyva Juan Leyva
            Adrian Greeve Adrian Greeve
            David Monllaó David Monllaó
            Jun Pataleta Jun Pataleta
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.