Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| LtiErrorMessage | |
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| getUrlParams | |
0.00% |
0 / 5 |
|
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) 2017 (original work) Open Assessment Technologies SA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | namespace oat\taoLti\models\classes\LtiMessages; |
| 23 | |
| 24 | /** |
| 25 | * Class LtiMessage |
| 26 | * |
| 27 | * Class represents message and log values to be used in the return url (launch_presentation_return_url) |
| 28 | * |
| 29 | * @see http://www.imsglobal.org/specs/ltiv1p0/implementation-guide#toc-3 - "launch_presentation_return_url" section |
| 30 | * @package oat\taoLti\models\classes\LtiMessages |
| 31 | * @author Aleh Hutnikau, <hutnikau@1pt.com> |
| 32 | */ |
| 33 | class LtiErrorMessage extends LtiMessage |
| 34 | { |
| 35 | /** |
| 36 | * Launch forbidden due to expiration, reaching max attempts etc |
| 37 | */ |
| 38 | public const ERROR_LAUNCH_FORBIDDEN = 1; |
| 39 | |
| 40 | /** |
| 41 | * Wrong value of parameter such as `proctored`, `secure` etc. |
| 42 | */ |
| 43 | public const ERROR_INVALID_PARAMETER = 2; |
| 44 | |
| 45 | /** |
| 46 | * Missed parameter |
| 47 | */ |
| 48 | public const ERROR_MISSING_PARAMETER = 3; |
| 49 | |
| 50 | /** |
| 51 | * os/browser does not comply requirements, java script is disabled) |
| 52 | */ |
| 53 | public const ERROR_CLIENT_REQUIREMENTS = 4; |
| 54 | |
| 55 | /** |
| 56 | * User is not authorized |
| 57 | */ |
| 58 | public const ERROR_UNAUTHORIZED = 5; |
| 59 | |
| 60 | /** |
| 61 | * other tao specific errors |
| 62 | */ |
| 63 | public const ERROR_SYSTEM_ERROR = 6; |
| 64 | |
| 65 | /** |
| 66 | * @return array |
| 67 | */ |
| 68 | public function getUrlParams() |
| 69 | { |
| 70 | $params = [ |
| 71 | 'lti_errormsg' => $this->getMessage(), |
| 72 | 'lti_errorlog' => $this->getLog(), |
| 73 | ]; |
| 74 | return $params; |
| 75 | } |
| 76 | } |