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) 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

Does this exam need a password to begin?

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.

Type:
Source:
See:

(static) canReverse :observable|boolean

Can the student go back to the previous question? False if the current question is the first one.

Type:
Source:

(static) currentQuestion :observable|Numbas.Question

The current question.

Type:
Source:
See:

(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) 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) enteredPassword :observable|string

Password entered by the student.

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) 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) passed :observable|boolean

Did the student pass the exam?

Type:
Source:

(static) passwordFeedback :observable|object

Feedback on the password the student has entered. Has properties iconClass, title and buttonClass.

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) 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) 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) 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

(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: