mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-59368 groups: Show no groups instead of ''
This is on the inplace editable for a users course groups.
This commit is contained in:
parent
76c493b3f2
commit
4aad7c2be2
1 changed files with 5 additions and 1 deletions
|
@ -92,7 +92,11 @@ class user_groups_editable extends \core\output\inplace_editable {
|
||||||
$listofgroups[] = format_string($this->coursegroups[$id]->name, true, ['context' => $this->context]);
|
$listofgroups[] = format_string($this->coursegroups[$id]->name, true, ['context' => $this->context]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->displayvalue = implode($listofgroups, ', ');
|
if (!empty($listofgroups)) {
|
||||||
|
$this->displayvalue = implode($listofgroups, ', ');
|
||||||
|
} else {
|
||||||
|
$this->displayvalue = get_string('groupsnone');
|
||||||
|
}
|
||||||
return parent::export_for_template($output);
|
return parent::export_for_template($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue