Closed leoauri closed 5 years ago
Similarly in db/install.php
Are you using the latest version? This seems related to what was fixed in #90
No, you seem to be right - the templates seem to contain {{component}}
where they should have {{component_name}}
I think the lines like
$id = $DB->insert_record('{{ component }}', $moduleinstance);
are similarly affected.
Similarly lines 37 and 39 of view.php
.
Also on line 43 get_string('missingidandcmid', mod_room)
is missing quotes.
I'll make a PR!
db_upgrade.mustache
defines
function xmldb_{{^ component_type_is_mod }}{{ component_type }}_{{/ component_type_is_mod }}{{ component_name }}_upgrade
I guess the same should be done in db_install.mustache
and db_uninstall.mustache
?
It turned out the unit tests for these things were wrong. I just fixed them in 3783b765ec9e37cd143b410f5a16a856ad72baa3
I added
component: mod_room
to the recipe (following the auth_test example).The lib.php file got generated with functions named
and so on. But moodle seems to expect these hooks without the mod_ prefix and throws errors.
Is this a bug, or did I create the recipe incorrectly?