TNL-7299 - Hide sequences that are time limited (special exams) (#241)
If a sequence has its isTimeLimited flag set, then show a spinner instead of the sequence content. The CoursewareContainer, meanwhile, will be attempting to redirect to the legacy experience. This prevents a situation where we temporarily show proctored/special exam content to users before their exam starts.
This commit is contained in:
@@ -113,6 +113,20 @@ function Sequence({
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
TODO: When the micro-frontend supports viewing special exams without redirecting to the legacy
|
||||
experience, we can remove this whole conditional. For now, though, we show the spinner here
|
||||
because we expect CoursewareContainer to be performing a redirect to the legacy experience while
|
||||
we're waiting. That redirect may take a few seconds, so we show the spinner in the meantime.
|
||||
*/
|
||||
if (sequenceStatus === 'loaded' && sequence.isTimeLimited) {
|
||||
return (
|
||||
<PageLoading
|
||||
srMessage={intl.formatMessage(messages['learn.loading.learning.sequence'])}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const gated = sequence && sequence.gatedContent !== undefined && sequence.gatedContent.gated;
|
||||
const goToCourseExitPage = () => {
|
||||
history.push(`/course/${courseId}/course-exit`);
|
||||
|
||||
Reference in New Issue
Block a user