<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\KuferTools\Veranstalter\KursUebersichtDerMitarbeiter\KursUebersicht\Detailsreiter\Feedback;

class FeedbackFormularUseCase extends \Kufer\KuferTools\Basis\KursDetails\Feedback\FeedbackFormularUseCase
{
  public function __construct($request)
  {
    parent::__construct($request, new FeedbackFormularResponse());
  }

  public static function getToolId()
  {
    return 61;
  }

  public static function getToolSectionId()
  {
    return 722;
  }

  public function hasAccess($pToolSectionId = null)
  {
    if (!parent::hasAccess()) {
      return false;
    }
    if (!$this->isRechtAllowed('722.0.3')) {
      return false;
    }

    return true;
  }

  protected function getKursnummer()
  {
    return $this->request->knr;
  }

  protected function getAction(): string
  {
    return 'kursdetails&knr=' . $this->request->knr;
  }
}

class FeedbackFormularRequest extends \Kufer\KuferTools\Basis\KursDetails\Feedback\FeedbackFormularRequest
{
}

class FeedbackFormularResponse extends \Kufer\KuferTools\Basis\KursDetails\Feedback\FeedbackFormularResponse
{
}