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

New Web Service mod_scorm_get_scorms_by_courses

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-50349-master
    • Hide

      Note: Version numbers are bumped because a new web service is added into the Mobile app service and also in a module.

      1. Create a course with a teacher and a student.
      2. Create a couple of scorms activities, you can upload the sample packages found here https://github.com/moodle/moodle/tree/master/mod/scorm/tests/packages. Hide one of the activities.
      3. Enable "Mobile services": Plugins ► Web Services ► Mobile
      4. Create a Token for the teacher and the student:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      5. Next, you can do a couple of CURL REST call simulating a WS client with the teacher and the student user .
        • You need to replace the wstoken, courseid 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=1b9cc9f44630b554bb2c9428b8744338'

          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

      6. Confirm that
        • As student you only see the visible scorm activity and all the settings fields except 'updatefreq', 'timemodified', 'options', 'completionstatusrequired', 'completionscorerequired' and 'autocommit'
        • As a teacher you see all the scorm activities and all the settings
      Show
      Note: Version numbers are bumped because a new web service is added into the Mobile app service and also in a module. Create a course with a teacher and a student. Create a couple of scorms activities, you can upload the sample packages found here https://github.com/moodle/moodle/tree/master/mod/scorm/tests/packages . Hide one of the activities. Enable "Mobile services": Plugins ► Web Services ► Mobile Create a Token for the teacher and the student: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a couple of CURL REST call simulating a WS client with the teacher and the student user . You need to replace the wstoken, courseid 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=1b9cc9f44630b554bb2c9428b8744338' 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 As student you only see the visible scorm activity and all the settings fields except 'updatefreq', 'timemodified', 'options', 'completionstatusrequired', 'completionscorerequired' and 'autocommit' As a teacher you see all the scorm activities and all the settings

      Retrieve a list of SCORMs from several courses

            jleyva Juan Leyva
            jleyva Juan Leyva
            Dani Palou Dani Palou
            Dan Poltawski Dan Poltawski
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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