Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module model answer RevealRule is not taken into account in CachedContent #1243

Open
lainets opened this issue Sep 1, 2023 · 0 comments
Open
Labels
effort: days Estimated to take less than one week, from the creation of a new branch to the merging experience: moderate required knowledge estimate requires: priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority)

Comments

@lainets
Copy link
Contributor

lainets commented Sep 1, 2023

The RevealRule is checked and saved in CachedPoints, which is used on course pages to check if the model chapter should be accessible. However, CachedContent does not check the RevealRule, meaning that the chapter could possibly be accessed somewhere using CachedContent without knowing that it shouldn't be accessible.

Investigating whether this truly is an issue (and fix it if there is one) would technically be enough, but it would be preferable (and easier) to implement is_revealed into the CachedContent such that it is false for all chapters that are model answers to a module. This should making such a mistake in the future less likely. After the cache changes, it would be easy to add a @property that checks if the model_answer_modules list is empty.

Highly related to #1242, as this could be done as part of that refactoring.

@lainets lainets added effort: days Estimated to take less than one week, from the creation of a new branch to the merging experience: moderate required knowledge estimate requires: priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority) labels Sep 1, 2023
@PasiSa PasiSa moved this to Todo in A+ sprints Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: days Estimated to take less than one week, from the creation of a new branch to the merging experience: moderate required knowledge estimate requires: priority Currently using this label to flag issues that need EDIT decision ASAP (even if there was priority)
Projects
Status: Todo
Development

No branches or pull requests

1 participant