2 // This file is part of Moodle - http://moodle.org/
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17 * prints the tabbed bar
20 * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
21 * @package mod_glossary
22 * @copyright 2021 Peter Dias
24 defined('MOODLE_INTERNAL') ||
die;
26 echo html_writer
::start_div('entrybox');
27 if (!isset($category)) {
33 case GLOSSARY_CATEGORY_VIEW
:
34 glossary_print_categories_menu($cm, $glossary, $hook, $category);
36 case GLOSSARY_APPROVAL_VIEW
:
37 glossary_print_approval_menu($cm, $glossary, $mode, $hook, $sortkey, $sortorder);
39 case GLOSSARY_AUTHOR_VIEW
:
41 glossary_print_author_menu($cm, $glossary, "author", $hook, $sortkey, $sortorder, 'print');
43 case GLOSSARY_IMPORT_VIEW
:
46 glossary_print_import_menu($cm, $glossary, 'import', $hook, $sortkey, $sortorder);
48 case GLOSSARY_EXPORT_VIEW
:
51 glossary_print_export_menu($cm, $glossary, 'export', $hook, $sortkey, $sortorder);
53 case GLOSSARY_DATE_VIEW
:
60 glossary_print_alphabet_menu($cm, $glossary, "date", $hook, $sortkey, $sortorder);
62 case GLOSSARY_STANDARD_VIEW
:
64 glossary_print_alphabet_menu($cm, $glossary, "letter", $hook, $sortkey, $sortorder);
65 if ($mode == 'search' and $hook) {
66 echo html_writer
::tag('div', "$strsearch: $hook");
70 echo html_writer
::empty_tag('hr');