src/Entity/StudentEvaluation.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StudentEvaluationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=StudentEvaluationRepository::class)
  7.  */
  8. class StudentEvaluation {
  9.     const STATUS_IN_PENDING 'PENDING';
  10.     /**
  11.      * IN_PROCESS es cuando el estudiante almacena las repuestas de la evaluacion para ser calificadas
  12.      */
  13.     const STATUS_IN_PROCESS 'IN_PROCESS';
  14.     /**
  15.      * STATUS_FINISHED se da cuando el evaluador da su calificación y da por cerrado el examen
  16.      */
  17.     const STATUS_FINISHED 'FINISHED';
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Students::class)
  26.      */
  27.     private $student;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Modules::class)
  30.      */
  31.     private $module;
  32.     /**
  33.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  34.      */
  35.     private $allPoints;
  36.     /**
  37.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  38.      */
  39.     private $gettedPoints;
  40.     /**
  41.      * @ORM\Column(type="integer", nullable=true)
  42.      */
  43.     private $scoreMinimun;
  44.     /**
  45.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  46.      */
  47.     private $scoreReading;
  48.     /**
  49.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  50.      */
  51.     private $scoreWriting;
  52.     /**
  53.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  54.      */
  55.     private $scoreListening;
  56.     /**
  57.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  58.      */
  59.     private $scoreSpeaking;
  60.     /**
  61.      * @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
  62.      */
  63.     private $score;
  64.     /**
  65.      * @ORM\Column(type="integer", nullable=true)
  66.      */
  67.     private $attemps;
  68.     /**
  69.      * @ORM\Column(type="integer", nullable=true)
  70.      */
  71.     private $approved;
  72.     /**
  73.      * @ORM\Column(type="string", nullable=true, options={"default" : "IN_PROCESS"})
  74.      */
  75.     private $status;
  76.     /**
  77.      * @ORM\Column(type="datetime", nullable=true)
  78.      */
  79.     private $presentedAt;
  80.     /**
  81.      * @ORM\Column(type="datetime", nullable=true)
  82.      */
  83.     private $checkedAt;
  84.     public function getId(): ?int {
  85.         return $this->id;
  86.     }
  87.     public function getModule(): ?Modules {
  88.         return $this->module;
  89.     }
  90.     public function setModule(?Modules $module): self {
  91.         $this->module $module;
  92.         return $this;
  93.     }
  94.     public function getScore(): ?string {
  95.         return $this->score;
  96.     }
  97.     public function setScore(?string $score): self {
  98.         $this->score $score;
  99.         return $this;
  100.     }
  101.     public function getAttemps(): ?int {
  102.         return $this->attemps;
  103.     }
  104.     public function setAttemps(?int $attemps): self {
  105.         $this->attemps $attemps;
  106.         return $this;
  107.     }
  108.     public function getApproved(): ?int {
  109.         return $this->approved;
  110.     }
  111.     public function getApprovedText(): ?string {
  112.         if ($this->approved == 1) {
  113.             return 'Aprobado';
  114.         } elseif ($this->approved == 0) {
  115.             return 'No Aprobado';
  116.         }
  117.         return '';
  118.     }
  119.     public function setApproved(?int $approved): self {
  120.         $this->approved $approved;
  121.         return $this;
  122.     }
  123.     public function getStudent(): ?Students {
  124.         return $this->student;
  125.     }
  126.     public function setStudent(?Students $student): self {
  127.         $this->student $student;
  128.         return $this;
  129.     }
  130.     public function getScoreMinimun() {
  131.         return $this->scoreMinimun;
  132.     }
  133.     public function setScoreMinimun($scoreMinimun): void {
  134.         $this->scoreMinimun $scoreMinimun;
  135.     }
  136.     public function getStatus() {
  137.         return $this->status;
  138.     }
  139.     public function getStatusText() {
  140.         switch ($this->status) {
  141.             case self::STATUS_IN_PENDING:
  142.                 return 'Pendiente';
  143.             case self::STATUS_IN_PROCESS:
  144.                 return 'En Proceso';
  145.             case self::STATUS_FINISHED:
  146.                 return 'Calificado';
  147.             default:
  148.                 break;
  149.         }
  150.     }
  151.     public function setStatus($status): void {
  152.         $this->status $status;
  153.     }
  154.     public function getAllPoints() {
  155.         return $this->allPoints;
  156.     }
  157.     public function getGettedPoints() {
  158.         return $this->gettedPoints;
  159.     }
  160.     public function setAllPoints($allPoints): void {
  161.         $this->allPoints $allPoints;
  162.     }
  163.     public function setGettedPoints($getedPoints): void {
  164.         $this->gettedPoints $getedPoints;
  165.     }
  166.     public function getScoreReading() {
  167.         return $this->scoreReading;
  168.     }
  169.     public function getScoreWriting() {
  170.         return $this->scoreWriting;
  171.     }
  172.     public function getScoreListening() {
  173.         return $this->scoreListening;
  174.     }
  175.     public function getScoreSpeaking() {
  176.         return $this->scoreSpeaking;
  177.     }
  178.     public function setScoreReading($scoreReading): void {
  179.         $this->scoreReading $scoreReading;
  180.     }
  181.     public function setScoreWriting($scoreWriting): void {
  182.         $this->scoreWriting $scoreWriting;
  183.     }
  184.     public function setScoreListening($scoreListening): void {
  185.         $this->scoreListening $scoreListening;
  186.     }
  187.     public function setScoreSpeaking($scoreSpeaking): void {
  188.         $this->scoreSpeaking $scoreSpeaking;
  189.     }
  190.     public function getPresentedAt() {
  191.         return $this->presentedAt;
  192.     }
  193.     public function setPresentedAt($presentedAt): void {
  194.         $this->presentedAt $presentedAt;
  195.     }
  196.     public function getCheckedAt() {
  197.         return $this->checkedAt;
  198.     }
  199.     public function setCheckedAt($checkedAt): void {
  200.         $this->checkedAt $checkedAt;
  201.     }
  202. }