Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 132 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| ReasonCategoryService | |
0.00% |
0 / 132 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| getDefinitions | |
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
2 | |||
| getCategories | |
0.00% |
0 / 118 |
|
0.00% |
0 / 1 |
2 | |||
| getIrregularities | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program 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. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2015 (original work) Open Assessment Technologies SA ; |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoProctoring\model; |
| 23 | |
| 24 | use oat\oatbox\service\ConfigurableService; |
| 25 | |
| 26 | /** |
| 27 | * Provides methods to return the list of available categories and subcategories |
| 28 | */ |
| 29 | class ReasonCategoryService extends ConfigurableService implements ReasonCategoryServiceInterface |
| 30 | { |
| 31 | /** |
| 32 | * @return array |
| 33 | */ |
| 34 | private function getDefinitions() |
| 35 | { |
| 36 | return [ |
| 37 | array( |
| 38 | 'id' => 'category', |
| 39 | 'placeholder' => __('Issue Category') |
| 40 | ), |
| 41 | array( |
| 42 | 'id' => 'subCategory', |
| 43 | 'placeholder' => __('Subcategory') |
| 44 | ) |
| 45 | ]; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * Default category list. It can be overwritten by child classes. |
| 50 | * Pay attention to the keys! |
| 51 | * |
| 52 | * @return array |
| 53 | */ |
| 54 | protected function getCategories() |
| 55 | { |
| 56 | return array( |
| 57 | array( |
| 58 | 'id' => 'environment', |
| 59 | 'label' => __('Environment'), |
| 60 | 'categories' => array( |
| 61 | array( |
| 62 | 'id' => 'comfort', |
| 63 | 'label' => __('Comfort') |
| 64 | ), |
| 65 | array( |
| 66 | 'id' => 'disturbance', |
| 67 | 'label' => __('Disturbance') |
| 68 | ), |
| 69 | array( |
| 70 | 'id' => 'noise', |
| 71 | 'label' => __('Noise') |
| 72 | ), |
| 73 | array( |
| 74 | 'id' => 'powerOutage', |
| 75 | 'label' => __('Power Outage') |
| 76 | ), |
| 77 | array( |
| 78 | 'id' => 'weather', |
| 79 | 'label' => __('Weather') |
| 80 | ), |
| 81 | ) |
| 82 | ), |
| 83 | array( |
| 84 | 'id' => 'examinee', |
| 85 | 'label' => __('Examinee'), |
| 86 | 'categories' => array( |
| 87 | array( |
| 88 | 'id' => 'behaviour', |
| 89 | 'label' => __('Behaviour') |
| 90 | ), |
| 91 | array( |
| 92 | 'id' => 'complaint', |
| 93 | 'label' => __('Complaint') |
| 94 | ), |
| 95 | array( |
| 96 | 'id' => 'idAuthorization', |
| 97 | 'label' => __('ID/Authorization') |
| 98 | ), |
| 99 | array( |
| 100 | 'id' => 'illness', |
| 101 | 'label' => __('Illness') |
| 102 | ), |
| 103 | array( |
| 104 | 'id' => 'late', |
| 105 | 'label' => __('Late') |
| 106 | ), |
| 107 | array( |
| 108 | 'id' => 'navigation', |
| 109 | 'label' => __('Navigation') |
| 110 | ), |
| 111 | array( |
| 112 | 'id' => 'noShow', |
| 113 | 'label' => __('No Show') |
| 114 | ), |
| 115 | ) |
| 116 | ), |
| 117 | array( |
| 118 | 'id' => 'proctorStaff', |
| 119 | 'label' => __('Proctor/Staff'), |
| 120 | 'categories' => array( |
| 121 | array( |
| 122 | 'id' => 'behaviour', |
| 123 | 'label' => __('Behaviour') |
| 124 | ), |
| 125 | array( |
| 126 | 'id' => 'compliance', |
| 127 | 'label' => __('Compliance') |
| 128 | ), |
| 129 | array( |
| 130 | 'id' => 'error', |
| 131 | 'label' => __('Error') |
| 132 | ), |
| 133 | array( |
| 134 | 'id' => 'late', |
| 135 | 'label' => __('Late') |
| 136 | ), |
| 137 | array( |
| 138 | 'id' => 'noShow', |
| 139 | 'label' => __('No Show') |
| 140 | ), |
| 141 | ) |
| 142 | ), |
| 143 | array( |
| 144 | 'id' => 'technical', |
| 145 | 'label' => __('Technical'), |
| 146 | 'categories' => array( |
| 147 | array( |
| 148 | 'id' => 'freezing', |
| 149 | 'label' => __('Freezing') |
| 150 | ), |
| 151 | array( |
| 152 | 'id' => 'launching', |
| 153 | 'label' => __('Launching') |
| 154 | ), |
| 155 | array( |
| 156 | 'id' => 'network', |
| 157 | 'label' => __('Network') |
| 158 | ), |
| 159 | array( |
| 160 | 'id' => 'printing', |
| 161 | 'label' => __('Printing') |
| 162 | ), |
| 163 | array( |
| 164 | 'id' => 'testingWorkstation', |
| 165 | 'label' => __('Testing Workstation') |
| 166 | ), |
| 167 | ) |
| 168 | ), |
| 169 | array( |
| 170 | 'id' => 'other', |
| 171 | 'label' => __('Other') |
| 172 | ) |
| 173 | ); |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * @return array |
| 178 | */ |
| 179 | public function getIrregularities() |
| 180 | { |
| 181 | return [ |
| 182 | 'categoriesDefinitions' => $this->getDefinitions(), |
| 183 | 'categories' => $this->getCategories() |
| 184 | ]; |
| 185 | } |
| 186 | } |