Jump to navigation

Class: ExamDisplay

Numbas.display.ExamDisplay

new ExamDisplay(e)

Display properties of the Numbas.Exam object.

Parameters:
Name Type Description
e Numbas.Exam

associated exam

Source:

Members

(static) advance :observable|boolean

Move forwards, to the next question or just switch back to viewing questions if viewing an info page.

Type:
Source:

(static) allowAttemptDownload :boolean

Does this exam allow the student to download their attempt data?

Type:
Source:

(static) allowPause :boolean

Is the student allowed to pause the exam?

Type:
Source:

(static) allowPrinting :observable|boolean

Allow the student to print an exam transcript?

Type:
Source:
See:
  • Numbas.Exam#settings#percentPass

(static) canAdvance :observable|boolean

Can the student go forward to the next question? False if the current question is the last one.

Type:
Source:

(static) canBegin :observable|boolean

Can the exam begin? True if no password is required, or if the student has entered the right password, and no name is required or the student has entered a name.

Type:
Source:

(static) canReverse :observable|boolean

Can the student go back to the previous question, or to the introduction? False if the current question is the first one and there's no introduction.

Type:
Source:

(static) confirmEnd :observable|string

Confirmation text entered by the student to end the exam.

Type:
Source:

(static) currentQuestionNumber :observable|number

The number of the current question.

Type:
Source:

(static) displayTime :observable|string

The time left in the exam.

Type:
Source:

(static) downloadEncryptionKey :observable|string

Key to use for encrypting student data

Type:
Source:

(static) downloadEncryptionKey :string

Key for encrypting student data.

Type:
Source:

(static) duration :observable|number

The time allowed for the exam, in seconds.

Type:
Source:

(static) endTime :observable|string

Time the exam ended, formatted for display.

Type:
Source:

(static) endTimeISO :observable|string

The time the exam ended, in ISO format.

Type:
Source:

(static) exam :Numbas.Exam

Reference to the associated exam object.

Type:
Source:

(static) examScoreDisplay :observable|string

String displaying the student's current score, and the total marks available, if allowed.

Type:
Source:

(static) feedbackMessage :observable|string

Message shown to the student based on their total score.

Type:
Source:

(static) infoPage :observable|string

The name of the currently displayed info page.

Type:
Source:

(static) main_labelledby :observable|string

The ID of the header to use for the label of the

tag.

Type:
Source:

(static) marks :observable|number

The total marks available for the exam.

Type:
Source:
See:

(static) mode :observable|string

The exam's mode.

Type:
Source:
See:

(static) needsPassword :boolean

Does this exam need a password to begin?

Type:
Source:

(static) needsStudentName :boolean

Must the student write their name before the exam can begin?

Type:
Source:

(static) numQuestions :observable|number

The number of questions in the exam.

Type:
Source:

(static) passed :observable|boolean

Did the student pass the exam?

Type:
Source:

(static) percentPass :observable|string

The percentage score the student needs to achieve to pass, formatted as a string.

Type:
Source:
See:
  • Numbas.Exam#settings#percentPass

(static) percentScore :observable|number

The student's total score as a percentage of the total marks available.

Type:
Source:

(static) printLabel :observable|string

Label to use for the "print your transcript" button on the results page.

Type:
Source:

(static) questions :observable|Array.<Numbas.display.QuestionDisplay>

All the exam's question display objects.

Type:
Source:

(static) questionsAttempted :observable|number

Total number of questions the student attempted.

Type:
Source:

(static) questionsAttemptedDisplay :observable|string

Total number of questions the student attempted, formatted as a fraction of the total number of questions.

Type:
Source:

(static) result :observable|string

The result of the exam - passed or failed?

Type:
Source:

(static) revealed :observable|boolean

Have the correct answers been revealed?

Type:
Source:
See:

(static) reverse :observable|boolean

Move backwards, to the previous question or to the introduction if already on the first question.

Type:
Source:

(static) saving :observable|boolean

Is Numbas.store currently saving?

Type:
Source:

(static) score :observable|number

The student's total score.

Type:
Source:
See:

(static) showActualMark :observable|boolean

Show the student their total score?

Type:
Source:

(static) showAttemptDownloadSecurityWarning :boolean

Show a warning that downloading attempt data won't work? True if the window is not in a secure context.

Type:
Source:

(static) showQuestionGroupNames :observable|string

Show the names of question groups in the menu?

Type:
Source:

(static) startTime :observable|string

Time the exam started, formatted for display.

Type:
Source:

(static) startTimeISO :observable|string

The time the exam started, in ISO format.

Type:
Source:

(static) student_name :observable|string

The student's name, as entered by the student.

Type:
Source:

(static) timeSpent :observable|string

The total time the student has spent in the exam.

Type:
Source:

(static) viewType :observable|string

What kind of view are we in at the moment? 'infopage' or 'question'.

Type:
Source:

Methods

download_attempt_data()

Download the attempt data.

Source:

showDiagnosticActions()

Show the modal dialog with actions the student can take to move on from the current question.

Source:

(static) applyQuestionBindings(question)

Apply knockout bindings to the given question.

Parameters:
Name Type Description
question Numbas.Question
Source:

(static) beginExam()

Try to begin the exam.

Source:

(static) end()

Called when the exam ends.

Source:

(static) endRegen()

Called after the current question has been regenerated.

Source:

(static) hideNavMenu()

Hide the sliding side menu.

Source:

(static) hideTiming()

Hide the timer.

Source:

(static) initQuestionList()

Initialise the question list display.

Source:

(static) revealAnswers()

Reveal the answers to every question in the exam.

Source:

(static) showInfoPage(page)

Show an info page (one of the front page, pause, or results).

Parameters:
Name Type Description
page string

Name of the page to show.

Source:

(static) showQuestion()

Show the current question.

Source:

(static) showScore()

Show/update the student's total score.

Source:

(static) showTiming()

Update the timer.

Source:

(static) startRegen()

Called just before the current question is regenerated.

Source:

(static) updateQuestionMenu()

Update the question list display - typically, scroll so the current question is visible.

Source: