/** * Get current values for assignment from * */ public function getAssignmentValues() { $values = array(); $ass = new ilEphAssignment($_GET["ass_id"]); $values["title"] = $ass->getTitle(); if ($ass->getStartTime() > 0) { $values["start_time"] = true; } $values["mandatory"] = $ass->getMandatory(); $values["instruction"] = $ass->getInstruction(); $this->form->setValuesByArray($values); $edit_date = new ilDateTime($ass->getDeadline(), IL_CAL_UNIX); $ed_item = $this->form->getItemByPostVar("deadline"); $ed_item->setDate($edit_date); if ($ass->getStartTime() > 0) { $edit_date = new ilDateTime($ass->getStartTime(), IL_CAL_UNIX); $ed_item = $this->form->getItemByPostVar("start_time"); $ed_item->setDate($edit_date); } }
function __formatBody($a_ass_id) { global $lng; include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php"; $ass = new ilEphAssignment($a_ass_id); $body = $ass->getInstruction(); $body .= "\n\n"; $body .= $lng->txt("eph_edit_until") . ": " . ilFormat::formatDate(date("Y-m-d H:i:s", $ass->getDeadline()), "datetime", true); $body .= "\n\n"; $body .= ILIAS_HTTP_PATH . "/goto.php?target=" . $this->getType() . "_" . $this->getRefId() . "&client_id=" . CLIENT_ID; return $body; }