Merge branch 'MDL-62018-master' of git://github.com/sarjona/moodle
authorDavid Monllao <davidm@moodle.com>
Wed, 18 Apr 2018 15:20:22 +0000 (17:20 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 18 Apr 2018 16:23:32 +0000 (18:23 +0200)
admin/tool/cohortroles/classes/output/cohort_role_assignments_table.php
admin/tool/cohortroles/templates/cohort-in-list.mustache

index 29405c2..496a4ac 100644 (file)
@@ -94,7 +94,8 @@ class cohort_role_assignments_table extends table_sql {
             'idnumber' => $data->cohortidnumber,
             'description' => $data->cohortdescription,
             'visible' => $data->cohortvisible,
-            'name' => $data->cohortname
+            'name' => $data->cohortname,
+            'theme' => $data->cohorttheme
         );
         $context = context_helper::instance_by_id($data->cohortcontextid);
 
@@ -169,7 +170,7 @@ class cohort_role_assignments_table extends table_sql {
     protected function get_sql_and_params($count = false) {
         $fields = 'uca.id, uca.cohortid, uca.userid, uca.roleid, ';
         $fields .= 'c.name as cohortname, c.idnumber as cohortidnumber, c.contextid as cohortcontextid, ';
-        $fields .= 'c.visible as cohortvisible, c.description as cohortdescription, ';
+        $fields .= 'c.visible as cohortvisible, c.description as cohortdescription, c.theme as cohorttheme, ';
 
         // Add extra user fields that we need for the graded user.
         $extrafields = get_extra_user_fields($this->context);
index 971065a..ff2199c 100644 (file)
     * idnumber cohort idnumber field
     * description cohort description field
     * visible cohort visible field
+    * theme cohort theme field
 
     Example context (json):
     { "id": "1",
       "name": "Cohort 1",
       "visible": true,
       "idnumber": "014",
-      "description": "Some users"
+      "description": "Some users",
+      "theme": "clean"
     }
 }}
 {{> tool_lp/form-cohort-selector-suggestion }}