bugfix/#5632 Grade sync fires on every course-page view instead of only on gradebook open - #49
Open
sabgre wants to merge 1 commit into
Conversation
…ss page Grade sync used to run unconditionally on every course page view (ilObjMumieTaskListGUI rendered it for every task in a repository listing) and always synced every course/group member's grade, even when only a single student opened their own learning progress page. - Sync now only runs when a learning progress page is actually opened, and scopes to the single viewing user unless the viewer has read_learning_progress (then all course/group members are synced). - Drop the "very hacky" per-listing-item sync in ilObjMumieTaskListGUI. - getValidAndNewXapiGradesForUser() now returns null instead of an undefined array offset when there's no new xAPI grade for that user since the last sync, and updateGradeForUser() skips the update in that case. Without this, a user revisiting their own learning progress page without a new MUMIE submission had their existing grade silently overwritten with a false "failed, 0%" entry. - Fix deleteLPForTask() comparing usr_id against the task id instead of the actual user id when deleting a single user's marks. - getAllMemberIds() now walks the repository tree to the nearest enclosing Course/Group instead of only checking the direct parent ref, and falls back to users with existing LP data instead of every platform user for tasks outside a Course/Group context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, grade sync ran on every course page view (ilObjMumieTaskListGUI triggered it per task in repository listings) and always synced all course/group members, even for a single student viewing their own progress.