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

WS mod_workshop_evaluate_assessment does not validate the weight and grading grade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4
    • Component/s: Workshop
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60348-master

      Description

      Similar issue that the found in MDL-60144

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jleyva Juan Leyva
                Reporter:
                jleyva Juan Leyva
                Peer reviewer:
                Pau Ferrer
                Integrator:
                David Monllaó
                Tester:
                Mark Nelson
                Participants:
                Component watchers:
                Amaia Anabitarte, David Mudrák (@mudrd8mz), Sara Arjona (@sarjona)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

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