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:
Kyle McCormick
2020-07-10 09:05:04 -04:00
committed by GitHub
parent c2f4ba3ad0
commit c0d0895630

View File

@@ -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.`);
}
});