pub async fn set_hidden(
conn: &mut PgConnection,
user_id: Uuid,
course_id: Uuid,
hidden: bool,
) -> ModelResult<u64>Expand description
Sets whether the given course is hidden from the user’s personal “My courses” list. The course is matched by its language group, so any language version of the course resolves to the same settings row.
Returns the number of settings rows updated. This is 0 when the user has no settings for the course (e.g. they only hold a role in it and never enrolled), in which case the course cannot be hidden.