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

New Web Service mod_workshop_get_assessment_form_definition

    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. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      7. Create a Token in the mobile app service for one of the students and the teacher:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      8. Next, you can do a CURL REST call simulating a WS client with the student.
        • You need to replace the wstoken with the student1 one, assessmentid with the id of the assessment assigned to this user during the allocation (the id from table workshop_assessments where the reviewerid is the student1 id)

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

      9. Now check that you receive in the "fields" var a list of form fields that matches the fields and default values in the assessment form in Moodle web (to view this form: as student1 log in into Moodle and go to assess the student2 submission).
      10. Now, in Moodle web, as student1 complete the assessment of the student2 submission
      11. Execute again the curl request and check that now, in the "current" field you see the values you entered in the previous assessment form.
      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. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for one 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 with the student. You need to replace the wstoken with the student1 one, assessmentid with the id of the assessment assigned to this user during the allocation (the id from table workshop_assessments where the reviewerid is the student1 id) curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assessmentid=3&wsfunction=mod_workshop_get_assessment_form_definition&wstoken=12a2a65aeea2a177055e233f9e303218&moodlewssettingfilter=true' | python -m "json.tool" Now check that you receive in the "fields" var a list of form fields that matches the fields and default values in the assessment form in Moodle web (to view this form: as student1 log in into Moodle and go to assess the student2 submission). Now, in Moodle web, as student1 complete the assessment of the student2 submission Execute again the curl request and check that now, in the "current" field you see the values you entered in the previous assessment form.
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59248-master

      Description

      To retrieve the assessment form definition (data required to be able to display the assessment form)

        Attachments

          Issue Links

            Activity

              People

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

                Dates

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