@thanh01.pmt/interactive-quiz-kit 1.0.64 → 1.0.66
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.cjs +2 -1
- package/dist/ai.d.cts +45 -0
- package/dist/ai.d.ts +45 -0
- package/dist/ai.mjs +2 -1
- package/dist/authoring.cjs +102 -188
- package/dist/authoring.d.cts +1 -1
- package/dist/authoring.d.ts +1 -1
- package/dist/authoring.mjs +102 -188
- package/dist/react-ui.cjs +102 -190
- package/dist/react-ui.d.cts +1 -1
- package/dist/react-ui.d.ts +1 -1
- package/dist/react-ui.mjs +102 -190
- package/dist/{toaster-FX787Evl.d.cts → toaster-CKS4zoRY.d.cts} +7 -2
- package/dist/{toaster-BTfAUpDp.d.ts → toaster-DLJ_2W9u.d.ts} +7 -2
- package/package.json +1 -1
package/dist/authoring.mjs
CHANGED
|
@@ -6580,7 +6580,8 @@ var QuizContextSchema = z.object({
|
|
|
6580
6580
|
originalSubject: z.string().optional(),
|
|
6581
6581
|
originalCategory: z.string().optional(),
|
|
6582
6582
|
originalTopic: z.string().optional(),
|
|
6583
|
-
loDescription: z.string().optional().describe("The full description of the learning objective for deep context.")
|
|
6583
|
+
loDescription: z.string().optional().describe("The full description of the learning objective for deep context."),
|
|
6584
|
+
gradeBand: z.string().optional()
|
|
6584
6585
|
});
|
|
6585
6586
|
var BaseQuestionGenerationClientInputSchema = z.object({
|
|
6586
6587
|
language: z.string().optional().default("English"),
|
|
@@ -72960,189 +72961,122 @@ var supportedQuestionTypesForAI = [
|
|
|
72960
72961
|
{ value: "sequence", label: "Sequence" },
|
|
72961
72962
|
{ value: "matching", label: "Matching" }
|
|
72962
72963
|
];
|
|
72963
|
-
var contextOptions = [
|
|
72964
|
-
{ shortContextId: "A", contextId: "THEO_ABS", contextDescription: "L\xFD thuy\u1EBFt/Tr\u1EEBu t\u01B0\u1EE3ng", contextExample: '"Ph\xE1t bi\u1EC3u \u0111\u1ECBnh lu\u1EADt III Newton." ho\u1EB7c "Gi\u1EA3i th\xEDch kh\xE1i ni\u1EC7m \u0111\u1EA1o h\xE0m."', keywords: "l\xFD thuy\u1EBFt, tr\u1EEBu t\u01B0\u1EE3ng, \u0111\u1ECBnh ngh\u0129a, kh\xE1i ni\u1EC7m, nguy\xEAn l\xFD, c\xF4ng th\u1EE9c, \u0111\u1ECBnh lu\u1EADt" },
|
|
72965
|
-
{ shortContextId: "B", contextId: "SPEC_CASE", contextDescription: "V\xED d\u1EE5 C\u1EE5 th\u1EC3/Tr\u01B0\u1EDDng h\u1EE3p Ri\xEAng", contextExample: '"T\xEDnh l\u1EF1c t\xE1c d\u1EE5ng l\xEAn v\u1EADt n\u1EB7ng 2kg r\u01A1i t\u1EF1 do." ho\u1EB7c "Cho h\xE0m s\u1ED1 y = x^2, t\xECm \u0111\u1EA1o h\xE0m t\u1EA1i x = 3."', keywords: "v\xED d\u1EE5, c\u1EE5 th\u1EC3, tr\u01B0\u1EDDng h\u1EE3p ri\xEAng, \xE1p d\u1EE5ng, t\xEDnh to\xE1n, minh h\u1ECDa, s\u1ED1 li\u1EC7u c\u1EE5 th\u1EC3" },
|
|
72966
|
-
{ shortContextId: "C", contextId: "NAT_OBS", contextDescription: "Hi\u1EC7n t\u01B0\u1EE3ng T\u1EF1 nhi\xEAn/Quan s\xE1t", contextExample: '"Gi\u1EA3i th\xEDch t\u1EA1i sao c\u1EA7u v\u1ED3ng xu\u1EA5t hi\u1EC7n sau c\u01A1n m\u01B0a." ho\u1EB7c "M\xF4 t\u1EA3 qu\xE1 tr\xECnh quang h\u1EE3p \u1EDF l\xE1 c\xE2y."', keywords: "hi\u1EC7n t\u01B0\u1EE3ng, t\u1EF1 nhi\xEAn, quan s\xE1t, gi\u1EA3i th\xEDch, m\xF4 t\u1EA3, th\u1EBF gi\u1EDBi th\u1EF1c, sinh h\u1ECDc, v\u1EADt l\xFD" },
|
|
72967
|
-
{ shortContextId: "D", contextId: "TECH_ENG", contextDescription: "\u1EE8ng d\u1EE5ng C\xF4ng ngh\u1EC7/K\u1EF9 thu\u1EADt", contextExample: '"Nguy\xEAn l\xFD ho\u1EA1t \u0111\u1ED9ng c\u1EE7a \u0111\u1ED9ng c\u01A1 \u0111\u1ED1t trong l\xE0 g\xEC?" ho\u1EB7c "Pin m\u1EB7t tr\u1EDDi chuy\u1EC3n \u0111\u1ED5i n\u0103ng l\u01B0\u1EE3ng \xE1nh s\xE1ng th\xE0nh \u0111i\u1EC7n n\u0103ng nh\u01B0 th\u1EBF n\xE0o?"', keywords: "\u1EE9ng d\u1EE5ng, c\xF4ng ngh\u1EC7, k\u1EF9 thu\u1EADt, thi\u1EBFt b\u1ECB, m\xE1y m\xF3c, ho\u1EA1t \u0111\u1ED9ng, nguy\xEAn l\xFD, ch\u1EBF t\u1EA1o" },
|
|
72968
|
-
{ shortContextId: "E", contextId: "EXP_INV", contextDescription: "Th\xED nghi\u1EC7m/\u0110i\u1EC1u tra Khoa h\u1ECDc", contextExample: '"Thi\u1EBFt k\u1EBF th\xED nghi\u1EC7m ch\u1EE9ng minh \u0111\u1ECBnh lu\u1EADt b\u1EA3o to\xE0n n\u0103ng l\u01B0\u1EE3ng." ho\u1EB7c "Ph\xE2n t\xEDch k\u1EBFt qu\u1EA3 th\xED nghi\u1EC7m v\u1EC1 t\u1ED1c \u0111\u1ED9 ph\u1EA3n \u1EE9ng."', keywords: "th\xED nghi\u1EC7m, \u0111i\u1EC1u tra, khoa h\u1ECDc, thi\u1EBFt k\u1EBF, quy tr\xECnh, k\u1EBFt qu\u1EA3, ph\xE2n t\xEDch, d\u1EEF li\u1EC7u" },
|
|
72969
|
-
{ shortContextId: "F", contextId: "REAL_PROB", contextDescription: "V\u1EA5n \u0111\u1EC1 Th\u1EF1c t\u1EBF/X\xE3 h\u1ED9i/M\xF4i tr\u01B0\u1EDDng", contextExample: '"\u0110\u1EC1 xu\u1EA5t gi\u1EA3i ph\xE1p gi\u1EA3m thi\u1EC3u \xF4 nhi\u1EC5m kh\xF4ng kh\xED t\u1EA1i \u0111\xF4 th\u1ECB." ho\u1EB7c "Ph\xE2n t\xEDch \u1EA3nh h\u01B0\u1EDFng c\u1EE7a bi\u1EBFn \u0111\u1ED5i kh\xED h\u1EADu \u0111\u1EBFn n\xF4ng nghi\u1EC7p."', keywords: "v\u1EA5n \u0111\u1EC1, th\u1EF1c t\u1EBF, x\xE3 h\u1ED9i, m\xF4i tr\u01B0\u1EDDng, gi\u1EA3i ph\xE1p, ph\xE2n t\xEDch, \u1EA3nh h\u01B0\u1EDFng, b\u1EC1n v\u1EEFng" },
|
|
72970
|
-
{ shortContextId: "G", contextId: "DATA_MOD", contextDescription: "Di\u1EC5n gi\u1EA3i D\u1EEF li\u1EC7u/M\xF4 h\xECnh h\xF3a", contextExample: '"D\u1EF1a v\xE0o bi\u1EC3u \u0111\u1ED3, nh\u1EADn x\xE9t xu h\u01B0\u1EDBng nhi\u1EC7t \u0111\u1ED9 to\xE0n c\u1EA7u." ho\u1EB7c "X\xE2y d\u1EF1ng m\xF4 h\xECnh to\xE1n h\u1ECDc m\xF4 t\u1EA3 s\u1EF1 t\u0103ng tr\u01B0\u1EDFng d\xE2n s\u1ED1."', keywords: "d\u1EEF li\u1EC7u, bi\u1EC3u \u0111\u1ED3, b\u1EA3ng s\u1ED1 li\u1EC7u, m\xF4 h\xECnh, di\u1EC5n gi\u1EA3i, ph\xE2n t\xEDch, xu h\u01B0\u1EDBng, d\u1EF1 \u0111o\xE1n" },
|
|
72971
|
-
{ shortContextId: "H", contextId: "HIST_SCI", contextDescription: "L\u1ECBch s\u1EED/Ph\xE1t tri\u1EC3n Khoa h\u1ECDc", contextExample: '"Tr\xECnh b\xE0y b\u1ED1i c\u1EA3nh ra \u0111\u1EDDi thuy\u1EBFt t\u01B0\u01A1ng \u0111\u1ED1i c\u1EE7a Einstein." ho\u1EB7c "Ai l\xE0 ng\u01B0\u1EDDi \u0111\u1EA7u ti\xEAn ph\xE1t hi\u1EC7n ra c\u1EA5u tr\xFAc DNA?"', keywords: "l\u1ECBch s\u1EED, ph\xE1t tri\u1EC3n, khoa h\u1ECDc, nh\xE0 khoa h\u1ECDc, ph\xE1t minh, kh\xE1m ph\xE1, b\u1ED1i c\u1EA3nh" },
|
|
72972
|
-
{ shortContextId: "I", contextId: "INTERDISC", contextDescription: "Li\xEAn ng\xE0nh (Interdisciplinary)", contextExample: '"S\u1EED d\u1EE5ng ki\u1EBFn th\u1EE9c To\xE1n v\xE0 V\u1EADt l\xFD \u0111\u1EC3 t\xEDnh qu\u1EF9 \u0111\u1EA1o c\u1EE7a v\u1EADt n\xE9m xi\xEAn." ho\u1EB7c "Ph\xE2n t\xEDch c\u01A1 ch\u1EBF h\xF3a sinh c\u1EE7a qu\xE1 tr\xECnh ti\xEAu h\xF3a."', keywords: "li\xEAn ng\xE0nh, t\xEDch h\u1EE3p, To\xE1n-L\xFD, Sinh-H\xF3a, Khoa h\u1ECDc-C\xF4ng ngh\u1EC7, k\u1EBFt n\u1ED1i ki\u1EBFn th\u1EE9c" },
|
|
72973
|
-
{ shortContextId: "J", contextId: "HYPO_COMP", contextDescription: "Gi\u1EA3 \u0111\u1ECBnh/So s\xE1nh T\xECnh hu\u1ED1ng", contextExample: '"N\u1EBFu Tr\xE1i \u0110\u1EA5t kh\xF4ng c\xF3 t\u1EEB tr\u01B0\u1EDDng th\xEC \u0111i\u1EC1u g\xEC s\u1EBD x\u1EA3y ra?" ho\u1EB7c "So s\xE1nh \u01B0u nh\u01B0\u1EE3c \u0111i\u1EC3m c\u1EE7a n\u0103ng l\u01B0\u1EE3ng h\u1EA1t nh\xE2n v\xE0 n\u0103ng l\u01B0\u1EE3ng m\u1EB7t tr\u1EDDi."', keywords: "gi\u1EA3 \u0111\u1ECBnh, so s\xE1nh, t\xECnh hu\u1ED1ng, n\u1EBFu...th\xEC, \u01B0u \u0111i\u1EC3m, nh\u01B0\u1EE3c \u0111i\u1EC3m, ph\xE2n t\xEDch, \u0111\xE1nh gi\xE1" },
|
|
72974
|
-
{ shortContextId: "__custom__", contextId: "__custom__", contextDescription: "Other (Custom Input)", contextExample: "", keywords: "custom, other, specific" }
|
|
72975
|
-
];
|
|
72976
|
-
var bloomLevelOptions = [
|
|
72977
|
-
{ value: "remembering", label: "Nh\u1EDB - D\u1EC5 (Remembering)" },
|
|
72978
|
-
{ value: "understanding", label: "Hi\u1EC3u - Trung B\xECnh (Understanding)" },
|
|
72979
|
-
{ value: "applying", label: "V\u1EADn D\u1EE5ng - Kh\xF3 (Applying)" }
|
|
72980
|
-
];
|
|
72981
|
-
var calculateCombinedDifficulty2 = (contextId, bloomLevel, qType, customContextInput) => {
|
|
72982
|
-
let contextScore = 1;
|
|
72983
|
-
const selectedContext = contextOptions.find((c2) => c2.contextId === contextId);
|
|
72984
|
-
if (selectedContext) {
|
|
72985
|
-
if (["THEO_ABS", "HIST_SCI", "__none__"].includes(selectedContext.contextId) || selectedContext.contextId === "__custom__" && !customContextInput.trim()) {
|
|
72986
|
-
contextScore = 1;
|
|
72987
|
-
} else if (["SPEC_CASE", "NAT_OBS", "DATA_MOD", "INTERDISC", "HYPO_COMP"].includes(selectedContext.contextId) || selectedContext.contextId === "__custom__" && customContextInput.trim()) {
|
|
72988
|
-
contextScore = 2;
|
|
72989
|
-
} else if (["TECH_ENG", "EXP_INV", "REAL_PROB"].includes(selectedContext.contextId)) {
|
|
72990
|
-
contextScore = 3;
|
|
72991
|
-
}
|
|
72992
|
-
} else if (contextId === "__custom__" && customContextInput.trim()) {
|
|
72993
|
-
contextScore = 2;
|
|
72994
|
-
}
|
|
72995
|
-
let bloomScore = 1;
|
|
72996
|
-
if (bloomLevel === "understanding") bloomScore = 2;
|
|
72997
|
-
else if (bloomLevel === "applying") bloomScore = 3;
|
|
72998
|
-
let questionTypeScore = 1;
|
|
72999
|
-
switch (qType) {
|
|
73000
|
-
case "true_false":
|
|
73001
|
-
case "multiple_choice":
|
|
73002
|
-
case "short_answer":
|
|
73003
|
-
questionTypeScore = 1;
|
|
73004
|
-
break;
|
|
73005
|
-
case "matching":
|
|
73006
|
-
case "fill_in_the_blanks":
|
|
73007
|
-
case "numeric":
|
|
73008
|
-
questionTypeScore = 2;
|
|
73009
|
-
break;
|
|
73010
|
-
case "sequence":
|
|
73011
|
-
case "multiple_response":
|
|
73012
|
-
questionTypeScore = 3;
|
|
73013
|
-
break;
|
|
73014
|
-
default:
|
|
73015
|
-
questionTypeScore = 1;
|
|
73016
|
-
}
|
|
73017
|
-
const totalScore = bloomScore + contextScore + questionTypeScore;
|
|
73018
|
-
if (totalScore <= 4) return "easy";
|
|
73019
|
-
if (totalScore <= 6) return "medium";
|
|
73020
|
-
return "hard";
|
|
73021
|
-
};
|
|
73022
72964
|
var AIQuestionGeneratorModal = ({
|
|
73023
72965
|
isOpen,
|
|
73024
72966
|
onClose,
|
|
73025
72967
|
onQuestionGenerated,
|
|
73026
|
-
language: language3
|
|
73027
|
-
|
|
72968
|
+
language: language3,
|
|
72969
|
+
questionType: questionTypeProp,
|
|
72970
|
+
subjects = [],
|
|
72971
|
+
topics = [],
|
|
72972
|
+
gradeLevels = [],
|
|
72973
|
+
bloomLevels = []
|
|
73028
72974
|
}) => {
|
|
73029
|
-
const [
|
|
73030
|
-
const [selectedContextId, setSelectedContextId] = useState("__none__");
|
|
73031
|
-
const [customContextInput, setCustomContextInput] = useState("");
|
|
73032
|
-
const [questionType, setQuestionType] = useState("multiple_choice");
|
|
73033
|
-
const [selectedBloomLevel, setSelectedBloomLevel] = useState("remembering");
|
|
72975
|
+
const [prompt, setPrompt] = useState("");
|
|
73034
72976
|
const [isLoading, setIsLoading] = useState(false);
|
|
73035
72977
|
const [error, setError] = useState(null);
|
|
73036
|
-
const [computedDifficultyForDisplay, setComputedDifficultyForDisplay] = useState(null);
|
|
73037
72978
|
const { toast: toast2 } = useToast();
|
|
72979
|
+
const [subjectCode, setSubjectCode] = useState("");
|
|
72980
|
+
const [topicCode, setTopicCode] = useState("");
|
|
72981
|
+
const [gradeBand, setGradeBand] = useState("");
|
|
72982
|
+
const [bloomLevelCode, setBloomLevelCode] = useState("");
|
|
72983
|
+
const [selectedQuestionType, setSelectedQuestionType] = useState("multiple_choice");
|
|
73038
72984
|
const [numberOfOptions, setNumberOfOptions] = useState(4);
|
|
73039
|
-
const [minCorrectAnswers, setMinCorrectAnswers] = useState(
|
|
73040
|
-
const [maxCorrectAnswers, setMaxCorrectAnswers] = useState(
|
|
72985
|
+
const [minCorrectAnswers, setMinCorrectAnswers] = useState(2);
|
|
72986
|
+
const [maxCorrectAnswers, setMaxCorrectAnswers] = useState(3);
|
|
73041
72987
|
const [isCaseSensitive, setIsCaseSensitive] = useState(false);
|
|
73042
72988
|
const [numberOfBlanks, setNumberOfBlanks] = useState(2);
|
|
73043
72989
|
const [numberOfSequenceItems, setNumberOfSequenceItems] = useState(4);
|
|
73044
72990
|
const [numberOfMatchingPairs, setNumberOfMatchingPairs] = useState(4);
|
|
73045
72991
|
const [isApiKeyManagerModalOpen, setIsApiKeyManagerModalOpen] = useState(false);
|
|
73046
72992
|
const [geminiApiKeyExists, setGeminiApiKeyExists] = useState(false);
|
|
72993
|
+
const finalQuestionType = questionTypeProp || selectedQuestionType;
|
|
73047
72994
|
useEffect(() => {
|
|
73048
72995
|
if (isOpen) {
|
|
73049
|
-
|
|
73050
|
-
setSelectedContextId("__none__");
|
|
73051
|
-
setCustomContextInput("");
|
|
73052
|
-
setQuestionType("multiple_choice");
|
|
73053
|
-
setSelectedBloomLevel("remembering");
|
|
72996
|
+
setPrompt("");
|
|
73054
72997
|
setError(null);
|
|
73055
72998
|
setIsLoading(false);
|
|
73056
|
-
|
|
73057
|
-
|
|
73058
|
-
|
|
73059
|
-
|
|
73060
|
-
|
|
73061
|
-
setNumberOfSequenceItems(4);
|
|
73062
|
-
setNumberOfMatchingPairs(4);
|
|
73063
|
-
setGeminiApiKeyExists(APIKeyService.hasAPIKey(GEMINI_API_KEY_SERVICE_NAME));
|
|
73064
|
-
}
|
|
73065
|
-
}, [isOpen]);
|
|
73066
|
-
useEffect(() => {
|
|
73067
|
-
if (isOpen) {
|
|
73068
|
-
const difficulty = calculateCombinedDifficulty2(selectedContextId, selectedBloomLevel, questionType, customContextInput);
|
|
73069
|
-
setComputedDifficultyForDisplay(difficulty);
|
|
72999
|
+
setSubjectCode("");
|
|
73000
|
+
setTopicCode("");
|
|
73001
|
+
setGradeBand("");
|
|
73002
|
+
setBloomLevelCode("");
|
|
73003
|
+
setSelectedQuestionType(questionTypeProp || "multiple_choice");
|
|
73070
73004
|
setGeminiApiKeyExists(APIKeyService.hasAPIKey(GEMINI_API_KEY_SERVICE_NAME));
|
|
73071
73005
|
}
|
|
73072
|
-
}, [
|
|
73006
|
+
}, [isOpen, questionTypeProp]);
|
|
73007
|
+
const filteredTopics = useMemo(() => {
|
|
73008
|
+
if (!subjectCode) return [];
|
|
73009
|
+
return topics.filter((t2) => t2.subjectCode === subjectCode);
|
|
73010
|
+
}, [subjectCode, topics]);
|
|
73073
73011
|
const handleApiKeyModalClose = () => {
|
|
73074
73012
|
setIsApiKeyManagerModalOpen(false);
|
|
73075
73013
|
setGeminiApiKeyExists(APIKeyService.hasAPIKey(GEMINI_API_KEY_SERVICE_NAME));
|
|
73076
73014
|
};
|
|
73077
73015
|
const handleSubmit = async () => {
|
|
73078
|
-
if (!
|
|
73079
|
-
setError("Please provide a
|
|
73016
|
+
if (!prompt.trim()) {
|
|
73017
|
+
setError("Please provide a prompt for the question.");
|
|
73080
73018
|
return;
|
|
73081
73019
|
}
|
|
73082
73020
|
const geminiKey = APIKeyService.getAPIKey(GEMINI_API_KEY_SERVICE_NAME);
|
|
73083
73021
|
if (!geminiKey) {
|
|
73084
|
-
setError("Gemini API Key is not set. Please
|
|
73022
|
+
setError("Gemini API Key is not set. Please configure it.");
|
|
73085
73023
|
setGeminiApiKeyExists(false);
|
|
73086
73024
|
return;
|
|
73087
73025
|
}
|
|
73088
73026
|
setGeminiApiKeyExists(true);
|
|
73089
73027
|
setError(null);
|
|
73090
73028
|
setIsLoading(true);
|
|
73091
|
-
let contextDescriptionForAI = void 0;
|
|
73092
|
-
if (selectedContextId === "__custom__") {
|
|
73093
|
-
contextDescriptionForAI = customContextInput.trim() || void 0;
|
|
73094
|
-
} else if (selectedContextId && selectedContextId !== "__none__") {
|
|
73095
|
-
const selectedContextObj = contextOptions.find((c2) => c2.contextId === selectedContextId);
|
|
73096
|
-
contextDescriptionForAI = selectedContextObj?.contextDescription;
|
|
73097
|
-
}
|
|
73098
|
-
const finalDifficultyForAI = calculateCombinedDifficulty2(selectedContextId, selectedBloomLevel, questionType, customContextInput);
|
|
73099
73029
|
try {
|
|
73100
|
-
|
|
73030
|
+
const quizContext = {
|
|
73031
|
+
plannedTopic: prompt,
|
|
73032
|
+
originalSubject: subjectCode,
|
|
73033
|
+
originalTopic: topicCode,
|
|
73034
|
+
gradeBand,
|
|
73035
|
+
plannedBloomLevel: bloomLevelCode
|
|
73036
|
+
};
|
|
73101
73037
|
const baseClientInput = {
|
|
73102
|
-
topic,
|
|
73103
73038
|
language: language3,
|
|
73104
|
-
|
|
73105
|
-
|
|
73106
|
-
contextDescription: contextDescriptionForAI,
|
|
73107
|
-
selectedContextId: selectedContextId !== "__none__" && selectedContextId !== "__custom__" ? selectedContextId : selectedContextId === "__custom__" && customContextInput.trim() ? "__custom__" : void 0
|
|
73039
|
+
difficulty: "medium",
|
|
73040
|
+
quizContext
|
|
73108
73041
|
};
|
|
73109
|
-
|
|
73042
|
+
let generatedResult = {};
|
|
73043
|
+
switch (finalQuestionType) {
|
|
73110
73044
|
case "true_false":
|
|
73111
|
-
|
|
73045
|
+
generatedResult = await generateTrueFalseQuestion(baseClientInput, geminiKey);
|
|
73112
73046
|
break;
|
|
73113
73047
|
case "multiple_choice":
|
|
73114
|
-
|
|
73048
|
+
generatedResult = await generateMCQQuestion({ ...baseClientInput, numberOfOptions }, geminiKey);
|
|
73115
73049
|
break;
|
|
73116
73050
|
case "multiple_response":
|
|
73117
|
-
|
|
73118
|
-
throw new Error("Invalid settings for Multiple Response correct answers count or number of options.");
|
|
73119
|
-
}
|
|
73120
|
-
generatedQuestionData = await generateMRQQuestion({ ...baseClientInput, numberOfOptions, minCorrectAnswers, maxCorrectAnswers }, geminiKey);
|
|
73051
|
+
generatedResult = await generateMRQQuestion({ ...baseClientInput, numberOfOptions, minCorrectAnswers, maxCorrectAnswers }, geminiKey);
|
|
73121
73052
|
break;
|
|
73122
73053
|
case "short_answer":
|
|
73123
|
-
|
|
73054
|
+
generatedResult = await generateShortAnswerQuestion({ ...baseClientInput, isCaseSensitive }, geminiKey);
|
|
73124
73055
|
break;
|
|
73125
73056
|
case "numeric":
|
|
73126
|
-
|
|
73057
|
+
generatedResult = await generateNumericQuestion({ ...baseClientInput, allowDecimals: true, tolerance: 0 }, geminiKey);
|
|
73127
73058
|
break;
|
|
73128
73059
|
case "fill_in_the_blanks":
|
|
73129
|
-
|
|
73060
|
+
generatedResult = await generateFillInTheBlanksQuestion({ ...baseClientInput, numberOfBlanks, isCaseSensitive }, geminiKey);
|
|
73130
73061
|
break;
|
|
73131
73062
|
case "sequence":
|
|
73132
|
-
|
|
73063
|
+
generatedResult = await generateSequenceQuestion({ ...baseClientInput, numberOfItems: numberOfSequenceItems }, geminiKey);
|
|
73133
73064
|
break;
|
|
73134
73065
|
case "matching":
|
|
73135
|
-
|
|
73066
|
+
generatedResult = await generateMatchingQuestion({ ...baseClientInput, numberOfPairs: numberOfMatchingPairs, shuffleOptions: true }, geminiKey);
|
|
73136
73067
|
break;
|
|
73137
73068
|
default:
|
|
73138
|
-
|
|
73139
|
-
|
|
73140
|
-
|
|
73141
|
-
|
|
73142
|
-
|
|
73143
|
-
|
|
73144
|
-
completeQuestion
|
|
73145
|
-
completeQuestion.
|
|
73069
|
+
throw new Error(`AI generation for '${finalQuestionType}' is not implemented in this flow.`);
|
|
73070
|
+
}
|
|
73071
|
+
if (generatedResult.error) {
|
|
73072
|
+
throw new Error(generatedResult.error);
|
|
73073
|
+
}
|
|
73074
|
+
if (generatedResult.question) {
|
|
73075
|
+
const completeQuestion = generatedResult.question;
|
|
73076
|
+
completeQuestion.subject = subjectCode;
|
|
73077
|
+
completeQuestion.topic = topicCode;
|
|
73078
|
+
completeQuestion.gradeBand = gradeBand;
|
|
73079
|
+
completeQuestion.bloomLevel = bloomLevelCode;
|
|
73146
73080
|
if (completeQuestion.points === void 0) completeQuestion.points = 10;
|
|
73147
73081
|
onQuestionGenerated(completeQuestion);
|
|
73148
73082
|
toast2({ title: "AI Question Generated", description: "Review and edit the generated question." });
|
|
@@ -73152,9 +73086,9 @@ var AIQuestionGeneratorModal = ({
|
|
|
73152
73086
|
}
|
|
73153
73087
|
} catch (e2) {
|
|
73154
73088
|
console.error("AI Question Generation Error:", e2);
|
|
73155
|
-
let errorMessage = e2.message || "An unknown error occurred
|
|
73156
|
-
if (typeof errorMessage === "string" &&
|
|
73157
|
-
errorMessage = "The provided Google Gemini API Key is invalid
|
|
73089
|
+
let errorMessage = e2.message || "An unknown error occurred.";
|
|
73090
|
+
if (typeof errorMessage === "string" && errorMessage.includes("API key not valid")) {
|
|
73091
|
+
errorMessage = "The provided Google Gemini API Key is invalid. Please check it.";
|
|
73158
73092
|
setGeminiApiKeyExists(false);
|
|
73159
73093
|
}
|
|
73160
73094
|
setError(errorMessage);
|
|
@@ -73163,11 +73097,17 @@ var AIQuestionGeneratorModal = ({
|
|
|
73163
73097
|
setIsLoading(false);
|
|
73164
73098
|
}
|
|
73165
73099
|
};
|
|
73100
|
+
const comboboxOptions = {
|
|
73101
|
+
subjects: subjects.map((s2) => ({ value: s2.code, label: s2.name })),
|
|
73102
|
+
topics: filteredTopics.map((t2) => ({ value: t2.code, label: t2.name })),
|
|
73103
|
+
gradeLevels: gradeLevels.map((g) => ({ value: g.code, label: g.name })),
|
|
73104
|
+
bloomLevels: bloomLevels.map((b) => ({ value: b.code, label: b.name }))
|
|
73105
|
+
};
|
|
73166
73106
|
const renderSpecificParams = () => {
|
|
73167
|
-
switch (
|
|
73107
|
+
switch (finalQuestionType) {
|
|
73168
73108
|
case "multiple_choice":
|
|
73169
73109
|
case "multiple_response":
|
|
73170
|
-
return /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-options" }, "Number of Options (2-
|
|
73110
|
+
return /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2 pt-4 border-t" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-options" }, "Number of Options (2-8)"), /* @__PURE__ */ React95__default.createElement(
|
|
73171
73111
|
Input,
|
|
73172
73112
|
{
|
|
73173
73113
|
id: "ai-num-options",
|
|
@@ -73175,80 +73115,54 @@ var AIQuestionGeneratorModal = ({
|
|
|
73175
73115
|
value: numberOfOptions,
|
|
73176
73116
|
onChange: (e2) => setNumberOfOptions(parseInt(e2.target.value, 10)),
|
|
73177
73117
|
min: 2,
|
|
73178
|
-
max:
|
|
73118
|
+
max: 8
|
|
73179
73119
|
}
|
|
73180
|
-
),
|
|
73120
|
+
), finalQuestionType === "multiple_response" && /* @__PURE__ */ React95__default.createElement(React95__default.Fragment, null, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-min-correct" }, "Min Correct Answers"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-min-correct", type: "number", value: minCorrectAnswers, onChange: (e2) => setMinCorrectAnswers(parseInt(e2.target.value, 10)), min: 1, max: numberOfOptions }), /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-max-correct" }, "Max Correct Answers"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-max-correct", type: "number", value: maxCorrectAnswers, onChange: (e2) => setMaxCorrectAnswers(parseInt(e2.target.value, 10)), min: minCorrectAnswers, max: numberOfOptions })));
|
|
73181
73121
|
case "short_answer":
|
|
73182
73122
|
case "fill_in_the_blanks":
|
|
73183
|
-
return /* @__PURE__ */ React95__default.createElement("div", { className: "flex items-center space-x-2" }, /* @__PURE__ */ React95__default.createElement("input", { type: "checkbox", id: "ai-case-sensitive", checked: isCaseSensitive, onChange: (e2) => setIsCaseSensitive(e2.target.checked), className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary" }), /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-case-sensitive" }, "Case Sensitive Answers"),
|
|
73123
|
+
return /* @__PURE__ */ React95__default.createElement("div", { className: "flex items-center space-x-2 pt-4 border-t" }, /* @__PURE__ */ React95__default.createElement("input", { type: "checkbox", id: "ai-case-sensitive", checked: isCaseSensitive, onChange: (e2) => setIsCaseSensitive(e2.target.checked), className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary" }), /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-case-sensitive" }, "Case Sensitive Answers"), finalQuestionType === "fill_in_the_blanks" && /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-1 ml-4" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-blanks" }, "Number of Blanks (1-5)"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-num-blanks", type: "number", value: numberOfBlanks, onChange: (e2) => setNumberOfBlanks(parseInt(e2.target.value, 10)), min: 1, max: 5 })));
|
|
73184
73124
|
case "sequence":
|
|
73185
|
-
return /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-seq-items" }, "Number of Items to Sequence (2-10)"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-num-seq-items", type: "number", value: numberOfSequenceItems, onChange: (e2) => setNumberOfSequenceItems(parseInt(e2.target.value, 10)), min: 2, max: 10 }));
|
|
73125
|
+
return /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2 pt-4 border-t" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-seq-items" }, "Number of Items to Sequence (2-10)"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-num-seq-items", type: "number", value: numberOfSequenceItems, onChange: (e2) => setNumberOfSequenceItems(parseInt(e2.target.value, 10)), min: 2, max: 10 }));
|
|
73186
73126
|
case "matching":
|
|
73187
|
-
return /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-match-pairs" }, "Number of Pairs to Match (2-8)"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-num-match-pairs", type: "number", value: numberOfMatchingPairs, onChange: (e2) => setNumberOfMatchingPairs(parseInt(e2.target.value, 10)), min: 2, max: 8 }));
|
|
73127
|
+
return /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2 pt-4 border-t" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-num-match-pairs" }, "Number of Pairs to Match (2-8)"), /* @__PURE__ */ React95__default.createElement(Input, { id: "ai-num-match-pairs", type: "number", value: numberOfMatchingPairs, onChange: (e2) => setNumberOfMatchingPairs(parseInt(e2.target.value, 10)), min: 2, max: 8 }));
|
|
73188
73128
|
default:
|
|
73189
73129
|
return null;
|
|
73190
73130
|
}
|
|
73191
73131
|
};
|
|
73192
73132
|
return /* @__PURE__ */ React95__default.createElement(React95__default.Fragment, null, /* @__PURE__ */ React95__default.createElement(Dialog2, { open: isOpen, onOpenChange: (open) => {
|
|
73193
73133
|
if (!open) onClose();
|
|
73194
|
-
} }, /* @__PURE__ */ React95__default.createElement(DialogContent2, { className: "sm:max-w-[
|
|
73195
|
-
Button,
|
|
73196
|
-
{
|
|
73197
|
-
variant: "link",
|
|
73198
|
-
className: "p-0 h-auto text-xs text-amber-700 hover:text-amber-800 mt-1",
|
|
73199
|
-
onClick: () => {
|
|
73200
|
-
onClose();
|
|
73201
|
-
setIsApiKeyManagerModalOpen(true);
|
|
73202
|
-
}
|
|
73203
|
-
},
|
|
73204
|
-
"Set API Key Now"
|
|
73205
|
-
)))), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-topic" }, "Topic"), /* @__PURE__ */ React95__default.createElement(
|
|
73206
|
-
Textarea,
|
|
73207
|
-
{
|
|
73208
|
-
id: "ai-topic",
|
|
73209
|
-
value: topic,
|
|
73210
|
-
onChange: (e2) => setTopic(e2.target.value),
|
|
73211
|
-
placeholder: "e.g., Photosynthesis, World War II History, Basic Algebra Equations",
|
|
73212
|
-
className: "min-h-[80px]"
|
|
73213
|
-
}
|
|
73214
|
-
)), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-context-select" }, "Context (Optional)"), /* @__PURE__ */ React95__default.createElement(
|
|
73215
|
-
Select2,
|
|
73216
|
-
{
|
|
73217
|
-
value: selectedContextId,
|
|
73218
|
-
onValueChange: (value) => setSelectedContextId(value)
|
|
73219
|
-
},
|
|
73220
|
-
/* @__PURE__ */ React95__default.createElement(SelectTrigger2, { id: "ai-context-select" }, /* @__PURE__ */ React95__default.createElement(SelectValue2, { placeholder: "Select a context or choose 'Other'..." })),
|
|
73221
|
-
/* @__PURE__ */ React95__default.createElement(SelectContent2, null, /* @__PURE__ */ React95__default.createElement(SelectItem2, { value: "__none__" }, "None (General Topic)"), contextOptions.map((opt) => /* @__PURE__ */ React95__default.createElement(SelectItem2, { key: opt.contextId, value: opt.contextId }, opt.contextDescription, " ", opt.shortContextId !== "__custom__" ? `(${opt.shortContextId})` : "")))
|
|
73222
|
-
)), selectedContextId === "__custom__" && /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-custom-context" }, "Custom Context"), /* @__PURE__ */ React95__default.createElement(
|
|
73134
|
+
} }, /* @__PURE__ */ React95__default.createElement(DialogContent2, { className: "sm:max-w-[600px]" }, /* @__PURE__ */ React95__default.createElement(DialogHeader, null, /* @__PURE__ */ React95__default.createElement(DialogTitle2, { className: "flex items-center font-headline text-2xl" }, /* @__PURE__ */ React95__default.createElement(WandSparkles, { className: "mr-2 h-6 w-6 text-primary" }), " AI Question Generator"), /* @__PURE__ */ React95__default.createElement(DialogDescription2, null, "Provide a prompt and metadata to generate a '", finalQuestionType, "' question.")), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-4 py-4 max-h-[60vh] overflow-y-auto px-2" }, !geminiApiKeyExists && /* @__PURE__ */ React95__default.createElement("div", { className: "p-3 mb-4 border border-amber-500 bg-amber-50 rounded-md text-amber-700" }), !questionTypeProp && /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-q-type-select" }, "Question Type"), /* @__PURE__ */ React95__default.createElement(Select2, { value: selectedQuestionType, onValueChange: (v) => setSelectedQuestionType(v) }, /* @__PURE__ */ React95__default.createElement(SelectTrigger2, { id: "ai-q-type-select" }, /* @__PURE__ */ React95__default.createElement(SelectValue2, null)), /* @__PURE__ */ React95__default.createElement(SelectContent2, null, supportedQuestionTypesForAI.map((type) => /* @__PURE__ */ React95__default.createElement(SelectItem2, { key: type.value, value: type.value }, type.label))))), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-prompt" }, "Prompt / Topic"), /* @__PURE__ */ React95__default.createElement(
|
|
73223
73135
|
Textarea,
|
|
73224
73136
|
{
|
|
73225
|
-
id: "ai-
|
|
73226
|
-
value:
|
|
73227
|
-
onChange: (e2) =>
|
|
73228
|
-
placeholder: "
|
|
73229
|
-
className: "min-h-[
|
|
73137
|
+
id: "ai-prompt",
|
|
73138
|
+
value: prompt,
|
|
73139
|
+
onChange: (e2) => setPrompt(e2.target.value),
|
|
73140
|
+
placeholder: "e.g., The process of photosynthesis, The causes of World War II, Basic Algebra Equations",
|
|
73141
|
+
className: "min-h-[100px]"
|
|
73230
73142
|
}
|
|
73231
|
-
)), /* @__PURE__ */ React95__default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, {
|
|
73232
|
-
Select2,
|
|
73233
|
-
{
|
|
73234
|
-
value: questionType,
|
|
73235
|
-
onValueChange: (value) => setQuestionType(value)
|
|
73236
|
-
},
|
|
73237
|
-
/* @__PURE__ */ React95__default.createElement(SelectTrigger2, { id: "ai-question-type" }, /* @__PURE__ */ React95__default.createElement(SelectValue2, { placeholder: "Select question type" })),
|
|
73238
|
-
/* @__PURE__ */ React95__default.createElement(SelectContent2, null, supportedQuestionTypesForAI.map((qType) => /* @__PURE__ */ React95__default.createElement(SelectItem2, { key: qType.value, value: qType.value }, qType.label)))
|
|
73239
|
-
)), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, { htmlFor: "ai-bloom-level" }, "Bloom Level"), /* @__PURE__ */ React95__default.createElement(
|
|
73240
|
-
Select2,
|
|
73241
|
-
{
|
|
73242
|
-
value: selectedBloomLevel,
|
|
73243
|
-
onValueChange: (value) => setSelectedBloomLevel(value)
|
|
73244
|
-
},
|
|
73245
|
-
/* @__PURE__ */ React95__default.createElement(SelectTrigger2, { id: "ai-bloom-level" }, /* @__PURE__ */ React95__default.createElement(SelectValue2, { placeholder: "Select Bloom Level" })),
|
|
73246
|
-
/* @__PURE__ */ React95__default.createElement(SelectContent2, null, bloomLevelOptions.map((level) => /* @__PURE__ */ React95__default.createElement(SelectItem2, { key: level.value, value: level.value }, level.label)))
|
|
73247
|
-
))), renderSpecificParams(), computedDifficultyForDisplay && /* @__PURE__ */ React95__default.createElement("div", { className: "mt-3 p-3 border rounded-md bg-secondary/50" }, /* @__PURE__ */ React95__default.createElement("p", { className: "text-sm font-medium text-foreground" }, "Calculated AI Difficulty: ", /* @__PURE__ */ React95__default.createElement("span", { className: "font-bold text-primary capitalize" }, computedDifficultyForDisplay))), error && /* @__PURE__ */ React95__default.createElement("p", { className: "text-sm text-destructive flex items-center mt-2" }, /* @__PURE__ */ React95__default.createElement(TriangleAlert, { className: "mr-1 h-4 w-4" }), " ", error)), /* @__PURE__ */ React95__default.createElement(DialogFooter, null, /* @__PURE__ */ React95__default.createElement(DialogClose2, { asChild: true }, /* @__PURE__ */ React95__default.createElement(Button, { type: "button", variant: "outline" }, "Cancel")), /* @__PURE__ */ React95__default.createElement(Button, { type: "button", onClick: handleSubmit, disabled: isLoading || !topic.trim() || !geminiApiKeyExists }, isLoading ? /* @__PURE__ */ React95__default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ React95__default.createElement(WandSparkles, { className: "mr-2 h-4 w-4" }), "Generate Question")))), /* @__PURE__ */ React95__default.createElement(APIKeyManagerModal, { isOpen: isApiKeyManagerModalOpen, onClose: handleApiKeyModalClose }));
|
|
73143
|
+
)), /* @__PURE__ */ React95__default.createElement("div", { className: "grid grid-cols-2 gap-4" }, /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, null, "Subject"), /* @__PURE__ */ React95__default.createElement(EditableCombobox, { options: comboboxOptions.subjects, value: subjectCode, onChange: setSubjectCode, placeholder: "Select or type a Subject..." })), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, null, "Topic"), /* @__PURE__ */ React95__default.createElement(EditableCombobox, { options: comboboxOptions.topics, value: topicCode, onChange: setTopicCode, placeholder: "Select or type a Topic...", disabled: !subjectCode })), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, null, "Grade Level"), /* @__PURE__ */ React95__default.createElement(EditableCombobox, { options: comboboxOptions.gradeLevels, value: gradeBand, onChange: setGradeBand, placeholder: "Select or type a Grade..." })), /* @__PURE__ */ React95__default.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React95__default.createElement(Label2, null, "Bloom's Level"), /* @__PURE__ */ React95__default.createElement(EditableCombobox, { options: comboboxOptions.bloomLevels, value: bloomLevelCode, onChange: setBloomLevelCode, placeholder: "Select a Bloom's Level..." }))), renderSpecificParams(), error && /* @__PURE__ */ React95__default.createElement("p", { className: "text-sm text-destructive flex items-center mt-2" }, /* @__PURE__ */ React95__default.createElement(TriangleAlert, { className: "mr-1 h-4 w-4" }), " ", error)), /* @__PURE__ */ React95__default.createElement(DialogFooter, null, /* @__PURE__ */ React95__default.createElement(DialogClose2, { asChild: true }, /* @__PURE__ */ React95__default.createElement(Button, { type: "button", variant: "outline" }, "Cancel")), /* @__PURE__ */ React95__default.createElement(Button, { type: "button", onClick: handleSubmit, disabled: isLoading || !prompt.trim() || !geminiApiKeyExists }, isLoading ? /* @__PURE__ */ React95__default.createElement(LoaderCircle, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ React95__default.createElement(WandSparkles, { className: "mr-2 h-4 w-4" }), "Generate Question")))), /* @__PURE__ */ React95__default.createElement(APIKeyManagerModal, { isOpen: isApiKeyManagerModalOpen, onClose: handleApiKeyModalClose }));
|
|
73248
73144
|
};
|
|
73249
73145
|
|
|
73250
73146
|
// src/react-ui/components/authoring/AIFullQuizGeneratorModal.tsx
|
|
73251
73147
|
init_react_shim();
|
|
73148
|
+
|
|
73149
|
+
// src/data/contextOptions.ts
|
|
73150
|
+
init_react_shim();
|
|
73151
|
+
var contextOptions = [
|
|
73152
|
+
{ shortContextId: "A", contextId: "THEO_ABS", contextDescription: "L\xFD thuy\u1EBFt/Tr\u1EEBu t\u01B0\u1EE3ng", contextExample: '"Ph\xE1t bi\u1EC3u \u0111\u1ECBnh lu\u1EADt III Newton." ho\u1EB7c "Gi\u1EA3i th\xEDch kh\xE1i ni\u1EC7m \u0111\u1EA1o h\xE0m."', keywords: "l\xFD thuy\u1EBFt, tr\u1EEBu t\u01B0\u1EE3ng, \u0111\u1ECBnh ngh\u0129a, kh\xE1i ni\u1EC7m, nguy\xEAn l\xFD, c\xF4ng th\u1EE9c, \u0111\u1ECBnh lu\u1EADt" },
|
|
73153
|
+
{ shortContextId: "B", contextId: "SPEC_CASE", contextDescription: "V\xED d\u1EE5 C\u1EE5 th\u1EC3/Tr\u01B0\u1EDDng h\u1EE3p Ri\xEAng", contextExample: '"T\xEDnh l\u1EF1c t\xE1c d\u1EE5ng l\xEAn v\u1EADt n\u1EB7ng 2kg r\u01A1i t\u1EF1 do." ho\u1EB7c "Cho h\xE0m s\u1ED1 y = x^2, t\xECm \u0111\u1EA1o h\xE0m t\u1EA1i x = 3."', keywords: "v\xED d\u1EE5, c\u1EE5 th\u1EC3, tr\u01B0\u1EDDng h\u1EE3p ri\xEAng, \xE1p d\u1EE5ng, t\xEDnh to\xE1n, minh h\u1ECDa, s\u1ED1 li\u1EC7u c\u1EE5 th\u1EC3" },
|
|
73154
|
+
{ shortContextId: "C", contextId: "NAT_OBS", contextDescription: "Hi\u1EC7n t\u01B0\u1EE3ng T\u1EF1 nhi\xEAn/Quan s\xE1t", contextExample: '"Gi\u1EA3i th\xEDch t\u1EA1i sao c\u1EA7u v\u1ED3ng xu\u1EA5t hi\u1EC7n sau c\u01A1n m\u01B0a." ho\u1EB7c "M\xF4 t\u1EA3 qu\xE1 tr\xECnh quang h\u1EE3p \u1EDF l\xE1 c\xE2y."', keywords: "hi\u1EC7n t\u01B0\u1EE3ng, t\u1EF1 nhi\xEAn, quan s\xE1t, gi\u1EA3i th\xEDch, m\xF4 t\u1EA3, th\u1EBF gi\u1EDBi th\u1EF1c, sinh h\u1ECDc, v\u1EADt l\xFD" },
|
|
73155
|
+
{ shortContextId: "D", contextId: "TECH_ENG", contextDescription: "\u1EE8ng d\u1EE5ng C\xF4ng ngh\u1EC7/K\u1EF9 thu\u1EADt", contextExample: '"Nguy\xEAn l\xFD ho\u1EA1t \u0111\u1ED9ng c\u1EE7a \u0111\u1ED9ng c\u01A1 \u0111\u1ED1t trong l\xE0 g\xEC?" ho\u1EB7c "Pin m\u1EB7t tr\u1EDDi chuy\u1EC3n \u0111\u1ED5i n\u0103ng l\u01B0\u1EE3ng \xE1nh s\xE1ng th\xE0nh \u0111i\u1EC7n n\u0103ng nh\u01B0 th\u1EBF n\xE0o?"', keywords: "\u1EE9ng d\u1EE5ng, c\xF4ng ngh\u1EC7, k\u1EF9 thu\u1EADt, thi\u1EBFt b\u1ECB, m\xE1y m\xF3c, ho\u1EA1t \u0111\u1ED9ng, nguy\xEAn l\xFD, ch\u1EBF t\u1EA1o" },
|
|
73156
|
+
{ shortContextId: "E", contextId: "EXP_INV", contextDescription: "Th\xED nghi\u1EC7m/\u0110i\u1EC1u tra Khoa h\u1ECDc", contextExample: '"Thi\u1EBFt k\u1EBF th\xED nghi\u1EC7m ch\u1EE9ng minh \u0111\u1ECBnh lu\u1EADt b\u1EA3o to\xE0n n\u0103ng l\u01B0\u1EE3ng." ho\u1EB7c "Ph\xE2n t\xEDch k\u1EBFt qu\u1EA3 th\xED nghi\u1EC7m v\u1EC1 t\u1ED1c \u0111\u1ED9 ph\u1EA3n \u1EE9ng."', keywords: "th\xED nghi\u1EC7m, \u0111i\u1EC1u tra, khoa h\u1ECDc, thi\u1EBFt k\u1EBF, quy tr\xECnh, k\u1EBFt qu\u1EA3, ph\xE2n t\xEDch, d\u1EEF li\u1EC7u" },
|
|
73157
|
+
{ shortContextId: "F", contextId: "REAL_PROB", contextDescription: "V\u1EA5n \u0111\u1EC1 Th\u1EF1c t\u1EBF/X\xE3 h\u1ED9i/M\xF4i tr\u01B0\u1EDDng", contextExample: '"\u0110\u1EC1 xu\u1EA5t gi\u1EA3i ph\xE1p gi\u1EA3m thi\u1EC3u \xF4 nhi\u1EC5m kh\xF4ng kh\xED t\u1EA1i \u0111\xF4 th\u1ECB." ho\u1EB7c "Ph\xE2n t\xEDch \u1EA3nh h\u01B0\u1EDFng c\u1EE7a bi\u1EBFn \u0111\u1ED5i kh\xED h\u1EADu \u0111\u1EBFn n\xF4ng nghi\u1EC7p."', keywords: "v\u1EA5n \u0111\u1EC1, th\u1EF1c t\u1EBF, x\xE3 h\u1ED9i, m\xF4i tr\u01B0\u1EDDng, gi\u1EA3i ph\xE1p, ph\xE2n t\xEDch, \u1EA3nh h\u01B0\u1EDFng, b\u1EC1n v\u1EEFng" },
|
|
73158
|
+
{ shortContextId: "G", contextId: "DATA_MOD", contextDescription: "Di\u1EC5n gi\u1EA3i D\u1EEF li\u1EC7u/M\xF4 h\xECnh h\xF3a", contextExample: '"D\u1EF1a v\xE0o bi\u1EC3u \u0111\u1ED3, nh\u1EADn x\xE9t xu h\u01B0\u1EDBng nhi\u1EC7t \u0111\u1ED9 to\xE0n c\u1EA7u." ho\u1EB7c "X\xE2y d\u1EF1ng m\xF4 h\xECnh to\xE1n h\u1ECDc m\xF4 t\u1EA3 s\u1EF1 t\u0103ng tr\u01B0\u1EDFng d\xE2n s\u1ED1."', keywords: "d\u1EEF li\u1EC7u, bi\u1EC3u \u0111\u1ED3, b\u1EA3ng s\u1ED1 li\u1EC7u, m\xF4 h\xECnh, di\u1EC5n gi\u1EA3i, ph\xE2n t\xEDch, xu h\u01B0\u1EDBng, d\u1EF1 \u0111o\xE1n" },
|
|
73159
|
+
{ shortContextId: "H", contextId: "HIST_SCI", contextDescription: "L\u1ECBch s\u1EED/Ph\xE1t tri\u1EC3n Khoa h\u1ECDc", contextExample: '"Tr\xECnh b\xE0y b\u1ED1i c\u1EA3nh ra \u0111\u1EDDi thuy\u1EBFt t\u01B0\u01A1ng \u0111\u1ED1i c\u1EE7a Einstein." ho\u1EB7c "Ai l\xE0 ng\u01B0\u1EDDi \u0111\u1EA7u ti\xEAn ph\xE1t hi\u1EC7n ra c\u1EA5u tr\xFAc DNA?"', keywords: "l\u1ECBch s\u1EED, ph\xE1t tri\u1EC3n, khoa h\u1ECDc, nh\xE0 khoa h\u1ECDc, ph\xE1t minh, kh\xE1m ph\xE1, b\u1ED1i c\u1EA3nh" },
|
|
73160
|
+
{ shortContextId: "I", contextId: "INTERDISC", contextDescription: "Li\xEAn ng\xE0nh (Interdisciplinary)", contextExample: '"S\u1EED d\u1EE5ng ki\u1EBFn th\u1EE9c To\xE1n v\xE0 V\u1EADt l\xFD \u0111\u1EC3 t\xEDnh qu\u1EF9 \u0111\u1EA1o c\u1EE7a v\u1EADt n\xE9m xi\xEAn." ho\u1EB7c "Ph\xE2n t\xEDch c\u01A1 ch\u1EBF h\xF3a sinh c\u1EE7a qu\xE1 tr\xECnh ti\xEAu h\xF3a."', keywords: "li\xEAn ng\xE0nh, t\xEDch h\u1EE3p, To\xE1n-L\xFD, Sinh-H\xF3a, Khoa h\u1ECDc-C\xF4ng ngh\u1EC7, k\u1EBFt n\u1ED1i ki\u1EBFn th\u1EE9c" },
|
|
73161
|
+
{ shortContextId: "J", contextId: "HYPO_COMP", contextDescription: "Gi\u1EA3 \u0111\u1ECBnh/So s\xE1nh T\xECnh hu\u1ED1ng", contextExample: '"N\u1EBFu Tr\xE1i \u0110\u1EA5t kh\xF4ng c\xF3 t\u1EEB tr\u01B0\u1EDDng th\xEC \u0111i\u1EC1u g\xEC s\u1EBD x\u1EA3y ra?" ho\u1EB7c "So s\xE1nh \u01B0u nh\u01B0\u1EE3c \u0111i\u1EC3m c\u1EE7a n\u0103ng l\u01B0\u1EE3ng h\u1EA1t nh\xE2n v\xE0 n\u0103ng l\u01B0\u1EE3ng m\u1EB7t tr\u1EDDi."', keywords: "gi\u1EA3 \u0111\u1ECBnh, so s\xE1nh, t\xECnh hu\u1ED1ng, n\u1EBFu...th\xEC, \u01B0u \u0111i\u1EC3m, nh\u01B0\u1EE3c \u0111i\u1EC3m, ph\xE2n t\xEDch, \u0111\xE1nh gi\xE1" },
|
|
73162
|
+
{ shortContextId: "__custom__", contextId: "__custom__", contextDescription: "Other (Custom Input)", contextExample: "", keywords: "custom, other, specific" }
|
|
73163
|
+
];
|
|
73164
|
+
|
|
73165
|
+
// src/react-ui/components/authoring/AIFullQuizGeneratorModal.tsx
|
|
73252
73166
|
var availableQuestionTypesForFullQuiz = [
|
|
73253
73167
|
{ value: "true_false", label: "True/False" },
|
|
73254
73168
|
{ value: "multiple_choice", label: "Multiple Choice" },
|