Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/IsaacApiTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,6 @@ export interface InlineRegionValidationResponseDTO extends QuestionValidationRes
}

export interface LLMFreeTextQuestionValidationResponseDTO extends QuestionValidationResponseDTO {
markCalculationInstructions?: string;
additionalMarkingInstructions?: string;
maxMarks?: number;
marksAwarded?: number;
markBreakdown?: LLMFreeTextMarkSchemeEntryDTO[];
}
Expand Down
3 changes: 1 addition & 2 deletions src/app/components/content/IsaacQuestion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio
const [hasSubmitted, setHasSubmitted] = useState<boolean>(false);
const hidingAttempts = useAppSelector(selectors.user.preferences)?.DISPLAY_SETTING?.HIDE_QUESTION_ATTEMPTS ?? false;


const {confidenceState, setConfidenceState, validationPending, setValidationPending, confidenceDisabled, recordConfidence, showQuestionFeedback} = useConfidenceQuestionsValues(
currentGameboard?.tags?.includes("CONFIDENCE_RESEARCH_BOARD"),
"question",
Expand Down Expand Up @@ -289,7 +288,7 @@ export const IsaacQuestion = withRouter(({doc, location}: {doc: ApiTypes.Questio

{/* LLM free-text question validation response */}
{isLLMFreeTextQuestion && showQuestionFeedback && validationResponse && showInlineAttemptStatus && !canSubmit &&
<LLMFreeTextQuestionFeedbackView {...{validationResponse, hasSubmitted, sentFeedback, setSentFeedback}} />
<LLMFreeTextQuestionFeedbackView maxMarks={(doc as ApiTypes.IsaacLLMFreeTextQuestionDTO).maxMarks ?? 0} {...{validationResponse, hasSubmitted, sentFeedback, setSentFeedback}} />
}
</ConfidenceContext.Provider>;
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ const noFeedback = {disagree: false, partlyAgree: false, agree: false};

interface LLMFreeTextQuestionFeedbackViewProps {
validationResponse: Immutable<LLMFreeTextQuestionValidationResponseDTO>;
maxMarks: number;
hasSubmitted: boolean;
sentFeedback: boolean;
setSentFeedback: (value: boolean) => void;
}
export default function LLMFreeTextQuestionFeedbackView({validationResponse, hasSubmitted, sentFeedback, setSentFeedback}: LLMFreeTextQuestionFeedbackViewProps) {
export default function LLMFreeTextQuestionFeedbackView({validationResponse, maxMarks, hasSubmitted, sentFeedback, setSentFeedback}: LLMFreeTextQuestionFeedbackViewProps) {
const dispatch = useAppDispatch();
const page = useAppSelector(selectors.doc.get);
const pageId = page && page !== NOT_FOUND && page.id || undefined;
Expand All @@ -35,7 +36,7 @@ export default function LLMFreeTextQuestionFeedbackView({validationResponse, has
<div className="prediction my-4">
<div className='d-flex'>
<span className="icon-ai me-2"/>
<strong>{`Prediction: ${validationResponse.marksAwarded} out of ${validationResponse.maxMarks} marks`}</strong>
<strong>{`Prediction: ${validationResponse.marksAwarded} out of ${maxMarks} marks`}</strong>
</div>
</div>
<div className="table-responsive card curved-table-wrapper mb-4">
Expand Down