-
Bug
-
Resolution: Fixed
-
Blocker
-
3.5
-
MOODLE_35_STABLE
-
MOODLE_35_STABLE
-
MDL-62018-master -
There is an error when you want to access to "Assign user roles to cohort". I attach a screen capture of the error.
Stack trace:
|
|
line 145 of /lib/classes/external/exporter.php: coding_exception thrown
|
line 102 of /admin/tool/cohortroles/classes/output/cohort_role_assignments_table.php: call to core\external\exporter->export()
|
line 821 of /lib/tablelib.php: call to tool_cohortroles\output\cohort_role_assignments_table->col_cohortname()
|
line 1514 of /lib/tablelib.php: call to flexible_table->format_row()
|
line 1637 of /lib/tablelib.php: call to table_sql->build_table()
|
line 91 of /admin/tool/cohortroles/index.php: call to table_sql->out()
|
I think that the error is in the function *col_cohortname* located in *admin/tool/cohortroles**/classes/output/cohort_role_assignments_table.php.*
|
This function has an exporter instance of uses cohort_summary_exporter and this has a new param named "theme" and this param is missing in the function.
This is the code of the function:
protected function col_cohortname($data) {
|
global $OUTPUT;
|
|
$record = (object) array(
|
'id' => $data->cohortid,
|
'idnumber' => $data->cohortidnumber,
|
'description' => $data->cohortdescription,
|
'visible' => $data->cohortvisible,
|
'name' => $data->cohortname,
|
);
|
$context = context_helper::instance_by_id($data->cohortcontextid);
|
$exporter = new \core_cohort\external\cohort_summary_exporter($record, array('context' => $context));
|
...
|
It seems an easy fix to add 'theme' => null to the $record.