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.

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: 0 times
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