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

Regression in course/lib get_module_metadata()

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Download the patch (0001-TEST-Not-to-be-integrated.patch) attached to this issue
      2. Apply it:

        git am 0001-TEST-Not-to-be-integrated.patch
        

      3. Purge caches
      4. Ensure that debugdisplay is enabled and developer debug levels are set
      5. Open a course
      6. Turn editing on
      7. Note: You will see a deprecation notice (all good)
        1. Confirm that there are no warnings about "Undefined property stdClass::$name"
      8. Click "Add an activity or resource"
        1. Confirm that you see two "Chat" activities:
          1. Chat - With a valid help string
          2. Chat - Without a valid help string
      9. Select "Chat - With a valid help string"
        1. Confirm that the help string is shown on the right
      10. Select "Chat - Without a valid help string
        1. Confirm that the string "There is currently no help associated with this resource activity" is shown instead
      Show
      Download the patch ( 0001-TEST-Not-to-be-integrated.patch ) attached to this issue Apply it: git am 0001-TEST-Not-to-be-integrated.patch Purge caches Ensure that debugdisplay is enabled and developer debug levels are set Open a course Turn editing on Note: You will see a deprecation notice (all good) Confirm that there are no warnings about " Undefined property stdClass::$name " Click "Add an activity or resource" Confirm that you see two "Chat" activities : Chat - With a valid help string Chat - Without a valid help string Select "Chat - With a valid help string" Confirm that the help string is shown on the right Select "Chat - Without a valid help string Confirm that the string "There is currently no help associated with this resource activity" is shown instead
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull 3.5 Branch:

      Description

      lots of entries in our error log like this:

      PHP Notice: Undefined property: stdClass::$name in moodle/course/lib.php on line 1340, 

      looks like $name is never actually populated at this point - seems to be an issue in all branches. 

      creation of $subtype->name is moved from here:
      https://github.com/moodle/moodle/commit/9ca0420e931fe877f33af54297f973c3beccaee3#diff-4c9e15f220b139143bd8750342ca43e5L1292

      further down the function, but it is moved too far down the function.

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 35 minutes
                  35m