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

Assign quick grading throws an error when another attempt was added

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-48778-master
    • Hide

      Setup:

      1. Create a course and enroll 4 students, "A", "B", "C", and "D"
      2. To make life easier, you will want to open multiple browsers (or private mode windows) so you are logged in as all 4 students and a teacher/admin (called teacher or teacher 1 in these instructions)

      Normal flows

      This first block of steps tests these flows:

      Assign 1
      A - No Submission > reopen > Submission > grade
      B - No Submission > grade > reopen > Submission > grade
      C - Submission > reopen > Submission > grade
      D - Submission > grade > reopen > Submission > grade

      1. As the teacher, make a new assignment, "Assign 1", set "Attempts reopened" to Manually under "Submission settings"
      2. As students C and D, add new submission content
      3. As the teacher, go to the submission grading table and enable quick grading
      4. Give student B a grade of 40 and student D 60 and click "Save all quick grading changes"
      5. Confirm that no errors are reported, and users B and D have the correct grades listed
      6. Select the checkboxes next to all students, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog
      7. As all 4 students add new sumissions
      8. As the teacher, reload the grading table view, and give student A a grade of 31, student B 41, student C 51, D 61 and click "Save all quick grading changes"
      9. Confirm that no errors are reported and all 4 students have the correct grades

      Collision and resumed flows

      This second set of steps test for change collisions (italics indicates the collision producing action test). Each collision we will clear and re-attempt, further exercising the code.

      • You will need a second window open, either as the same admin/teacher or a different one. We will call this teacher 2
      • Make sure when switching between teacher 2 and teacher 1, the grading table does not get reloaded unless specifically stated

      Assign 2
      A - No Submission > grade > grade
      B - No Submission > reopen > grade
      C - Submission > reopen > grade
      D - Submission > grade > grade

      1. As the teacher 1, make a new assignment, "Assign 2", set "Attempts reopened" to Manually under "Submission settings"
      2. As students C and D, add new submission content
      3. As the teacher 1, go to the submission grading table and enable quick grading
      4. As teacher 2, go to the submission grading table and make sure quick grading is enabled
      5. Enter a grade of 30 for student A, then click "Save all quick grading changes"
      6. Confirm that student A shows a grade of 30
      7. As teacher 1, enter a grade of 31 for student A, then click "Save all quick grading changes"
      8. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      9. Confirm that student A has a grade of 30
      10. Enter a grade of 31 for student A, then click "Save all quick grading changes"
      11. Confirm that no errors are reported and that student A has a grade of 31
      12. As teacher 2, reload the grading table
      13. Select the checkbox next to student B, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog
      14. As teacher 1, enter a grade of 40 for student B, then click "Save all quick grading changes"
      15. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      16. Confirm that student B has no grade
      17. Enter a grade of 41 for student B, then click "Save all quick grading changes"
      18. Confirm that no errors are reported and that student B has a grade of 41
      19. As teacher 2, reload the grading table
      20. Select the checkbox next to student C, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog
      21. As teacher 1, enter a grade of 50 for student C, then click "Save all quick grading changes"
      22. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      23. Confirm that student C has no grade
      24. Enter a grade of 51 for student C, then click "Save all quick grading changes"
      25. Confirm that no errors are reported and that student C has a grade of 51
      26. As teacher 2, reload the grading table and enter a grade of 60 for student D, then click "Save all quick grading changes"
      27. Confirm that student D shows a grade of 60
      28. As teacher 1, enter a grade of 61 for student D, then click "Save all quick grading changes"
      29. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      30. Confirm that student D has a grade of 60
      31. Enter a grade of 61 for student D, then click "Save all quick grading changes"
      32. Confirm that no errors are reported and that student A has a grade of 61

      Assign 3
      A - No Submission > grade > reopen > grade
      B - No Submission > grade > grade > grade
      C - Submission > grade > reopen > grade
      D - Submission > grade > grade > grade

      1. As the teacher 1, make a new assignment, "Assign 3", set "Attempts reopened" to Manually under "Submission settings"
      2. As students C and D, add new submission content
      3. As the teacher 1, go to the submission grading table and enable quick grading
      4. Give student A a grade of 30, student B 40, student C 50, student D 60 and click "Save all quick grading changes"
      5. Confirm that no errors are reported and all 4 students have the correct grades
      6. As teacher 2, go to the submission grading table and make sure quick grading is enabled
      7. Select the checkbox next to student A, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog
      8. As teacher 1, enter a grade of 32 for student A, then click "Save all quick grading changes"
      9. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      10. Confirm that student A has no grade
      11. Enter a grade of 32 for student A, then click "Save all quick grading changes"
      12. Confirm that no errors are reported and that student A has a grade of 32
      13. As teacher 2, reload the grading table and enter a grade of 41 for student B, then click "Save all quick grading changes"
      14. Confirm that student B shows a grade of 41
      15. As teacher 1, enter a grade of 42 for student B, then click "Save all quick grading changes"
      16. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      17. Confirm that student B has a grade of 41
      18. Enter a grade of 42 for student B, then click "Save all quick grading changes"
      19. Confirm that no errors are reported and that student A has a grade of 42
      20. As teacher 2, reload the grading table
      21. Select the checkbox next to student C, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog
      22. As teacher 1, enter a grade of 52 for student C, then click "Save all quick grading changes"
      23. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      24. Confirm that student C has no grade
      25. Enter a grade of 52 for student C, then click "Save all quick grading changes"
      26. Confirm that no errors are reported and that student A has a grade of 52
      27. As teacher 2, reload the grading table and enter a grade of 61 for student D, then click "Save all quick grading changes"
      28. Confirm that student D shows a grade of 61
      29. As teacher 1, enter a grade of 62 for student D, then click "Save all quick grading changes"
      30. Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue.
      31. Confirm that student D has a grade of 61
      32. Enter a grade of 62 for student D, then click "Save all quick grading changes"
      33. Confirm that no errors are reported and that student A has a grade of 62
      Show
      Setup: Create a course and enroll 4 students, "A", "B", "C", and "D" To make life easier, you will want to open multiple browsers (or private mode windows) so you are logged in as all 4 students and a teacher/admin (called teacher or teacher 1 in these instructions) Normal flows This first block of steps tests these flows: Assign 1 A - No Submission > reopen > Submission > grade B - No Submission > grade > reopen > Submission > grade C - Submission > reopen > Submission > grade D - Submission > grade > reopen > Submission > grade As the teacher, make a new assignment, "Assign 1", set "Attempts reopened" to Manually under "Submission settings" As students C and D, add new submission content As the teacher, go to the submission grading table and enable quick grading Give student B a grade of 40 and student D 60 and click "Save all quick grading changes" Confirm that no errors are reported, and users B and D have the correct grades listed Select the checkboxes next to all students, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog As all 4 students add new sumissions As the teacher, reload the grading table view, and give student A a grade of 31, student B 41, student C 51, D 61 and click "Save all quick grading changes" Confirm that no errors are reported and all 4 students have the correct grades Collision and resumed flows This second set of steps test for change collisions ( italics indicates the collision producing action test). Each collision we will clear and re-attempt, further exercising the code. You will need a second window open, either as the same admin/teacher or a different one. We will call this teacher 2 Make sure when switching between teacher 2 and teacher 1, the grading table does not get reloaded unless specifically stated Assign 2 A - No Submission > grade > grade B - No Submission > reopen > grade C - Submission > reopen > grade D - Submission > grade > grade As the teacher 1, make a new assignment, "Assign 2", set "Attempts reopened" to Manually under "Submission settings" As students C and D, add new submission content As the teacher 1, go to the submission grading table and enable quick grading As teacher 2, go to the submission grading table and make sure quick grading is enabled Enter a grade of 30 for student A, then click "Save all quick grading changes" Confirm that student A shows a grade of 30 As teacher 1, enter a grade of 31 for student A, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student A has a grade of 30 Enter a grade of 31 for student A, then click "Save all quick grading changes" Confirm that no errors are reported and that student A has a grade of 31 As teacher 2, reload the grading table Select the checkbox next to student B, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog As teacher 1, enter a grade of 40 for student B, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student B has no grade Enter a grade of 41 for student B, then click "Save all quick grading changes" Confirm that no errors are reported and that student B has a grade of 41 As teacher 2, reload the grading table Select the checkbox next to student C, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog As teacher 1, enter a grade of 50 for student C, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student C has no grade Enter a grade of 51 for student C, then click "Save all quick grading changes" Confirm that no errors are reported and that student C has a grade of 51 As teacher 2, reload the grading table and enter a grade of 60 for student D, then click "Save all quick grading changes" Confirm that student D shows a grade of 60 As teacher 1, enter a grade of 61 for student D, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student D has a grade of 60 Enter a grade of 61 for student D, then click "Save all quick grading changes" Confirm that no errors are reported and that student A has a grade of 61 Assign 3 A - No Submission > grade > reopen > grade B - No Submission > grade > grade > grade C - Submission > grade > reopen > grade D - Submission > grade > grade > grade As the teacher 1, make a new assignment, "Assign 3", set "Attempts reopened" to Manually under "Submission settings" As students C and D, add new submission content As the teacher 1, go to the submission grading table and enable quick grading Give student A a grade of 30, student B 40, student C 50, student D 60 and click "Save all quick grading changes" Confirm that no errors are reported and all 4 students have the correct grades As teacher 2, go to the submission grading table and make sure quick grading is enabled Select the checkbox next to student A, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog As teacher 1, enter a grade of 32 for student A, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student A has no grade Enter a grade of 32 for student A, then click "Save all quick grading changes" Confirm that no errors are reported and that student A has a grade of 32 As teacher 2, reload the grading table and enter a grade of 41 for student B, then click "Save all quick grading changes" Confirm that student B shows a grade of 41 As teacher 1, enter a grade of 42 for student B, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student B has a grade of 41 Enter a grade of 42 for student B, then click "Save all quick grading changes" Confirm that no errors are reported and that student A has a grade of 42 As teacher 2, reload the grading table Select the checkbox next to student C, and from the menu "With selected..." select "Allow another attempt", then click go, and confirm the popup dialog As teacher 1, enter a grade of 52 for student C, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student C has no grade Enter a grade of 52 for student C, then click "Save all quick grading changes" Confirm that no errors are reported and that student A has a grade of 52 As teacher 2, reload the grading table and enter a grade of 61 for student D, then click "Save all quick grading changes" Confirm that student D shows a grade of 61 As teacher 1, enter a grade of 62 for student D, then click "Save all quick grading changes" Confirm that you see a (user friendly) error that grades could not be saved because a change happened. Click Continue. Confirm that student D has a grade of 61 Enter a grade of 62 for student D, then click "Save all quick grading changes" Confirm that no errors are reported and that student A has a grade of 62
    • 3.1 Sprint 4
    • Medium

      Whenever you allow another attempt for a submission, it is impossible to save quick grades due to the following error message: "The grades were not saved because someone has modified one or more records more recently than when you loaded the page."

      Steps to reproduce:
      1. Create a new assign with some amount of allowed attempts.
      2. Submit as a student.
      3. Make sure Quick grading is turned on.
      4. Grade the assignment (say, Fx in Bologna Scale or whatever) so the student is aware that he got a half-passing grade.
      5. Allow another attempt so the student can improve his/her grade
      6. Ensure that 'Save all quick grading changes' throws the error mentioned above no matter which one will be graded.

      Problem:
      Line 5298 of assign/locallib.php. $modified->lastmodified gets nullified once you allow a new attempt, therefore an error is thrown.

                      if ((int)$current->lastmodified > (int)$modified->lastmodified) {
                          // Error - record has been modified since viewing the page.
                          return get_string('errorrecordmodified', 'assign');
                      } else {
                          $modifiedusers[$modified->userid] = $modified;
                      }
      

            lameze Simey Lameze
            pavel.m.sokolov Pavel Sokolov
            Simey Lameze Simey Lameze
            Dan Poltawski Dan Poltawski
            cameron1729 cameron1729
            Votes:
            21 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved:

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