*/ namespace oat\taoProctoring\model\authorization; use oat\oatbox\user\User; use oat\taoDelivery\model\execution\DeliveryExecutionInterface; use oat\taoProctoring\model\ServiceDelegator; class TestTakerAuthorizationDelegator extends ServiceDelegator implements TestTakerAuthorizationInterface { /** * (non-PHPdoc) * @see \oat\taoDelivery\model\authorization\AuthorizationProvider::verifyStartAuthorization() * @param $deliveryId * @param User $user */ public function verifyStartAuthorization($deliveryId, User $user) { return $this->getResponsibleService($user, $deliveryId)->verifyStartAuthorization($deliveryId, $user); } /** * (non-PHPdoc) * @see \oat\taoDelivery\model\authorization\AuthorizationProvider::verifyResumeAuthorization() * @param DeliveryExecutionInterface $deliveryExecution * @param User $user * @throws UnAuthorizedException */ public function verifyResumeAuthorization(DeliveryExecutionInterface $deliveryExecution, User $user) { $deliveryId = $deliveryExecution->getDelivery()->getUri(); return $this->getResponsibleService($user, $deliveryId)->verifyResumeAuthorization($deliveryExecution, $user); } /** * Check if delivery id proctored * * @param string $deliveryId * @param User $user * @return bool * @internal param core_kernel_classes_Resource $delivery */ public function isProctored($deliveryId, User $user) { return $this->getResponsibleService($user, $deliveryId)->isProctored($deliveryId, $user); } }