createdAt = new DateTime('now'); $this->updatedAt = new DateTime('now'); $this->isReal = false; $this->requiresValidation = false; } /** * @return int */ public function getId() { return $this->id; } /** * @return Skill */ public function getSkill() { return $this->skill; } /** * @return SkillRelItem */ public function setSkill(Skill $skill) { $this->skill = $skill; return $this; } /** * @return int */ public function getItemId() { return $this->itemId; } /** * @return SkillRelItem */ public function setItemId(int $itemId) { $this->itemId = $itemId; return $this; } /** * @return string */ public function getObtainConditions() { return $this->obtainConditions; } /** * @return SkillRelItem */ public function setObtainConditions(string $obtainConditions) { $this->obtainConditions = $obtainConditions; return $this; } public function isRequiresValidation(): bool { return $this->requiresValidation; } /** * @return SkillRelItem */ public function setRequiresValidation(bool $requiresValidation) { $this->requiresValidation = $requiresValidation; return $this; } public function isReal(): bool { return $this->isReal; } /** * @return SkillRelItem */ public function setIsReal(bool $isReal) { $this->isReal = $isReal; return $this; } /** * @return DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * @return SkillRelItem */ public function setCreatedAt(DateTime $createdAt) { $this->createdAt = $createdAt; return $this; } /** * @return DateTime */ public function getUpdatedAt() { return $this->updatedAt; } /** * @return SkillRelItem */ public function setUpdatedAt(DateTime $updatedAt) { $this->updatedAt = $updatedAt; return $this; } /** * @return int */ public function getCreatedBy() { return $this->createdBy; } /** * @return SkillRelItem */ public function setCreatedBy(int $createdBy) { $this->createdBy = $createdBy; return $this; } /** * @return int */ public function getUpdatedBy() { return $this->updatedBy; } /** * @return SkillRelItem */ public function setUpdatedBy(int $updatedBy) { $this->updatedBy = $updatedBy; return $this; } /** * @return int */ public function getItemType() { return $this->itemType; } /** * @return SkillRelItem */ public function setItemType(int $itemType) { $this->itemType = $itemType; return $this; } /** * @return int */ public function getCourseId() { return $this->courseId; } /** * @return SkillRelItem */ public function setCourseId(int $courseId) { $this->courseId = $courseId; return $this; } /** * @return int */ public function getSessionId() { return $this->sessionId; } /** * @return SkillRelItem */ public function setSessionId(int $sessionId) { $this->sessionId = $sessionId; return $this; } /** * @return string */ public function getItemResultUrl(string $cidReq) { $url = ''; switch ($this->getItemType()) { case ITEM_TYPE_EXERCISE: $url = 'exercise/exercise_show.php?action=qualify&'.$cidReq; break; case ITEM_TYPE_STUDENT_PUBLICATION: $url = 'work/view.php?'.$cidReq; break; } return $url; } /** * @return string */ public function getItemResultList(string $cidReq) { $url = ''; switch ($this->getItemType()) { case ITEM_TYPE_EXERCISE: $url = 'exercise/exercise_report.php?'.$cidReq.'&id='.$this->getItemId(); break; case ITEM_TYPE_STUDENT_PUBLICATION: $url = 'work/work_list_all.php?'.$cidReq.'&id='.$this->getItemId(); break; } return $url; } }