mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'w02_MDL-35899_m25_cohortsort' of git://github.com/skodak/moodle
This commit is contained in:
commit
47ee9f9100
@ -77,6 +77,8 @@ switch ($action) {
|
||||
$offset = optional_param('offset', 0, PARAM_INT);
|
||||
$search = optional_param('search', '', PARAM_RAW);
|
||||
$outcome->response = enrol_cohort_search_cohorts($manager, $offset, 25, $search);
|
||||
// Some browsers reorder collections by key.
|
||||
$outcome->response['cohorts'] = array_values($outcome->response['cohorts']);
|
||||
break;
|
||||
case 'enrolcohort':
|
||||
require_capability('moodle/course:enrolconfig', $context);
|
||||
|
@ -229,7 +229,7 @@ YUI.add('moodle-enrol_cohort-quickenrolment', function(Y) {
|
||||
var rawcohorts = response.cohorts;
|
||||
var cohorts = [], i=0;
|
||||
for (i in rawcohorts) {
|
||||
cohorts[rawcohorts[i].cohortid] = new COHORT(rawcohorts[i]);
|
||||
cohorts[i] = new COHORT(rawcohorts[i]);
|
||||
}
|
||||
this.set(COHORTS, cohorts);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user