Skip to main content

select_registration_completion

Function select_registration_completion 

Source
pub fn select_registration_completion<C: Borrow<CourseModuleCompletion>>(
    completions: impl IntoIterator<Item = C>,
) -> Option<C>
Expand description

The completion that decides which credit registration flow a student gets for one module: one opted in to register_credits_via_suotar outranks the rest, then the newest wins. While the push path owns a completion, the student must not be sent to the old flow for another.

Pass completions awaiting review too: leaving them out could switch the flow and so reveal the flag. Not select_best_completion, which picks the result shown to the student.