Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
a096fb59
Commit
a096fb59
authored
Oct 01, 2021
by
Andrew Nicols
Browse files
Merge branch 'MDL-72673-master' of
git://github.com/junpataleta/moodle
parents
f4604fe5
8c180760
Changes
1
Hide whitespace changes
Inline
Side-by-side
mod/glossary/lib.php
View file @
a096fb59
...
...
@@ -1195,18 +1195,9 @@ function glossary_print_entry_aliases($course, $cm, $glossary, $entry,$mode='',
global
$DB
;
$return
=
''
;
if
(
$aliases
=
$DB
->
get_records
(
'glossary_alias'
,
array
(
'entryid'
=>
$entry
->
id
)))
{
foreach
(
$aliases
as
$alias
)
{
if
(
trim
(
$alias
->
alias
))
{
if
(
$return
==
''
)
{
$return
=
'<select id="keyword" class="custom-select">'
;
}
$return
.
=
"<option>
$alias->alias
</option>"
;
}
}
if
(
$return
!=
''
)
{
$return
.
=
'</select>'
;
}
if
(
$aliases
=
$DB
->
get_fieldset_select
(
'glossary_alias'
,
'alias'
,
'entryid = :entryid'
,
[
'entryid'
=>
$entry
->
id
]))
{
$id
=
"keyword-
{
$entry
->
id
}
"
;
$return
=
html_writer
::
select
(
$aliases
,
$id
,
''
,
false
,
[
'id'
=>
$id
]);
}
if
(
$type
==
'print'
)
{
echo
$return
;
...
...
@@ -1376,9 +1367,10 @@ function glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $m
if
(
$aliases
||
$icons
||
!
empty
(
$entry
->
rating
))
{
echo
'<table>'
;
if
(
$aliases
)
{
$id
=
"keyword-
{
$entry
->
id
}
"
;
echo
'<tr valign="top"><td class="aliases">'
.
'<label for="
keyword
">'
.
get_string
(
'aliases'
,
'glossary'
)
.
': </label>'
.
$aliases
.
'</td></tr>'
;
'<label for="
'
.
$id
.
'
">'
.
get_string
(
'aliases'
,
'glossary'
)
.
': </label>'
.
$aliases
.
'</td></tr>'
;
}
if
(
$icons
)
{
echo
'<tr valign="top"><td class="icons">'
.
$icons
.
'</td></tr>'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment