Skip to main content

copy_course_exercises

Function copy_course_exercises 

Source
async fn copy_course_exercises(
    tx: &mut PgConnection,
    new_course_id: Uuid,
    src_course_id: Uuid,
    target_clg_id: Uuid,
    same_clg: bool,
) -> ModelResult<HashSet<Uuid>>
Expand description

Copies the exercises of the copied pages and returns the copies’ ids.

Exercises take their page’s chapter, since exercises.chapter_id can be stale after a page moved between chapters.