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

New Web Service mod_workshop_get_submission_assessments

    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 a couple users as student (student2 and student1) 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 two students, do a submission (total of 2 submissions, one per sstudent).
      5. As teacher, move the workshop to the assessment phase, allocating the assessment of the submissions: student2 will assess student1 and vice versa.
      6. As the students, do your assessments (student2 will assess the submission done by student1 and vice versa)
      7. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      8. Create a Token in the mobile app service for both of the students and the teacher:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      9. Next, you can do a CURL REST call simulating a WS client.
        • You need to replace the wstoken with the teacher one, submissionid with one of the submissions done by the students and the URL of your moodle instance

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

      10. Now check that you receive the information of the submission assessments (you will see just one assessment).
      11. Now, replace the wstoken with the student1 and execute the curl request, do the same using the student2 wstoken
      12. In both cases you will get a nopermissions error (you can't see the assessments until the workshop is closed/finished)
      13. As teacher, finish/close the workshop (you will have to grade the assessments, etc...)
      14. And now, if you replace the wstoken with the one from the user who did the submission (the submission passed in the submissionid parameter) you should be able to view the assessments because the workshop is finished. Note that the reviewerid field will be set to 0 because students by default can't see the name of the reviewers
      Show
      Create a course with a workshop Enrol a couple users as student (student2 and student1) 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 two students, do a submission (total of 2 submissions, one per sstudent). As teacher, move the workshop to the assessment phase, allocating the assessment of the submissions: student2 will assess student1 and vice versa. As the students, do your assessments (student2 will assess the submission done by student1 and vice versa) Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for both of the students and the teacher: Click on Site administration ► Plugins ► Web services ► Manage tokens Next, you can do a CURL REST call simulating a WS client. You need to replace the wstoken with the teacher one, submissionid with one of the submissions done by the students and the URL of your moodle instance curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'submissionid=8&wsfunction=mod_workshop_get_submission_assessments&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Now check that you receive the information of the submission assessments (you will see just one assessment). Now, replace the wstoken with the student1 and execute the curl request, do the same using the student2 wstoken In both cases you will get a nopermissions error (you can't see the assessments until the workshop is closed/finished) As teacher, finish/close the workshop (you will have to grade the assessments, etc...) And now, if you replace the wstoken with the one from the user who did the submission (the submission passed in the submissionid parameter) you should be able to view the assessments because the workshop is finished. Note that the reviewerid field will be set to 0 because students by default can't see the name of the reviewers
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59246-master

      Description

      To retrieve all the assessments done in the submission

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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