If the name of an activity is left blank, then give it a generic name

matching the name of the module.
This commit is contained in:
moodler 2004-08-14 12:15:28 +00:00
parent 7c990f68d6
commit 71d707f18f

View File

@ -48,6 +48,11 @@
switch ($mod->mode) {
case "update":
if (trim($mod->name) == '') {
unset($mod->name);
}
$return = $updateinstancefunction($mod);
if (!$return) {
if (file_exists($moderr)) {
@ -72,6 +77,11 @@
break;
case "add":
if (trim($mod->name) == '') {
$mod->name = get_string("modulename", $mod->modulename);
}
$return = $addinstancefunction($mod);
if (!$return) {
if (file_exists($moderr)) {