Do not assume HTML blocks are units (#105)
After further conversation, we decide that
we shouldn't just treat HTML blocks as units.
We've been making the assumption that Verticals
occupy the Unit-level, and we shouldn't break that
assumption for this specific case.
Reverts part of e04f588d1f.
However, the error handling changes remain.
This commit is contained in:
@@ -34,7 +34,6 @@ export function normalizeBlocks(courseId, blocks) {
|
||||
unitIds: block.children || [],
|
||||
};
|
||||
break;
|
||||
case 'html':
|
||||
case 'vertical':
|
||||
models.units[block.id] = {
|
||||
graded: block.graded,
|
||||
@@ -44,7 +43,7 @@ export function normalizeBlocks(courseId, blocks) {
|
||||
};
|
||||
break;
|
||||
default:
|
||||
logError(`Unexpected course block type: ${block.type} with ID ${block.id}. Expected block types are course, chapter, sequential, vertical, and html.`);
|
||||
logError(`Unexpected course block type: ${block.type} with ID ${block.id}. Expected block types are course, chapter, sequential, and vertical.`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user