matching the name of the module.
switch ($mod->mode) {
case "update":
+
+ if (trim($mod->name) == '') {
+ unset($mod->name);
+ }
+
$return = $updateinstancefunction($mod);
if (!$return) {
if (file_exists($moderr)) {
break;
case "add":
+
+ if (trim($mod->name) == '') {
+ $mod->name = get_string("modulename", $mod->modulename);
+ }
+
$return = $addinstancefunction($mod);
if (!$return) {
if (file_exists($moderr)) {