Moodle
  1. Moodle
  2. MDL-24043

IMS Enterprise file enrolment plugin sets course category to 0 (zero) on failed category insert.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9
    • Fix Version/s: 1.9.10
    • Component/s: Enrolments, General
    • Labels:
      None
    • Environment:
      Redhat/Apache
      PHP 5.3.2
    • Database:
      PostgreSQL
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When XML <group> has a new course which is in a new category<orgunit> where the text contains a single quote the insert_record() fails because the addslashes_object() has not been applied and category ($course->category) ends up be set to 0 (zero). It ($course->category) should be set to 1;

      Effects:
      Under postgres, the newly created course ended up becoming our sitepage.
      Under mysql, sitepage stays same, is ok.
      Under both can't find the course in a category as category 0 is hidden.

      Attached: Is sample XML for test

      I will post patch soon.

        Gliffy Diagrams

          Activity

          Hide
          Troy Williams added a comment -

          Patch attached

          Show
          Troy Williams added a comment - Patch attached
          Hide
          Petr Skoda added a comment -

          Committed, thank you for the report and patch!

          Petr Skoda

          Show
          Petr Skoda added a comment - Committed, thank you for the report and patch! Petr Skoda

            People

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

              Dates

              • Created:
                Updated:
                Resolved: