Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
This class represents a restriction on the set of question_usage ids to include in a larger database query. More...
Public Member Functions | |
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 () | |
This class represents a restriction on the set of question_usage ids to include in a larger database query.
Depending of the how you are going to restrict the list of usages, construct an appropriate subclass.
If $qubaids is an instance of this class, example usage might be
SELECT qa.id, qa.maxmark FROM $qubaids->from_question_attempts('qa') WHERE $qubaids->where() AND qa.slot = 1
|
abstract |
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.
string | $alias |
string | SQL fragment. |
Reimplemented in qubaid_join, and qubaid_list.
|
abstract |
array | the params needed by a query that uses from_question_attempts() and where(). |
Reimplemented in qubaid_join, and qubaid_list.
qubaid_condition::get_hash_code | ( | ) |
string | 40-character hash code that uniquely identifies the combination of properties and class name of this qubaid condition. |
|
abstract |
string | SQL that can use used in a WHERE qubaid IN (...) query. This method returns the "IN (...)" part. |
Reimplemented in qubaid_join, and qubaid_list.
|
abstract |
array | the params needed by a query that uses usage_id_in(). |
Reimplemented in qubaid_join, and qubaid_list.
|
abstract |
string | the SQL that needs to go in the where clause. |
Reimplemented in qubaid_join, and qubaid_list.