Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 402 and 403]

(no description)

File Size: 112 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

display_options:: (2 methods):
  make_from_quiz()
  extract()


Class: display_options  - X-Ref

An extension of question_display_options that includes the extra options used by the quiz.

make_from_quiz(\stdClass $quiz, int $when)   X-Ref
Set up the various options from the quiz settings, and a time constant.

param: \stdClass $quiz the quiz settings from the database.
param: int $when of the constants {@see DURING}, {@see IMMEDIATELY_AFTER},
return: display_options instance of this class set up appropriately.

extract(int $setting, int $when,$whenset = self::VISIBLE, $whennotset = self::HIDDEN)   X-Ref
Helper function to return one value or another depending on whether one bit is set.

param: int $setting the setting to unpack (e.g. $quiz->reviewmarks).
param: int $when of the constants {@see DURING}, {@see IMMEDIATELY_AFTER},
param: bool|int $whenset value to return when the bit is set.
param: bool|int $whennotset value to return when the bit is set.
return: bool|int $whenset or $whennotset, depending.