@thanh01.pmt/interactive-quiz-kit 1.0.38 → 1.0.40
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/{ai-ecosystem-DCPvHU4-.d.cts → ai-ecosystem-DqFRlFU3.d.cts} +1 -1
- package/dist/{ai-ecosystem-D6vuLxnS.d.ts → ai-ecosystem-DqVlSO3r.d.ts} +1 -1
- package/dist/ai.d.cts +4 -4
- package/dist/ai.d.ts +4 -4
- package/dist/authoring.cjs +251 -62
- package/dist/authoring.d.cts +3 -3
- package/dist/authoring.d.ts +3 -3
- package/dist/authoring.mjs +251 -62
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +2 -1
- package/dist/player.d.cts +1 -1
- package/dist/player.d.ts +1 -1
- package/dist/{quiz-config-Df_89hFx.d.cts → quiz-config-o4j2dfsu.d.cts} +1 -0
- package/dist/{quiz-config-Df_89hFx.d.ts → quiz-config-o4j2dfsu.d.ts} +1 -0
- package/dist/react-ui.cjs +253 -64
- package/dist/react-ui.d.cts +5 -5
- package/dist/react-ui.d.ts +5 -5
- package/dist/react-ui.mjs +253 -64
- package/dist/{toaster-eWZIxSVc.d.ts → toaster-Cgg3CSob.d.ts} +1 -1
- package/dist/{toaster-D1bLqmd_.d.cts → toaster-JTJ7cUyP.d.cts} +1 -1
- package/package.json +1 -1
package/dist/authoring.mjs
CHANGED
|
@@ -3445,6 +3445,8 @@ var QuizEditorService = class {
|
|
|
3445
3445
|
static createNewQuestionTemplate(type) {
|
|
3446
3446
|
const baseNewQuestion = {
|
|
3447
3447
|
id: generateUniqueId(`new_${type}_`),
|
|
3448
|
+
// NEW: Initialize the code property
|
|
3449
|
+
code: "",
|
|
3448
3450
|
questionType: type,
|
|
3449
3451
|
prompt: "",
|
|
3450
3452
|
points: 10,
|
|
@@ -3510,7 +3512,6 @@ var QuizEditorService = class {
|
|
|
3510
3512
|
testCases: [],
|
|
3511
3513
|
functionSignature: "",
|
|
3512
3514
|
points: 25
|
|
3513
|
-
// Coding questions are worth more by default
|
|
3514
3515
|
};
|
|
3515
3516
|
default:
|
|
3516
3517
|
const _exhaustiveCheck = type;
|
|
@@ -100324,7 +100325,9 @@ var EditQuestionModal = ({
|
|
|
100324
100325
|
questionData,
|
|
100325
100326
|
onSave
|
|
100326
100327
|
}) => {
|
|
100327
|
-
const [editedQuestion, setEditedQuestion] = useState(
|
|
100328
|
+
const [editedQuestion, setEditedQuestion] = useState(
|
|
100329
|
+
null
|
|
100330
|
+
);
|
|
100328
100331
|
useEffect(() => {
|
|
100329
100332
|
if (questionData) {
|
|
100330
100333
|
setEditedQuestion(JSON.parse(JSON.stringify(questionData)));
|
|
@@ -100334,7 +100337,9 @@ var EditQuestionModal = ({
|
|
|
100334
100337
|
return null;
|
|
100335
100338
|
}
|
|
100336
100339
|
const handleBaseFieldChange = (field, value) => {
|
|
100337
|
-
setEditedQuestion(
|
|
100340
|
+
setEditedQuestion(
|
|
100341
|
+
(prev) => prev ? { ...prev, [field]: value } : null
|
|
100342
|
+
);
|
|
100338
100343
|
};
|
|
100339
100344
|
const handleSpecificFieldChange = (updates) => {
|
|
100340
100345
|
setEditedQuestion((prev) => {
|
|
@@ -100357,83 +100362,267 @@ var EditQuestionModal = ({
|
|
|
100357
100362
|
if (!editedQuestion) return /* @__PURE__ */ React96__default.createElement("p", null, "Loading question data...");
|
|
100358
100363
|
switch (editedQuestion.questionType) {
|
|
100359
100364
|
case "true_false":
|
|
100360
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100365
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100366
|
+
TrueFalseQuestionForm,
|
|
100367
|
+
{
|
|
100368
|
+
question: editedQuestion,
|
|
100369
|
+
onFormChange: handleSpecificFieldChange
|
|
100370
|
+
}
|
|
100371
|
+
);
|
|
100361
100372
|
case "multiple_choice":
|
|
100362
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100373
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100374
|
+
MultipleChoiceQuestionForm,
|
|
100375
|
+
{
|
|
100376
|
+
question: editedQuestion,
|
|
100377
|
+
onFormChange: handleSpecificFieldChange
|
|
100378
|
+
}
|
|
100379
|
+
);
|
|
100363
100380
|
case "multiple_response":
|
|
100364
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100381
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100382
|
+
MultipleResponseQuestionForm,
|
|
100383
|
+
{
|
|
100384
|
+
question: editedQuestion,
|
|
100385
|
+
onFormChange: handleSpecificFieldChange
|
|
100386
|
+
}
|
|
100387
|
+
);
|
|
100365
100388
|
case "short_answer":
|
|
100366
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100389
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100390
|
+
ShortAnswerQuestionForm,
|
|
100391
|
+
{
|
|
100392
|
+
question: editedQuestion,
|
|
100393
|
+
onFormChange: handleSpecificFieldChange
|
|
100394
|
+
}
|
|
100395
|
+
);
|
|
100367
100396
|
case "numeric":
|
|
100368
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100397
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100398
|
+
NumericQuestionForm,
|
|
100399
|
+
{
|
|
100400
|
+
question: editedQuestion,
|
|
100401
|
+
onFormChange: handleSpecificFieldChange
|
|
100402
|
+
}
|
|
100403
|
+
);
|
|
100369
100404
|
case "fill_in_the_blanks":
|
|
100370
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100405
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100406
|
+
FillInTheBlanksQuestionForm,
|
|
100407
|
+
{
|
|
100408
|
+
question: editedQuestion,
|
|
100409
|
+
onFormChange: handleSpecificFieldChange
|
|
100410
|
+
}
|
|
100411
|
+
);
|
|
100371
100412
|
case "sequence":
|
|
100372
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100413
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100414
|
+
SequenceQuestionForm,
|
|
100415
|
+
{
|
|
100416
|
+
question: editedQuestion,
|
|
100417
|
+
onFormChange: handleSpecificFieldChange
|
|
100418
|
+
}
|
|
100419
|
+
);
|
|
100373
100420
|
case "matching":
|
|
100374
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100421
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100422
|
+
MatchingQuestionForm,
|
|
100423
|
+
{
|
|
100424
|
+
question: editedQuestion,
|
|
100425
|
+
onFormChange: handleSpecificFieldChange
|
|
100426
|
+
}
|
|
100427
|
+
);
|
|
100375
100428
|
case "drag_and_drop":
|
|
100376
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100429
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100430
|
+
DragAndDropQuestionForm,
|
|
100431
|
+
{
|
|
100432
|
+
question: editedQuestion,
|
|
100433
|
+
onFormChange: handleSpecificFieldChange
|
|
100434
|
+
}
|
|
100435
|
+
);
|
|
100377
100436
|
case "hotspot":
|
|
100378
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100437
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100438
|
+
HotspotQuestionForm,
|
|
100439
|
+
{
|
|
100440
|
+
question: editedQuestion,
|
|
100441
|
+
onFormChange: handleSpecificFieldChange
|
|
100442
|
+
}
|
|
100443
|
+
);
|
|
100379
100444
|
case "blockly_programming":
|
|
100380
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100445
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100446
|
+
BlocklyProgrammingQuestionForm,
|
|
100447
|
+
{
|
|
100448
|
+
question: editedQuestion,
|
|
100449
|
+
onFormChange: handleSpecificFieldChange
|
|
100450
|
+
}
|
|
100451
|
+
);
|
|
100381
100452
|
case "scratch_programming":
|
|
100382
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100453
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100454
|
+
ScratchProgrammingQuestionForm,
|
|
100455
|
+
{
|
|
100456
|
+
question: editedQuestion,
|
|
100457
|
+
onFormChange: handleSpecificFieldChange
|
|
100458
|
+
}
|
|
100459
|
+
);
|
|
100383
100460
|
case "coding":
|
|
100384
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100461
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100462
|
+
CodingQuestionForm,
|
|
100463
|
+
{
|
|
100464
|
+
question: editedQuestion,
|
|
100465
|
+
onFormChange: handleSpecificFieldChange
|
|
100466
|
+
}
|
|
100467
|
+
);
|
|
100385
100468
|
default:
|
|
100386
100469
|
return /* @__PURE__ */ React96__default.createElement("p", { className: "text-destructive" }, "Unsupported question type for editing");
|
|
100387
100470
|
}
|
|
100388
100471
|
};
|
|
100389
|
-
return /* @__PURE__ */ React96__default.createElement(
|
|
100390
|
-
|
|
100391
|
-
} }, /* @__PURE__ */ React96__default.createElement(DialogContent2, { className: "sm:max-w-[600px] md:max-w-[800px] lg:max-w-[1000px] max-h-[90vh]" }, /* @__PURE__ */ React96__default.createElement(DialogHeader, null, /* @__PURE__ */ React96__default.createElement(DialogTitle2, { className: "font-headline text-2xl" }, questionData?.id && !questionData.id.startsWith("new_") && !questionData.id.startsWith("temp_") ? "Edit Question" : "Add New Question"), /* @__PURE__ */ React96__default.createElement(DialogDescription2, null, "Configure the details for this question. Current type: ", /* @__PURE__ */ React96__default.createElement("span", { className: "font-semibold" }, editedQuestion.questionType))), /* @__PURE__ */ React96__default.createElement(ScrollArea2, { className: "max-h-[calc(80vh-150px)] p-1 pr-6" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-6 p-4" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "prompt", className: "font-semibold" }, "Question Prompt"), /* @__PURE__ */ React96__default.createElement(
|
|
100392
|
-
SimpleMarkdownEditor,
|
|
100393
|
-
{
|
|
100394
|
-
value: editedQuestion.prompt,
|
|
100395
|
-
onChange: (htmlContent) => handleBaseFieldChange("prompt", htmlContent)
|
|
100396
|
-
}
|
|
100397
|
-
)), renderSpecificForm(), /* @__PURE__ */ React96__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 pt-4 border-t" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "points" }, "Points"), /* @__PURE__ */ React96__default.createElement(
|
|
100398
|
-
Input,
|
|
100399
|
-
{
|
|
100400
|
-
id: "points",
|
|
100401
|
-
type: "number",
|
|
100402
|
-
value: editedQuestion.points || 0,
|
|
100403
|
-
onChange: (e2) => handleBaseFieldChange("points", parseInt(e2.target.value, 10) || 0),
|
|
100404
|
-
min: "0"
|
|
100405
|
-
}
|
|
100406
|
-
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "difficulty" }, "Difficulty"), /* @__PURE__ */ React96__default.createElement(
|
|
100407
|
-
Select2,
|
|
100472
|
+
return /* @__PURE__ */ React96__default.createElement(
|
|
100473
|
+
Dialog2,
|
|
100408
100474
|
{
|
|
100409
|
-
|
|
100410
|
-
|
|
100411
|
-
|
|
100412
|
-
|
|
100413
|
-
/* @__PURE__ */ React96__default.createElement(SelectContent2, null, /* @__PURE__ */ React96__default.createElement(SelectItem2, { value: "easy" }, "Easy"), /* @__PURE__ */ React96__default.createElement(SelectItem2, { value: "medium" }, "Medium"), /* @__PURE__ */ React96__default.createElement(SelectItem2, { value: "hard" }, "Hard"))
|
|
100414
|
-
))), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "explanation" }, "Explanation (Optional)"), /* @__PURE__ */ React96__default.createElement(
|
|
100415
|
-
SimpleMarkdownEditor,
|
|
100416
|
-
{
|
|
100417
|
-
value: editedQuestion.explanation || "",
|
|
100418
|
-
onChange: (htmlContent) => handleBaseFieldChange("explanation", htmlContent),
|
|
100419
|
-
minHeight: "100px"
|
|
100420
|
-
}
|
|
100421
|
-
)), /* @__PURE__ */ React96__default.createElement("details", { className: "group" }, /* @__PURE__ */ React96__default.createElement("summary", { className: "cursor-pointer font-semibold text-primary hover:underline" }, "Advanced Metadata (Optional)"), /* @__PURE__ */ React96__default.createElement("div", { className: "mt-4 space-y-4 p-4 border rounded-md group-open:animate-accordion-down" }, /* @__PURE__ */ React96__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "learningObjective" }, "Learning Objective"), /* @__PURE__ */ React96__default.createElement(Input, { id: "learningObjective", value: editedQuestion.learningObjective || "", onChange: (e2) => handleBaseFieldChange("learningObjective", e2.target.value) })), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "category" }, "Category"), /* @__PURE__ */ React96__default.createElement(Input, { id: "category", value: editedQuestion.category || "", onChange: (e2) => handleBaseFieldChange("category", e2.target.value) })), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "topic" }, "Topic"), /* @__PURE__ */ React96__default.createElement(Input, { id: "topic", value: editedQuestion.topic || "", onChange: (e2) => handleBaseFieldChange("topic", e2.target.value) })), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "bloomLevel" }, "Bloom's Level"), /* @__PURE__ */ React96__default.createElement(
|
|
100422
|
-
Select2,
|
|
100423
|
-
{
|
|
100424
|
-
value: editedQuestion.bloomLevel || "__none__",
|
|
100425
|
-
onValueChange: (value) => handleBaseFieldChange("bloomLevel", value === "__none__" ? void 0 : value)
|
|
100475
|
+
open: isOpen,
|
|
100476
|
+
onOpenChange: (open2) => {
|
|
100477
|
+
if (!open2) onClose();
|
|
100478
|
+
}
|
|
100426
100479
|
},
|
|
100427
|
-
/* @__PURE__ */ React96__default.createElement(
|
|
100428
|
-
|
|
100429
|
-
|
|
100430
|
-
|
|
100431
|
-
|
|
100432
|
-
|
|
100433
|
-
|
|
100434
|
-
|
|
100435
|
-
|
|
100436
|
-
|
|
100480
|
+
/* @__PURE__ */ React96__default.createElement(DialogContent2, { className: "sm:max-w-[600px] md:max-w-[800px] lg:max-w-[1000px] max-h-[90vh]" }, /* @__PURE__ */ React96__default.createElement(DialogHeader, null, /* @__PURE__ */ React96__default.createElement(DialogTitle2, { className: "font-headline text-2xl" }, questionData?.id && !questionData.id.startsWith("new_") && !questionData.id.startsWith("temp_") ? "Edit Question" : "Add New Question"), /* @__PURE__ */ React96__default.createElement(DialogDescription2, null, "Configure the details for this question. Current type:", " ", /* @__PURE__ */ React96__default.createElement("span", { className: "font-semibold" }, editedQuestion.questionType))), /* @__PURE__ */ React96__default.createElement(ScrollArea2, { className: "max-h-[calc(80vh-150px)] p-1 pr-6" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-6 p-4" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "prompt", className: "font-semibold" }, "Question Prompt"), /* @__PURE__ */ React96__default.createElement(
|
|
100481
|
+
SimpleMarkdownEditor,
|
|
100482
|
+
{
|
|
100483
|
+
value: editedQuestion.prompt,
|
|
100484
|
+
onChange: (htmlContent) => handleBaseFieldChange("prompt", htmlContent)
|
|
100485
|
+
}
|
|
100486
|
+
)), renderSpecificForm(), /* @__PURE__ */ React96__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4 pt-4 border-t" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "points" }, "Points"), /* @__PURE__ */ React96__default.createElement(
|
|
100487
|
+
Input,
|
|
100488
|
+
{
|
|
100489
|
+
id: "points",
|
|
100490
|
+
type: "number",
|
|
100491
|
+
value: editedQuestion.points || 0,
|
|
100492
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100493
|
+
"points",
|
|
100494
|
+
parseInt(e2.target.value, 10) || 0
|
|
100495
|
+
),
|
|
100496
|
+
min: "0"
|
|
100497
|
+
}
|
|
100498
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "difficulty" }, "Difficulty"), /* @__PURE__ */ React96__default.createElement(
|
|
100499
|
+
Select2,
|
|
100500
|
+
{
|
|
100501
|
+
value: editedQuestion.difficulty || "medium",
|
|
100502
|
+
onValueChange: (value) => handleBaseFieldChange(
|
|
100503
|
+
"difficulty",
|
|
100504
|
+
value
|
|
100505
|
+
)
|
|
100506
|
+
},
|
|
100507
|
+
/* @__PURE__ */ React96__default.createElement(SelectTrigger2, null, /* @__PURE__ */ React96__default.createElement(SelectValue2, null)),
|
|
100508
|
+
/* @__PURE__ */ React96__default.createElement(SelectContent2, null, /* @__PURE__ */ React96__default.createElement(SelectItem2, { value: "easy" }, "Easy"), /* @__PURE__ */ React96__default.createElement(SelectItem2, { value: "medium" }, "Medium"), /* @__PURE__ */ React96__default.createElement(SelectItem2, { value: "hard" }, "Hard"))
|
|
100509
|
+
))), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "explanation" }, "Explanation (Optional)"), /* @__PURE__ */ React96__default.createElement(
|
|
100510
|
+
SimpleMarkdownEditor,
|
|
100511
|
+
{
|
|
100512
|
+
value: editedQuestion.explanation || "",
|
|
100513
|
+
onChange: (htmlContent) => handleBaseFieldChange(
|
|
100514
|
+
"explanation",
|
|
100515
|
+
htmlContent
|
|
100516
|
+
),
|
|
100517
|
+
minHeight: "100px"
|
|
100518
|
+
}
|
|
100519
|
+
)), /* @__PURE__ */ React96__default.createElement("details", { className: "group" }, /* @__PURE__ */ React96__default.createElement("summary", { className: "cursor-pointer font-semibold text-primary hover:underline" }, "Advanced Metadata (Optional)"), /* @__PURE__ */ React96__default.createElement("div", { className: "mt-4 space-y-4 p-4 border rounded-md group-open:animate-accordion-down" }, /* @__PURE__ */ React96__default.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4" }, /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "questionCode" }, "Question Code (Business ID)"), /* @__PURE__ */ React96__default.createElement(
|
|
100520
|
+
Input,
|
|
100521
|
+
{
|
|
100522
|
+
id: "questionCode",
|
|
100523
|
+
value: editedQuestion.code || "",
|
|
100524
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100525
|
+
"code",
|
|
100526
|
+
e2.target.value.toUpperCase()
|
|
100527
|
+
),
|
|
100528
|
+
placeholder: "e.g., MATH-ALG-001"
|
|
100529
|
+
}
|
|
100530
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "learningObjective" }, "Learning Objective"), /* @__PURE__ */ React96__default.createElement(
|
|
100531
|
+
Input,
|
|
100532
|
+
{
|
|
100533
|
+
id: "learningObjective",
|
|
100534
|
+
value: editedQuestion.learningObjective || "",
|
|
100535
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100536
|
+
"learningObjective",
|
|
100537
|
+
e2.target.value
|
|
100538
|
+
)
|
|
100539
|
+
}
|
|
100540
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "category" }, "Category"), /* @__PURE__ */ React96__default.createElement(
|
|
100541
|
+
Input,
|
|
100542
|
+
{
|
|
100543
|
+
id: "category",
|
|
100544
|
+
value: editedQuestion.category || "",
|
|
100545
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100546
|
+
"category",
|
|
100547
|
+
e2.target.value
|
|
100548
|
+
)
|
|
100549
|
+
}
|
|
100550
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "topic" }, "Topic"), /* @__PURE__ */ React96__default.createElement(
|
|
100551
|
+
Input,
|
|
100552
|
+
{
|
|
100553
|
+
id: "topic",
|
|
100554
|
+
value: editedQuestion.topic || "",
|
|
100555
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100556
|
+
"topic",
|
|
100557
|
+
e2.target.value
|
|
100558
|
+
)
|
|
100559
|
+
}
|
|
100560
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "bloomLevel" }, "Bloom's Level"), /* @__PURE__ */ React96__default.createElement(
|
|
100561
|
+
Select2,
|
|
100562
|
+
{
|
|
100563
|
+
value: editedQuestion.bloomLevel || "__none__",
|
|
100564
|
+
onValueChange: (value) => handleBaseFieldChange(
|
|
100565
|
+
"bloomLevel",
|
|
100566
|
+
value === "__none__" ? void 0 : value
|
|
100567
|
+
)
|
|
100568
|
+
},
|
|
100569
|
+
/* @__PURE__ */ React96__default.createElement(SelectTrigger2, { id: "bloomLevel" }, /* @__PURE__ */ React96__default.createElement(SelectValue2, { placeholder: "Select Bloom Level..." })),
|
|
100570
|
+
/* @__PURE__ */ React96__default.createElement(SelectContent2, null, bloomLevelOptionsForEdit.map(
|
|
100571
|
+
(opt) => /* @__PURE__ */ React96__default.createElement(
|
|
100572
|
+
SelectItem2,
|
|
100573
|
+
{
|
|
100574
|
+
key: opt.value,
|
|
100575
|
+
value: opt.value
|
|
100576
|
+
},
|
|
100577
|
+
opt.label
|
|
100578
|
+
)
|
|
100579
|
+
))
|
|
100580
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "gradeBand" }, "Grade Band"), /* @__PURE__ */ React96__default.createElement(
|
|
100581
|
+
Input,
|
|
100582
|
+
{
|
|
100583
|
+
id: "gradeBand",
|
|
100584
|
+
value: editedQuestion.gradeBand || "",
|
|
100585
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100586
|
+
"gradeBand",
|
|
100587
|
+
e2.target.value
|
|
100588
|
+
)
|
|
100589
|
+
}
|
|
100590
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "contextCode" }, "Context Code"), /* @__PURE__ */ React96__default.createElement(
|
|
100591
|
+
Input,
|
|
100592
|
+
{
|
|
100593
|
+
id: "contextCode",
|
|
100594
|
+
value: editedQuestion.contextCode || "",
|
|
100595
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100596
|
+
"contextCode",
|
|
100597
|
+
e2.target.value
|
|
100598
|
+
)
|
|
100599
|
+
}
|
|
100600
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "course" }, "Course"), /* @__PURE__ */ React96__default.createElement(
|
|
100601
|
+
Input,
|
|
100602
|
+
{
|
|
100603
|
+
id: "course",
|
|
100604
|
+
value: editedQuestion.course || "",
|
|
100605
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100606
|
+
"course",
|
|
100607
|
+
e2.target.value
|
|
100608
|
+
)
|
|
100609
|
+
}
|
|
100610
|
+
)), /* @__PURE__ */ React96__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React96__default.createElement(Label2, { htmlFor: "glossary" }, "Glossary Terms (comma-separated)"), /* @__PURE__ */ React96__default.createElement(
|
|
100611
|
+
Input,
|
|
100612
|
+
{
|
|
100613
|
+
id: "glossary",
|
|
100614
|
+
value: Array.isArray(
|
|
100615
|
+
editedQuestion.glossary
|
|
100616
|
+
) ? editedQuestion.glossary.join(
|
|
100617
|
+
", "
|
|
100618
|
+
) : "",
|
|
100619
|
+
onChange: (e2) => handleBaseFieldChange(
|
|
100620
|
+
"glossary",
|
|
100621
|
+
e2.target.value.split(",").map((s2) => s2.trim()).filter((s2) => s2)
|
|
100622
|
+
)
|
|
100623
|
+
}
|
|
100624
|
+
))))))), /* @__PURE__ */ React96__default.createElement(DialogFooter, { className: "pt-4 border-t" }, /* @__PURE__ */ React96__default.createElement(DialogClose2, { asChild: true }, /* @__PURE__ */ React96__default.createElement(Button, { type: "button", variant: "outline" }, "Cancel")), /* @__PURE__ */ React96__default.createElement(Button, { type: "button", onClick: handleSaveClick }, /* @__PURE__ */ React96__default.createElement(Save, { className: "mr-2 h-4 w-4" }), " Save Question")))
|
|
100625
|
+
);
|
|
100437
100626
|
};
|
|
100438
100627
|
var APIKeyManagerModal = ({ isOpen, onClose }) => {
|
|
100439
100628
|
const [geminiApiKey, setGeminiApiKey] = useState("");
|
package/dist/index.cjs
CHANGED
|
@@ -1497,6 +1497,8 @@ var QuizEditorService = class {
|
|
|
1497
1497
|
static createNewQuestionTemplate(type) {
|
|
1498
1498
|
const baseNewQuestion = {
|
|
1499
1499
|
id: generateUniqueId(`new_${type}_`),
|
|
1500
|
+
// NEW: Initialize the code property
|
|
1501
|
+
code: "",
|
|
1500
1502
|
questionType: type,
|
|
1501
1503
|
prompt: "",
|
|
1502
1504
|
points: 10,
|
|
@@ -1562,7 +1564,6 @@ var QuizEditorService = class {
|
|
|
1562
1564
|
testCases: [],
|
|
1563
1565
|
functionSignature: "",
|
|
1564
1566
|
points: 25
|
|
1565
|
-
// Coding questions are worth more by default
|
|
1566
1567
|
};
|
|
1567
1568
|
default:
|
|
1568
1569
|
const _exhaustiveCheck = type;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-
|
|
2
|
-
export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-
|
|
3
|
-
import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-
|
|
4
|
-
export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-
|
|
1
|
+
import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-o4j2dfsu.cjs';
|
|
2
|
+
export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-o4j2dfsu.cjs';
|
|
3
|
+
import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-DqFRlFU3.cjs';
|
|
4
|
+
export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DqFRlFU3.cjs';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
interface CodeNamedEntity {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-
|
|
2
|
-
export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-
|
|
3
|
-
import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-
|
|
4
|
-
export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-
|
|
1
|
+
import { g as QuizQuestion, s as QuizConfig, Q as QuestionTypeStrings, q as SCORMSettings } from './quiz-config-o4j2dfsu.js';
|
|
2
|
+
export { B as BaseQuestion, e as BlocklyProgrammingQuestion, C as CodingQuestion, D as DragAndDropQuestion, l as DraggableItem, m as DropZone, F as FillInTheBlanksQuestion, n as HotspotArea, H as HotspotQuestion, M as MarkdownString, k as MatchOptionItem, j as MatchPromptItem, d as MatchingQuestion, a as MultipleChoiceQuestion, b as MultipleResponseQuestion, N as NumericQuestion, h as QuestionOption, r as QuizSettings, R as RichContentString, f as ScratchProgrammingQuestion, i as SequenceItem, c as SequenceQuestion, S as ShortAnswerQuestion, p as SupportedCodingLanguage, o as TestCase, T as TrueFalseQuestion } from './quiz-config-o4j2dfsu.js';
|
|
3
|
+
import { Q as QuizResultType, U as UserAnswerType, I as ImportError, y as Goal, n as PracticeSession, h as QuizReviewContent, p as PracticeSessionSummary, o as PracticeStats, j as AchievementDefinition, i as Achievement, K as KnowledgeCard } from './ai-ecosystem-DqVlSO3r.js';
|
|
4
|
+
export { r as ActivityCalendarData, u as AnalysisReport, A as AnswerDetail, x as ChatContext, C as ChatMessage, v as DashboardCardConfig, D as DashboardCardId, w as DashboardLayout, G as GoalType, t as ImageContextItem, L as LearningAnalysis, e as PerformanceByBloomLevel, b as PerformanceByCategory, d as PerformanceByDifficulty, P as PerformanceByLearningObjective, c as PerformanceByTopic, f as PerformanceMetric, s as PerformanceSummary, k as PracticeDifficulty, m as PracticeSuggestion, l as PracticeSuggestionTopic, q as PracticeTopicSummary, g as QuestionReview, R as RoadmapItem, T as TestCaseResult, a as UserAnswers, W as WeeklyRoadmap } from './ai-ecosystem-DqVlSO3r.js';
|
|
5
5
|
import { ClassValue } from 'clsx';
|
|
6
6
|
|
|
7
7
|
interface CodeNamedEntity {
|
package/dist/index.mjs
CHANGED
|
@@ -1491,6 +1491,8 @@ var QuizEditorService = class {
|
|
|
1491
1491
|
static createNewQuestionTemplate(type) {
|
|
1492
1492
|
const baseNewQuestion = {
|
|
1493
1493
|
id: generateUniqueId(`new_${type}_`),
|
|
1494
|
+
// NEW: Initialize the code property
|
|
1495
|
+
code: "",
|
|
1494
1496
|
questionType: type,
|
|
1495
1497
|
prompt: "",
|
|
1496
1498
|
points: 10,
|
|
@@ -1556,7 +1558,6 @@ var QuizEditorService = class {
|
|
|
1556
1558
|
testCases: [],
|
|
1557
1559
|
functionSignature: "",
|
|
1558
1560
|
points: 25
|
|
1559
|
-
// Coding questions are worth more by default
|
|
1560
1561
|
};
|
|
1561
1562
|
default:
|
|
1562
1563
|
const _exhaustiveCheck = type;
|
package/dist/player.d.cts
CHANGED
package/dist/player.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ type RichContentString = string;
|
|
|
4
4
|
type QuestionTypeStrings = 'multiple_choice' | 'multiple_response' | 'fill_in_the_blanks' | 'drag_and_drop' | 'true_false' | 'short_answer' | 'numeric' | 'sequence' | 'matching' | 'hotspot' | 'blockly_programming' | 'scratch_programming' | 'coding';
|
|
5
5
|
interface BaseQuestion {
|
|
6
6
|
id: string;
|
|
7
|
+
code?: string;
|
|
7
8
|
questionType: QuestionTypeStrings;
|
|
8
9
|
prompt: RichContentString;
|
|
9
10
|
points?: number;
|
|
@@ -4,6 +4,7 @@ type RichContentString = string;
|
|
|
4
4
|
type QuestionTypeStrings = 'multiple_choice' | 'multiple_response' | 'fill_in_the_blanks' | 'drag_and_drop' | 'true_false' | 'short_answer' | 'numeric' | 'sequence' | 'matching' | 'hotspot' | 'blockly_programming' | 'scratch_programming' | 'coding';
|
|
5
5
|
interface BaseQuestion {
|
|
6
6
|
id: string;
|
|
7
|
+
code?: string;
|
|
7
8
|
questionType: QuestionTypeStrings;
|
|
8
9
|
prompt: RichContentString;
|
|
9
10
|
points?: number;
|