feat: notify the user if a sequence is hidden because of due date (#636)
Normally, these sequences are skipped. But if the user manually goes to the section, they should be notified why they can't access it. That can easily happen if they bookmarked the page or something. AA-1000
This commit is contained in:
@@ -58,6 +58,7 @@ Factory.define('sequenceMetadata')
|
||||
save_position: true,
|
||||
prev_url: null,
|
||||
is_time_limited: false,
|
||||
is_hidden_after_due: false,
|
||||
show_completion: true,
|
||||
banner_text: null,
|
||||
format: 'Homework',
|
||||
|
||||
@@ -253,6 +253,7 @@ function normalizeSequenceMetadata(sequence) {
|
||||
gatedContent: camelCaseObject(sequence.gated_content),
|
||||
isTimeLimited: sequence.is_time_limited,
|
||||
isProctored: sequence.is_proctored,
|
||||
isHiddenAfterDue: sequence.is_hidden_after_due,
|
||||
// Position comes back from the server 1-indexed. Adjust here.
|
||||
activeUnitIndex: sequence.position ? sequence.position - 1 : 0,
|
||||
saveUnitPosition: sequence.save_position,
|
||||
|
||||
@@ -331,6 +331,7 @@ describe('Courseware Service', () => {
|
||||
item_id: string('block-v1:edX+DemoX+Demo_Course+type@sequential+block@basic_questions'),
|
||||
is_time_limited: boolean(false),
|
||||
is_proctored: boolean(false),
|
||||
is_hidden_after_due: boolean(false),
|
||||
position: null,
|
||||
tag: boolean('sequential'),
|
||||
banner_text: null,
|
||||
@@ -367,6 +368,7 @@ describe('Courseware Service', () => {
|
||||
},
|
||||
isTimeLimited: false,
|
||||
isProctored: false,
|
||||
isHiddenAfterDue: false,
|
||||
activeUnitIndex: 0,
|
||||
saveUnitPosition: false,
|
||||
showCompletion: false,
|
||||
|
||||
Reference in New Issue
Block a user