-
Bug
-
Resolution: Fixed
-
Minor
-
2.0
-
None
-
Easy
-
MOODLE_20_STABLE
-
MOODLE_20_STABLE
The NEWMODULE stub module has some issues working with Moodle 2.
1. You cannot add a module instance to a course (DB errors).
2. You cannot view the module (url error).
To resolve 1:
There is no function newmodule_supports in lib.php. This needs to be added and support for FEATURE_MOD_INTRO enabled. example:
function newmodule_supports($features) {
switch($feature)
}
In the DB record for the module instance timemodified is expected to not be null. When adding an instance this is not set. Function newmodule_add_instance in lib.php needs amending to also set this value, e.g.:
$newmodule->timemodified = $newmodule->timecreated;
To resolve 2:
In view.php line 56 should have a forward slash before the path e.g.:
$PAGE->set_url('/mod/newmodule...
- blocks
-
CONTRIB-1385 META: NEWMODULE 2.0
-
- Closed
-
- is duplicated by
-
CONTRIB-2575 NEWMODULE few improvements
-
- Resolved
-