mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
forgot useMemo usage for AssetPickerSheet
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -195,6 +195,15 @@ const DEFAULT_HANDLERS = {
|
||||
*/
|
||||
async function evaluateEntity({ entityType, entityId, userId, courseId = null, transaction = null }) {
|
||||
const t = transaction;
|
||||
|
||||
// Units always complete by passing their own quiz — overrides whatever
|
||||
// completion_requirement type (if any) is configured on the unit. A unit
|
||||
// with no quiz attached never completes (isUnitQuizPassed returns false).
|
||||
if (entityType === 'unit') {
|
||||
const completed = await isUnitQuizPassed({ unitId: entityId, userId, t });
|
||||
return { status: completed ? 'completed' : 'in_progress', evaluated_via: 'quiz_required', satisfied: [] };
|
||||
}
|
||||
|
||||
const rows = await CompletionRequirement.findAll({
|
||||
where: { entity_type: entityType, entity_id: entityId },
|
||||
order: [['order', 'ASC']],
|
||||
|
||||
Reference in New Issue
Block a user