import { GraderFor } from "../graders/QuestionGrader"; import { ResponseKind } from "../response/common"; import { ResponseSpecification, ValidSubmission, ViableSubmission } from "../response/responses"; import { QuestionVerifier } from "../verifiers/QuestionVerifier"; import { CredentialsStrategy, ExamCompletionSpecification, ExamSpecification, MinMaxPoints, QuestionChooser, QuestionSpecification, SectionChooser, SectionSpecification, SkinChooser } from "./exam_specification"; import { ExamComponentSkin } from "./skins"; export declare class Question { readonly component_kind = "component"; readonly spec: QuestionSpecification; readonly question_id: string; readonly title?: string; readonly tags: readonly string[]; readonly mk_description: string; readonly mk_postscript: string; readonly pointsPossible: number; readonly kind: QT; readonly response: ResponseSpecification; readonly skin: ExamComponentSkin | SkinChooser; readonly sampleSolution?: ViableSubmission; readonly defaultGrader?: GraderFor; readonly verifier?: QuestionVerifier; readonly assets_dir?: string; private readonly descriptionCache; private readonly postscriptCache; private static instances; static create(spec: QuestionSpecification | Question): Question; private constructor(); renderResponse(uuid: string, skin?: ExamComponentSkin): string; renderResponseSolution(uuid: string, solution: ValidSubmission, skin?: ExamComponentSkin): string; renderDescription(skin: ExamComponentSkin): string; renderPostscript(skin: ExamComponentSkin): string; isKind(kind: RK): this is Question; } export declare class Section { readonly component_kind = "component"; readonly spec: SectionSpecification; readonly section_id: string; readonly title: string; readonly mk_description: string; readonly mk_reference?: string; readonly points: MinMaxPoints; readonly questions: readonly (Question | QuestionChooser)[]; readonly skin: ExamComponentSkin | SkinChooser; /** * Desired width of reference material as a percent (e.g. 40 means 40%). * Guaranteed to be an integral value. */ readonly right_column_width: number; readonly assets_dir?: string; readonly allQuestions: readonly Question[]; private readonly questionsMap; private readonly descriptionCache; private readonly referenceCache; private static instances; static create(spec: SectionSpecification | Section): Section; private constructor(); getQuestionById(question_id: string): Question | undefined; renderDescription(skin: ExamComponentSkin): string; renderReference(skin: ExamComponentSkin): string | undefined; } export declare const MK_DEFAULT_QUESTIONS_MESSAGE = ""; export declare const MK_DEFAULT_DOWNLOAD_MESSAGE = "Download an answers file to submit separately."; export declare const MK_DEFAULT_BOTTOM_MESSAGE = "You've reached the bottom of the exam!"; export declare class Exam { readonly component_kind = "component"; readonly exam_id: string; readonly title: string; readonly html_instructions: string; readonly html_announcements: readonly string[]; readonly mk_questions_message: string; readonly mk_download_message: string; readonly mk_bottom_message: string; readonly enable_bottom_im_finished_button: boolean; readonly mk_saver_message?: string; readonly assets_dir?: string; readonly points: MinMaxPoints; readonly sections: readonly (Section | SectionChooser)[]; readonly completion?: ExamCompletionSpecification; readonly enable_regrades: boolean; readonly allow_clientside_content: boolean; readonly credentials_strategy?: CredentialsStrategy; private static instances; readonly spec: ExamSpecification; readonly allSections: readonly Section[]; readonly allQuestions: readonly Question[]; private readonly sectionsMap; private readonly questionsMap; static create(spec: ExamSpecification | Exam): Exam; private constructor(); addAnnouncement(announcement_mk: string): void; getSectionById(section_id: string): Section | undefined; getQuestionById(question_id: string): Question | undefined; }