Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
qubaid_list Class Reference

This class represents a restriction on the set of question_usage ids to include in a larger database query based on an explicit list of ids. More...

Inheritance diagram for qubaid_list:
qubaid_condition

Public Member Functions

 __construct (array $qubaids)
 Constructor.
 
 from_question_attempts ($alias)
 Get the SQL fragment to go in a FROM clause.
 
 from_where_params ()
 
 get_hash_code ()
 
 usage_id_in ()
 
 usage_id_in_params ()
 
 where ()
 

Protected Attributes

 $columntotest = null
 
 $params
 
array $qubaids
 of ids.
 

Detailed Description

This class represents a restriction on the set of question_usage ids to include in a larger database query based on an explicit list of ids.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

qubaid_list::__construct ( array $qubaids)

Constructor.

Parameters
array$qubaidsof question usage ids.

Member Function Documentation

◆ from_question_attempts()

qubaid_list::from_question_attempts ( $alias)

Get the SQL fragment to go in a FROM clause.

The SQL that needs to go in the FROM clause when trying to select records from the 'question_attempts' table based on this qubaid_condition.

Parameters
string$alias
Return values
stringSQL fragment.

Reimplemented from qubaid_condition.

◆ from_where_params()

qubaid_list::from_where_params ( )
Return values
arraythe params needed by a query that uses from_question_attempts() and where().

Reimplemented from qubaid_condition.

◆ get_hash_code()

qubaid_condition::get_hash_code ( )
inherited
Return values
string40-character hash code that uniquely identifies the combination of properties and class name of this qubaid condition.

◆ usage_id_in()

qubaid_list::usage_id_in ( )
Return values
stringSQL that can use used in a WHERE qubaid IN (...) query. This method returns the "IN (...)" part.

Reimplemented from qubaid_condition.

◆ usage_id_in_params()

qubaid_list::usage_id_in_params ( )
Return values
arraythe params needed by a query that uses usage_id_in().

Reimplemented from qubaid_condition.

◆ where()

qubaid_list::where ( )
Return values
stringthe SQL that needs to go in the where clause.

Reimplemented from qubaid_condition.


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