Closed FMCorz closed 6 months ago
Hi Fred, thanks for the report
This was actually due to the fact that MDLCode could not parse the magic __FILE__
constant. If you have used "$CFG->dirroot/blocks/xp/classes/form/itemspertime.php"
instead, it would work. But I will fix it in the next release to understand the __FILE__
as well
This is implemented in version 1.0.32 (released today)
When declaring a new form element, and registering it in its own file, MDLCode does not find its definition.
Source: https://github.com/FMCorz/moodle-block_xp/blob/master/classes/form/itemspertime.php#L298
Source: https://github.com/FMCorz/moodle-block_xp/blob/master/classes/form/config.php#L145
The error displayed for the
addElement
call is: