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

New Web Service mod_scorm_view_scorm

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9
    • Fix Version/s: 3.0
    • Component/s: SCORM, Web Services
    • Labels:
    • Testing Instructions:
      Hide

      Note: Version number is bumped because a new web service is added into the Mobile app service and to the mod_scorm list of external functions.

      1. Create a course with a student, the course must have at least one section.
      2. Create a mod_scorm resource
      3. Log in as the student and visit the scorm
      4. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      5. Create a Token for the student user:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      6. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, scormid (the scorm instance value) and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'scormid=2&wsfunction=mod_scorm_view_scorm&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' --compressed

          Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output

      7. Confirm that
        • You can see new entries in the course log (SCORM course module viewed) for that course and the user. The origin for the new log entries is "ws"
      Show
      Note: Version number is bumped because a new web service is added into the Mobile app service and to the mod_scorm list of external functions. Create a course with a student, the course must have at least one section. Create a mod_scorm resource Log in as the student and visit the scorm 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, scormid (the scorm instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'scormid=2&wsfunction=mod_scorm_view_scorm&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' --compressed Note, you can use jsonlint.com to validate and format the json returned string or append "| python -m json.tool" to automatically format the command output Confirm that You can see new entries in the course log (SCORM course module viewed) for that course and the user. The origin for the new log entries is "ws"
    • Affected Branches:
      MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50427-master

      Description

      Trigger the module view event (this WS is just for simulating the scorm/view.php page)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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