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

New Web Service mod_scorm_launch_sco

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.9, 3.1
    • Fix Version/s: 3.1
    • 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 (you can grab a package from the mod/scorm/tests/packages directory)
      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_launch_sco&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 (SCO launched) 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 (you can grab a package from the mod/scorm/tests/packages directory) 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_launch_sco&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 (SCO launched) for that course and the user. The origin for the new log entries is "ws"
    • Affected Branches:
      MOODLE_29_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-50428-master

      Description

      Trigger the \mod_scorm\event\sco_launched event (this WS is just for simulating the scorm/loadSCO.php page so the user interactions are logged in Moodle)

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Dani Palou
            Integrator:
            David Monllaó
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/May/16