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


Public Member Functions | |
| __construct ($uniqueid) | |
| table_sql ($uniqueid) | |
| build_table () | |
| get_row_class ($row) | |
| set_count_sql ($sql, array $params=NULL) | |
| set_sql ($fields, $from, $where, array $params=NULL) | |
| query_db ($pagesize, $useinitialsbar=true) | |
| out ($pagesize, $useinitialsbar, $downloadhelpbutton='') | |
Data Fields | |
| $countsql = NULL | |
| $countparams = NULL | |
| $sql = NULL | |
| $rawdata = NULL | |
| $is_sortable = true | |
| $is_collapsible = true | |
Definition at line 1240 of file tablelib.php.
| __construct | ( | $ | uniqueid | ) |
| string | $uniqueid | a string identifying this table.Used as a key in session vars. |
Reimplemented from flexible_table.
Definition at line 1266 of file tablelib.php.


| build_table | ( | ) |
Take the data returned from the db_query and go through all the rows processing each col using either col_{columnname} method or other_cols method or if other_cols returns NULL then put the data straight into the table.
Reimplemented in quiz_report_overview_table, and quiz_report_responses_table.
Definition at line 1290 of file tablelib.php.


| get_row_class | ( | $ | row | ) |
Get any extra classes names to add to this row in the HTML.
| $row | array the data for this row. |
Reimplemented in xhprof_table_sql, and quiz_attempt_report_table.
Definition at line 1305 of file tablelib.php.

| out | ( | $ | pagesize, |
| $ | useinitialsbar, | ||
| $ | downloadhelpbutton = '' |
||
| ) |
Convenience method to call a number of methods for you to display the table.
Definition at line 1394 of file tablelib.php.

Query the db. Store results in the table object for use by build_table.
| int | $pagesize | size of page for paginated displayed table. |
| bool | $useinitialsbar | do you want to use the initials bar. Bar will only be used if there is a fullname column defined for the table. |
Reimplemented in quiz_attempt_report_table, and quiz_report_overview_table.
Definition at line 1344 of file tablelib.php.


| set_count_sql | ( | $ | sql, |
| array $ | params = NULL |
||
| ) |
This is only needed if you want to use different sql to count rows. Used for example when perhaps all db JOINS are not needed when counting records. You don't need to call this function the count_sql will be generated automatically.
We need to count rows returned by the db seperately to the query itself as we need to know how many pages of data we have to display.
Definition at line 1318 of file tablelib.php.
Set the sql to query the db. Query will be : SELECT $fields FROM $from WHERE $where Of course you can use sub-queries, JOINS etc. by putting them in the appropriate clause of the query.
Definition at line 1329 of file tablelib.php.
| table_sql | ( | $ | uniqueid | ) |
Backwards-compatible constructor, so that legacy code subclassing table_sql does not break.
Definition at line 1278 of file tablelib.php.

| $countparams = NULL |
Definition at line 1243 of file tablelib.php.
| $countsql = NULL |
Definition at line 1242 of file tablelib.php.
| $is_collapsible = true |
Reimplemented from flexible_table.
Definition at line 1260 of file tablelib.php.
| $is_sortable = true |
Reimplemented from flexible_table.
Definition at line 1256 of file tablelib.php.
| $rawdata = NULL |
Definition at line 1251 of file tablelib.php.
| $sql = NULL |
Definition at line 1247 of file tablelib.php.