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

New Web Service mod_assign_view_submission_status

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.1
    • Component/s: Assignment
    • 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_resource list of external functions.

      1. Create a mod_assign activity inside a course, enrol a student user in the course.
      2. As admin, enable "Mobile services": Plugins ► Web Services ► Mobile
      3. Create a Token for the student user
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      4. Next, you can do a CURL REST call simulating a WS client with the student user .
        • You need to replace the wstoken, assignid (the assign module instance value) and the URL of your moodle instance

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

      5. Confirm that
        • You can see new entries in the course log (submission status viewed) for the assignment and the user. The origin for the new log entries is "ws"
        • Try to run the WS using and invalid assignid (non-existent, from other course, etc..) you should see proper errors
      Show
      Note: Version number is bumped because a new web service is added into the Mobile app service and to the mod_resource list of external functions. Create a mod_assign activity inside a course, enrol a student user in the course. 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, assignid (the assign module instance value) and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assignid=4&wsfunction=mod_assign_view_submission_status&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e' --compressed Confirm that You can see new entries in the course log (submission status viewed) for the assignment and the user. The origin for the new log entries is "ws" Try to run the WS using and invalid assignid (non-existent, from other course, etc..) you should see proper errors
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-52974-master

      Description

      Web Service to trigger the submission viewed event

        Attachments

          Activity

            People

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

              Dates

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