Moodle
  1. Moodle
  2. MDL-37301

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

    Details

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

      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.

        Issue Links

          Activity

          Hide
          Petr Škoda added a comment -

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

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

          I've added a basic regression test.

          Integrated to master, 24 and 23.

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

          Works as expected. Passing.

          Show
          Mark Nelson added a comment - Works as expected. Passing.
          Hide
          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
          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: