Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect deadline in ModuleRevealState when it has no exercises
When ModuleRevealState has no exercises (that is, the corresponding course module contains no exercises), then it must return the module's deadline instead of `None` in the methods `get_deadline()` and `get_latest_deadline()`. `None` value prevents deadline-triggered reveal rules from working, that is, the chapter model solution for the course module would never be revealed when the deadline trigger is used. In addition, this commit slightly optimizes ModuleRevealState. In `get_latest_deadline()`, all exercises belong to the same course module, thus their common deadlines are identical (the module's deadline).
- Loading branch information