Per-user chapter progress for a course. When user_ids is Some, only those users are included;
when None, every user with progress in the course is returned.
The chapters a student starts chapter locking with: the base module’s chapters up to and
including the first one with exercises. Errors with NotFound if the course has no base
module.
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.
Writes every field of the snapshot to the chapter, creating it with the snapshot’s id if it does
not exist and bringing it back if it is deleted. Does not touch the chapter’s pages.