-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.5
-
MOODLE_403_STABLE
Currently if a grade item has an error in calculation formula we show incorrect results to a user.
Steps to reproduce:
- Add quiz1 and quiz2 (using quiz just as example)
- Add id numbers for those grade items q1 and q2
- Add calculation formula for course total to be smth like [[q1]]+[[q2]]
- Add grades to a student for both items (like 1 and 3)
- Total shows 4 (being 1+3)
- Delete quiz2 and run cron
- Go to grader report
- Total shows Error as expected since formula is broken
- Reload the page
- Total shows Error as expected since formula is broken
- Go to quiz1
- Error is shown Error in the calculation of grade item {$a} which is expected since Total is broken
- Reload the page
- Error is gone somehow
- Go to grader report
- No error is shown and Total shows 4 (it stored in database) which is wrong
Creating this issue to start some work to make it better. There are many steps that need to be taken into consideration and potentially can be done in separate issues. So some points to agree, investigate or to address:
- Do we want to show errors to students? We currently don't - we are showing wrong grade which is even worse. Perhaps we should show 0 when there is error? For example this logic seems to follow that path https://github.com/moodle/moodle/blob/main/mod/quiz/view.php#L138 if by whatever reason it couldn't get grade here https://github.com/moodle/moodle/blob/main/lib/gradelib.php#L538
- Does it affects completions? I.e. can the old 'wrong' grades mark completion incorrectly passed
- If we decide to treat the affected grades as error grades - how do we export those. How do we create a course back up with those. How do we import those? I guess no change - the old 'wrong value' is stored in db. And error can be handled after restore since gradeitem needsupdate=1
- We a need a mechanism to notify a teacher when he deletes a course module. So we need to know if a module to be deleted is used in any calculation formula and if yes have a warning
- To above - what do we do with a webservices for module deletion. Do we need to proceed with deletion and return a warning that deleted module was used?
- Discovered while testing
-
MDL-51360 Full course grade recalculation can have huge impact on opening/closing quizzes
- Closed