Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Calculated multiple-choice question definition class.

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

Defines 3 classes

qtype_calculatedmulti_single_question:: (5 methods):
  start_attempt()
  apply_attempt_state()
  calculate_all_expressions()
  get_num_variants()
  get_variants_selection_seed()

qtype_calculatedmulti_multi_question:: (5 methods):
  start_attempt()
  apply_attempt_state()
  calculate_all_expressions()
  get_num_variants()
  get_variants_selection_seed()

qtype_calculatedmulti_calculate_helper:: (1 method):
  calculate_all_expressions()


Class: qtype_calculatedmulti_single_question  - X-Ref

Represents a calculated multiple-choice multiple-response question.

start_attempt(question_attempt_step $step, $variant)   X-Ref


apply_attempt_state(question_attempt_step $step)   X-Ref
No description

calculate_all_expressions()   X-Ref
No description

get_num_variants()   X-Ref
No description

get_variants_selection_seed()   X-Ref
No description

Class: qtype_calculatedmulti_multi_question  - X-Ref

Represents a calculated multiple-choice multiple-response question.

start_attempt(question_attempt_step $step, $variant)   X-Ref


apply_attempt_state(question_attempt_step $step)   X-Ref
No description

calculate_all_expressions()   X-Ref
No description

get_num_variants()   X-Ref
No description

get_variants_selection_seed()   X-Ref
No description

Class: qtype_calculatedmulti_calculate_helper  - X-Ref

Helper to abstract common code between qtype_calculatedmulti_single_question
and qtype_calculatedmulti_multi_question.

calculate_all_expressions(qtype_calculated_question_with_expressions $question)   X-Ref
Calculate all the exressions in a qtype_calculatedmulti_single_question
or qtype_calculatedmulti_multi_question.

param: unknown_type $question