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

Time the exam ended, formatted for display

Source:

(static) _startTime

Time the exam started, formatted for display

Source:

(static) allowPause :Boolean

Is the student allowed to pause the exam?

Type:
Source:

(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 (Numbas.Exam#currentQuestion)

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) 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 (Numbas.Exam#mark)

Type:
Source:

(static) mode :observable|String

The exam's mode (Numbas.Exam#mode)

Type:
Source:

(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 (Numbas.Exam#percentPass), formatted as a string.

Type:
Source:

(static) percentScore :observable|Number

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

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) saving :observable|Boolean

Is Numbas.store currently saving?

Type:
Source:

(static) score :observable|Number

The student's total score (Numbas.Exam#score)

Type:
Source:

(static) showQuestionGroupNames :observable|String

Show the names of question groups in the menu?

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

Apply knockout bindings to the given question

Parameters:
Type Description
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) showInfoPage(page)

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

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: