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/>.
19 * Lib library of functions.
21 * @package block_accessreview
22 * @copyright 2019 Karen Holland LTS.ie
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 defined('MOODLE_INTERNAL') ||
die();
29 * Get icon mapping for font-awesome.
31 function block_accessreview_get_fontawesome_icon_map() {
33 'block_accessreview:smile' => 'fa-smile-o',
34 'block_accessreview:frown' => 'fa-frown-o',
35 'block_accessreview:errorsfound' => 'fa-ban',
36 'block_accessreview:f/pdf' => 'fa-file-pdf-o',
37 'block_accessreview:f/video' => 'fa-file-video-o',
38 'block_accessreview:f/find' => 'fa-bar-chart',
39 'block_accessreview:f/form' => 'fa-pencil-square-o',
40 'block_accessreview:f/image' => 'fa-image',
41 'block_accessreview:f/layout' => 'fa-th-large',
42 'block_accessreview:f/link' => 'fa-link',
43 'block_accessreview:f/media' => 'fa-play-circle-o',
44 'block_accessreview:f/table' => 'fa-table',
45 'block_accessreview:f/text' => 'fa-font',
46 'block_accessreview:t/fail' => 'fa-ban',
47 'block_accessreview:t/pass' => 'fa-check',
52 * Define preferences which may be set via the core_user_set_user_preferences external function.
56 function block_accessreview_user_preferences(): array {
58 'block_accessreviewtogglestate' => [
60 'null' => NULL_NOT_ALLOWED
,