mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 04:33:13 +01:00
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:
parent
7c990f68d6
commit
71d707f18f
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user