feat: optional xblocks#638
Conversation
2fee526 to
42451ca
Compare
There was a problem hiding this comment.
Nit: we should not mix the snake_case with camelCase.
There was a problem hiding this comment.
Actually, this seems to be a backward-compatible change, so we can revert bumping this version.
There was a problem hiding this comment.
Nit: can we use a more verbose name for this test, like "test_optional_completion_off_by_default"?
There was a problem hiding this comment.
What if the optional_completion is set to False (default), but the parent XBlock has it set to True? In this use case, the field is still active. We should disable this checkbox when ancestor_has_optional_completion returns True, regardless of the xblock_info['optional_completion'] value.
There was a problem hiding this comment.
Regarding this comment about hiding the editor when the completion tracking is not enabled, please see the following parts of code that handle a similar scenario for another editor:
I think we shouldn't move this to a follow-up ticket because this feature is not enabled by default in edx-platform.
There was a problem hiding this comment.
wow i didn't realize it'd be so straight forward. implementing this
There was a problem hiding this comment.
done. I wasn't able to test it manually without hardcoding the value in the base.html. it seems waffle flags are cached somewhere and take quite some time to invalidate the cache.
In case you want to test it and have my same problem you can hard code completion_tracking_enabled to False in cms/templates/base.html line 162.
There was a problem hiding this comment.
| <% var message = gettext('Optional %(xblockType)ss won\'t count towards course or parent completion. Only has an effect if completion module is enabled.') %> | |
| <% var message = gettext('Optional %(xblockType)ss won\'t count towards course or parent completion.') %> |
Once we hide the editor when the completion tracking is not enabled, we can remove this part.
487ae2d to
a2968d0
Compare
There was a problem hiding this comment.
@DanielVZ96, the completion tracking should be enabled for the course instead of the section.
Also, you should be able to use something like console.warn(window. course) to verify that it's applied correctly.
3f0b03c to
f7745fd
Compare
3046507 to
84ad5ee
Compare
d1618cb to
e57c355
Compare
|
Replaced by #823. |
Description
This PR implements separating optional progress from normal progress, and also displaying optional chapters and sequences in the outline.
Supporting information
Testing instructions
Screenshots
Private-ref: https://tasks.opencraft.com/browse/BB-8586