import { AssignedSection, Exam } from '../core'; import { AssignedExam, AssignedQuestion } from './assigned_exams'; import { StudentInfo } from './exam_specification'; import { PluginCollection } from './plugin'; export declare function renderHead(scripts: string, plugin_configs: string, css: string): string; export declare function renderInstructions(exam: Exam): string; export declare function renderAnnouncements(exam: Exam): string; export interface ExamRendererPlugin { config(ae: AssignedExam): Config_t; initial_state(ae: AssignedExam): State_t; section_nav?(as: AssignedSection): string; section_right_column?(as: AssignedSection): { readonly right_column_id: string; readonly tab_header: string; readonly tab_content: string; } | undefined; } type ExamRendererOptions = { /** * A string containing custom css rules, which will be rendered into a style * tag within the tag of the generated html. */ custom_css?: string; plugins?: PluginCollection; }; export declare abstract class ExamRenderer { readonly options: Readonly; readonly plugins: PluginCollection; constructor(options?: Partial); renderTimer(): string; renderNav(ae: AssignedExam): string; abstract renderSectionNavBadges(s: AssignedSection): string; renderSaverButton(ae: AssignedExam): string; renderGradingSummary(ae: AssignedExam): string; abstract renderScripts(ae: AssignedExam, frontendPath: string): string; renderPluginConfigs(ae: AssignedExam): string; abstract renderBody(ae: AssignedExam): string; renderSections(ae: AssignedExam): string; renderAll(ae: AssignedExam, frontendPath: string): string; renderHeader(ae: AssignedExam, student: StudentInfo): string; protected abstract renderStudentHeader(student: StudentInfo): string; protected abstract renderSectionHeader(as: AssignedSection): string; renderSection(as: AssignedSection): string; renderSectionMainColumn(as: AssignedSection): string; private hasRightColumnContent; renderSectionRightColumn(as: AssignedSection): string; protected renderRightColumnPanels(as: AssignedSection): string; protected abstract renderQuestionHeader(aq: AssignedQuestion): string; protected abstract renderQuestionContent(aq: AssignedQuestion): string; renderQuestion(aq: AssignedQuestion): string; protected renderModals(ae: AssignedExam): string; } declare abstract class TakenExamRenderer extends ExamRenderer { renderScripts(ae: AssignedExam, frontendPath: string): string; protected renderSignInButton(): string; protected renderCompletionStatus(ae: AssignedExam): string; renderNav(ae: AssignedExam): string; protected abstract renderQuestionNavBadges(q: AssignedQuestion): string; protected renderVerifierStatus(aq: AssignedQuestion): string; protected renderModals(ae: AssignedExam): string; } export declare class OriginalExamRenderer extends TakenExamRenderer { renderScripts(ae: AssignedExam, frontendPath: string): string; renderBody(ae: AssignedExam): string; renderSectionNavBadges(s: AssignedSection): string; protected renderQuestionNavBadges(q: AssignedQuestion): string; protected renderStudentHeader(student: StudentInfo): string; protected renderSectionHeader(as: AssignedSection): string; protected renderQuestionHeader(aq: AssignedQuestion): string; protected renderQuestionContent(aq: AssignedQuestion): string; } export declare class SampleSolutionExamRenderer extends ExamRenderer { renderScripts(ae: AssignedExam, frontendPath: string): string; renderBody(ae: AssignedExam): string; renderSectionNavBadges(s: AssignedSection): string; protected renderStudentHeader(student: StudentInfo): string; protected renderSectionHeader(as: AssignedSection): string; protected renderQuestionHeader(aq: AssignedQuestion): string; protected renderQuestionContent(aq: AssignedQuestion): string; } export declare class SubmittedExamRenderer extends ExamRenderer { renderScripts(ae: AssignedExam, frontendPath: string): string; renderBody(ae: AssignedExam): string; renderSectionNavBadges(s: AssignedSection): string; protected renderStudentHeader(student: StudentInfo): string; protected renderSectionHeader(as: AssignedSection): string; protected renderQuestionHeader(aq: AssignedQuestion): string; protected renderQuestionContent(aq: AssignedQuestion): string; } export declare class GradedExamRenderer extends ExamRenderer { renderScripts(ae: AssignedExam, frontendPath: string): string; renderBody(ae: AssignedExam): string; renderSectionNavBadges(s: AssignedSection): string; protected renderStudentHeader(student: StudentInfo): string; renderGrade(ae: AssignedExam): string; protected renderSectionHeader(as: AssignedSection): string; protected renderQuestionHeader(aq: AssignedQuestion): string; protected renderQuestionContent(aq: AssignedQuestion): string; private renderExceptionIfPresent; } export declare class DocRenderer extends TakenExamRenderer { renderScripts(ae: AssignedExam, frontendPath: string): string; renderBody(ae: AssignedExam): string; renderSectionNavBadges(s: AssignedSection): string; protected renderQuestionNavBadges(q: AssignedQuestion): string; protected renderStudentHeader(student: StudentInfo): string; protected renderSectionHeader(as: AssignedSection): string; protected renderQuestionHeader(aq: AssignedQuestion): string; protected renderQuestionContent(aq: AssignedQuestion): string; } export {};