-
Bug
-
Resolution: Fixed
-
Minor
-
2.4.3
-
MOODLE_24_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
w24_
MDL-39549_m26_cohortsearch -
Easy
-
If you go to a cohort in a category and try search through them in Moodle 2.4.3, it automatically searches the system cohorts (context id 1).
I have fixed it (could not find the exact issue in the tracker) in /cohort/index.php
search for "// Add search form."
add this line
$search .= html_writer::empty_tag('input', array('id'=>'cohort_search_c', 'type'=>'hidden', 'name'=>'contextid', 'value'=>$contextid));
below this line
$search .= html_writer::empty_tag('input', array('id'=>'cohort_search_q', 'type'=>'text', 'name'=>'search', 'value'=>$searchquery));