MDL-67122 forumreport_summary: Fix template context eg and line length

The template context needed updating now it populates a single select
and the summary_table constructor params should be broken over 2 lines
This commit is contained in:
Michael Hawkins
2019-11-08 00:15:48 +08:00
parent 30fc34761b
commit 209cfe64fb
2 changed files with 16 additions and 2 deletions
@@ -103,7 +103,8 @@ class summary_table extends table_sql {
* @param bool $canseeprivatereplies Whether the user can see all private replies or not.
* @param int $perpage The number of rows to display per page.
*/
public function __construct(int $courseid, array $filters, bool $allowbulkoperations, bool $canseeprivatereplies, int $perpage) {
public function __construct(int $courseid, array $filters, bool $allowbulkoperations,
bool $canseeprivatereplies, int $perpage) {
global $USER, $OUTPUT;
$forumid = $filters['forums'][0];
@@ -47,7 +47,20 @@
"value": "#messageselect"
}
],
"perpage" : "<div class='singleselect'></div>"
"perpage": {
"name": "perpage",
"method": "get",
"action": "#",
"classes": "singleselect",
"label": "Per page",
"formid": "randomid",
"id": "selectperpage",
"options":[
{"value": 50, "name": "50", "selected": true},
{"value": 100, "name": "100", "selected":false},
{"value": 200, "name": "200", "selected": false}
]
}
}
}}