mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-60174-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
bdb157653b
30 changed files with 653 additions and 44 deletions
|
@ -3799,7 +3799,7 @@ function glossary_get_search_terms_sql(array $terms, $fullsearch = true, $glossa
|
|||
* @param array $options Accepts:
|
||||
* - (bool) includenotapproved. When false, includes the non-approved entries created by
|
||||
* the current user. When true, also includes the ones that the user has the permission to approve.
|
||||
* @return array The first element being the recordset, the second the number of entries.
|
||||
* @return array The first element being the array of results, the second the number of entries.
|
||||
* @since Moodle 3.1
|
||||
*/
|
||||
function glossary_get_entries_by_search($glossary, $context, $query, $fullsearch, $order, $sort, $from, $limit,
|
||||
|
|
|
@ -216,6 +216,10 @@ if ( $allentries ) {
|
|||
|
||||
glossary_print_entry($course, $cm, $glossary, $entry, $mode, $hook, 1, $displayformat, true);
|
||||
}
|
||||
// The all entries value may be a recordset or an array.
|
||||
if ($allentries instanceof moodle_recordset) {
|
||||
$allentries->close();
|
||||
}
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
|
|
@ -521,6 +521,10 @@ if ($allentries) {
|
|||
glossary_print_entry($course, $cm, $glossary, $entry, $mode, $hook,1,$displayformat);
|
||||
$entriesshown++;
|
||||
}
|
||||
// The all entries value may be a recordset or an array.
|
||||
if ($allentries instanceof moodle_recordset) {
|
||||
$allentries->close();
|
||||
}
|
||||
}
|
||||
if ( !$entriesshown ) {
|
||||
echo $OUTPUT->box(get_string("noentries","glossary"), "generalbox boxaligncenter boxwidthwide");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue