Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
qbank_usage\helper Class Reference

Helper class for usage. More...

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.
 

Detailed Description

Helper class for usage.

Author
Safat Shahin safat.nosp@m.shah.nosp@m.in@ca.nosp@m.taly.nosp@m.st-au.nosp@m..net
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

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: