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

prepare_submission_for_external is not returning the grading or feedback for submissions

    XMLWordPrintable

    Details

    • 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 student).
      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. Access to one student submission via the Workshop main page and from there evaluate the submission via the "Feedback for the author" form, you should add feedback there and override the grade.
      10. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      11. Create a Token in the mobile app service for the teacher and the two students:
        • Click on Site administration ► Plugins ► Web services ► Manage tokens
      12. Next, you can do a CURL REST call simulating a WS client.
        • You need to replace the wstoken with the teacher one, and the evaluated submission id

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

      13. Check that you receive in the JSON response the grade, feedbackauthor, timegraded, gradeover and the gradeoverby fieds.
      14. Now via the web interface switch to the assessment phase, execute again the curl request, and check that you don't receive those fields
      15. Now, as teacher again, switch to the Grading evaluation phase
      16. Execute the same curl request but using as wstoken the token of the user who did the submission
      17. Check that you don't receive the grade, feedbackauthor, timegraded, gradeover and the gradeoverby fieds in the response.
      18. Now, as teacher again, switch to the Closed phase
      19. Execute the latest curl request and check that now you receive the feedbackauthor and the gradeoverby but not the grade, gradeover and timegraded fields
      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 student). 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 Access to one student submission via the Workshop main page and from there evaluate the submission via the "Feedback for the author" form, you should add feedback there and override the grade. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Create a Token in the mobile app service for the teacher and the two students: 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, and the evaluated submission id curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'submissionid=7&wsfunction=mod_workshop_get_submission&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e&moodlewssettingfilter=true' | python -m "json.tool" Check that you receive in the JSON response the grade, feedbackauthor, timegraded, gradeover and the gradeoverby fieds. Now via the web interface switch to the assessment phase, execute again the curl request, and check that you don't receive those fields Now, as teacher again, switch to the Grading evaluation phase Execute the same curl request but using as wstoken the token of the user who did the submission Check that you don't receive the grade, feedbackauthor, timegraded, gradeover and the gradeoverby fieds in the response. Now, as teacher again, switch to the Closed phase Execute the latest curl request and check that now you receive the feedbackauthor and the gradeoverby but not the grade, gradeover and timegraded fields
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60708-master

      Description

      Right now the feedback for submission authors is only returned for teachers when the workshop is closed.
      This information can be retrieved in the Web interface in the assessment and evaluation phase too, so we need to fix this WS helper function to be consistent.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jan/18