Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
The class for displaying the forum report table. More...
Public Member Functions | |
__construct (int $courseid, array $filters, bool $allowbulkoperations, bool $canseeprivatereplies, int $perpage, bool $canexport) | |
Forum report table constructor. More... | |
add_data ($row, $classname='') | |
This method actually directly echoes the row passed to it now or adds it to the download. More... | |
add_data_keyed ($rowwithkeys, $classname='') | |
Add a row of data to the table. More... | |
add_filter (int $filtertype, array $values=[]) | |
Adds the relevant SQL to apply a filter to the report. More... | |
add_separator () | |
Add a seperator line to table. | |
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. More... | |
close_recordset () | |
Closes recordset (for use after building the table). | |
col_attachmentcount (\stdClass $data) | |
Generate the attachmentcount column. More... | |
col_earliestpost (\stdClass $data) | |
Generate the earliestpost column. More... | |
col_export (\stdClass $data) | |
Generate the export column. More... | |
col_fullname ($data) | |
Generate the fullname column. More... | |
col_latestpost (\stdClass $data) | |
Generate the latestpost column. More... | |
col_postcount (\stdClass $data) | |
Generate the postcount column. More... | |
col_replycount (\stdClass $data) | |
Generate the replycount column. More... | |
col_select ($data) | |
Generate the select column. More... | |
collapsible ($bool) | |
Sets the is_collapsible variable to the given boolean. More... | |
column_class ($column, $classname) | |
Sets the given $column index to the given $classname in $this->column_class. More... | |
column_style ($column, $property, $value) | |
Sets the given $column index and $property index to the given $value in $this->column_style. More... | |
column_style_all ($property, $value) | |
Sets all columns' $propertys to the given $value in $this->column_style. More... | |
column_suppress ($column) | |
What this method does is set the column so that if the same data appears in consecutive rows, then it is not repeated. More... | |
define_baseurl ($url) | |
Sets $this->baseurl. More... | |
define_columns ($columns) | |
define_header_column (string $column) | |
Mark a specific column as being a table header using the column name defined in define_columns. More... | |
define_headers ($headers) | |
define_help_for_headers ($helpicons) | |
Defines a help icon for the header. More... | |
download ($format) | |
Download the summary report in the selected format. More... | |
download_buttons () | |
Get the html for the download buttons. More... | |
export_class_instance ($exportclass=null) | |
Get, and optionally set, the export class. More... | |
finish_html () | |
This function is not part of the public api. | |
finish_output ($closeexportclassdoc=true) | |
You should call this to finish outputting the table data after adding data to the table with add_data or add_data_keyed. | |
format_and_add_array_of_rows ($rowstoadd, $finish=true) | |
Add a number of rows to the table at once. More... | |
format_row ($row) | |
Call appropriate methods on this table class to perform any processing on values before displaying in table. More... | |
format_text ($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL) | |
Used from col_* functions when text is to be displayed. More... | |
get_initial_first () | |
This function is not part of the public api. More... | |
get_initial_last () | |
This function is not part of the public api. More... | |
get_page_size () | |
get_page_start () | |
get_perpage () | |
Fetch the number of items to be displayed per page. More... | |
get_row_class ($row) | |
Get any extra classes names to add to this row in the HTML. More... | |
get_row_from_keyed ($rowwithkeys) | |
This function is not part of the public api. | |
get_row_html ($row, $classname='') | |
Generate html code for the passed row. More... | |
get_sort_columns () | |
Get the columns to sort by, in the form required by construct_order_by(). More... | |
get_sql_sort () | |
get_sql_where () | |
initialbars ($bool) | |
Sets the use_initials variable to the given boolean. More... | |
is_downloadable ($downloadable=null) | |
Probably don't need to call this directly. More... | |
is_downloading ($download=null, $filename='', $sheettitle='') | |
Call this to pass the download type. More... | |
is_persistent ($persistent=null) | |
Call with boolean true to store table layout changes in the user_preferences table. More... | |
is_sortable ($column=null) | |
Is the column sortable? More... | |
make_styles_string ($styles) | |
This function is not part of the public api. More... | |
no_sorting ($column) | |
Do not sort using this column. More... | |
other_cols ($column, $row) | |
You can override this method in a child class. More... | |
out ($pagesize, $useinitialsbar, $downloadhelpbutton='') | |
Convenience method to call a number of methods for you to display the table. More... | |
pageable ($bool) | |
Sets the use_pages variable to the given boolean. More... | |
pagesize ($perpage, $total) | |
Sets the pagesize variable to the given integer, the totalrows variable to the given integer, and the use_pages variable to true. More... | |
print_headers () | |
This function is not part of the public api. | |
print_html () | |
This method is deprecated although the old api is still supported. More... | |
print_initials_bar () | |
This function is not part of the public api. | |
print_nothing_to_display () | |
Override the default implementation to set a decent heading level. More... | |
print_row ($row, $classname='') | |
This function is not part of the public api. | |
query_db ($pagesize, $useinitialsbar=false) | |
Query the db. More... | |
set_attribute ($attribute, $value) | |
Gives the given $value to the $attribute index of $this->attributes. More... | |
set_control_variables ($variables) | |
Assigns each given variable in the array to the corresponding index in the request class variable. More... | |
set_count_sql ($sql, array $params=NULL) | |
This is only needed if you want to use different sql to count rows. More... | |
set_sql ($fields, $from, $where, array $params=[]) | |
Overriding the parent method because it should not be used here. More... | |
setup () | |
Must be called after table is defined. More... | |
show_download_buttons_at ($showat) | |
Where to show download buttons. More... | |
sortable ($bool, $defaultcolumn=NULL, $defaultorder=SORT_ASC) | |
Sets the is_sortable variable to the given boolean, sort_default_column to the given string, and the sort_default_order to the given integer. More... | |
start_html () | |
This function is not part of the public api. | |
start_output () | |
This function is not part of the public api. More... | |
text_sorting ($column) | |
Use text sorting functions for this column (required for text columns with Oracle). More... | |
wrap_html_finish () | |
Overriding method to render the bulk actions and items per page pagination options directly below the table. More... | |
wrap_html_start () | |
Hook that can be overridden in child classes to wrap a table in a form for example. More... | |
Static Public Member Functions | |
static | construct_order_by ($cols, $textsortcols=array()) |
Prepare an an order by clause from the list of columns to be sorted. More... | |
static | get_sort_for_table ($uniqueid) |
Get the order by clause from the session or user preferences, for the table with id $uniqueid. More... | |
Public Attributes | |
$attributes = array() | |
$baseurl = NULL | |
$column_class = array() | |
$column_nosort = array('userpic') | |
$column_style = array() | |
$column_suppress = array() | |
$columns = array() | |
$countparams = NULL | |
$countsql = NULL | |
$currentrow = 0 | |
$currpage = 0 | |
string | $download = '' |
which download plugin to use. More... | |
bool | $downloadable = false |
whether data is downloadable from table. More... | |
$exportclass = null | |
$headers = array() | |
bool | $is_collapsible = true |
Overriding default for this. | |
bool | $is_sortable = true |
Overriding default for this. | |
$maxsortkeys = 2 | |
$pagesize = 30 | |
array Traversable | $rawdata = NULL |
Data fetched from the db. | |
$request = array() | |
boolean | $setup = false |
Stores if setup has already been called on this flixible table. | |
$showdownloadbuttonsat = array(TABLE_P_TOP) | |
Array of positions in which to display download controls. | |
$sort_default_column = NULL | |
$sort_default_order = SORT_ASC | |
stdClass | $sql |
The various SQL segments that will be combined to form queries to fetch various information. | |
bool | $started_output = false |
Has start output been called yet? | |
$totalrows = 0 | |
$uniqueid = NULL | |
$use_initials = false | |
$use_pages = false | |
string | $useridfield = 'id' |
Key of field returned by db query that is the id field of the user table or equivalent. | |
const | DEFAULT_PER_PAGE = 50 |
Default number of rows to display per page. | |
const | FILTER_DATES = 3 |
Dates filter type. | |
const | FILTER_FORUM = 1 |
Forum filter type. | |
const | FILTER_GROUPS = 2 |
Groups filter type. | |
const | LOG_SUMMARY_TEMP_TABLE = 'forum_report_summary_counts' |
Table to store summary data extracted from the log table. | |
Protected Member Functions | |
apply_filters (array $filters) | |
Apply the relevant filters to the report. More... | |
can_be_reset () | |
Are there some table preferences that can be reset? More... | |
create_log_summary_temp_table () | |
Creates a temp table to store summary data from the log table for this request. More... | |
define_base_filter_sql () | |
Instantiate the properties to store filter values. More... | |
define_base_sql () | |
Define the object to store all for the table SQL and initialises the base SQL required. More... | |
define_table_configs () | |
Define various table config options. More... | |
drop_log_summary_temp_table () | |
Drops the temp table. More... | |
fill_log_summary_temp_table (int $contextid) | |
Fills the log summary temp table. More... | |
get_filter_groups (array $groups) | |
Get the final list of groups to filter by, based on the groups submitted, and those the user has access to. More... | |
get_filter_name (int $filtertype) | |
Provides the string name of each filter type, to be used by errors. More... | |
get_full_sql (bool $fullselect=true) | |
Prepares a complete SQL statement from the base query and any filters defined. More... | |
get_internal_log_reader () | |
Returns an internal and enabled log reader. More... | |
print_one_initials_bar ($alpha, $current, $class, $title, $urlvar) | |
Helper function, used by print_initials_bar() to output one initial bar. More... | |
render_reset_button () | |
Generate the HTML for the table preferences reset button. More... | |
show_hide_link ($column, $index) | |
Generate the HTML for the collapse/uncollapse icon. More... | |
show_word_char_counts () | |
sort_icon ($isprimary, $order) | |
Generate the HTML for the sort icon. More... | |
sort_link ($text, $column, $isprimary, $order) | |
Generate the HTML for the sort link. More... | |
sort_order_name ($isprimary, $order) | |
Generate the correct tool tip for changing the sort order. More... | |
Protected Attributes | |
bool | $allowbulkoperations = false |
Whether the user has the capability/capabilities to perform bulk operations. | |
bool | $canseeprivatereplies |
Whether the user can see all private replies or not. | |
stdClass | $cm |
The course module object of the forum being reported on. | |
context null | $context = null |
array | $exportfilterdata = [] |
Validated filter data, for use in GET parameters by export links. | |
$filename | $filename |
string | $headercolumn = null |
A column which should be considered as a header column. | |
core log sql_reader null | $logreader = null |
int | $perpage = self::DEFAULT_PER_PAGE |
The number of rows to be displayed per page. | |
array | $perpageoptions = [50, 100, 200] |
The values available for pagination size per page. | |
$sheettitle | $sheettitle |
int | $userid |
The user ID if only one user's summary will be generated. More... | |
The class for displaying the forum report table.
forumreport_summary\summary_table::__construct | ( | int | $courseid, |
array | $filters, | ||
bool | $allowbulkoperations, | ||
bool | $canseeprivatereplies, | ||
int | $perpage, | ||
bool | $canexport | ||
) |
Forum report table constructor.
int | $courseid | The ID of the course the forum(s) exist within. |
array | $filters | Report filters in the format 'type' => [values]. |
bool | $allowbulkoperations | Is the user allowed to perform bulk operations? |
bool | $canseeprivatereplies | Whether the user can see all private replies or not. |
int | $perpage | The number of rows to display per page. |
bool | $canexport | Is the user allowed to export records? |
|
inherited |
This method actually directly echoes the row passed to it now or adds it to the download.
If this is the first row and start_output has not already been called this method also calls start_output to open the table or send headers for the downloaded. Can be used as before. print_html now calls finish_html to close table.
array | $row | a numerically keyed row of data to add to the table. |
string | $classname | CSS class name to add to this row's tr tag. |
bool | success. |
|
inherited |
Add a row of data to the table.
This function takes an array or object with column names as keys or property names.
It ignores any elements with keys that are not defined as columns. It puts in empty strings into the row when there is no element in the passed array corresponding to a column in the table. It puts the row elements in the proper order (internally row table data is stored by in arrays with a numerical index corresponding to the column number).
object | array | $rowwithkeys | array keys or object property names are column names, as defined in call to define_columns. |
string | $classname | CSS class name to add to this row's tr tag. |
forumreport_summary\summary_table::add_filter | ( | int | $filtertype, |
array | $values = [] |
||
) |
Adds the relevant SQL to apply a filter to the report.
int | $filtertype | Filter type as defined by class constants. |
array | $values | Optional array of values passed into the filter type. |
void |
coding_exception |
|
protected |
Apply the relevant filters to the report.
array | $filters | Report filters in the format 'type' => [values]. |
void. |
|
inherited |
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.
After calling this function, don't forget to call close_recordset.
Reimplemented in quiz_last_responses_table, quiz_overview_table, and mod_feedback_responses_table.
|
protectedinherited |
Are there some table preferences that can be reset?
If true, then the "reset table preferences" widget should be displayed.
bool |
forumreport_summary\summary_table::col_attachmentcount | ( | \stdClass | $data | ) |
Generate the attachmentcount column.
stdClass | $data | The row data. |
int | number of files attached to posts by user. |
forumreport_summary\summary_table::col_earliestpost | ( | \stdClass | $data | ) |
Generate the earliestpost column.
stdClass | $data | The row data. |
string | Timestamp of user's earliest post, or a dash if no posts exist. |
forumreport_summary\summary_table::col_export | ( | \stdClass | $data | ) |
Generate the export column.
stdClass | $data | The row data. |
string | The link to export content belonging to the row. |
forumreport_summary\summary_table::col_fullname | ( | $data | ) |
Generate the fullname column.
stdClass | $data | The row data. |
string | User's full name. |
Reimplemented from flexible_table.
forumreport_summary\summary_table::col_latestpost | ( | \stdClass | $data | ) |
Generate the latestpost column.
stdClass | $data | The row data. |
string | Timestamp of user's most recent post, or a dash if no posts exist. |
forumreport_summary\summary_table::col_postcount | ( | \stdClass | $data | ) |
Generate the postcount column.
stdClass | $data | The row data. |
int | number of discussion posts made by user. |
forumreport_summary\summary_table::col_replycount | ( | \stdClass | $data | ) |
Generate the replycount column.
stdClass | $data | The row data. |
int | number of replies made by user. |
forumreport_summary\summary_table::col_select | ( | $data | ) |
Generate the select column.
stdClass | $data |
string |
|
inherited |
Sets the is_collapsible variable to the given boolean.
bool | $bool |
void |
|
inherited |
Sets the given $column index to the given $classname in $this->column_class.
int | $column | |
string | $classname |
void |
|
inherited |
Sets the given $column index and $property index to the given $value in $this->column_style.
int | $column | |
string | $property | |
mixed | $value |
void |
|
inherited |
Sets all columns' $propertys to the given $value in $this->column_style.
int | $property | |
string | $value |
void |
|
inherited |
What this method does is set the column so that if the same data appears in consecutive rows, then it is not repeated.
For example, in the quiz overview report, the fullname column is set to be suppressed, so that when one student has made multiple attempts, their name is only printed in the row for their first attempt.
int | $column | the index of a column. |
|
staticinherited |
Prepare an an order by clause from the list of columns to be sorted.
array | $cols | column name => SORT_ASC or SORT_DESC |
SQL | fragment that can be used in an ORDER BY clause. |
|
protected |
Creates a temp table to store summary data from the log table for this request.
null |
|
protected |
Instantiate the properties to store filter values.
void. |
|
protected |
Define the object to store all for the table SQL and initialises the base SQL required.
void. |
|
inherited |
Sets $this->baseurl.
moodle_url | string | $url | the url with params needed to call up this page |
|
inherited |
array | $columns | an array of identifying names for columns. If columns are sorted then column names must correspond to a field in sql. |
Reimplemented in mod_feedback_responses_table.
|
inherited |
Mark a specific column as being a table header using the column name defined in define_columns.
Note: Only one column can be a header, and it will be rendered using a th tag.
string | $column |
|
inherited |
array | $headers | numerical keyed array of displayed string titles for each column. |
|
inherited |
Defines a help icon for the header.
Always use this function if you need to create header with sorting and help icon.
renderable[] | $helpicons | An array of renderable objects to be used as help icons |
|
protected |
Define various table config options.
void. |
forumreport_summary\summary_table::download | ( | $format | ) |
Download the summary report in the selected format.
string | $format | The format to download the report. |
|
inherited |
Get the html for the download buttons.
Usually only use internally
Reimplemented in mod_feedback_responses_table.
|
protected |
Drops the temp table.
This should be called once the processing for the summary table has been done.
|
inherited |
Get, and optionally set, the export class.
$exportclass | (optional) if passed, set the table to use this export class. |
table_default_export_format_parent | the export class in use (after any set). |
|
protected |
Fills the log summary temp table.
int | $contextid |
null |
|
inherited |
Add a number of rows to the table at once.
And optionally finish output after they have been added.
(object|array|null)[] | $rowstoadd Array of rows to add to table, a null value in array adds a separator row. Or a object or array is added to table. We expect properties for the row array as would be passed to add_data_keyed. | |
bool | $finish |
|
inherited |
Call appropriate methods on this table class to perform any processing on values before displaying in table.
Takes raw data from the database and process it into human readable format, perhaps also adding html linking when displaying table as html, adding a div wrap, etc.
See for example col_fullname below which will be called for a column whose name is 'fullname'.
array | object | $row | row of data from db used to make one row of the table. |
array | one row for the table, added using add_data_keyed method. |
Reimplemented in assign_grading_table, and tool_policy\acceptances_table.
|
inherited |
Used from col_* functions when text is to be displayed.
Does the right thing - either converts text to html or strips any html tags depending on if we are downloading and what is the download type. Params are the same as format_text function in weblib.php but some default options are changed.
|
protected |
Get the final list of groups to filter by, based on the groups submitted, and those the user has access to.
array | $groups | The group IDs submitted. |
array | Group objects of groups to use in groups filter. If no filtering required (all groups selected), returns []. |
|
protected |
Provides the string name of each filter type, to be used by errors.
Note: This does not use language strings as the value is injected into error strings.
int | $filtertype | Type of filter |
string | Name of the filter |
|
protected |
Prepares a complete SQL statement from the base query and any filters defined.
bool | $fullselect | Whether to select all relevant columns. False selects a count only (used to calculate pagination). |
string | The complete SQL statement. |
|
inherited |
This function is not part of the public api.
string | initial of first name we are currently filtering by |
|
inherited |
This function is not part of the public api.
string | initial of last name we are currently filtering by |
|
protected |
Returns an internal and enabled log reader.
core |
|
inherited |
int | the pagesize for LIMIT clause of SQL |
|
inherited |
int | the offset for LIMIT clause of SQL |
forumreport_summary\summary_table::get_perpage | ( | ) |
Fetch the number of items to be displayed per page.
int |
|
inherited |
Get any extra classes names to add to this row in the HTML.
$row | array the data for this row. |
string | added to the class="" attribute of the tr. |
Reimplemented in quiz_first_or_all_responses_table, core_tag_manage_table, assign_grading_table, and quiz_attempts_report_table.
|
inherited |
Generate html code for the passed row.
array | $row | Row data. |
string | $classname | classes to add. |
string::$html | html code for the row passed. |
|
inherited |
Get the columns to sort by, in the form required by construct_order_by().
array | column name => SORT_... constant. |
Reimplemented in quiz_attempts_report_table, assign_grading_table, and tool_policy\acceptances_table.
|
staticinherited |
Get the order by clause from the session or user preferences, for the table with id $uniqueid.
string | $uniqueid | the identifier for a table. |
SQL | fragment that can be used in an ORDER BY clause. |
|
inherited |
SQL | fragment that can be used in an ORDER BY clause. |
Reimplemented in gradereport_history\output\tablelog.
|
inherited |
string | sql to add to where statement. |
Reimplemented in core_tag_manage_table, and tool_policy\acceptances_table.
|
inherited |
Sets the use_initials variable to the given boolean.
bool | $bool |
void |
|
inherited |
Probably don't need to call this directly.
Calling is_downloading with a param automatically sets table as downloadable.
bool | $downloadable | optional param to set whether data from table is downloadable. If ommitted this function can be used to get current state of table. |
bool | whether table data is set to be downloadable. |
|
inherited |
Call this to pass the download type.
Use : $download = optional_param('download', '', PARAM_ALPHA); To get the download type. We assume that if you call this function with params that this table's data is downloadable, so we call is_downloadable for you (even if the param is '', which means no download this time. Also you can call this method with no params to get the current set download type.
string | $download | dataformat type. One of csv, xhtml, ods, etc |
string | $filename | filename for downloads without file extension. |
string | $sheettitle | title for downloaded data. |
string | download dataformat type. One of csv, xhtml, ods, etc |
|
inherited |
Call with boolean true to store table layout changes in the user_preferences table.
Note: user_preferences.value has a maximum length of 1333 characters. Call with no parameter to get current state of table persistence.
bool | $persistent | Optional parameter to set table layout persistence. |
bool | Whether or not the table layout preferences will persist. |
|
inherited |
Is the column sortable?
string | column name, null means table |
bool |
|
inherited |
This function is not part of the public api.
array | $styles | CSS-property => value |
string | values suitably to go in a style="" attribute in HTML. |
|
inherited |
Do not sort using this column.
string | column name |
|
inherited |
You can override this method in a child class.
See the description of build_table which calls this method.
Reimplemented in mod_feedback_responses_table, tool_policy\acceptances_table, assign_grading_table, quiz_statistics_question_table, webservice\token_table, core_user\participants_table, quiz_last_responses_table, and quiz_overview_table.
forumreport_summary\summary_table::out | ( | $pagesize, | |
$useinitialsbar, | |||
$downloadhelpbutton = '' |
|||
) |
Convenience method to call a number of methods for you to display the table.
Overrides the parent so SQL for filters is handled.
int | $pagesize | Number of rows to fetch. |
bool | $useinitialsbar | Whether to include the initials bar with the table. |
string | $downloadhelpbutton | Unused. |
void. |
Reimplemented from table_sql.
|
inherited |
Sets the use_pages variable to the given boolean.
bool | $bool |
void |
|
inherited |
Sets the pagesize variable to the given integer, the totalrows variable to the given integer, and the use_pages variable to true.
int | $perpage | |
int | $total |
void |
|
inherited |
This method is deprecated although the old api is still supported.
forumreport_summary\summary_table::print_nothing_to_display | ( | ) |
Override the default implementation to set a decent heading level.
void. |
Reimplemented from flexible_table.
|
protectedinherited |
Helper function, used by print_initials_bar() to output one initial bar.
array | $alpha | of letters in the alphabet. |
string | $current | the currently selected letter. |
string | $class | class name to add to this initial bar. |
string | $title | the name to put in front of this initial bar. |
string | $urlvar | URL parameter name for this initial. |
forumreport_summary\summary_table::query_db | ( | $pagesize, | |
$useinitialsbar = false |
|||
) |
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 | Overridden but unused. |
void |
Reimplemented from table_sql.
|
protectedinherited |
Generate the HTML for the table preferences reset button.
string | HTML fragment, empty string if no need to reset |
|
inherited |
Gives the given $value to the $attribute index of $this->attributes.
string | $attribute | |
mixed | $value |
void |
|
inherited |
Assigns each given variable in the array to the corresponding index in the request class variable.
array | $variables |
void |
|
inherited |
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.
forumreport_summary\summary_table::set_sql | ( | $fields, | |
$from, | |||
$where, | |||
array | $params = [] |
||
) |
Overriding the parent method because it should not be used here.
Filters are applied, so the structure of $this->sql is now different to the way this is set up in the parent.
string | $fields | Unused. |
string | $from | Unused. |
string | $where | Unused. |
array | $params | Unused. |
void. |
coding_exception |
Reimplemented from table_sql.
|
inherited |
Must be called after table is defined.
Use methods above first. Cannot use functions below till after calling this method.
type? |
Reimplemented in assign_grading_table.
|
inherited |
Where to show download buttons.
array | $showat | array of postions in which to show download buttons. Containing TABLE_P_TOP and/or TABLE_P_BOTTOM |
|
protectedinherited |
Generate the HTML for the collapse/uncollapse icon.
This is a helper method used by print_headers().
string | $column | the column name, index into various names. |
int | $index | numerical index of the column. |
string | HTML fragment. |
Reimplemented in core_user\participants_table, assign_grading_table, tool_dataprivacy\output\expired_contexts_table, and tool_dataprivacy\output\data_requests_table.
|
protectedinherited |
Generate the HTML for the sort icon.
This is a helper method used by sort_link().
bool | $isprimary | whether an icon is needed (it is only needed for the primary sort column.) |
int | $order | SORT_ASC or SORT_DESC |
string | HTML fragment. |
|
protectedinherited |
Generate the HTML for the sort link.
This is a helper method used by print_headers().
string | $text | the text for the link. |
string | $column | the column name, may be a fake column like 'firstname' or a real one. |
bool | $isprimary | whether the is column is the current primary sort column. |
int | $order | SORT_ASC or SORT_DESC |
string | HTML fragment. |
|
protectedinherited |
Generate the correct tool tip for changing the sort order.
This is a helper method used by sort_link().
bool | $isprimary | whether the is column is the current primary sort column. |
int | $order | SORT_ASC or SORT_DESC |
string | the correct title. |
|
inherited |
Sets the is_sortable variable to the given boolean, sort_default_column to the given string, and the sort_default_order to the given integer.
bool | $bool | |
string | $defaultcolumn | |
int | $defaultorder |
void |
|
inherited |
This function is not part of the public api.
You don't normally need to call this. It is called automatically when needed when you start adding data to the table.
|
inherited |
Use text sorting functions for this column (required for text columns with Oracle).
Be warned that you cannot use this with column aliases. You can only do this with real columns. See MDL-40481 for an example.
string | column name |
forumreport_summary\summary_table::wrap_html_finish | ( | ) |
Overriding method to render the bulk actions and items per page pagination options directly below the table.
void |
Reimplemented from flexible_table.
|
inherited |
Hook that can be overridden in child classes to wrap a table in a form for example.
Called only when there is data to display and not downloading.
Reimplemented in quiz_statistics_table, quiz_attempts_report_table, and tool_policy\acceptances_table.
|
inherited |
which download plugin to use.
Default '' means none - print html table with paging. Property set by is_downloading which typically passes in cleaned data from $
|
inherited |
whether data is downloadable from table.
Determines whether to display download buttons. Set by method downloadable().
|
protected |
The user ID if only one user's summary will be generated.
This will apply to users without permission to view others' summaries.