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

Category Undefined in IMS Enterprise

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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
    • Sprint:
      BACKEND Sprint 5
    • 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

          Attachments

            Issue Links

              Activity

              Hide
              skodak Petr Skoda added a comment -

              thanks for the report

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

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

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

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

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

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

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

              Test passed on 24, 25 and master.

              Thanks!

              Show
              damyon Damyon Wiese added a comment - Test passed on 24, 25 and master. Thanks!
              Hide
              poltawski 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
              poltawski 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:
                    Fix Release Date:
                    11/Nov/13