Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-39549

Moodle 2.4.3 Cohort search only searches system cohorts.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.3
    • Fix Version/s: 2.3.8, 2.4.5, 2.5.1
    • Component/s: Cohorts
    • Labels:

      Description

      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));

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/13