analytica-frontend-lib 1.2.67 → 1.2.69
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/ActivityCardQuestionBanks/index.js +827 -244
- package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.mjs +828 -237
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.js +650 -67
- package/dist/ActivityCardQuestionPreview/index.js.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.mjs +655 -64
- package/dist/ActivityCardQuestionPreview/index.mjs.map +1 -1
- package/dist/ActivityDetails/index.d.ts +6 -4
- package/dist/ActivityDetails/index.d.ts.map +1 -1
- package/dist/ActivityDetails/index.js +2381 -1007
- package/dist/ActivityDetails/index.js.map +1 -1
- package/dist/ActivityDetails/index.mjs +2352 -953
- package/dist/ActivityDetails/index.mjs.map +1 -1
- package/dist/ActivityPreview/index.js +1175 -592
- package/dist/ActivityPreview/index.js.map +1 -1
- package/dist/ActivityPreview/index.mjs +1171 -580
- package/dist/ActivityPreview/index.mjs.map +1 -1
- package/dist/CorrectActivityModal/index.d.ts +4 -2
- package/dist/CorrectActivityModal/index.d.ts.map +1 -1
- package/dist/CorrectActivityModal/index.js +1999 -527
- package/dist/CorrectActivityModal/index.js.map +1 -1
- package/dist/CorrectActivityModal/index.mjs +2030 -529
- package/dist/CorrectActivityModal/index.mjs.map +1 -1
- package/dist/Quiz/index.js +2 -0
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +2 -0
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/hooks/useSendActivity/index.d.ts +47 -0
- package/dist/hooks/useSendActivity/index.d.ts.map +1 -0
- package/dist/hooks/useSendActivity/index.js +194 -0
- package/dist/hooks/useSendActivity/index.js.map +1 -0
- package/dist/hooks/useSendActivity/index.mjs +159 -0
- package/dist/hooks/useSendActivity/index.mjs.map +1 -0
- package/dist/hooks/useSendActivity.d.ts +47 -0
- package/dist/hooks/useSendActivity.d.ts.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10284 -9202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10170 -9087
- package/dist/index.mjs.map +1 -1
- package/dist/types/activities/index.d.ts +81 -0
- package/dist/types/activities/index.d.ts.map +1 -0
- package/dist/types/activities/index.js +52 -0
- package/dist/types/activities/index.js.map +1 -0
- package/dist/types/activities/index.mjs +25 -0
- package/dist/types/activities/index.mjs.map +1 -0
- package/dist/types/activities.d.ts +81 -0
- package/dist/types/activities.d.ts.map +1 -0
- package/dist/types/sendActivity/index.d.ts +127 -0
- package/dist/types/sendActivity/index.d.ts.map +1 -0
- package/dist/types/sendActivity/index.js +19 -0
- package/dist/types/sendActivity/index.js.map +1 -0
- package/dist/types/sendActivity/index.mjs +1 -0
- package/dist/types/sendActivity/index.mjs.map +1 -0
- package/dist/types/sendActivity.d.ts +127 -0
- package/dist/types/sendActivity.d.ts.map +1 -0
- package/dist/utils/questionRenderer/alternative/index.d.ts +8 -0
- package/dist/utils/questionRenderer/alternative/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/components/index.d.ts +25 -0
- package/dist/utils/questionRenderer/components/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/connectDots/index.d.ts +8 -0
- package/dist/utils/questionRenderer/connectDots/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/dissertative/index.d.ts +8 -0
- package/dist/utils/questionRenderer/dissertative/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/fill/index.d.ts +10 -0
- package/dist/utils/questionRenderer/fill/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/image/index.d.ts +8 -0
- package/dist/utils/questionRenderer/image/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/index.d.ts +31 -0
- package/dist/utils/questionRenderer/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts +8 -0
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/trueOrFalse/index.d.ts +9 -0
- package/dist/utils/questionRenderer/trueOrFalse/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/types.d.ts +14 -0
- package/dist/utils/questionRenderer/types.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/constants.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/constants.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/converter.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/converter.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/index.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/index.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/types.d.ts +84 -0
- package/dist/utils/studentActivityCorrection/types.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts +30 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/types/studentActivityCorrection.d.ts +0 -62
- package/dist/types/studentActivityCorrection.d.ts.map +0 -1
- package/dist/utils/questionRenderer.d.ts +0 -5
- package/dist/utils/questionRenderer.d.ts.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { QuestionRendererProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Render image question
|
|
5
|
+
* Shows image with clickable area, correct answer circle, and user's answer circle
|
|
6
|
+
*/
|
|
7
|
+
export declare const renderQuestionImage: ({ result, }: Omit<QuestionRendererProps, "question">) => ReactNode;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/questionRenderer/image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAEjC,IAAI,CAAC,qBAAqB,EAAE,UAAU,CAAC,KAAG,SA0M5C,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { QUESTION_TYPE } from '../../components/Quiz/useQuizStore';
|
|
3
|
+
import type { QuestionRendererProps } from './types';
|
|
4
|
+
export type { QuestionRendererProps } from './types';
|
|
5
|
+
export { Status } from './types';
|
|
6
|
+
export { getStatusBadge, QuestionContainer, QuestionSubTitle, FillQuestionContent, } from './components';
|
|
7
|
+
export { renderQuestionAlternative } from './alternative';
|
|
8
|
+
export { renderQuestionMultipleChoice } from './multipleChoice';
|
|
9
|
+
export { renderQuestionTrueOrFalse } from './trueOrFalse';
|
|
10
|
+
export { renderQuestionDissertative } from './dissertative';
|
|
11
|
+
export { renderQuestionFill } from './fill';
|
|
12
|
+
export { renderQuestionImage } from './image';
|
|
13
|
+
export { renderQuestionConnectDots } from './connectDots';
|
|
14
|
+
/**
|
|
15
|
+
* Render question based on question type
|
|
16
|
+
* @param props - Question renderer props
|
|
17
|
+
* @returns Rendered question content
|
|
18
|
+
*/
|
|
19
|
+
export declare const renderQuestion: (props: QuestionRendererProps) => ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Type for question renderer map
|
|
22
|
+
*/
|
|
23
|
+
export type QuestionRendererMap = Record<QUESTION_TYPE, () => ReactNode>;
|
|
24
|
+
/**
|
|
25
|
+
* Render from a map of renderers
|
|
26
|
+
* @param renderers - Map of question type to render function
|
|
27
|
+
* @param questionType - Type of question to render
|
|
28
|
+
* @returns Rendered content or null
|
|
29
|
+
*/
|
|
30
|
+
export declare const renderFromMap: (renderers: QuestionRendererMap, questionType?: QUESTION_TYPE) => ReactNode;
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/questionRenderer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAQnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGrD,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAe1D;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,qBAAqB,KAAG,SA4B7D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,EAAE,MAAM,SAAS,CAAC,CAAC;AAEzE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,WAAW,mBAAmB,EAC9B,eAAe,aAAa,cAK7B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { QuestionRendererProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Render multiple choice question
|
|
5
|
+
* Returns content without wrapper (for accordion use)
|
|
6
|
+
*/
|
|
7
|
+
export declare const renderQuestionMultipleChoice: ({ question, result, }: QuestionRendererProps) => ReactNode;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/questionRenderer/multipleChoice/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGtD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GAAI,uBAG1C,qBAAqB,KAAG,SA2D1B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { QuestionRendererProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Render true or false question
|
|
5
|
+
* Each option has a statement, and student marks V or F for each
|
|
6
|
+
* Returns content without wrapper (for accordion use)
|
|
7
|
+
*/
|
|
8
|
+
export declare const renderQuestionTrueOrFalse: ({ question, result, }: QuestionRendererProps) => ReactNode;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/questionRenderer/trueOrFalse/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGtD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,uBAGvC,qBAAqB,KAAG,SAoE1B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Question, QuestionResult } from '../../components/Quiz/useQuizStore';
|
|
2
|
+
export declare enum Status {
|
|
3
|
+
CORRECT = "correct",
|
|
4
|
+
INCORRECT = "incorrect",
|
|
5
|
+
NEUTRAL = "neutral"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Props for question renderers
|
|
9
|
+
*/
|
|
10
|
+
export interface QuestionRendererProps {
|
|
11
|
+
question: Question;
|
|
12
|
+
result: QuestionResult['answers'][number];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/questionRenderer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACf,MAAM,oCAAoC,CAAC;AAE5C,oBAAY,MAAM;IAChB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;CAC3C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Question status enum for student activity correction
|
|
3
|
+
* Maps from ANSWER_STATUS to a simpler status for UI display
|
|
4
|
+
*/
|
|
5
|
+
export declare const QUESTION_STATUS: {
|
|
6
|
+
readonly CORRETA: "CORRETA";
|
|
7
|
+
readonly INCORRETA: "INCORRETA";
|
|
8
|
+
readonly EM_BRANCO: "EM_BRANCO";
|
|
9
|
+
/** Reserved for future use - pending teacher evaluation for essay questions */
|
|
10
|
+
readonly PENDENTE: "PENDENTE";
|
|
11
|
+
};
|
|
12
|
+
export type QuestionStatus = (typeof QUESTION_STATUS)[keyof typeof QUESTION_STATUS];
|
|
13
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/studentActivityCorrection/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;IAI1B,+EAA+E;;CAEvE,CAAC;AAEX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { QuestionsAnswersByStudentResponse, StudentActivityCorrectionData } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Convert QuestionResult from API to StudentActivityCorrectionData
|
|
4
|
+
* This function transforms the API response into the format expected by CorrectActivityModal
|
|
5
|
+
* @param apiResponse - API response with answers and statistics
|
|
6
|
+
* @param studentId - Student ID
|
|
7
|
+
* @param studentName - Student name
|
|
8
|
+
* @param observation - Optional teacher observation
|
|
9
|
+
* @param attachment - Optional attachment URL
|
|
10
|
+
* @returns StudentActivityCorrectionData formatted for the modal
|
|
11
|
+
*/
|
|
12
|
+
export declare const convertApiResponseToCorrectionData: (apiResponse: QuestionsAnswersByStudentResponse, studentId: string, studentName: string, observation?: string, attachment?: string) => StudentActivityCorrectionData;
|
|
13
|
+
//# sourceMappingURL=converter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"converter.d.ts","sourceRoot":"","sources":["../../../src/utils/studentActivityCorrection/converter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iCAAiC,EACjC,6BAA6B,EAG9B,MAAM,SAAS,CAAC;AA0FjB;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,GAC7C,aAAa,iCAAiC,EAC9C,WAAW,MAAM,EACjB,aAAa,MAAM,EACnB,cAAc,MAAM,EACpB,aAAa,MAAM,KAClB,6BAwBF,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Student Activity Correction Module
|
|
3
|
+
*
|
|
4
|
+
* This module provides types, utilities, and converters for student activity correction.
|
|
5
|
+
* All exports are centralized here for easy importing.
|
|
6
|
+
*
|
|
7
|
+
* @module studentActivityCorrection
|
|
8
|
+
*/
|
|
9
|
+
export { QUESTION_STATUS, type QuestionStatus } from './constants';
|
|
10
|
+
export type { EssayQuestionCorrection, CorrectionQuestionData, StudentQuestion, StudentActivityCorrectionData, SaveQuestionCorrectionPayload, QuestionsAnswersByStudentResponse, } from './types';
|
|
11
|
+
export { getIsCorrect, mapAnswerStatusToQuestionStatus, getQuestionStatusBadgeConfig, getQuestionStatusFromData, } from './utils';
|
|
12
|
+
export { convertApiResponseToCorrectionData } from './converter';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/studentActivityCorrection/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAGnE,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,eAAe,EACf,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,YAAY,EACZ,+BAA+B,EAC/B,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Question, QuestionResult } from '../../components/Quiz/useQuizStore';
|
|
2
|
+
import type { QuestionStatus } from './constants';
|
|
3
|
+
/**
|
|
4
|
+
* Correction data for essay questions (dissertativas)
|
|
5
|
+
* Used for teacher evaluation of essay answers
|
|
6
|
+
*/
|
|
7
|
+
export interface EssayQuestionCorrection {
|
|
8
|
+
/** Whether the answer is correct (true/false/null for not evaluated) */
|
|
9
|
+
isCorrect: boolean | null;
|
|
10
|
+
/** Teacher observation/feedback */
|
|
11
|
+
teacherFeedback: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Combined question data for correction modal
|
|
15
|
+
* Combines Question (from Quiz format) with QuestionResult answer data
|
|
16
|
+
*/
|
|
17
|
+
export interface CorrectionQuestionData {
|
|
18
|
+
/** Question data in Quiz format */
|
|
19
|
+
question: Question;
|
|
20
|
+
/** Student answer data from QuestionResult */
|
|
21
|
+
result: QuestionResult['answers'][number];
|
|
22
|
+
/** Question number in the activity (1-indexed) */
|
|
23
|
+
questionNumber: number;
|
|
24
|
+
/** Correction data for essay questions (only for DISSERTATIVA type) */
|
|
25
|
+
correction?: EssayQuestionCorrection;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Legacy interface for backward compatibility
|
|
29
|
+
* @deprecated Use CorrectionQuestionData instead
|
|
30
|
+
*/
|
|
31
|
+
export interface StudentQuestion {
|
|
32
|
+
questionNumber: number;
|
|
33
|
+
status: QuestionStatus;
|
|
34
|
+
studentAnswer?: string;
|
|
35
|
+
correctAnswer?: string;
|
|
36
|
+
questionText?: string;
|
|
37
|
+
questionType?: string;
|
|
38
|
+
alternatives?: Array<{
|
|
39
|
+
value: string;
|
|
40
|
+
label: string;
|
|
41
|
+
isCorrect: boolean;
|
|
42
|
+
}>;
|
|
43
|
+
isCorrect?: boolean | null;
|
|
44
|
+
teacherFeedback?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Student activity correction data interface
|
|
48
|
+
* Uses Quiz format (Question + QuestionResult) for questions
|
|
49
|
+
*/
|
|
50
|
+
export interface StudentActivityCorrectionData {
|
|
51
|
+
studentId: string;
|
|
52
|
+
studentName: string;
|
|
53
|
+
score: number | null;
|
|
54
|
+
correctCount: number;
|
|
55
|
+
incorrectCount: number;
|
|
56
|
+
blankCount: number;
|
|
57
|
+
/** Questions with their answers in Quiz format */
|
|
58
|
+
questions: CorrectionQuestionData[];
|
|
59
|
+
/** Teacher observation text (general observation for the activity) */
|
|
60
|
+
observation?: string;
|
|
61
|
+
/** URL of attached file */
|
|
62
|
+
attachment?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Payload for saving question correction (for essay questions)
|
|
66
|
+
*/
|
|
67
|
+
export interface SaveQuestionCorrectionPayload {
|
|
68
|
+
/** Question ID from Question interface */
|
|
69
|
+
questionId: string;
|
|
70
|
+
/** Question number in the activity (for reference) */
|
|
71
|
+
questionNumber: number;
|
|
72
|
+
/** Whether the answer is correct */
|
|
73
|
+
isCorrect: boolean;
|
|
74
|
+
/** Teacher observation/feedback */
|
|
75
|
+
teacherFeedback?: string;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* API response structure for fetchQuestionsAnswersByStudent
|
|
79
|
+
* Returns student answers and statistics for an activity
|
|
80
|
+
*/
|
|
81
|
+
export interface QuestionsAnswersByStudentResponse {
|
|
82
|
+
data: QuestionResult;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/studentActivityCorrection/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,wEAAwE;IACxE,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,mCAAmC;IACnC,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,mCAAmC;IACnC,QAAQ,EAAE,QAAQ,CAAC;IACnB,8CAA8C;IAC9C,MAAM,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;IAC1C,kDAAkD;IAClD,cAAc,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,EAAE,sBAAsB,EAAE,CAAC;IACpC,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,0CAA0C;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,cAAc,EAAE,MAAM,CAAC;IACvB,oCAAoC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,cAAc,CAAC;CACtB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StatusBadgeConfig } from '@/types/activityDetails';
|
|
2
|
+
import { ANSWER_STATUS } from '../../components/Quiz/useQuizStore';
|
|
3
|
+
import { type QuestionStatus } from './constants';
|
|
4
|
+
import type { CorrectionQuestionData } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Returns whether the answer is correct, incorrect, or null based on the answer status.
|
|
7
|
+
* @param answerStatus - Answer status from ANSWER_STATUS enum
|
|
8
|
+
* @returns Returns true for correct, false for incorrect, or null if undefined.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getIsCorrect: (answerStatus: ANSWER_STATUS) => boolean | null;
|
|
11
|
+
/**
|
|
12
|
+
* Map ANSWER_STATUS from Quiz to QUESTION_STATUS for correction modal
|
|
13
|
+
* @param answerStatus - Answer status from QuestionResult
|
|
14
|
+
* @returns QuestionStatus for UI display
|
|
15
|
+
*/
|
|
16
|
+
export declare const mapAnswerStatusToQuestionStatus: (answerStatus: ANSWER_STATUS) => QuestionStatus;
|
|
17
|
+
/**
|
|
18
|
+
* Get question status badge configuration
|
|
19
|
+
* @param status - Question status
|
|
20
|
+
* @returns Badge configuration with label and colors
|
|
21
|
+
*/
|
|
22
|
+
export declare const getQuestionStatusBadgeConfig: (status: QuestionStatus) => StatusBadgeConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Get question status from CorrectionQuestionData
|
|
25
|
+
* Maps the result's answerStatus to QuestionStatus
|
|
26
|
+
* @param questionData - Correction question data
|
|
27
|
+
* @returns QuestionStatus for UI display
|
|
28
|
+
*/
|
|
29
|
+
export declare const getQuestionStatusFromData: (questionData: CorrectionQuestionData) => QuestionStatus;
|
|
30
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/studentActivityCorrection/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,cAAc,aAAa,KAAG,OAAO,GAAG,IAIpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,GAC1C,cAAc,aAAa,KAC1B,cAaF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,cAAc,sBA+BlE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,cAAc,sBAAsB,KACnC,cAEF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Question status enum for student activity correction
|
|
3
|
-
*/
|
|
4
|
-
export declare const QUESTION_STATUS: {
|
|
5
|
-
readonly CORRETA: "CORRETA";
|
|
6
|
-
readonly INCORRETA: "INCORRETA";
|
|
7
|
-
readonly EM_BRANCO: "EM_BRANCO";
|
|
8
|
-
/** Reserved for future use - pending teacher evaluation for essay questions */
|
|
9
|
-
readonly PENDENTE: "PENDENTE";
|
|
10
|
-
};
|
|
11
|
-
export type QuestionStatus = (typeof QUESTION_STATUS)[keyof typeof QUESTION_STATUS];
|
|
12
|
-
/**
|
|
13
|
-
* Represents an alternative for a question
|
|
14
|
-
*/
|
|
15
|
-
export interface QuestionAlternative {
|
|
16
|
-
/** Alternative value (e.g., "A", "B", "C") */
|
|
17
|
-
value: string;
|
|
18
|
-
/** Alternative text content */
|
|
19
|
-
label: string;
|
|
20
|
-
/** Whether this is the correct answer */
|
|
21
|
-
isCorrect: boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Student question data interface
|
|
25
|
-
*/
|
|
26
|
-
export interface StudentQuestion {
|
|
27
|
-
questionNumber: number;
|
|
28
|
-
status: QuestionStatus;
|
|
29
|
-
studentAnswer?: string;
|
|
30
|
-
correctAnswer?: string;
|
|
31
|
-
/** Question text content */
|
|
32
|
-
questionText?: string;
|
|
33
|
-
/** List of alternatives (for multiple choice questions) */
|
|
34
|
-
alternatives?: QuestionAlternative[];
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Student activity correction data interface
|
|
38
|
-
*/
|
|
39
|
-
export interface StudentActivityCorrectionData {
|
|
40
|
-
studentId: string;
|
|
41
|
-
studentName: string;
|
|
42
|
-
score: number | null;
|
|
43
|
-
correctCount: number;
|
|
44
|
-
incorrectCount: number;
|
|
45
|
-
blankCount: number;
|
|
46
|
-
questions: StudentQuestion[];
|
|
47
|
-
/** Teacher observation text */
|
|
48
|
-
observation?: string;
|
|
49
|
-
/** URL of attached file */
|
|
50
|
-
attachment?: string;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get question status badge configuration
|
|
54
|
-
* @param status - Question status
|
|
55
|
-
* @returns Badge configuration with label and colors
|
|
56
|
-
*/
|
|
57
|
-
export declare const getQuestionStatusBadgeConfig: (status: QuestionStatus) => {
|
|
58
|
-
label: string;
|
|
59
|
-
bgColor: string;
|
|
60
|
-
textColor: string;
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=studentActivityCorrection.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"studentActivityCorrection.d.ts","sourceRoot":"","sources":["../../src/types/studentActivityCorrection.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,eAAe;;;;IAI1B,+EAA+E;;CAEvE,CAAC;AAEX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4BAA4B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GAAI,QAAQ,cAAc;WAGtD,MAAM;aAAW,MAAM;eAAa,MAAM;CAyBtD,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { QUESTION_TYPE } from '../components/Quiz/useQuizStore';
|
|
3
|
-
export type QuestionRendererMap = Record<QUESTION_TYPE, () => ReactNode>;
|
|
4
|
-
export declare const renderFromMap: (renderers: QuestionRendererMap, questionType?: QUESTION_TYPE) => ReactNode;
|
|
5
|
-
//# sourceMappingURL=questionRenderer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"questionRenderer.d.ts","sourceRoot":"","sources":["../../src/utils/questionRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,EAAE,MAAM,SAAS,CAAC,CAAC;AAEzE,eAAO,MAAM,aAAa,GACxB,WAAW,mBAAmB,EAC9B,eAAe,aAAa,cAK7B,CAAC"}
|