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.

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

(no description)

File Size: 155 lines (6 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.

param: \question_definition $question
return: int

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.

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

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

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

return: string