new QuestionDisplay(q)
Display properties of a question object.
Parameters:
Name | Type | Description |
---|---|---|
q |
Numbas.Question | the associated question object |
Members
(static) adviceDisplayed :observable|boolean
Has the advice been shown?
Type:
(static) answered :observable|boolean
Has this question been answered?
Type:
(static) anyAnswered :observable|boolean
Have any of this question's parts been answered?
Type:
(static) canReveal :observable|boolean
Is the student able to reveal the correct answers?
Type:
(static) credit :observable|number
Proportion of available marks awarded to the student.
Type:
(static) css_classes :Observable.<object>
CSS classes for this question's HTML element.
Type:
- Observable.<object>
(static) currentPart :observable|Numbas.display.PartDisplay
The currently visible part, in explore mode.
Type:
(static) displayName :observable|string
The name to display for this question - in default locale, it's "Question {N}".
Type:
(static) doesMarking :observable|boolean
Does this question do any marking?
Type:
(static) hasAdvice :observable|string
Does this question have non-empty advice text?
Type:
(static) hasStatement :observable|string
Does this question have non-empty statement text?
Type:
(static) html :Element
HTML representing the question.
Type:
(static) isDirty :observable|boolean
Has the student changed any of their answers since submitting?
Type:
(static) locked :observable|boolean
Has this question been locked?
Type:
(static) marks :observable|number
Total marks available for this question.
Type:
(static) numParts :observable|number
Number of parts in this question.
Type:
(static) objectives :Array.<object>
Explore mode objectives.
Type:
(static) parts :observable.<Array.<Numbas.display.PartDisplay>>
Display objects for all parts in this question.
Type:
(static) penalties :Array.<object>
Explore mode penalties.
Type:
(static) previousPart :observable|Numbas.display.PartDisplay
The part that created the current part.
Type:
(static) revealed :observable|boolean
Have the correct answers been revealed?
Type:
(static) score :observable|number
Student's current score.
Type:
(static) scoreFeedback :Object
Score feedback string.
Type:
(static) showPartsTree :Observable.<boolean>
Show the tree of parts for navigation?
Type:
- Observable.<boolean>
(static) showScoreBreakdown :Observable.<boolean>
Should the score breakdown table be shown?
Type:
- Observable.<boolean>
(static) submitMessage :observable|string
Text for the "submit all answers" button.
Type:
(static) this.html_promise :Promise
A promise resolving to the question's HTML element.
Type:
- Promise
(static) visible :observable|boolean
Is this question visible in the list?
Type:
(static) visited :observable|boolean
Has the student looked at this question?
Type:
Methods
resume()
Called when the attempt is resumed.
updateParts()
Update the list of parts.
(static) end()
Called when the exam ends.
(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 |
(static) init()
Initialise this question's display.
(static) leave()
Called when the student leaves the question.
(static) makeHTML()
Make the HTML to display the question.
(static) revealAnswer()
Reveal the answers to this question.
(static) review()
Show this question in review mode.
(static) scrollToError()
Scroll to the first part submission error.
(static) show()
Show the question.
(static) showAdvice()
Show this question's advice.
(static) showScore(noUpdate)
Display question score and answer state.
Parameters:
Name | Type | Description |
---|---|---|
noUpdate |
boolean |
(static) this.htmlBound()
Called when Knockout has finished binding all the HTML for this question to the DOM.