Skip to content

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
devfrom
bugfix/#5632-grade-sync-fires-on-every-course-page-view-instead-of-only-on-gradebook-open
Open

bugfix/#5632 Grade sync fires on every course-page view instead of only on gradebook open#49
sabgre wants to merge 1 commit into
devfrom
bugfix/#5632-grade-sync-fires-on-every-course-page-view-instead-of-only-on-gradebook-open

Conversation

@sabgre

@sabgre sabgre commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

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.

  • Sync now only fires when a learning progress page is opened, scoped to the viewing user unless they have read_learning_progress (then all members sync).
  • Removed the hacky per-listing-item sync in ilObjMumieTaskListGUI.
  • getValidAndNewXapiGradesForUser() returns null (not an undefined offset) when there's no new grade; updateGradeForUser() now skips the update instead of overwriting existing grades with a false "failed, 0%".
  • Fixed deleteLPForTask() comparing usr_id against the task ID instead of the user ID.
  • getAllMemberIds() now walks up to the nearest Course/Group and falls back to users with existing LP data instead of all platform users.

…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.
@sabgre
sabgre requested a review from AlexanderW-IL July 30, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant