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

Course Searches are not working for MSSQL databases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3, 1.9
    • Component/s: Course
    • Labels:
      None
    • Environment:
      RHEL5 x86_64, PHP 5.1.6, Apache 2.2.3
      Windows Server 2003 SP2 x64 Edition, Microsoft SQL Server 2005 w/ SP2
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Course searches do not work in Moodle 1.8 with MSSQL as the backend. This is because ADODB will prepend an 'N' to quoted literal strings when appropriate to indicate unicode strings. If no space is left between operators such as LIKE, NOT, etc, the 'N' is placed right up against the operator with no white space.

      A simple change to lines 923 and 924 in lib/datalib.php of adding a space before the quoted literal string allows the 'N' that adodb prepends to be properly handled while performing a search.

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            jlee@pbu.edu Jay Lee
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Oct/07