mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Merge branch 'MDL-74162-master' of https://github.com/mihailges/moodle
This commit is contained in:
commit
066b9ac6ed
1 changed files with 3 additions and 3 deletions
|
@ -153,11 +153,11 @@ class standard_action_bar implements renderable, templatable {
|
|||
* Render the add entry button
|
||||
*
|
||||
* @param renderer_base $output
|
||||
* @return \stdClass
|
||||
* @return \stdClass|null
|
||||
*/
|
||||
private function create_add_button(renderer_base $output): \stdClass {
|
||||
private function create_add_button(renderer_base $output): ?\stdClass {
|
||||
if (!has_capability('mod/glossary:write', $this->context)) {
|
||||
return '';
|
||||
return null;
|
||||
}
|
||||
$btn = new single_button(new moodle_url('/mod/glossary/edit.php', ['cmid' => $this->cm->id]),
|
||||
get_string('addsingleentry', 'glossary'), 'post', true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue