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

Moodle 2.4.3 Cohort search only searches system cohorts.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.3
    • 2.3.8, 2.4.5, 2.5.1
    • Cohorts

    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

            skodak Petr Skoda
            aosiname Andrew Osiname
            Sam Hemelryk Sam Hemelryk
            David Monllaó David Monllaó
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8/Jul/13