Conditionally display gated content in courseware
Display gated sections in course outline, navigation and in the course when user has met prerequiste condition. WL-1273, WL-1317
This commit is contained in:
@@ -56,10 +56,14 @@ def get_blocks(
|
||||
requested_fields = []
|
||||
include_completion = 'completion' in requested_fields
|
||||
include_special_exams = 'special_exam_info' in requested_fields
|
||||
include_gated_sections = 'show_gated_sections' in requested_fields
|
||||
|
||||
if user is not None:
|
||||
transformers += COURSE_BLOCK_ACCESS_TRANSFORMERS
|
||||
transformers += [MilestonesAndSpecialExamsTransformer(include_special_exams), HiddenContentTransformer()]
|
||||
transformers += [MilestonesAndSpecialExamsTransformer(
|
||||
include_special_exams=include_special_exams,
|
||||
include_gated_sections=include_gated_sections)]
|
||||
transformers += [HiddenContentTransformer()]
|
||||
transformers += [
|
||||
BlocksAPITransformer(
|
||||
block_counts,
|
||||
|
||||
Reference in New Issue
Block a user