Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
qbank_usage\helper Class Reference

Static Public Member Functions

static get_question_attempt_usage_sql ()
 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 ()
 Get the question bank usage sql.
 
static get_question_entry_usage_count ($question)
 Get the usage count for a question.
 
static get_question_last_used_sql ()
 Get the question last used sql.
 
static question_usage_sql ()
 Get the sql for usage data.
 

Member Function Documentation

◆ get_question_attempt_usage_sql()

static qbank_usage\helper::get_question_attempt_usage_sql ( )
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.

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

Return values
string

◆ get_question_entry_usage_count()

static qbank_usage\helper::get_question_entry_usage_count ( $question)
static

Get the usage count for a question.

Parameters
question_definition$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 ( )
static

Get the sql for usage data.

Return values
string

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