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

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

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.9.2
    • 3.0
    • 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

    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

              jleyva Juan Leyva
              jleyva Juan Leyva
              Adrian Greeve Adrian Greeve
              David Monllaó David Monllaó
              Jun Pataleta Jun Pataleta
              Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                16/Nov/15