-
Bug
-
Resolution: Fixed
-
Minor
-
4.0.4
-
MOODLE_400_STABLE
-
MOODLE_400_STABLE
-
MDL-76018-master -
The activity header code contains this line:
if (empty($layoutoptions['nodescription']) && $page->activityrecord->intro && trim($page->activityrecord->intro)) {
|
It is possible (and sometimes useful, in special cases) to create an activity that doesn't have an 'intro' field. When doing this, you should define false for the FEATURE_MOD_INTRO constant in the module's 'supports' function (see attached example module for code).
But, even when that is set, the line above causes a PHP warning when you edit settings for the activity.
On Boost theme it is hard to see the warning (it flickers on) but if you edit source you can see it. At the start of the source it looks like this.
<br />
|
<b>Warning</b>: Undefined property: stdClass::$intro in <b>C:\Users\sm449\workspace\core-moodle-github\lib\classes\output\activity_header.php</b> on line <b>70</b><br />
|