Modules can be configured a chapter as model answer. The chapters visibility is controlled through a RevealRule.
Why?
Chapters may include prujus to previous modules, especially in O1.
How?
Adds model answer and reveal rule fields to CourseModule. A Chapter can check (by reversing the relation) if it is a model solution to a module. Any LearningObject can check if it is a child of this kind of Chapter. Adds a key 'is_revealed' to every LearningObject entry in cache. Updates exercise permission class to check LearningObject's visibility. Adds new reveal state that takes all module's exercises into account.
Fixes #1098
Testing
Remember to add or update unit tests for new features and changes.
Made chapter 2.0 module 1's model answer. Added deadline deviation to module 1 for student so that module 1 and 2 are open simultaneously. Made sure chapter 2.0 is not visible to student, not through toc, results or direct link.
Did you test the changes in
[x] Chrome
[x] Firefox
[ ] This pull request cannot be tested in the browser.
Think of what is affected by these changes and could become broken
Description
What?
Modules can be configured a chapter as model answer. The chapters visibility is controlled through a RevealRule.
Why?
Chapters may include prujus to previous modules, especially in O1.
How?
Adds model answer and reveal rule fields to CourseModule. A Chapter can check (by reversing the relation) if it is a model solution to a module. Any LearningObject can check if it is a child of this kind of Chapter. Adds a key 'is_revealed' to every LearningObject entry in cache. Updates exercise permission class to check LearningObject's visibility. Adds new reveal state that takes all module's exercises into account.
Fixes #1098
Testing
Remember to add or update unit tests for new features and changes.
What type of test did you run?
Made chapter 2.0 module 1's model answer. Added deadline deviation to module 1 for student so that module 1 and 2 are open simultaneously. Made sure chapter 2.0 is not visible to student, not through toc, results or direct link.
Did you test the changes in
Think of what is affected by these changes and could become broken
Translation
Programming style
Have you updated the README or other relevant documentation?
Is it Done?
Clean up your git commit history before submitting the pull request!