import { AssignedQuestion, GradedQuestion } from "../core/assigned_exams"; import { ResponseKind } from "../response/common"; import { ImmutableGradingResult, QuestionGrader } from "./QuestionGrader"; export type SummationMCGradingResult = ImmutableGradingResult & { readonly selections: readonly { selected: boolean; pointsForThisItem: number; }[]; } | ImmutableGradingResult & { readonly wasInvalidSubmission: true; }; export type SummationMCGraderSpecification = { readonly grader_kind: "summation_multiple_choice"; /** * For each answer option, define whether the grader is looking * for the option to be selected or not (true/false) and the number of points to add * (or subtract if negative) in that case */ readonly rubric: readonly { selected: boolean; points: number; ignore_selection?: boolean; }[]; }; export declare class SummationMCGrader implements QuestionGrader<"multiple_choice"> { readonly spec: SummationMCGraderSpecification; readonly t_response_kinds: "multiple_choice"; constructor(spec: SummationMCGraderSpecification); scale(new_points_possible: number): SummationMCGrader; isGrader(responseKind: T): this is QuestionGrader; prepare(exam_id: string, question_id: string, spec: SummationMCGraderSpecification): void; grade(aq: AssignedQuestion<"multiple_choice">): SummationMCGradingResult; pointsEarned(gr: SummationMCGradingResult): number; renderReport(gq: GradedQuestion<"multiple_choice", SummationMCGradingResult>): string; annotateResponseElem(gq: GradedQuestion<"multiple_choice", SummationMCGradingResult>, response_elem: JQuery): void; renderStats(): string; renderOverview(gqs: readonly GradedQuestion<"multiple_choice">[]): string; }