Code Coverage  | 
      ||||||||||
Lines  | 
       Functions and Methods  | 
       Classes and Traits  | 
      ||||||||
| Total |         | 
       50.00%  | 
       1 / 2  | 
               | 
       50.00%  | 
       1 / 2  | 
       CRAP |         | 
       0.00%  | 
       0 / 1  | 
      
| QtiRunnerPausedException |         | 
       50.00%  | 
       1 / 2  | 
               | 
       50.00%  | 
       1 / 2  | 
       2.50 |         | 
       0.00%  | 
       0 / 1  | 
      
| __construct |         | 
       100.00%  | 
       1 / 1  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 | |||
| getUserMessage |         | 
       0.00%  | 
       0 / 1  | 
               | 
       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) 2016 (original work) Open Assessment Technologies SA ; | 
| 19 | */ | 
| 20 | |
| 21 | /** | 
| 22 | * @author Jean-Sébastien Conan <jean-sebastien.conan@vesperiagroup.com> | 
| 23 | */ | 
| 24 | |
| 25 | namespace oat\taoQtiTest\models\runner; | 
| 26 | |
| 27 | use qtism\runtime\tests\AssessmentTestSessionState; | 
| 28 | |
| 29 | class QtiRunnerPausedException extends \common_Exception implements \common_exception_UserReadableException | 
| 30 | { | 
| 31 | /** | 
| 32 | * Create a new QtiRunnerClosedException object. | 
| 33 | * | 
| 34 | * @param string $message A technical infiormation message. | 
| 35 | * @param integer $code A code to explicitely identify the nature of the error. | 
| 36 | */ | 
| 37 | public function __construct($message = 'The test has been suspended', $code = AssessmentTestSessionState::SUSPENDED) | 
| 38 | { | 
| 39 | parent::__construct($message, $code); | 
| 40 | } | 
| 41 | |
| 42 | /** | 
| 43 | * Returns a translated human-readable message destinated to the end-user. | 
| 44 | * | 
| 45 | * @return string A human-readable message. | 
| 46 | */ | 
| 47 | public function getUserMessage() | 
| 48 | { | 
| 49 | return __('This test has been suspended'); | 
| 50 | } | 
| 51 | } |