AA-278 & AA-279: Add offer and course expired alerts to outline (#164)

* AA-278: Add offer alert to outline

It was previously only used in the courseware. But to match the
LMS, we also want to show it on the outline tab.

* AA-279: Add course expired alert to outline

It was previously only used in the courseware. But to match the
LMS, we also want to show it on the outline tab.
This commit is contained in:
Michael Terry
2020-08-06 09:49:37 -04:00
committed by GitHub
parent 4667535c0c
commit 9e0f192ae7
11 changed files with 63 additions and 41 deletions

View File

@@ -69,18 +69,22 @@ export async function getOutlineTabData(courseId) {
data,
} = tabData;
const courseBlocks = normalizeBlocks(courseId, data.course_blocks.blocks);
const courseExpiredHtml = data.course_expired_html;
const courseTools = camelCaseObject(data.course_tools);
const datesWidget = camelCaseObject(data.dates_widget);
const enrollAlert = camelCaseObject(data.enroll_alert);
const handoutsHtml = data.handouts_html;
const offerHtml = data.offer_html;
const welcomeMessageHtml = data.welcome_message_html;
return {
courseTools,
courseBlocks,
courseExpiredHtml,
courseTools,
datesWidget,
enrollAlert,
handoutsHtml,
offerHtml,
welcomeMessageHtml,
};
}