Moodle  2.2.1
http://www.collinsharper.com
qubaid_condition Class Reference
Inheritance diagram for qubaid_condition:

Public Member Functions

 from_question_attempts ($alias)
 where ()
 from_where_params ()
 usage_id_in ()
 usage_id_in_params ()

Detailed Description

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

Definition at line 1325 of file datalib.php.


Member Function Documentation

from_question_attempts ( alias) [abstract]
Returns:
string the SQL that needs to go in the FROM clause when trying to select records from the 'question_attempts' table based on the qubaid_condition.

Reimplemented in qubaid_join, and qubaid_list.

from_where_params ( ) [abstract]
Returns:
the params needed by a query that uses from_question_attempts() and where().

Reimplemented in qubaid_join, and qubaid_list.

Here is the caller graph for this function:

usage_id_in ( ) [abstract]
Returns:
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.

Here is the caller graph for this function:

usage_id_in_params ( ) [abstract]
Returns:
the params needed by a query that uses usage_id_in().

Reimplemented in qubaid_join, and qubaid_list.

Here is the caller graph for this function:

where ( ) [abstract]
Returns:
string the SQL that needs to go in the where clause.

Reimplemented in qubaid_join, and qubaid_list.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations