Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 137 lines (5 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)   X-Ref
Get the usage count for a question.

return: int
param: \question_definition $question

question_usage_sql()   X-Ref
Get the sql for usage data.

return: string

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

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

get_question_bank_usage_sql()   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.

return: string

get_question_attempt_usage_sql()   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.

return: string