Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.8.1
-
MOODLE_28_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-48778-master -
Hide
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
ShowSetup: 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
Description
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; |
}
|
Attachments
Issue Links
- Discovered while testing
-
MDL-53024 Multiple attempts on group submission throws an error
-
- Closed
-
- has a non-specific relationship to
-
MDL-47172 Display 'You have assignments that need attention' when more relevant to students and teachers.
-
- Closed
-
- is a regression caused by
-
MDL-46171 Denormalize the assign_submission and assign_grade tables (a little)
-
- Closed
-