-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.1.8, 4.3.3
-
MOODLE_401_STABLE, MOODLE_403_STABLE
If an aspect is removed from the assessment form after students have begun assessing submissions, an error is encounter when calculating the workshop grades.
Exception - Attempt to assign property "variance" on null |
Debug info:
|
Error code: generalexceptionmessage
|
Stack trace:
|
line 176 of /mod/workshop/eval/best/lib.php: Error thrown |
line 97 of /mod/workshop/eval/best/lib.php: call to workshop_best_evaluation->process_assessments() |
line 53 of /mod/workshop/aggregate.php: call to workshop_best_evaluation->update_grading_grades() |
As outlined in the steps below, a scenario where this could occur is that when using the Atto HTML editor. A space is recognized as a valid description for an aspect, resulting in a seemingly blank aspect. If the aspect is cleared after students have begun assessing submissions then the error occurs. However, the error can also be produced when using TinyMCE if the description of any aspect is cleared after students have begun assessing submissions.
REPLICATION STEPS
1. Go to Preferences > Editor preferences and set your Text editor preference to Atto HMTL editor
2. Enroll four users as students in a course.
3. Create a new workshop activity, default settings should be sufficient.
4. Go to the workshop's Assessment form.
5. Enter a description for Aspect 1, Aspect 2, and Aspect 3.
6. Click the "Blanks for 2 more aspects" button.
7. Type just a space in the description of Aspect 4.
8. Enter a description for Aspect 5 and click "Save and preview".
9. Observe that the assessment form contains 5 aspects, including the seemingly blank Aspect 4.
10. As the teacher, switch the workshop to the submission phase.
11. Login as each of the four students in turn and make a submission to the workshop.
12. As the teacher, do a random allocation of the submissions with 2 reviews per submission.
13. Switch the workshop to the assessment phase.
14. Login as each of the four students in turn and evaluate the two assigned submissions. Enter a grade for each of the aspects, including the "blank" Aspect 4.
15. As teacher return to the workshop assessment form. Toggle on the HTML view on the description of Aspect 4 (the "blank" one). Remove all the HTML. Click the "Save and preview" button.
16. Observe the form now only has 4 aspects. The "blank" aspect has been removed.
17. Switch the workshop to the evaluation phase.
18. Click the "Re-calculate grades" button.
OBSERVED BEHAVIOR:
Receive an error stating, "Exception - Attempt to assign property "variance" on null".
EXPECTED BEHAVIOR:
When editing the assessment form it is not permitted to clear the description of an aspect that has already been used to evaluate a submission. Additionally, during initial creation of the assessment form using Atto editor, a description with only white space characters is not accepted.
ADDITIONAL NOTES:
I also tested with TinyMCE editor. When this editor is used, a space is not recognized as being a value so a "blank" aspect is not saved. However, the error can still be produced by clearing the description of an aspect that has already been used to evaluate a submission.
Replicated in 4.3.3, 4.1.8, and 4.1.6.