|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($from, $usageidcolumn, $where= '', $params=array()) | |
| from_question_attempts ($alias) | |
| where () | |
| from_where_params () | |
| usage_id_in () | |
| usage_id_in_params () | |
Data Fields | |
| $from | |
| $usageidcolumn | |
| $where | |
| $params | |
This class represents a restriction on the set of question_usage ids to include in a larger database query based on JOINing to some other tables.
The general form of the query is something like
SELECT qa.id, qa.maxmark FROM $from JOIN {question_attempts} qa ON qa.questionusageid = $usageidcolumn WHERE $where AND qa.slot = 1
where $from, $usageidcolumn and $where are the arguments to the constructor.
Definition at line 1434 of file datalib.php.
| __construct | ( | $ | from, |
| $ | usageidcolumn, | ||
| $ | where = '', |
||
| $ | params = array() |
||
| ) |
Constructor. The meaning of the arguments is explained in the class comment.
| string | $from | SQL fragemnt to go in the FROM clause. |
| string | $usageidcolumn | the column in $from that should be made equal to the usageid column in the JOIN clause. |
| string | $where | SQL fragment to go in the where clause. |
| array | $params | required by the SQL. You must use named parameters. |
Definition at line 1448 of file datalib.php.

| from_question_attempts | ( | $ | alias | ) |
Reimplemented from qubaid_condition.
Definition at line 1458 of file datalib.php.
Reimplemented from qubaid_condition.
Definition at line 1468 of file datalib.php.
| usage_id_in | ( | ) |
Reimplemented from qubaid_condition.
Definition at line 1472 of file datalib.php.
Reimplemented from qubaid_condition.
Definition at line 1476 of file datalib.php.
| where | ( | ) |
Reimplemented from qubaid_condition.
Definition at line 1464 of file datalib.php.

| $from |
Definition at line 1435 of file datalib.php.
| $params |
Definition at line 1438 of file datalib.php.
| $usageidcolumn |
Definition at line 1436 of file datalib.php.
Definition at line 1437 of file datalib.php.