| Code Coverage | ||||||||||
| Lines | Functions and Methods | Classes and Traits | ||||||||
| Total |  | 0.00% | 0 / 3 |  | 0.00% | 0 / 3 | CRAP |  | 0.00% | 0 / 1 | 
| SectionPauseService |  | 0.00% | 0 / 3 |  | 0.00% | 0 / 3 | 12 |  | 0.00% | 0 / 1 | 
| couldBePaused |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| isPausable |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 | |||
| canMoveBackward |  | 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) 2017 (original work) Open Assessment Technologies SA ; | 
| 19 | * | 
| 20 | * @author Alexander Zagovorychev <zagovorichev@1pt.com> | 
| 21 | */ | 
| 22 | |
| 23 | namespace oat\taoQtiTest\models; | 
| 24 | |
| 25 | use oat\oatbox\service\ConfigurableService; | 
| 26 | use oat\taoQtiTest\models\runner\session\TestSession; | 
| 27 | |
| 28 | class SectionPauseService extends ConfigurableService | 
| 29 | { | 
| 30 | public const SERVICE_ID = 'taoQtiTest/SectionPauseService'; | 
| 31 | |
| 32 | /** | 
| 33 | * Checked the given session could be paused at some point | 
| 34 | * (in other words : is section pause enabled) | 
| 35 | * @param $session | 
| 36 | * @return bool | 
| 37 | */ | 
| 38 | public function couldBePaused(TestSession $session = null) | 
| 39 | { | 
| 40 | return false; | 
| 41 | } | 
| 42 | |
| 43 | /** | 
| 44 | * Checked that section can be paused | 
| 45 | * @param $session | 
| 46 | * @return bool | 
| 47 | */ | 
| 48 | public function isPausable(TestSession $session = null) | 
| 49 | { | 
| 50 | return false; | 
| 51 | } | 
| 52 | |
| 53 | /** | 
| 54 | * Check if we can move backward : when leaving a pausable section, | 
| 55 | * we can't move backward. | 
| 56 | * | 
| 57 | * @param TestSession $session | 
| 58 | * @return bool | 
| 59 | */ | 
| 60 | public function canMoveBackward(TestSession $session = null) | 
| 61 | { | 
| 62 | return true; | 
| 63 | } | 
| 64 | } |