fix(exercise): persist completion policy and improve dev build workflow (#754)
* fix(exercise): persist completion policy and pass threshold on save buildExerciseUpdateFields accepted completionPolicy and passThreshold in the validation schema but never mapped them to the database update, so exercise settings appeared to save while reverting on refresh. Co-authored-by: Rotimi Best <[email protected]> * fix(db): build workspace deps before compiling @cio/db imports @cio/utils/notifications, which only exists after @cio/utils is built. Building db in isolation failed when utils dist was missing or stale. - Add a db prebuild step for question-types, utils, and email - Clean dist and tsbuildinfo before utils and email builds so incremental tsc cannot skip emission after dist was removed Co-authored-by: Rotimi Best <[email protected]> * chore(dev): build api workspace deps before api:dev Run turbo build for @cio/api and @cio/jobs-worker dependencies before starting the dev servers, so missing dist/ folders do not break startup. Co-authored-by: Rotimi Best <[email protected]> * feat(course): improve exercise progression grading UX --------- Co-authored-by: Rotimi Best <[email protected]>
This commit is contained in:
co-authored by
Rotimi Best
parent
fdc19aac41
commit
bfafc685e0
@@ -71,7 +71,7 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc && tsc-alias",
|
||||
"build": "rimraf dist tsconfig.tsbuildinfo && tsc && tsc-alias",
|
||||
"dev": "tsc --watch",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
|
||||
@@ -46,6 +46,10 @@ const QUESTION_VALIDATION_RULES: Record<number, Array<(question: QuestionRuleInp
|
||||
return null;
|
||||
},
|
||||
(question) => {
|
||||
if (typeof question.settings?.correctValue === 'boolean') {
|
||||
return null;
|
||||
}
|
||||
|
||||
const options = question.options || [];
|
||||
if (options.length > 0 && !options.some((opt) => opt.isCorrect === true)) {
|
||||
return 'Please mark an option as the correct answer';
|
||||
|
||||
Reference in New Issue
Block a user