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

New Web Service mod_workshop_view_submission

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      Hide
      1. Create a course with a workshop
      2. Enrol one user as student and one user as teacher
      3. As teacher, move the workshop to the submission phase (doing all the required configuration steps indicated by the activity)
      4. As the student do a submission
      5. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      6. Create a Token in the mobile app service for the student:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      7. Next, you can do a CURL REST call simulating a WS client with the student.
        • You need to replace the wstoken with the student one, submissionid with the id of the submission the student did and the URL of your moodle instance

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'submissionid=4&wsfunction=mod_workshop_view_submission&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool"

      8. Check that the status field in the curl response is set to true
      9. Go to the workshop activity logs
      10. Check that there is a new recent entry "Submission viewed" with origin "ws"
      Show
      Create a course with a workshop Enrol one user as student and one user as teacher As teacher, move the workshop to the submission phase (doing all the required configuration steps indicated by the activity) As the student do a submission Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for the student: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client with the student. You need to replace the wstoken with the student one, submissionid with the id of the submission the student did and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'submissionid=4&wsfunction=mod_workshop_view_submission&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Check that the status field in the curl response is set to true Go to the workshop activity logs Check that there is a new recent entry "Submission viewed" with origin "ws"
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59239-master

      Description

      To be called when a submission is viewed

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17