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

WS mod_workshop_evaluate_assessment does not validate the weight and grading grade

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.4
    • 3.3.2
    • Workshop
    • MOODLE_33_STABLE
    • MOODLE_34_STABLE
    • MDL-60348-master
    • Hide
      1. Create a course with a workshop with Grading strategy set to comments
      2. Enrol a couple users as student (student2 and student1) and one user as teacher
      3. Edit the workshop assessment form creating only two evaluable comments
      4. As teacher, move the workshop to the submission phase (doing all the required configuration steps indicated by the activity)
      5. As the two students, do a submission (total of 2 submissions, one per sstudent).
      6. As teacher, move the workshop to the assessment phase, allocating the assessment of the submissions: student2 will assess student1 and vice versa.
      7. As student2 do the assessment of the student1 and vice versa
      8. Now, as teacher, switch to the Grading evaluation phase
      9. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      10. Create a Token in the mobile app service for the teacher:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      11. Next, you can do a CURL REST call simulating a WS client.
        • You need to replace the wstoken with the teacher one, one of the students assessments id

          curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assessmentid=5&wsfunction=mod_workshop_evaluate_assessment&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true&feedbacktext=thetext&feedbackformat=1&weight=2&gradinggradeover=10' | python -m "json.tool"

      12. Check that the result of the curl request includes a status field set to true
      13. As teacher go to the web interface and check that the assessment was correctly evaluated (column graded received for the student in the workshop grades report). You should see there that the feedback is "thetext" and the override grade is 10 and new weight is 2
      14. Now, execute the same curl request but setting the parameter weight to 17 and the parameter gradinggradeover to 100
      15. In this case you will receive two warnings indicating that weight and gradinggradeover can't be higher than the maximum weight and assessment grade
      Show
      Create a course with a workshop with Grading strategy set to comments Enrol a couple users as student (student2 and student1) and one user as teacher Edit the workshop assessment form creating only two evaluable comments 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 student2 do the assessment of the student1 and vice versa Now, as teacher, switch to the Grading evaluation phase Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for 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, one of the students assessments id curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'assessmentid=5&wsfunction=mod_workshop_evaluate_assessment&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true&feedbacktext=thetext&feedbackformat=1&weight=2&gradinggradeover=10' | python -m "json.tool" Check that the result of the curl request includes a status field set to true As teacher go to the web interface and check that the assessment was correctly evaluated (column graded received for the student in the workshop grades report). You should see there that the feedback is "thetext" and the override grade is 10 and new weight is 2 Now, execute the same curl request but setting the parameter weight to 17 and the parameter gradinggradeover to 100 In this case you will receive two warnings indicating that weight and gradinggradeover can't be higher than the maximum weight and assessment grade

      Similar issue that the found in MDL-60144

            jleyva Juan Leyva
            jleyva Juan Leyva
            Pau Ferrer Pau Ferrer
            David Monllaó David Monllaó
            Mark Nelson Mark Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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