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

Quiz manual grading includes responses from unenrolled students



    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.2
    • Fix Version/s: None
    • Component/s: Enrolments, Quiz
    • Labels:
    • Affected Branches:


      Then manual grading tool for quizzes does not filter responses and will include responses from users no longer enrolled in the course. If the instructor enters a grade for an unenrolled student, this will create new grades records in the gradebook.

      If the student later needs to be re-enrolled in the course, Moodle will be unable to recovery the student's previous grades because the recovery process checks for any existing grades for the user and if any are found aborts the grade recovery process.

      1. Create a new course.
      2. Enroll three users as students and one user as a teacher.
      3. Create an assignment.
      4. Create a quiz with a multiple choice question and an essay question.
      5. Login as each of the three students in turn and complete the assignment and quiz.
      6. Login as the teacher and grade Student1's submission to the assignment.
      7. Go to the Grader report and confirm that Student1's grade is seen in the gradebook.
      8. If you have backend access, run this query, entering the id of the course, to see all the grades in the gradebook.

          select gi.itemtype, IFNULL(gc2.fullname, gc.fullname) as category, IFNULL(gc.fullname, gi.itemname) as item_name, gi.itemmodule,
          u.firstname, u.lastname, gg.rawgrade, gg.finalgrade, gg.aggregationstatus from mdl_grade_items gi
          left join mdl_grade_categories gc on gc.id = gi.iteminstance AND gi.itemtype = 'category'
          left join mdl_grade_categories gc2 on gc2.id = gi.categoryid
          left join mdl_grade_grades gg on gg.itemid = gi.id
          left join mdl_user u on u.id = gg.userid
          where gi.courseid = <enter courseid>
          order by category, gi.sortorder, u.lastname

      9. Unenroll Student1 from the course.
      10. Run the query again to confirm that Student1's grades are no longer in the gradebook.
      11. Open the quiz and go to Quiz administration >Results > Manual grading.
      12. Note that the page still indicates there are 3 responses to grade even though only two student remain enrolled in the course.
      13. Click the "grade all" link.

      Three responses are provided for grading, including the response from Student1 who is no longer enrolled.

      Only the two responses from the remaining enrolled student are presented for grading.

      14. Enter a grade for all three responses including the response from Student1.
      15. Use the query to observe that a grade has been entered into the gradebook for Student1 even though he is no longer enrolled.
      16. Re-enroll Student1 in the course ensuring that the option "Recover user's old grades if possible" is selected.
      17. Go to the Grader report and observe the Student1's grade for the assignment has not been recovered.

      3.4.3 and 3.5.2

      Assignments do not provide access to submissions from users no longer enrolled in the course.

      From the Quiz administration > Results > Grades page, one can select "all users who have attempted the quiz" from the "Attempts from" drop-down menu to access attempts from un-enrolled users. Entering any grades on such an attempt will enter grades in the gradebook for the unenrolled user which will interfere with recovery of other grades during re-enrollment. However, this workflow at least requires quite a bit of intentional effort to grade a user no longer enrolled. Whereas with the manual grading workflow, an instructor working through a long list of responses may forget to skip over a student no longer enrolled.

      As another variation, the unenrolled student's quiz attempt has already been graded prior to un-enrollment. After the student has been un-enrolled, the instructor returns to manually grade additional attempts. If the instructor where to use the "grade all" link to load all responses, versus just those in the "To grade" column, and grade another student's response, upon saving the unenrolled student's grade would be reentered in the gradebook.

      Aside from potentially wasted effort on evaluating responses from users no longer enrolled in the course, the main impact is on the grade recovery process. Should the user need to be re-enrolled in the course their grades cannot be recovered because of the gradebook grade entered post-unenrollment from the quiz. It is possible to un-enroll the user a second time and then re-enroll the user once again which should restore all previous grades. However that is not a very scalable solution.




            • Assignee:
              brian.winstead Brian Winstead
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: