mirror of
https://github.com/moodle/moodle.git
synced 2025-08-09 02:46:40 +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.
|
// Set parameters.
|
||||||
$this->shortname = $shortname;
|
$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(
|
$this->fullname = get_string(
|
||||||
'fullname',
|
'fullname',
|
||||||
'tool_generator',
|
'tool_generator',
|
||||||
|
@ -145,6 +147,8 @@ class tool_generator_course_backend extends tool_generator_backend {
|
||||||
} else {
|
} else {
|
||||||
$this->fullname = $fullname;
|
$this->fullname = $fullname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Summary, on the other hand, should be empty-able.
|
||||||
if (!is_null($summary)) {
|
if (!is_null($summary)) {
|
||||||
$this->summary = $summary;
|
$this->summary = $summary;
|
||||||
$this->summaryformat = $summaryformat;
|
$this->summaryformat = $summaryformat;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue