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

Course search does not include idnumber or shortname

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.3, 2.1, 2.2
    • Fix Version/s: 2.0.4, 2.1.1
    • Component/s: Libraries
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      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.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    1/Aug/11