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

New Web Service mod_scorm_view_scorm

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0
    • 2.9
    • SCORM, Web Services
    • MOODLE_29_STABLE
    • MOODLE_30_STABLE
    • MDL-50427-master
    • 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"

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

            jleyva Juan Leyva
            jleyva Juan Leyva
            Simey Lameze Simey Lameze
            Dan Poltawski Dan Poltawski
            David Monllaó David Monllaó
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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