Jump to navigation

Class: QuestionDisplay

Numbas.display.QuestionDisplay

new QuestionDisplay(q)

Display properties of a question object

Parameters:
Name Type Description
q Numbas.Question

the associated question object

Source:

Members

(static) adviceDisplayed :observable|Boolean

Has the advice been shown?

Type:
Source:

(static) answered :observable|Boolean

Has this question been answered? (Numbas.Question#answered)

Type:
Source:

(static) anyAnswered :observable|Boolean

Have any of this question's parts been answered?

Type:
Source:

(static) canReveal :observable|Boolean

Is the student able to reveal the correct answers?

Type:
Source:

(static) credit :observable|Number

Proportion of available marks awarded to the student

Type:
Source:

(static) displayName :observable|String

The name to display for this question - in default locale, it's "Question {N}"

Type:
Source:

(static) doesMarking :observable|Boolean

Does this question do any marking?

Type:
Source:

(static) html :Element

HTML representing the question

Type:
Source:

(static) isDirty :observable|Boolean

Has the student changed any of their answers since submitting?

Type:
Source:

(static) marks :observable|Number

Total marks available for this question (Numbas.Question#marks)

Type:
Source:

(static) numParts :observable|Number

Number of parts in this question

Type:
Source:

(static) question :Numbas.Question

The associated question object

Type:
Source:

(static) revealed :observable|Boolean

Have the correct answers been revealed? (Numbas.Question#revealed)

Type:
Source:

(static) score :observable|Number

Student's current score (Numbas.Question#score)

Type:
Source:

(static) scoreFeedback :Object

Score feedback string

Type:
Source:

(static) submitMessage :observable|String

Text for the "submit all answers" button

Type:
Source:

(static) visible :observable|Boolean

Is this question visible in the list?

Type:
Source:

(static) visited :observable|Boolean

Has the student looked at this question? (Numbas.Question#visited)

Type:
Source:

Methods

(static) end()

Called when the exam ends

Source:

(static) getPart(path) → {Numbas.display.PartDisplay}

Get the Numbas.display.PartDisplay object for the given path.

Parameters:
Name Type Description
path Numbas.parts.partpath
Returns:
Type Description
Numbas.display.PartDisplay
Source:

(static) init()

Initialise this question's display

Source:

(static) leave()

Called when the student leaves the question

Source:

(static) makeHTML()

Make the HTML to display the question

Source:

(static) revealAnswer()

Reveal the answers to this question

Source:

(static) review()

Show this question in review mode

Source:

(static) scrollToError()

Scroll to the first part submission error

Source:

(static) show()

Show the question

Source:

(static) showAdvice()

Show this question's advice

Source:

(static) showScore()

Display question score and answer state

Source: