icoa-cli 2.16.7 → 2.16.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/exam.js +10 -7
- package/package.json +1 -1
package/dist/commands/exam.js
CHANGED
|
@@ -638,14 +638,17 @@ export function registerExamCommand(program) {
|
|
|
638
638
|
}
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
|
-
|
|
642
|
-
if (
|
|
643
|
-
|
|
641
|
+
// Demo: submit directly. Real exam: show warning first.
|
|
642
|
+
if (state.session.examId !== 'demo-free') {
|
|
643
|
+
console.log();
|
|
644
|
+
console.log(chalk.yellow(` Submitting ${answered}/${total} answers.`));
|
|
645
|
+
if (unanswered > 0) {
|
|
646
|
+
console.log(chalk.yellow(` ${unanswered} unanswered.`));
|
|
647
|
+
}
|
|
648
|
+
console.log(chalk.gray(' You cannot change answers after this.'));
|
|
649
|
+
console.log(chalk.gray(' Type "back" now to cancel, or wait...'));
|
|
650
|
+
await sleep(2000);
|
|
644
651
|
}
|
|
645
|
-
msg += ' You cannot change answers after this.';
|
|
646
|
-
const proceed = await confirm({ message: chalk.white(msg), default: false, theme: { prefix: '', style: { message: (t) => t, defaultAnswer: (t) => chalk.green(t) } } });
|
|
647
|
-
if (!proceed)
|
|
648
|
-
return;
|
|
649
652
|
console.log();
|
|
650
653
|
// Demo exam: grade locally
|
|
651
654
|
if (state.session.examId === 'demo-free') {
|