Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Fake question behaviour that is used when the actual behaviour was not available.

Copyright: 2009 The Open University
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 76 lines (3 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

qbehaviour_missing:: (6 methods):
  is_compatible_question()
  summarise_action()
  init_first_step()
  process_action()
  get_min_fraction()
  get_max_fraction()


Class: qbehaviour_missing  - X-Ref

Fake question behaviour that is used when the actual behaviour
is not available.

Imagine, for example, that a quiz attempt has been restored from another
Moodle site with more behaviours installed, or a behaviour
that used to be available in this site has been uninstalled. Obviously all we
can do is have some code to prevent fatal errors.

The approach we take is: The rendering code is still implemented, as far as
possible. A warning is shown that behaviour specific bits may be missing.
Any attempt to process anything causes an exception to be thrown.

is_compatible_question(question_definition $question)   X-Ref
No description

summarise_action(question_attempt_step $step)   X-Ref
No description

init_first_step(question_attempt_step $step, $variant)   X-Ref
No description

process_action(question_attempt_pending_step $pendingstep)   X-Ref
No description

get_min_fraction()   X-Ref
No description

get_max_fraction()   X-Ref
No description