MDL-69454 core_search: consistent mod searches
[moodle.git] / mod / glossary / view.php
CommitLineData
5fa0208e 1<?php
2
07842023 3/// This page prints a particular instance of glossary
5fa0208e 4require_once("../../config.php");
5require_once("lib.php");
786d886e 6require_once($CFG->libdir . '/completionlib.php');
5fa0208e 7require_once("$CFG->libdir/rsslib.php");
8
9$id = optional_param('id', 0, PARAM_INT); // Course Module ID
10$g = optional_param('g', 0, PARAM_INT); // Glossary ID
11
12$tab = optional_param('tab', GLOSSARY_NO_VIEW, PARAM_ALPHA); // browsing entries by categories?
13$displayformat = optional_param('displayformat',-1, PARAM_INT); // override of the glossary display format
14
15$mode = optional_param('mode', '', PARAM_ALPHA); // term entry cat date letter search author approval
16$hook = optional_param('hook', '', PARAM_CLEAN); // the term, entry, cat, etc... to look for based on mode
17$fullsearch = optional_param('fullsearch', 0,PARAM_INT); // full search (concept and definition) when searching?
18$sortkey = optional_param('sortkey', '', PARAM_ALPHA);// Sorted view: CREATION | UPDATE | FIRSTNAME | LASTNAME...
19$sortorder = optional_param('sortorder', 'ASC', PARAM_ALPHA); // it defines the order of the sorting (ASC or DESC)
20$offset = optional_param('offset', 0,PARAM_INT); // entries to bypass (for paging purposes)
21$page = optional_param('page', 0,PARAM_INT); // Page to show (for paging purposes)
22$show = optional_param('show', '', PARAM_ALPHA); // [ concept | alias ] => mode=term hook=$show
23
24if (!empty($id)) {
25 if (! $cm = get_coursemodule_from_id('glossary', $id)) {
26 print_error('invalidcoursemodule');
27 }
28 if (! $course = $DB->get_record("course", array("id"=>$cm->course))) {
29 print_error('coursemisconf');
30 }
31 if (! $glossary = $DB->get_record("glossary", array("id"=>$cm->instance))) {
32 print_error('invalidid', 'glossary');
33 }
49bcd737 34
5fa0208e 35} else if (!empty($g)) {
36 if (! $glossary = $DB->get_record("glossary", array("id"=>$g))) {
8a274bcd 37 print_error('invalidid', 'glossary');
67905ace 38 }
5fa0208e 39 if (! $course = $DB->get_record("course", array("id"=>$glossary->course))) {
40 print_error('invalidcourseid');
41 }
42 if (!$cm = get_coursemodule_from_instance("glossary", $glossary->id, $course->id)) {
43 print_error('invalidcoursemodule');
44 }
45 $id = $cm->id;
46} else {
47 print_error('invalidid', 'glossary');
48}
7856dd59 49
5fa0208e 50require_course_login($course->id, true, $cm);
c3963fbd
JF
51$context = context_module::instance($cm->id);
52require_capability('mod/glossary:view', $context);
bbbf2d40 53
bce3e3dc
EL
54// Prepare format_string/text options
55$fmtoptions = array(
56 'context' => $context);
57
36051c9e
DC
58require_once($CFG->dirroot . '/comment/lib.php');
59comment::init();
60
1ac87c73 61/// redirecting if adding a new entry
5fa0208e 62if ($tab == GLOSSARY_ADDENTRY_VIEW ) {
63 redirect("edit.php?cmid=$cm->id&amp;mode=$mode");
64}
1ac87c73 65
66/// setting the defaut number of entries per page if not set
5fa0208e 67if ( !$entriesbypage = $glossary->entbypage ) {
68 $entriesbypage = $CFG->glossary_entbypage;
69}
1ac87c73 70
a2a1a586
HB
71// If we have received a page, recalculate offset and page size.
72$pagelimit = $entriesbypage;
73if ($page > 0 && $offset == 0) {
5fa0208e 74 $offset = $page * $entriesbypage;
a2a1a586
HB
75} else if ($page < 0) {
76 $offset = 0;
77 $pagelimit = 0;
5fa0208e 78}
e2cf5316 79
0dafa92b 80/// setting the default values for the display mode of the current glossary
81/// only if the glossary is viewed by the first time
5fa0208e 82if ( $dp = $DB->get_record('glossary_formats', array('name'=>$glossary->displayformat)) ) {
83/// Based on format->defaultmode, we build the defaulttab to be showed sometimes
29645f97 84 $showtabs = glossary_get_visible_tabs($dp);
5fa0208e 85 switch ($dp->defaultmode) {
86 case 'cat':
87 $defaulttab = GLOSSARY_CATEGORY_VIEW;
223d6cb3
NS
88
89 // Handle defaultmode if 'category' tab is disabled. Fallback to 'standard' tab.
90 if (!in_array(GLOSSARY_CATEGORY, $showtabs)) {
91 $defaulttab = GLOSSARY_STANDARD_VIEW;
92 }
93
5fa0208e 94 break;
95 case 'date':
96 $defaulttab = GLOSSARY_DATE_VIEW;
223d6cb3
NS
97
98 // Handle defaultmode if 'date' tab is disabled. Fallback to 'standard' tab.
99 if (!in_array(GLOSSARY_DATE, $showtabs)) {
100 $defaulttab = GLOSSARY_STANDARD_VIEW;
101 }
102
5fa0208e 103 break;
104 case 'author':
105 $defaulttab = GLOSSARY_AUTHOR_VIEW;
223d6cb3
NS
106
107 // Handle defaultmode if 'author' tab is disabled. Fallback to 'standard' tab.
108 if (!in_array(GLOSSARY_AUTHOR, $showtabs)) {
109 $defaulttab = GLOSSARY_STANDARD_VIEW;
110 }
111
5fa0208e 112 break;
113 default:
114 $defaulttab = GLOSSARY_STANDARD_VIEW;
0dafa92b 115 }
5fa0208e 116/// Fetch the rest of variables
117 $printpivot = $dp->showgroup;
118 if ( $mode == '' and $hook == '' and $show == '') {
119 $mode = $dp->defaultmode;
120 $hook = $dp->defaulthook;
121 $sortkey = $dp->sortkey;
122 $sortorder = $dp->sortorder;
fe32b4f6 123 }
5fa0208e 124} else {
125 $defaulttab = GLOSSARY_STANDARD_VIEW;
29645f97 126 $showtabs = array($defaulttab);
5fa0208e 127 $printpivot = 1;
128 if ( $mode == '' and $hook == '' and $show == '') {
129 $mode = 'letter';
130 $hook = 'ALL';
0dafa92b 131 }
5fa0208e 132}
133
134if ( $displayformat == -1 ) {
135 $displayformat = $glossary->displayformat;
136}
137
138if ( $show ) {
139 $mode = 'term';
140 $hook = $show;
141 $show = '';
142}
6553cda7 143
1ac87c73 144/// stablishing flag variables
5fa0208e 145if ( $sortorder = strtolower($sortorder) ) {
146 if ($sortorder != 'asc' and $sortorder != 'desc') {
147 $sortorder = '';
767a31c3 148 }
5fa0208e 149}
150if ( $sortkey = strtoupper($sortkey) ) {
151 if ($sortkey != 'CREATION' and
152 $sortkey != 'UPDATE' and
153 $sortkey != 'FIRSTNAME' and
154 $sortkey != 'LASTNAME'
155 ) {
156 $sortkey = '';
767a31c3 157 }
5fa0208e 158}
1d9ddaaf 159
5fa0208e 160switch ( $mode = strtolower($mode) ) {
161case 'search': /// looking for terms containing certain word(s)
162 $tab = GLOSSARY_STANDARD_VIEW;
c76e673a 163
5fa0208e 164 //Clean a bit the search string
165 $hook = trim(strip_tags($hook));
74a27855 166
5fa0208e 167break;
fe32b4f6 168
5fa0208e 169case 'entry': /// Looking for a certain entry id
170 $tab = GLOSSARY_STANDARD_VIEW;
171 if ( $dp = $DB->get_record("glossary_formats", array("name"=>$glossary->displayformat)) ) {
172 $displayformat = $dp->popupformatname;
173 }
174break;
fe32b4f6 175
5fa0208e 176case 'cat': /// Looking for a certain cat
177 $tab = GLOSSARY_CATEGORY_VIEW;
223d6cb3
NS
178
179 // Validation - we don't want to display 'category' tab if it is disabled.
180 if (!in_array(GLOSSARY_CATEGORY, $showtabs)) {
181 $tab = GLOSSARY_STANDARD_VIEW;
182 }
183
5fa0208e 184 if ( $hook > 0 ) {
185 $category = $DB->get_record("glossary_categories", array("id"=>$hook));
186 }
187break;
c76e673a 188
5fa0208e 189case 'approval': /// Looking for entries waiting for approval
190 $tab = GLOSSARY_APPROVAL_VIEW;
c042fc81
ARN
191 // Override the display format with the approvaldisplayformat
192 if ($glossary->approvaldisplayformat !== 'default' && ($df = $DB->get_record("glossary_formats",
193 array("name" => $glossary->approvaldisplayformat)))) {
194 $displayformat = $df->popupformatname;
195 }
5fa0208e 196 if ( !$hook and !$sortkey and !$sortorder) {
197 $hook = 'ALL';
198 }
199break;
1ac87c73 200
5fa0208e 201case 'term': /// Looking for entries that include certain term in its concept, definition or aliases
202 $tab = GLOSSARY_STANDARD_VIEW;
203break;
1ac87c73 204
5fa0208e 205case 'date':
206 $tab = GLOSSARY_DATE_VIEW;
223d6cb3
NS
207
208 // Validation - we dont want to display 'date' tab if it is disabled.
209 if (!in_array(GLOSSARY_DATE, $showtabs)) {
210 $tab = GLOSSARY_STANDARD_VIEW;
211 }
212
5fa0208e 213 if ( !$sortkey ) {
214 $sortkey = 'UPDATE';
215 }
216 if ( !$sortorder ) {
217 $sortorder = 'desc';
218 }
219break;
fe32b4f6 220
5fa0208e 221case 'author': /// Looking for entries, browsed by author
222 $tab = GLOSSARY_AUTHOR_VIEW;
223d6cb3
NS
223
224 // Validation - we dont want to display 'author' tab if it is disabled.
225 if (!in_array(GLOSSARY_AUTHOR, $showtabs)) {
226 $tab = GLOSSARY_STANDARD_VIEW;
227 }
228
5fa0208e 229 if ( !$hook ) {
230 $hook = 'ALL';
231 }
232 if ( !$sortkey ) {
233 $sortkey = 'FIRSTNAME';
234 }
235 if ( !$sortorder ) {
236 $sortorder = 'asc';
237 }
238break;
1ac87c73 239
5fa0208e 240case 'letter': /// Looking for entries that begin with a certain letter, ALL or SPECIAL characters
241default:
242 $tab = GLOSSARY_STANDARD_VIEW;
243 if ( !$hook ) {
244 $hook = 'ALL';
fe32b4f6 245 }
5fa0208e 246break;
247}
1ac87c73 248
5fa0208e 249switch ( $tab ) {
250case GLOSSARY_IMPORT_VIEW:
251case GLOSSARY_EXPORT_VIEW:
252case GLOSSARY_APPROVAL_VIEW:
253 $showcommonelements = 0;
254break;
fe32b4f6 255
5fa0208e 256default:
257 $showcommonelements = 1;
258break;
259}
1ac87c73 260
3dbe89ac 261// Trigger module viewed event.
d0d4372c 262glossary_view($glossary, $course, $cm, $context, $mode);
3dbe89ac 263
1ac87c73 264/// Printing the heading
5fa0208e 265$strglossaries = get_string("modulenameplural", "glossary");
266$strglossary = get_string("modulename", "glossary");
267$strallcategories = get_string("allcategories", "glossary");
268$straddentry = get_string("addentry", "glossary");
269$strnoentries = get_string("noentries", "glossary");
5fa0208e 270$strsearchindefinition = get_string("searchindefinition", "glossary");
271$strsearch = get_string("search");
272$strwaitingapproval = get_string('waitingapproval', 'glossary');
ab397f26 273
274/// If we are in approval mode, prit special header
8c6ca696 275$PAGE->set_title($glossary->name);
2e4fd166 276$PAGE->set_heading($course->fullname);
a6855934 277$url = new moodle_url('/mod/glossary/view.php', array('id'=>$cm->id));
5fa0208e 278if (isset($mode)) {
279 $url->param('mode', $mode);
280}
281$PAGE->set_url($url);
4657f038 282$PAGE->force_settings_menu();
9e86f2e7
AD
283
284if (!empty($CFG->enablerssfeeds) && !empty($CFG->glossary_enablerssfeeds)
285 && $glossary->rsstype && $glossary->rssarticles) {
286
7a241d81 287 $rsstitle = format_string($course->shortname, true, array('context' => context_course::instance($course->id))) . ': '. format_string($glossary->name);
43b92251 288 rss_add_http_header($context, 'mod_glossary', $glossary, $rsstitle);
9e86f2e7
AD
289}
290
5fa0208e 291if ($tab == GLOSSARY_APPROVAL_VIEW) {
292 require_capability('mod/glossary:approve', $context);
293 $PAGE->navbar->add($strwaitingapproval);
294 echo $OUTPUT->header();
295 echo $OUTPUT->heading($strwaitingapproval);
86342d63 296} else { /// Print standard header
5fa0208e 297 echo $OUTPUT->header();
298}
e5d932cc 299echo $OUTPUT->heading(format_string($glossary->name), 2);
136ce8de 300
dd232d01 301/// All this depends if whe have $showcommonelements
5fa0208e 302if ($showcommonelements) {
303/// To calculate available options
304 $availableoptions = '';
305
306/// Decide about to print the import link
9e86f2e7 307 /*if (has_capability('mod/glossary:import', $context)) {
5fa0208e 308 $availableoptions = '<span class="helplink">' .
309 '<a href="' . $CFG->wwwroot . '/mod/glossary/import.php?id=' . $cm->id . '"' .
310 ' title="' . s(get_string('importentries', 'glossary')) . '">' .
311 get_string('importentries', 'glossary') . '</a>' .
312 '</span>';
313 }
314/// Decide about to print the export link
315 if (has_capability('mod/glossary:export', $context)) {
316 if ($availableoptions) {
317 $availableoptions .= '&nbsp;/&nbsp;';
ab397f26 318 }
5fa0208e 319 $availableoptions .='<span class="helplink">' .
320 '<a href="' . $CFG->wwwroot . '/mod/glossary/export.php?id=' . $cm->id .
321 '&amp;mode='.$mode . '&amp;hook=' . urlencode($hook) . '"' .
322 ' title="' . s(get_string('exportentries', 'glossary')) . '">' .
323 get_string('exportentries', 'glossary') . '</a>' .
324 '</span>';
9e86f2e7 325 }*/
5fa0208e 326
327/// Decide about to print the approval link
328 if (has_capability('mod/glossary:approve', $context)) {
329 /// Check we have pending entries
330 if ($hiddenentries = $DB->count_records('glossary_entries', array('glossaryid'=>$glossary->id, 'approved'=>0))) {
136ce8de 331 if ($availableoptions) {
5fa0208e 332 $availableoptions .= '<br />';
f4646b44 333 }
136ce8de 334 $availableoptions .='<span class="helplink">' .
5fa0208e 335 '<a href="' . $CFG->wwwroot . '/mod/glossary/view.php?id=' . $cm->id .
336 '&amp;mode=approval' . '"' .
337 ' title="' . s(get_string('waitingapproval', 'glossary')) . '">' .
338 get_string('waitingapproval', 'glossary') . ' ('.$hiddenentries.')</a>' .
136ce8de 339 '</span>';
2dda0bbb 340 }
5fa0208e 341 }
5bd9aa93 342
5fa0208e 343/// Start to print glossary controls
52ea8aa0 344// print_box_start('glossarycontrol clearfix');
5fa0208e 345 echo '<div class="glossarycontrol" style="text-align: right">';
346 echo $availableoptions;
347
5fa0208e 348/// The print icon
349 if ( $showcommonelements and $mode != 'search') {
350 if (has_capability('mod/glossary:manageentries', $context) or $glossary->allowprintview) {
a2a1a586
HB
351 $params = array(
352 'id' => $cm->id,
353 'mode' => $mode,
354 'hook' => $hook,
355 'sortkey' => $sortkey,
356 'sortorder' => $sortorder,
357 'offset' => $offset,
358 'pagelimit' => $pagelimit
359 );
360 $printurl = new moodle_url('/mod/glossary/print.php', $params);
361 $printtitle = get_string('printerfriendly', 'glossary');
362 $printattributes = array(
363 'class' => 'printicon',
364 'title' => $printtitle
365 );
366 echo html_writer::link($printurl, $printtitle, $printattributes);
ab397f26 367 }
5fa0208e 368 }
369/// End glossary controls
52ea8aa0 370// print_box_end(); /// glossarycontrol
283f7083 371 echo '</div><br />';
49bcd737 372
52ea8aa0 373// print_box('&nbsp;', 'clearer');
5fa0208e 374}
d3709d95 375
7dd88447 376/// Info box
5fa0208e 377if ($glossary->intro && $showcommonelements) {
378 echo $OUTPUT->box(format_module_intro('glossary', $glossary, $cm->id), 'generalbox', 'intro');
379}
7dd88447 380
86183b07 381/// Search box
5fa0208e 382if ($showcommonelements ) {
4c71e1d0 383 $fullsearchchecked = false;
5fa0208e 384 if ($fullsearch || $mode != 'search') {
4c71e1d0 385 $fullsearchchecked = true;
5fa0208e 386 }
fe32b4f6 387
4c71e1d0
BB
388 $check = [
389 'name' => 'fullsearch',
390 'id' => 'fullsearch',
391 'value' => '1',
392 'checked' => $fullsearchchecked,
393 'label' => $strsearchindefinition
394 ];
395
396 $checkbox = $OUTPUT->render_from_template('core/checkbox', $check);
397
398 $hiddenfields = [
399 (object) ['name' => 'id', 'value' => $cm->id],
400 (object) ['name' => 'mode', 'value' => 'search'],
401 ];
402 $data = [
403 'action' => new moodle_url('/mod/glossary/view.php'),
404 'hiddenfields' => $hiddenfields,
405 'otherfields' => $checkbox,
406 'inputname' => 'hook',
407 'query' => ($mode == 'search') ? s($hook) : '',
408 'searchstring' => get_string('search'),
409 'extraclasses' => 'my-2'
410 ];
411 echo $OUTPUT->render_from_template('core/search_input', $data);
5fa0208e 412}
66111853 413
414/// Show the add entry button if allowed
5fa0208e 415if (has_capability('mod/glossary:write', $context) && $showcommonelements ) {
416 echo '<div class="singlebutton glossaryaddentry">';
5cac5fa4 417 echo "<form class=\"form form-inline mb-1\" id=\"newentryform\" method=\"get\" action=\"$CFG->wwwroot/mod/glossary/edit.php\">";
5fa0208e 418 echo '<div>';
419 echo "<input type=\"hidden\" name=\"cmid\" value=\"$cm->id\" />";
1093b461 420 echo '<input type="submit" value="'.get_string('addentry', 'glossary').'" class="btn btn-secondary" />';
5fa0208e 421 echo '</div>';
422 echo '</form>';
423 echo "</div>\n";
424}
66111853 425
fb443f1a 426
5fa0208e 427require("tabs.php");
07842023 428
5fa0208e 429require("sql.php");
fe32b4f6 430
1ac87c73 431/// printing the entries
5fa0208e 432$entriesshown = 0;
433$currentpivot = '';
5fa0208e 434$paging = NULL;
539f698d 435
5fa0208e 436if ($allentries) {
7fe60b0c 437
5fa0208e 438 //Decide if we must show the ALL link in the pagebar
439 $specialtext = '';
440 if ($glossary->showall) {
441 $specialtext = get_string("allentries","glossary");
442 }
db87439a 443
5fa0208e 444 //Build paging bar
ca6f7175
MG
445 $baseurl = new moodle_url('/mod/glossary/view.php', ['id' => $id, 'mode' => $mode, 'hook' => $hook,
446 'sortkey' => $sortkey, 'sortorder' => $sortorder, 'fullsearch' => $fullsearch]);
447 $paging = glossary_get_paging_bar($count, $page, $entriesbypage, $baseurl->out() . '&amp;',
448 9999, 10, '&nbsp;&nbsp;', $specialtext, -1);
1ac87c73 449
5fa0208e 450 echo '<div class="paging">';
451 echo $paging;
452 echo '</div>';
eee75231 453
63e87951 454 //load ratings
d251b259 455 require_once($CFG->dirroot.'/rating/lib.php');
2b04c41c
SH
456 if ($glossary->assessed != RATING_AGGREGATE_NONE) {
457 $ratingoptions = new stdClass;
195a0848 458 $ratingoptions->context = $context;
2c2ff8d5 459 $ratingoptions->component = 'mod_glossary';
2b04c41c 460 $ratingoptions->ratingarea = 'entry';
198ff498
AD
461 $ratingoptions->items = $allentries;
462 $ratingoptions->aggregate = $glossary->assessed;//the aggregation method
463 $ratingoptions->scaleid = $glossary->scale;
464 $ratingoptions->userid = $USER->id;
465 $ratingoptions->returnurl = $CFG->wwwroot.'/mod/glossary/view.php?id='.$cm->id;
466 $ratingoptions->assesstimestart = $glossary->assesstimestart;
467 $ratingoptions->assesstimefinish = $glossary->assesstimefinish;
198ff498
AD
468
469 $rm = new rating_manager();
470 $allentries = $rm->get_ratings($ratingoptions);
471 }
dd232d01 472
5fa0208e 473 foreach ($allentries as $entry) {
539f698d 474
5fa0208e 475 // Setting the pivot for the current entry
70d20d08
FM
476 if ($printpivot) {
477 $pivot = $entry->{$pivotkey};
478 $upperpivot = core_text::strtoupper($pivot);
479 $pivottoshow = core_text::strtoupper(format_string($pivot, true, $fmtoptions));
480
481 // Reduce pivot to 1cc if necessary.
482 if (!$fullpivot) {
483 $upperpivot = core_text::substr($upperpivot, 0, 1);
484 $pivottoshow = core_text::substr($pivottoshow, 0, 1);
485 }
539f698d 486
70d20d08
FM
487 // If there's a group break.
488 if ($currentpivot != $upperpivot) {
5fa0208e 489 $currentpivot = $upperpivot;
fe32b4f6 490
70d20d08
FM
491 // print the group break if apply
492
5fa0208e 493 echo '<div>';
494 echo '<table cellspacing="0" class="glossarycategoryheader">';
c4a35419 495
5fa0208e 496 echo '<tr>';
70d20d08 497 if ($userispivot) {
5fa0208e 498 // printing the user icon if defined (only when browsing authors)
499 echo '<th align="left">';
70d20d08 500 $user = mod_glossary_entry_query_builder::get_user_from_record($entry);
812dbaf7 501 echo $OUTPUT->user_picture($user, array('courseid'=>$course->id));
e0a91e11 502 $pivottoshow = fullname($user, has_capability('moodle/site:viewfullnames', context_course::instance($course->id)));
5fa0208e 503 } else {
504 echo '<th >';
539f698d 505 }
fe32b4f6 506
e5d932cc 507 echo $OUTPUT->heading($pivottoshow, 3);
5fa0208e 508 echo "</th></tr></table></div>\n";
fe32b4f6 509 }
5fa0208e 510 }
b1918034 511
5fa0208e 512 /// highlight the term if necessary
513 if ($mode == 'search') {
514 //We have to strip any word starting by + and take out words starting by -
515 //to make highlight works properly
516 $searchterms = explode(' ', $hook); // Search for words independently
517 foreach ($searchterms as $key => $searchterm) {
518 if (preg_match('/^\-/',$searchterm)) {
519 unset($searchterms[$key]);
520 } else {
521 $searchterms[$key] = preg_replace('/^\+/','',$searchterm);
522 }
523 //Avoid highlight of <2 len strings. It's a well known hilight limitation.
524 if (strlen($searchterm) < 2) {
525 unset($searchterms[$key]);
526 }
1ac87c73 527 }
5fa0208e 528 $strippedsearch = implode(' ', $searchterms); // Rebuild the string
529 $entry->highlight = $strippedsearch;
de1fe384 530 }
d23e2291 531
5fa0208e 532 /// and finally print the entry.
63e87951 533 glossary_print_entry($course, $cm, $glossary, $entry, $mode, $hook,1,$displayformat);
5fa0208e 534 $entriesshown++;
63dd5fb2 535 }
a938e409 536 // The all entries value may be a recordset or an array.
537 if ($allentries instanceof moodle_recordset) {
538 $allentries->close();
539 }
5fa0208e 540}
541if ( !$entriesshown ) {
542 echo $OUTPUT->box(get_string("noentries","glossary"), "generalbox boxaligncenter boxwidthwide");
543}
544
5fa0208e 545if (!empty($formsent)) {
546 // close the form properly if used
547 echo "</div>";
548 echo "</form>";
549}
550
551if ( $paging ) {
552 echo '<hr />';
553 echo '<div class="paging">';
554 echo $paging;
555 echo '</div>';
556}
557echo '<br />';
558glossary_print_tabbed_table_end();
0dafa92b 559
db87439a 560/// Finish the page
5fa0208e 561echo $OUTPUT->footer();