Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
qbank_usage\helper Class Reference

Static Public Member Functions

static get_question_attempt_usage_sql (bool $specificversion=false)
 Get the question attempt usage sql.
 
static get_question_attempts_count_in_quiz (int $questionid, $quizid=null)
 Get question attempt count for the question.
 
static get_question_bank_usage_sql (bool $specificversion=false)
 Get the question bank usage sql.
 
static get_question_entry_usage_count ($question, bool $specificversion=false)
 Get the usage count for a question.
 
static get_question_last_used_sql ()
 Get the question last used sql.
 
static question_usage_sql (bool $specificversion=false)
 Get the sql for usage data.
 

Member Function Documentation

◆ get_question_attempt_usage_sql()

static qbank_usage\helper::get_question_attempt_usage_sql ( bool $specificversion = false)
static

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.

Parameters
bool$specificversionCount usages just for this version of the question?
Return values
string

◆ get_question_attempts_count_in_quiz()

static qbank_usage\helper::get_question_attempts_count_in_quiz ( int $questionid,
$quizid = null )
static

Get question attempt count for the question.

Parameters
int$questionid
int$quizid
Return values
int

◆ get_question_bank_usage_sql()

static qbank_usage\helper::get_question_bank_usage_sql ( bool $specificversion = false)
static

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.

Parameters
bool$specificversionCount usages just for this version of the question?
Return values
string

◆ get_question_entry_usage_count()

static qbank_usage\helper::get_question_entry_usage_count ( $question,
bool $specificversion = false )
static

Get the usage count for a question.

Parameters
question_definition$question
bool$specificversionCount usages just for this version of the question?
Return values
int

◆ get_question_last_used_sql()

static qbank_usage\helper::get_question_last_used_sql ( )
static

Get the question last used sql.

Return values
string

◆ question_usage_sql()

static qbank_usage\helper::question_usage_sql ( bool $specificversion = false)
static

Get the sql for usage data.

Parameters
bool$specificversionCount usages just for this version of the question?
Return values
string

The documentation for this class was generated from the following file: