Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.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