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

Public Member Functions | |
| __construct (question_bank_view $qbank) | |
| is_extra_row () | |
| display_header () | |
| display ($question, $rowclasses) | |
| get_name () | |
| get_extra_classes () | |
| get_extra_joins () | |
| get_required_fields () | |
| is_sortable () | |
| sort_expression ($reverse, $subsort) | |
Protected Member Functions | |
| init () | |
| get_title () | |
| get_title_tip () | |
| make_sort_link ($sort, $title, $tip, $defaultreverse=false) | |
| get_sort_icon ($reverse) | |
| display_start ($question, $rowclasses) | |
| get_classes () | |
| display_content ($question, $rowclasses) | |
| display_end ($question, $rowclasses) | |
| sortorder ($reverse) | |
Protected Attributes | |
| $qbank | |
Base class for representing a column in a question_bank_view.
Definition at line 130 of file editlib.php.
| __construct | ( | question_bank_view $ | qbank | ) |
Constructor.
| $qbank | the question_bank_view we are helping to render. |
Definition at line 140 of file editlib.php.

| display | ( | $ | question, |
| $ | rowclasses | ||
| ) |
Output this column.
| object | $question | the row from the $question table, augmented with extra information. |
| string | $rowclasses | CSS class names that should be applied to this row of output. |
Definition at line 254 of file editlib.php.

| display_content | ( | $ | question, |
| $ | rowclasses | ||
| ) | [abstract, protected] |
Output the contents of this column.
| object | $question | the row from the $question table, augmented with extra information. |
| string | $rowclasses | CSS class names that should be applied to this row of output. |
Reimplemented in question_bank_question_name_text_column, question_bank_add_to_quiz_action_column, question_bank_question_text_row, question_bank_delete_action_column, question_bank_move_action_column, question_bank_preview_action_column, question_bank_edit_action_column, question_bank_modifier_name_column, question_bank_creator_name_column, question_bank_question_name_column, question_bank_question_type_column, and question_bank_checkbox_column.

| display_end | ( | $ | question, |
| $ | rowclasses | ||
| ) | [protected] |
Reimplemented in question_bank_row_base.
Definition at line 294 of file editlib.php.

| display_header | ( | ) |
Output the column header cell.
Definition at line 159 of file editlib.php.

| display_start | ( | $ | question, |
| $ | rowclasses | ||
| ) | [protected] |
Reimplemented in question_bank_row_base.
Definition at line 260 of file editlib.php.


| get_classes | ( | ) | [protected] |
Definition at line 267 of file editlib.php.


Reimplemented in question_bank_action_column_base.
Definition at line 283 of file editlib.php.

| get_extra_joins | ( | ) |
Return an array 'table_alias' => 'JOIN clause' to bring in any data that this column required.
The return values for all the columns will be checked. It is OK if two columns join in the same table with the same alias and identical JOIN clauses. If to columns try to use the same alias with different joins, you get an error. The only table included by default is the question table, which is aliased to 'q'.
It is importnat that your join simply adds additional data (or NULLs) to the existing rows of the query. It must not cause additional rows.
Reimplemented in question_bank_question_text_row, question_bank_modifier_name_column, and question_bank_creator_name_column.
Definition at line 312 of file editlib.php.
| get_name | ( | ) | [abstract] |
| object | $question | the row from the $question table, augmented with extra information. |
Reimplemented in question_bank_question_name_text_column, question_bank_add_to_quiz_action_column, question_bank_question_text_row, question_bank_delete_action_column, question_bank_move_action_column, question_bank_preview_action_column, question_bank_edit_action_column, question_bank_modifier_name_column, question_bank_creator_name_column, question_bank_question_name_column, question_bank_question_type_column, and question_bank_checkbox_column.

Reimplemented in question_bank_question_name_text_column, question_bank_add_to_quiz_action_column, question_bank_question_text_row, question_bank_delete_action_column, question_bank_preview_action_column, question_bank_action_column_base, question_bank_modifier_name_column, question_bank_creator_name_column, question_bank_question_name_column, question_bank_question_type_column, and question_bank_checkbox_column.
Definition at line 320 of file editlib.php.
| get_sort_icon | ( | $ | reverse | ) | [protected] |
Get an icon representing the corrent sort state.
| $reverse | sort is descending, not ascending. |
Definition at line 240 of file editlib.php.

| get_title | ( | ) | [abstract, protected] |
Title for this column. Not used if is_sortable returns an array.
| object | $question | the row from the $question table, augmented with extra information. |
| string | $rowclasses | CSS class names that should be applied to this row of output. |
Reimplemented in question_bank_question_text_row, question_bank_action_column_base, question_bank_modifier_name_column, question_bank_creator_name_column, question_bank_question_name_column, question_bank_question_type_column, and question_bank_checkbox_column.

| get_title_tip | ( | ) | [protected] |
Reimplemented in question_bank_question_type_column, and question_bank_checkbox_column.
Definition at line 200 of file editlib.php.

| init | ( | ) | [protected] |
A chance for subclasses to initialise themselves, for example to load lang strings, without having to override the constructor.
Reimplemented in question_bank_add_to_quiz_action_column, question_bank_question_text_row, question_bank_delete_action_column, question_bank_move_action_column, question_bank_preview_action_column, question_bank_edit_action_column, and question_bank_checkbox_column.
Definition at line 149 of file editlib.php.

| is_extra_row | ( | ) |
Reimplemented in question_bank_row_base.
Definition at line 152 of file editlib.php.
| is_sortable | ( | ) |
Can this column be sorted on? You can return either: + false for no (the default), + a field name, if sorting this column corresponds to sorting on that datbase field. + an array of subnames to sort on as follows return array( 'firstname' => array('field' => 'uc.firstname', 'title' => get_string('firstname')), 'lastname' => array('field' => 'uc.lastname', 'field' => get_string('lastname')), ); As well as field, and field, you can also add 'revers' => 1 if you want the default sort order to be DESC.
Reimplemented in question_bank_modifier_name_column, question_bank_creator_name_column, question_bank_question_name_column, and question_bank_question_type_column.
Definition at line 337 of file editlib.php.

| make_sort_link | ( | $ | sort, |
| $ | title, | ||
| $ | tip, | ||
| $ | defaultreverse = false |
||
| ) | [protected] |
Get a link that changes the sort order, and indicates the current sort state.
| $name | internal name used for this type of sorting. |
| $currentsort | the current sort order -1, 0, 1 for descending, none, ascending. |
| $title | the link text. |
| $defaultreverse | whether the default sort order for this column is descending, rather than ascending. |
Definition at line 212 of file editlib.php.


| sort_expression | ( | $ | reverse, |
| $ | subsort | ||
| ) |
| $reverse | Whether to sort in the reverse of the default sort order. |
| $subsort | if is_sortable returns an array of subnames, then this will be one of those. Otherwise will be empty. |
Definition at line 361 of file editlib.php.

| sortorder | ( | $ | reverse | ) | [protected] |
Helper method for building sort clauses.
| bool | $reverse | whether the normal direction should be reversed. |
| string | $normaldir | 'ASC' or 'DESC' |
Definition at line 347 of file editlib.php.

$qbank [protected] |
Definition at line 134 of file editlib.php.