pub async fn unlock_next_chapters_for_user(
conn: &mut PgConnection,
user_id: Uuid,
chapter_id: Uuid,
course_id: Uuid,
) -> ModelResult<Vec<Uuid>>Expand description
Unlocks the next chapter(s) for a user after they complete a chapter. If the completed chapter is the last in a base module (order_number == 0), unlocks the first chapter of all additional modules (order_number != 0). Otherwise, unlocks the next chapter in the same module. Note: If a module has no chapters with exercises, all chapters in that module will be unlocked. This is intentional to allow progression through content-only chapters.