/** * Test getCompletionDateForTriggerRefId * * @param * @return */ function test() { global $tpl, $lng, $ilCtrl, $ilTabs; $this->setTestSubTabs("test"); $ilTabs->activateTab("test"); include_once "./Services/Skill/classes/class.ilBasicSkill.php"; include_once "Services/Form/classes/class.ilPropertyFormGUI.php"; $this->form = new ilPropertyFormGUI(); $this->form->addCommandButton("test", $lng->txt("execute")); $this->form->setTitle("getCompletionDateForTriggerRefId()"); $this->form->setFormAction($ilCtrl->getFormAction($this)); // user id $ti = new ilTextInputGUI("User ID(s)", "user_id"); $ti->setMaxLength(200); $ti->setInfo("Separate multiple IDs by :"); $ti->setValue($_POST["user_id"]); $this->form->addItem($ti); // ref id $ti = new ilTextInputGUI("Ref ID(s)", "ref_id"); $ti->setMaxLength(200); $ti->setInfo("Separate multiple IDs by :"); $ti->setValue($_POST["ref_id"]); $this->form->addItem($ti); $result = ""; if (isset($_POST["user_id"])) { $user_ids = explode(":", $_POST["user_id"]); $ref_ids = explode(":", $_POST["ref_id"]); if (count($user_ids) <= 1) { $user_ids = $user_ids[0]; } if (count($ref_ids) == 1) { $ref_ids = $ref_ids[0]; } else { if (count($ref_ids) == 0) { $ref_ids = null; } } $result = ilBasicSkill::getCompletionDateForTriggerRefId($user_ids, $ref_ids); $result = "<br />Result:<br />" . var_export($result, true); } $tpl->setContent($this->form->getHTML() . $result); }