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

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

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.9.2
    • Fix Version/s: 3.0
    • Component/s: SCORM, Web Services
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-51434-master

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  16/Nov/15