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

Errors in SQL in file browser file_info_context_coursecat.php on postgresql 8.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.3, 2.4
    • Fix Version/s: 2.3.4, 2.4.1
    • Component/s: Filepicker
    • Labels:

      Description

      Two lines in file_info_context_coursecat.php are missing "AS" in the SQL command causing an error when attempting to view the server files in tree mode.

      207 $rs = $DB->get_recordset_sql('SELECT ctx.id contextid, c.visible -> $rs = $DB>get_recordset_sql('SELECT ctx.id AS contextid, c.visible

      229 $rs = $DB->get_recordset_sql('SELECT ctx.id contextid, c.visible -> $rs = $DB>get_recordset_sql('SELECT ctx.id AS contextid, c.visible

      The error was discovered on v. 2.3.3 but appears not to have been fixed on 2.4 either.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            Ooops, it was a similar issue only, thanks for the report.

            Show
            skodak Petr Skoda added a comment - Ooops, it was a similar issue only, thanks for the report.
            Hide
            poltawski Dan Poltawski added a comment -

            I've added a basic regression test.

            Integrated to master, 24 and 23.

            Show
            poltawski Dan Poltawski added a comment - I've added a basic regression test. Integrated to master, 24 and 23.
            Hide
            markn Mark Nelson added a comment -

            Works as expected. Passing.

            Show
            markn Mark Nelson added a comment - Works as expected. Passing.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            And your fantastic code has met core, hope they become good friends for a long period.

            Closing, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - And your fantastic code has met core, hope they become good friends for a long period. Closing, thanks!

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13