A column with a checkbox for each question with name q{questionid}.
More...
|
bool | $isheading = false |
| determine whether the column is td or th.
|
|
view | $qbank |
| $qbank the question bank view we are helping to render.
|
|
A column with a checkbox for each question with name q{questionid}.
- Copyright
- 2009 Tim Hunt
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ display()
core_question\bank\column_base::display |
( |
|
$question, |
|
|
|
$rowclasses |
|
) |
| |
|
inherited |
Output this column.
- Parameters
-
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. |
◆ display_content()
core_question\bank\checkbox_column::display_content |
( |
|
$question, |
|
|
|
$rowclasses |
|
) |
| |
|
protected |
Output the contents of this column.
- Parameters
-
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 from core_question\bank\column_base.
◆ display_end()
core_question\bank\column_base::display_end |
( |
|
$question, |
|
|
|
$rowclasses |
|
) |
| |
|
protectedinherited |
◆ display_start()
core_question\bank\column_base::display_start |
( |
|
$question, |
|
|
|
$rowclasses |
|
) |
| |
|
protectedinherited |
Output the opening column tag.
If it is set as heading, it will use
tag instead of
- Parameters
-
stdClass | $question | |
string | $rowclasses | |
Reimplemented in core_question\bank\row_base.
◆ get_classes()
core_question\bank\column_base::get_classes |
( |
| ) |
|
|
protectedinherited |
- Return values
-
string | the CSS classes to apply to every cell in this column. |
◆ get_extra_classes()
core_question\bank\column_base::get_extra_classes |
( |
| ) |
|
|
inherited |
◆ get_extra_joins()
core_question\bank\column_base::get_extra_joins |
( |
| ) |
|
|
inherited |
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.
- Return values
-
array | 'table_alias' => 'JOIN clause' |
Reimplemented in core_question\bank\question_text_row, core_question\bank\modifier_name_column, core_question\bank\creator_name_column, and core_question\bank\action_column_base.
◆ get_name()
core_question\bank\checkbox_column::get_name |
( |
| ) |
|
Get the internal name for this column.
Used as a CSS class name, and to store information about the current sort. Must match PARAM_ALPHA.
- Return values
-
Reimplemented from core_question\bank\column_base.
◆ get_required_fields()
core_question\bank\checkbox_column::get_required_fields |
( |
| ) |
|
- Return values
-
array | fields required. use table alias 'q' for the question table, or one of the ones from get_extra_joins. Every field requested must specify a table prefix. |
Reimplemented from core_question\bank\column_base.
◆ get_sort_icon()
core_question\bank\column_base::get_sort_icon |
( |
|
$reverse | ) |
|
|
protectedinherited |
Get an icon representing the corrent sort state.
- Parameters
-
bool | $reverse | sort is descending, not ascending. |
- Return values
-
◆ get_title()
core_question\bank\checkbox_column::get_title |
( |
| ) |
|
|
protected |
◆ get_title_tip()
core_question\bank\checkbox_column::get_title_tip |
( |
| ) |
|
|
protected |
◆ is_sortable()
core_question\bank\column_base::is_sortable |
( |
| ) |
|
|
inherited |
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', 'title' => 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.
- Return values
-
Reimplemented in core_question\bank\question_type_column, core_question\bank\question_name_idnumber_tags_column, core_question\bank\question_name_column, core_question\bank\modifier_name_column, and core_question\bank\creator_name_column.
◆ load_additional_data()
core_question\bank\column_base::load_additional_data |
( |
array |
$questions | ) |
|
|
inherited |
◆ load_question_tags()
core_question\bank\column_base::load_question_tags |
( |
array |
$questions | ) |
|
|
inherited |
◆ make_sort_link()
core_question\bank\column_base::make_sort_link |
( |
|
$sort, |
|
|
|
$title, |
|
|
|
$tip, |
|
|
|
$defaultreverse = false |
|
) |
| |
|
protectedinherited |
Get a link that changes the sort order, and indicates the current sort state.
- Parameters
-
string | $sort | the column to sort on. |
string | $title | the link text. |
string | $tip | the link tool-tip text. If empty, defaults to title. |
bool | $defaultreverse | whether the default sort order for this column is descending, rather than ascending. |
- Return values
-
◆ sort_expression()
core_question\bank\column_base::sort_expression |
( |
|
$reverse, |
|
|
|
$subsort |
|
) |
| |
|
inherited |
- Parameters
-
bool | $reverse | Whether to sort in the reverse of the default sort order. |
string | $subsort | if is_sortable returns an array of subnames, then this will be one of those. Otherwise will be empty. |
- Return values
-
string | some SQL to go in the order by clause. |
◆ sortorder()
core_question\bank\column_base::sortorder |
( |
|
$reverse | ) |
|
|
protectedinherited |
Helper method for building sort clauses.
- Parameters
-
bool | $reverse | whether the normal direction should be reversed. |
- Return values
-
The documentation for this class was generated from the following file: