Moodle  2.2.1
http://www.collinsharper.com
question_display_options Class Reference
Inheritance diagram for question_display_options:

Public Member Functions

 hide_all_feedback ()

Static Public Member Functions

static get_dp_options ()

Data Fields

const HIDDEN = 0
const VISIBLE = 1
const EDITABLE = 2
const MAX_ONLY = 1
const MARK_AND_MAX = 2
const MAX_DP = 7
 $readonly = false
 $clearwrong = false
 $correctness = self::VISIBLE
 $marks = self::MARK_AND_MAX
 $markdp = 2
 $flags = self::VISIBLE
 $feedback = self::VISIBLE
 $numpartscorrect = self::VISIBLE
 $generalfeedback = self::VISIBLE
 $rightanswer = self::VISIBLE
 $manualcomment = self::VISIBLE
 $manualcommentlink = null
 $questionreviewlink = null
 $history = self::HIDDEN
 $editquestionparams = array()
 $context

Detailed Description

This class contains all the options that controls how a question is displayed.

Normally, what will happen is that the calling code will set up some display options to indicate what sort of question display it wants, and then before the question is rendered, the behaviour will be given a chance to modify the display options, so that, for example, A question that is finished will only be shown read-only, and a question that has not been submitted will not have any sort of feedback displayed.

Definition at line 378 of file lib.php.


Member Function Documentation

static get_dp_options ( ) [static]

Returns the valid choices for the number of decimal places for showing question marks. For use in the user interface.

Calling code should probably use question_engine::get_dp_options() rather than calling this method directly.

Returns:
array suitable for passing to choose_from_menu() or similar.

Definition at line 540 of file lib.php.

Set all the feedback-related fields $feedback, generalfeedback, rightanswer and manualcomment to question_display_options::HIDDEN.

Definition at line 522 of file lib.php.

Here is the caller graph for this function:


Field Documentation

$clearwrong = false

Definition at line 407 of file lib.php.

Definition at line 515 of file lib.php.

$correctness = self::VISIBLE

Definition at line 417 of file lib.php.

$editquestionparams = array()

Definition at line 510 of file lib.php.

$feedback = self::VISIBLE

Definition at line 442 of file lib.php.

$flags = self::VISIBLE

Definition at line 435 of file lib.php.

$generalfeedback = self::VISIBLE

Definition at line 458 of file lib.php.

$history = self::HIDDEN

Definition at line 496 of file lib.php.

$manualcomment = self::VISIBLE

Definition at line 475 of file lib.php.

$manualcommentlink = null

Definition at line 482 of file lib.php.

$markdp = 2

Definition at line 427 of file lib.php.

$marks = self::MARK_AND_MAX

Definition at line 424 of file lib.php.

$numpartscorrect = self::VISIBLE

Definition at line 451 of file lib.php.

$questionreviewlink = null

Definition at line 489 of file lib.php.

$readonly = false

Definition at line 401 of file lib.php.

$rightanswer = self::VISIBLE

Definition at line 466 of file lib.php.

const EDITABLE = 2

Definition at line 382 of file lib.php.

integer link HIDDEN = 0

The the mark and/or the maximum available mark for this question be visible?

question_display_options::MAX_ONLY or question_display_options::MARK_AND_MAX

Should the flag this question UI element be visible, and if so, should the flag state be changable?

question_display_options::VISIBLE or question_display_options::EDITABLE

Should the manually added marker's comment be visible. Should the link for adding/editing the comment be there.

question_display_options::VISIBLE, or question_display_options::EDITABLE. Editable means that form fields are displayed inline.

Definition at line 380 of file lib.php.

const MARK_AND_MAX = 2

Definition at line 387 of file lib.php.

const MAX_DP = 7

Definition at line 395 of file lib.php.

const MAX_ONLY = 1

Definition at line 386 of file lib.php.

const VISIBLE = 1

Definition at line 381 of file lib.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations