mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-49224 tooL_generator: fallback to "Test course <x>" when no fullname specified
This commit is contained in:
parent
cfb8019b67
commit
728e272851
1 changed files with 5 additions and 1 deletions
|
@ -134,7 +134,9 @@ class tool_generator_course_backend extends tool_generator_backend {
|
|||
|
||||
// Set parameters.
|
||||
$this->shortname = $shortname;
|
||||
if (is_null($fullname)) {
|
||||
|
||||
// We can't allow fullname to be set to an empty string.
|
||||
if (empty($fullname)) {
|
||||
$this->fullname = get_string(
|
||||
'fullname',
|
||||
'tool_generator',
|
||||
|
@ -145,6 +147,8 @@ class tool_generator_course_backend extends tool_generator_backend {
|
|||
} else {
|
||||
$this->fullname = $fullname;
|
||||
}
|
||||
|
||||
// Summary, on the other hand, should be empty-able.
|
||||
if (!is_null($summary)) {
|
||||
$this->summary = $summary;
|
||||
$this->summaryformat = $summaryformat;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue