Moodle
  1. Moodle
  2. MDL-32592

Category Undefined in IMS Enterprise

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1, 2.2.2
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide
      1. Download the attached IMS enterprise enrolment file and put it in your moodledata directory
      2. Go to Home / Site administration / Plugins / Enrolments
      3. Enable the IMS enterprise enrolment plugin
      4. In the settings, provide the path to the file you uploaded in File location
      5. Save settings
      6. Go to the link 'perform an IMS Enterprise import right now'
      7. VERIFY: the ims enrollment works ok
      8. VERIFY: no debugging is experienced
      Show
      Download the attached IMS enterprise enrolment file and put it in your moodledata directory Go to Home / Site administration / Plugins / Enrolments Enable the IMS enterprise enrolment plugin In the settings, provide the path to the file you uploaded in File location Save settings Go to the link 'perform an IMS Enterprise import right now' VERIFY: the ims enrollment works ok VERIFY: no debugging is experienced
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-32592-master
    • Story Points (Obsolete):
      2
    • Sprint:
      BACKEND Sprint 5

      Description

      Hi

      At line 396 in enrol/imsenterprise/lib.php the script checks if the category-string is longer than 0. However, if the category is empty this will and does result in an error.

      Notice: Undefined property: stdClass::$category in /workspace/moodle2.0/enrol/imsenterprise/lib.php on line 396.

      It is not an serious matter, but a small bug which is easily fixed by adding a different if statement:

      if(!empty($group->category)).

      I can provide a patch if necessarily.

      Best regards

      Henrik

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Petr Skoda added a comment -

            thanks for the report

            Show
            Petr Skoda added a comment - thanks for the report
            Hide
            Dan Poltawski added a comment -

            I've tested this and implemented the fix and the attached sample IMS file which exposes the problem.

            Show
            Dan Poltawski added a comment - I've tested this and implemented the fix and the attached sample IMS file which exposes the problem.
            Hide
            Mark Nelson added a comment -

            Looks good Dan, submitting for integration. Thanks for the report and fix Henrik.

            Show
            Mark Nelson added a comment - Looks good Dan, submitting for integration. Thanks for the report and fix Henrik.
            Hide
            Marina Glancy added a comment -

            Thanks Dan, Henrik. Integrated in 2.4, 2.5 and master

            Show
            Marina Glancy added a comment - Thanks Dan, Henrik. Integrated in 2.4, 2.5 and master
            Hide
            Damyon Wiese added a comment -

            Test passed on 24, 25 and master.

            Thanks!

            Show
            Damyon Wiese added a comment - Test passed on 24, 25 and master. Thanks!
            Hide
            Dan Poltawski added a comment -

            You did it!

            Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

            Show
            Dan Poltawski added a comment - You did it! Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Agile