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

Course search does not include idnumber or shortname

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.3, 2.1, 2.2
    • 2.0.4, 2.1.1
    • Libraries
    • Any
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • Easy
    • Hide

      1. login as admin
      2. from side block, site admin > courses > add/edit courses
      3. select course categories
      4. list of courses will be display and search courses input box should be display under re-sort and add new course button.

      search a course by name, id or shortname.

      Note: search text must contains at least 2 characters.

      Show
      1. login as admin 2. from side block, site admin > courses > add/edit courses 3. select course categories 4. list of courses will be display and search courses input box should be display under re-sort and add new course button. search a course by name, id or shortname. Note: search text must contains at least 2 characters.

    Description

      The latest get_courses_search() does not search the idnumber or shortname.

      Around line 720 in /lib/datalib.php

      Replace

          $concat = $DB->sql_concat('c.summary', "' '", 'c.fullname');

      With

          $concat = $DB->sql_concat('c.summary', "' '", 'c.fullname', "' '",'c.idnumber', "' '", 'c.shortname');

      Similar issue reported and fixed for 1.9: MDL-19078

      Attachments

        Issue Links

          Activity

            People

              rwijaya Rossiani Wijaya
              jballard James Ballard
              Rajesh Taneja Rajesh Taneja
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Marina Glancy Marina Glancy
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                1/Aug/11