/** * Standard Version of Fill Row. Most likely to * be overwritten by derived class. */ protected function fillRow($a_set) { global $lng, $ilCtrl, $lng; include_once "./Services/Tracking/classes/class.ilLPMarks.php"; include_once "./Modules/Wiki/classes/class.ilWikiContributor.php"; if (ilObject::_exists($a_set["user_id"])) { arsort($a_set["pages"]); // pages foreach ($a_set["pages"] as $page_id => $cnt) { if ($page_id > 0) { include_once "./Modules/Wiki/classes/class.ilWikiPage.php"; $title = ilWikiPage::lookupTitle($page_id); $this->tpl->setCurrentBlock("page"); $this->tpl->setVariable("PAGE", $title); $this->tpl->setVariable("CNT", $cnt); $this->tpl->parseCurrentBlock(); } } $this->tpl->setVariable("TXT_LINKED_USER", $user["lastname"] . ", " . $user["firstname"] . " [" . $login . "]"); // profile link //$ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user", $a_set["user"]); //$ilCtrl->setParameterByClass("ilpublicuserprofilegui", "back_url", // rawurlencode($ilCtrl->getLinkTarget($this->getParentObject(), $this->getParentCmd()))); //$this->tpl->setVariable("USER_LINK", // $ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML")); $img = ilObjUser::_getPersonalPicturePath($a_set["user_id"], "xsmall"); $this->tpl->setVariable("IMG_USER", $img); $this->tpl->setVariable("TXT_NAME", $a_set["lastname"] . ", " . $a_set["firstname"]); $this->tpl->setVariable("USER_ID", $a_set["user_id"]); // comment for learner $this->tpl->setVariable("TXT_LCOMMENT", $lng->txt("wiki_comment_for_learner")); $this->tpl->setVariable("NAME_LCOMMENT", "lcomment[" . $a_set["user_id"] . "]"); $lpcomment = ilLPMarks::_lookupComment($a_set["user_id"], $this->parent_obj->object->getId()); $this->tpl->setVariable("VAL_LCOMMENT", ilUtil::prepareFormOutput($lpcomment)); // status //$status = ilExerciseMembers::_lookupStatus($this->object->getId(), $member_id); $status = ilWikiContributor::_lookupStatus($this->parent_obj->object->getId(), $a_set["user_id"]); $this->tpl->setVariable("SEL_" . $status, ' selected="selected" '); $this->tpl->setVariable("TXT_NOTGRADED", $lng->txt("wiki_notgraded")); $this->tpl->setVariable("TXT_PASSED", $lng->txt("wiki_passed")); $this->tpl->setVariable("TXT_FAILED", $lng->txt("wiki_failed")); $this->tpl->setVariable("VAL_NOTGRADED", ilWikiContributor::STATUS_NOT_GRADED); $this->tpl->setVariable("VAL_PASSED", ilWikiContributor::STATUS_PASSED); $this->tpl->setVariable("VAL_FAILED", ilWikiContributor::STATUS_FAILED); if (($sd = ilWikiContributor::_lookupStatusTime($this->parent_obj->object->getId(), $a_set["user_id"])) > 0) { $this->tpl->setCurrentBlock("status_date"); $this->tpl->setVariable("TXT_LAST_CHANGE", $lng->txt("last_change")); $this->tpl->setVariable("VAL_STATUS_DATE", ilDatePresentation::formatDate(new ilDateTime($sd, IL_CAL_DATETIME))); $this->tpl->parseCurrentBlock(); } switch ($status) { case ilWikiContributor::STATUS_PASSED: $pic = "scorm/passed.png"; break; case ilWikiContributor::STATUS_FAILED: $pic = "scorm/failed.png"; break; default: $pic = "scorm/not_attempted.png"; break; } $this->tpl->setVariable("IMG_STATUS", ilUtil::getImagePath($pic)); $this->tpl->setVariable("ALT_STATUS", $lng->txt("wiki_" . $status)); // mark $this->tpl->setVariable("TXT_MARK", $lng->txt("wiki_mark")); $this->tpl->setVariable("NAME_MARK", "mark[" . $a_set["user_id"] . "]"); $mark = ilLPMarks::_lookupMark($a_set["user_id"], $this->parent_obj->object->getId()); $this->tpl->setVariable("VAL_MARK", ilUtil::prepareFormOutput($mark)); } }