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

Regression in course/lib get_module_metadata()

XMLWordPrintable

    • MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • 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

      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.

       

            danmarsden Dan Marsden
            danmarsden Dan Marsden
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.