Moodle
  1. Moodle
  2. MDL-20989

modedit.php throws notices if a module has FEATURE_MOD_INTRO set to false

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      If a module has FEATURE_MOD_INTRO set to false then when creating a new instance of the module you will get notices displayed about a missing property.
      Solution is modedit.php simply needs to be made to check the features of a module to ensure it does have an intro field.

        Gliffy Diagrams

          Activity

          Hide
          Sam Hemelryk added a comment -

          Hi Petr, I have attached a simple patch to this bug could you please have a look at it for me. It fixes the issue but is there more areas where this should also be checked in the new intro related code?

          Show
          Sam Hemelryk added a comment - Hi Petr, I have attached a simple patch to this bug could you please have a look at it for me. It fixes the issue but is there more areas where this should also be checked in the new intro related code?
          Hide
          Petr Skoda added a comment -

          nope, we have plugin_supports($type, $name, $feature, $default=null) for this

          Show
          Petr Skoda added a comment - nope, we have plugin_supports($type, $name, $feature, $default=null) for this
          Hide
          Sam Hemelryk added a comment -

          Awesome, thanks for the feedback Petr, have commit a fix that uses plugin_supports

          Show
          Sam Hemelryk added a comment - Awesome, thanks for the feedback Petr, have commit a fix that uses plugin_supports

            People

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

              Dates

              • Created:
                Updated:
                Resolved: