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 400 and 403] [Versions 401 and 403] [Versions 402 and 403]

(no description)

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

Defines 1 class


Class: helper  - X-Ref

Helper class for usage.

get_question_entry_usage_count($question, bool $specificversion = false)   X-Ref
Get the usage count for a question.

param: \question_definition $question
param: bool $specificversion Count usages just for this version of the question?
return: int

question_usage_sql(bool $specificversion = false)   X-Ref
Get the sql for usage data.

param: bool $specificversion Count usages just for this version of the question?
return: string

get_question_attempts_count_in_quiz(int $questionid, $quizid = null)   X-Ref
Get question attempt count for the question.

param: int $questionid
param: int $quizid
return: int

get_question_bank_usage_sql(bool $specificversion = false)   X-Ref
Get the question bank usage sql.

The resulting string which represents a sql query has then to be
called accompanying a $params array which includes the necessary
parameters in the correct order which are the question id, then
the component and finally the question area.

param: bool $specificversion Count usages just for this version of the question?
return: string

get_question_attempt_usage_sql(bool $specificversion = false)   X-Ref
Get the question attempt usage sql.

The resulting string which represents a sql query has then to be
called accompanying a $params array which includes the necessary
parameter, the question id.

param: bool $specificversion Count usages just for this version of the question?
return: string

get_question_last_used_sql()   X-Ref
Get the question last used sql.

return: string