getTestExecutionUri()) { $deliveryExecution = ServiceProxy::singleton()->getDeliveryExecution($context->getTestExecutionUri()); if ($this->isProctoredDelivery($deliveryExecution->getDelivery())) { $response['securePauseStateRequired'] = true; } } } return $response; } /** * Check whether secure plugins must be used. * * @param \core_kernel_classes_Resource $delivery * @return bool * @throws \core_kernel_persistence_Exception */ private function isProctoredDelivery(\core_kernel_classes_Resource $delivery) { $hasProctor = $delivery->getOnePropertyValue($this->getProperty(ProctorService::ACCESSIBLE_PROCTOR)); $result = $hasProctor instanceof \core_kernel_classes_Resource && $hasProctor->getUri() == ProctorService::ACCESSIBLE_PROCTOR_ENABLED; return $result; } /** * Check whether the test is in a runnable state. * * @param RunnerServiceContext $context * @return bool * @throws \common_Exception * @throws \oat\taoQtiTest\models\runner\QtiRunnerClosedException * @throws QtiRunnerPausedException */ public function check(RunnerServiceContext $context) { parent::check($context); $state = $context->getTestSession()->getState(); if ($state == AssessmentTestSessionState::SUSPENDED) { throw new QtiRunnerPausedException(); } return true; } }