コード例 #1
0
 /**
  * Show subscription info
  */
 protected function show()
 {
     $token = $this->createToken();
     ilUtil::sendInfo($GLOBALS['lng']->txt('cal_subscription_info'));
     include_once './Services/InfoScreen/classes/class.ilInfoScreenGUI.php';
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($GLOBALS['ilCtrl']->getFormAction($this));
     $hash = $this->createToken();
     $url = ILIAS_HTTP_PATH . '/calendar.php?client_id=' . CLIENT_ID . '&token=' . $hash;
     $info->addSection($this->getCalendar()->getTitle());
     $info->addProperty('Abonnieren', $url, $url);
     $GLOBALS['tpl']->setContent($info->getHTML());
 }
コード例 #2
0
 /**
  * show info screen
  *
  * @access public
  */
 public function infoScreen()
 {
     global $ilCtrl;
     $this->tabs_gui->activateTab('infoScreen');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->addSection($this->txt('xxco_instructions'));
     $info->addProperty("", $this->object->getInstructions());
     // meta data
     $xml_obj = $this->object->fetchMetaData(self::META_TIMEOUT_INFO);
     if ($xml_obj) {
         foreach ($xml_obj->group as $group) {
             if (in_array($group['name'], $this->meta_groups)) {
                 $info->addSection(utf8_decode($group->title));
                 foreach ($group->fields->field as $field) {
                     $info->addProperty(utf8_decode($field->title), $field->content);
                 }
             }
         }
     }
     $info->enablePrivateNotes();
     // add view button
     if ($this->object->typedef->getAvailability() == ilExternalContentType::AVAILABILITY_NONE) {
         ilUtil::sendFailure($this->lng->txt('xxco_message_type_not_available'), false);
     } elseif ($this->object->getOnline()) {
         if ($this->object->typedef->getLaunchType() == ilExternalContentType::LAUNCH_TYPE_LINK) {
             $info->addButton($this->lng->txt("view"), $ilCtrl->getLinkTarget($this, "view"));
         } elseif ($this->object->typedef->getLaunchType() == ilExternalContentType::LAUNCH_TYPE_PAGE) {
             $info->addButton($this->lng->txt("view"), $ilCtrl->getLinkTarget($this, "viewPage"));
         }
     }
     $ilCtrl->forwardCommand($info);
 }
コード例 #3
0
 /**
  * show calendar details
  *
  * @access protected
  * @return
  */
 protected function details()
 {
     global $tpl;
     if (!$_GET['category_id']) {
         ilUtil::sendFailure($this->lng->txt('select_one'), true);
         $this->ctrl->returnToParent($this);
     }
     $this->readPermissions();
     $this->checkVisible();
     $category = new ilCalendarCategory((int) $_GET['category_id']);
     if (!in_array($category->getType(), array(ilCalendarCategory::TYPE_CH, ilCalendarCategory::TYPE_BOOK))) {
         include_once "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php";
         $toolbar = new ilToolbarGui();
         $toolbar->addButton($this->lng->txt("cal_add_appointment"), $this->ctrl->getLinkTargetByClass("ilcalendarappointmentgui", "add"));
         if (!in_array($category->getType(), array(ilCalendarCategory::TYPE_CH, ilCalendarCategory::TYPE_BOOK))) {
             $toolbar->addButton($this->lng->txt("cal_import_appointments"), $this->ctrl->getLinkTarget($this, "importAppointments"));
         }
         $toolbar = $toolbar->getHTML();
     }
     // Non editable category
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($this->ctrl->getFormAction($this));
     $info->addSection($this->lng->txt('cal_cal_details'));
     // Calendar Name
     $info->addProperty($this->lng->txt('cal_calendar_name'), $category->getTitle());
     switch ($category->getType()) {
         case ilCalendarCategory::TYPE_USR:
             $info->addProperty($this->lng->txt('cal_cal_type'), $this->lng->txt('cal_type_personal'));
             break;
         case ilCalendarCategory::TYPE_GLOBAL:
             $info->addProperty($this->lng->txt('cal_cal_type'), $this->lng->txt('cal_type_system'));
             break;
         case ilCalendarCategory::TYPE_OBJ:
             $info->addProperty($this->lng->txt('cal_cal_type'), $this->lng->txt('cal_type_' . $category->getObjType()));
             $info->addSection($this->lng->txt('additional_info'));
             $info->addProperty($this->lng->txt('perma_link'), $this->addReferenceLinks($category->getObjId()));
             break;
         case ilCalendarCategory::TYPE_CH:
         case ilCalendarCategory::TYPE_BOOK:
             // nothing to do
             break;
     }
     // Ical link
     $this->ctrl->setParameterByClass('ilcalendarsubscriptiongui', 'cal_id', (int) $_GET['category_id']);
     $info->addProperty($this->lng->txt('cal_ical_infoscreen'), '<img src="' . ilUtil::getImagePath('ical.png', 'Services/Calendar') . '" />', $this->ctrl->getLinkTargetByClass(array('ilcalendarpresentationgui', 'ilcalendarsubscriptiongui')));
     $tpl->setContent($toolbar . $info->getHTML() . $this->showAssignedAppointments());
 }
コード例 #4
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilTabs, $ilUser, $ilToolbar;
     if (!$this->external_rater_360 && !$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     $ilTabs->activateTab("info_short");
     include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
     $output_gui =& new ilSurveyExecutionGUI($this->object);
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     // "active" survey?
     $canStart = $this->object->canStartSurvey(null, $this->external_rater_360);
     $showButtons = $canStart["result"];
     if (!$showButtons) {
         if ($canStart["edit_settings"] && $ilAccess->checkAccess("write", "", $this->ref_id)) {
             $canStart["messages"][] = "<a href=\"" . $this->ctrl->getLinkTarget($this, "properties") . "\">&raquo; " . $this->lng->txt("survey_edit_settings") . "</a>";
         }
         ilUtil::sendInfo(implode("<br />", $canStart["messages"]));
     }
     $big_button = false;
     if ($showButtons) {
         // closing survey?
         $is_appraisee = false;
         if ($this->object->get360Mode() && $this->object->isAppraisee($ilUser->getId())) {
             $info->addSection($this->lng->txt("survey_360_appraisee_info"));
             $appr_data = $this->object->getAppraiseesData();
             $appr_data = $appr_data[$ilUser->getId()];
             $info->addProperty($this->lng->txt("survey_360_raters_status_info"), $appr_data["finished"]);
             if (!$appr_data["closed"]) {
                 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
                 $button = ilLinkButton::getInstance();
                 $button->setCaption("survey_360_appraisee_close_action");
                 $button->setUrl($this->ctrl->getLinkTargetByClass("ilsurveyparticipantsgui", "confirmappraiseeclose"));
                 $close_button_360 = '<div>' . $button->render() . '</div>';
                 $txt = "survey_360_appraisee_close_action_info";
                 if ($this->object->get360SkillService()) {
                     $txt .= "_skill";
                 }
                 $info->addProperty($this->lng->txt("status"), $close_button_360 . $this->lng->txt($txt));
             } else {
                 ilDatePresentation::setUseRelativeDates(false);
                 $dt = new ilDateTime($appr_data["closed"], IL_CAL_UNIX);
                 $info->addProperty($this->lng->txt("status"), sprintf($this->lng->txt("survey_360_appraisee_close_action_status"), ilDatePresentation::formatDate($dt)));
             }
             $is_appraisee = true;
         }
         // handle code
         // validate incoming
         $code_input = false;
         $anonymous_code = $_POST["anonymous_id"];
         if ($anonymous_code) {
             $code_input = true;
             // if(!$this->object->isUnusedCode($anonymous_code, $ilUser->getId()))
             if (!$this->object->checkSurveyCode($anonymous_code)) {
                 $anonymous_code = null;
             } else {
                 // #15860
                 $this->object->bindSurveyCodeToUser($ilUser->getId(), $anonymous_code);
             }
         }
         if ($anonymous_code) {
             $_SESSION["anonymous_id"][$this->object->getId()] = $anonymous_code;
         } else {
             $anonymous_code = $_SESSION["anonymous_id"][$this->object->getId()];
             if ($anonymous_code) {
                 $code_input = true;
             }
         }
         // try to find code for current (registered) user from existing run
         if ($this->object->getAnonymize() && !$anonymous_code) {
             $anonymous_code = $this->object->findCodeForUser($ilUser->getId());
         }
         // get existing runs for current user, might generate code
         $participant_status = $this->object->getUserSurveyExecutionStatus($anonymous_code);
         if ($participant_status) {
             $anonymous_code = $participant_status["code"];
             $participant_status = $participant_status["runs"];
         }
         // (final) check for proper anonymous code
         if (!$this->object->isAccessibleWithoutCode() && !$is_appraisee && $code_input && (!$anonymous_code || !$this->object->isAnonymousKey($anonymous_code))) {
             $anonymous_code = null;
             ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
         }
         // :TODO: really save in session?
         $_SESSION["anonymous_id"][$this->object->getId()] = $anonymous_code;
         // code is mandatory and not given yet
         if (!$is_appraisee && !$anonymous_code && !$this->object->isAccessibleWithoutCode()) {
             $info->setFormAction($this->ctrl->getFormAction($this, "infoScreen"));
             $info->addSection($this->lng->txt("anonymization"));
             $info->addProperty("", $this->lng->txt("anonymize_anonymous_introduction"));
             $info->addPropertyTextinput($this->lng->txt("enter_anonymous_id"), "anonymous_id", "", 8, "infoScreen", $this->lng->txt("submit"), true);
         } else {
             // trunk/default
             if (!$this->object->get360Mode()) {
                 if ($anonymous_code) {
                     $info->addHiddenElement("anonymous_id", $anonymous_code);
                 }
                 $survey_started = $this->object->isSurveyStarted($ilUser->getId(), $anonymous_code);
                 if ($survey_started === 1) {
                     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
                         if ($this->object->hasViewOwnResults()) {
                             include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
                             $button = ilLinkButton::getInstance();
                             $button->setCaption("svy_view_own_results");
                             $button->setUrl($this->ctrl->getLinkTarget($this, "viewUserResults"));
                             $ilToolbar->addButtonInstance($button);
                         }
                         if ($this->object->hasMailOwnResults()) {
                             if ($this->object->hasViewOwnResults()) {
                                 $ilToolbar->addSeparator();
                             }
                             require_once "Services/Form/classes/class.ilTextInputGUI.php";
                             $mail = new ilTextInputGUI($this->lng->txt("email"), "mail");
                             $mail->setSize(25);
                             $mail->setValue($ilUser->getEmail());
                             $ilToolbar->addInputItem($mail, true);
                             $ilToolbar->setFormAction($this->ctrl->getFormAction($this, "mailUserResults"));
                             include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
                             $button = ilSubmitButton::getInstance();
                             $button->setCaption("svy_mail_own_results");
                             $button->setCommand("mailUserResults");
                             $ilToolbar->addButtonInstance($button);
                         }
                     }
                     ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                 } elseif ($survey_started === 0) {
                     $big_button = array("resume", $this->lng->txt("resume_survey"));
                 } elseif ($survey_started === FALSE) {
                     $big_button = array("start", $this->lng->txt("start_survey"));
                 }
             } else {
                 $appr_ids = array();
                 // use given code (if proper external one)
                 if ($anonymous_code) {
                     $anonymous_id = $this->object->getAnonymousIdByCode($anonymous_code);
                     if ($anonymous_id) {
                         $appr_ids = $this->object->getAppraiseesToRate(0, $anonymous_id);
                     }
                 }
                 // registered user
                 // if an auto-code was generated, we still have to check for the original user id
                 if (!$appr_ids && $ilUser->getId() != ANONYMOUS_USER_ID) {
                     $appr_ids = $this->object->getAppraiseesToRate($ilUser->getId());
                 }
                 if (sizeof($appr_ids)) {
                     // map existing runs to appraisees
                     $active_appraisees = array();
                     if ($participant_status) {
                         foreach ($participant_status as $item) {
                             $active_appraisees[$item["appr_id"]] = $item["finished"];
                         }
                     }
                     $list = array();
                     foreach ($appr_ids as $appr_id) {
                         if ($this->object->isAppraiseeClosed($appr_id)) {
                             // closed
                             $list[$appr_id] = $this->lng->txt("survey_360_appraisee_is_closed");
                         } else {
                             if (array_key_exists($appr_id, $active_appraisees)) {
                                 // already done
                                 if ($active_appraisees[$appr_id]) {
                                     $list[$appr_id] = $this->lng->txt("already_completed_survey");
                                 } else {
                                     $list[$appr_id] = array("resume", $this->lng->txt("resume_survey"));
                                 }
                             } else {
                                 // start
                                 $list[$appr_id] = array("start", $this->lng->txt("start_survey"));
                             }
                         }
                     }
                     $info->addSection($this->lng->txt("survey_360_rate_other_appraisees"));
                     include_once "Services/User/classes/class.ilUserUtil.php";
                     foreach ($list as $appr_id => $item) {
                         $appr_name = ilUserUtil::getNamePresentation($appr_id, false, false, "", true);
                         if (!is_array($item)) {
                             $info->addProperty($appr_name, $item);
                         } else {
                             $this->ctrl->setParameter($output_gui, "appr_id", $appr_id);
                             $href = $this->ctrl->getLinkTarget($output_gui, $item[0]);
                             $this->ctrl->setParameter($output_gui, "appr_id", "");
                             include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
                             $button = ilLinkButton::getInstance();
                             $button->setCaption($item[1], false);
                             $button->setUrl($href);
                             $big_button_360 = '<div>' . $button->render() . '</div>';
                             $info->addProperty($appr_name, $big_button_360);
                         }
                     }
                 } else {
                     if (!$is_appraisee) {
                         ilUtil::sendFailure($this->lng->txt("survey_360_no_appraisees"));
                     }
                 }
             }
         }
         if ($this->object->get360Mode() && $this->object->get360SelfAppraisee() && !$this->object->isAppraisee($ilUser->getId()) && $ilUser->getId() != ANONYMOUS_USER_ID) {
             $link = $this->ctrl->getLinkTargetByClass("ilsurveyparticipantsgui", "addSelfAppraisee");
             $link = '<a href="' . $link . '">' . $this->lng->txt("survey_360_add_self_appraisee") . '</a>';
             $info->addProperty("&nbsp;", $link);
         }
     }
     if ($big_button) {
         $ilToolbar->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
         include_once "Services/UIComponent/Button/classes/class.ilSubmitButton.php";
         $button = ilSubmitButton::getInstance();
         $button->setCaption($big_button[1], false);
         $button->setCommand($big_button[0]);
         $button->setPrimary(true);
         $ilToolbar->addButtonInstance($button);
         $ilToolbar->setCloseFormTag(false);
         $info->setOpenFormTag(false);
     }
     /* #12016
     		else
     		{
     			$info->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
     		}
     		*/
     if (strlen($this->object->getIntroduction())) {
         $introduction = $this->object->getIntroduction();
         $info->addSection($this->lng->txt("introduction"));
         $info->addProperty("", $this->object->prepareTextareaOutput($introduction) . "<br />" . $info->getHiddenToggleButton());
     } else {
         $info->addSection("");
         $info->addProperty("", $info->getHiddenToggleButton());
     }
     $info->hideFurtherSections(false);
     if (!$this->object->get360Mode()) {
         $info->addSection($this->lng->txt("svy_general_properties"));
         $info->addProperty($this->lng->txt("survey_results_anonymization"), !$this->object->hasAnonymizedResults() ? $this->lng->txt("survey_results_personalized_info") : $this->lng->txt("survey_results_anonymized_info"));
         include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
         if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId())) {
             $info->addProperty($this->lng->txt("evaluation_access"), $this->lng->txt("evaluation_access_info"));
         }
     }
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     $this->ctrl->forwardCommand($info);
 }
コード例 #5
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilUser, $ilTabs, $lng, $tpl;
     $ilTabs->activateTab("info");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $tpl->setDescription($this->object->getDescription());
     $info->enablePrivateNotes();
     $info->enableNews();
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         $info->enableNewsEditing();
         $info->setBlockProperty("news", "settings", true);
     }
     // standard meta data
     //$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
     // instructions
     $info->addSection($this->lng->txt("rep_robj_xeph_overview"));
     include_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus/classes/class.ilEphAssignment.php";
     $ass = ilEphAssignment::getAssignmentDataOfEphorus($this->object->getId());
     $cnt = 0;
     $mcnt = 0;
     foreach ($ass as $a) {
         $cnt++;
         if ($a["mandatory"]) {
             $mcnt++;
         }
     }
     $info->addProperty($lng->txt("rep_robj_xeph_assignments"), $cnt);
     $info->addProperty($lng->txt("rep_robj_xeph_mandatory"), $mcnt);
     if ($this->object->getPassMode() != "nr") {
         $info->addProperty($lng->txt("rep_robj_xeph_pass_mode"), $lng->txt("rep_robj_xeph_msg_all_mandatory_ass"));
     } else {
         $info->addProperty($lng->txt("rep_robj_xeph_pass_mode"), sprintf($lng->txt("rep_robj_xeph_msg_min_number_ass"), $this->object->getPassNr()));
     }
     // feedback from tutor
     include_once "Services/Tracking/classes/class.ilLPMarks.php";
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
         $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
         //$status = ilEphorusMembers::_lookupStatus($this->object->getId(), $ilUser->getId());
         $st = $this->object->determineStatusOfUser($ilUser->getId());
         $status = $st["overall_status"];
         if ($lpcomment != "" || $mark != "" || $status != "notgraded") {
             $info->addSection($this->lng->txt("rep_robj_xeph_feedback_from_tutor"));
             if ($lpcomment != "") {
                 $info->addProperty($this->lng->txt("rep_robj_xeph_comment"), $lpcomment);
             }
             if ($mark != "") {
                 $info->addProperty($this->lng->txt("rep_robj_xeph_mark"), $mark);
             }
             //if ($status == "")
             //{
             //  $info->addProperty($this->lng->txt("status"),
             //		$this->lng->txt("message_no_delivered_files"));
             //}
             //else
             if ($status != "notgraded") {
                 $img = '<img border="0" src="' . ilUtil::getImagePath("scorm/" . $status . ".png") . '" ' . ' alt="' . $lng->txt("rep_robj_xeph_" . $status) . '" title="' . $lng->txt("rep_robj_xeph_" . $status) . '" style="vertical-align:middle;"/>';
                 $add = "";
                 if ($st["failed_a_mandatory"]) {
                     $add = " (" . $lng->txt("rep_robj_xeph_msg_failed_mandatory") . ")";
                 } else {
                     if ($status == "failed") {
                         $add = " (" . $lng->txt("rep_robj_xeph_msg_missed_minimum_number") . ")";
                     }
                 }
                 $info->addProperty($this->lng->txt("status"), $img . " " . $this->lng->txt("rep_robj_xeph_" . $status) . $add);
             }
         }
     }
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #6
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilUser, $ilTabs;
     $ilTabs->activateTab("id_info");
     if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     /*
     		$info->enableNews();
     		if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
     		{
     			//$info->enableNewsEditing();
     			$info->setBlockProperty("news", "settings", true);
     		}*/
     // general information
     $this->lng->loadLanguageModule("meta");
     $this->lng->loadLanguageModule("mcst");
     $med_items = $this->object->getItemsArray();
     $info->addSection($this->lng->txt("meta_general"));
     $info->addProperty($this->lng->txt("mcst_nr_items"), (int) count($med_items));
     if (count($med_items) > 0) {
         $cur = current($med_items);
         $last = ilDatePresentation::formatDate(new ilDateTime($cur["creation_date"], IL_CAL_DATETIME));
     } else {
         $last = "-";
     }
     $info->addProperty($this->lng->txt("mcst_last_submission"), $last);
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #7
0
 /**
  * show info screen
  *
  * @access protected
  * @return
  */
 protected function showInfoScreen()
 {
     global $tpl, $ilUser;
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->setFormAction($this->ctrl->getFormAction($this));
     if ($this->app->isMilestone()) {
         $info->addSection($this->lng->txt('cal_ms_details'));
     } else {
         $info->addSection($this->lng->txt('cal_details'));
     }
     // Appointment
     $info->addProperty($this->lng->txt('appointment'), ilDatePresentation::formatPeriod($this->app->getStart(), $this->app->getEnd()));
     $info->addProperty($this->lng->txt('title'), $this->app->getPresentationTitle());
     // Description
     if (strlen($desc = $this->app->getDescription())) {
         $info->addProperty($this->lng->txt('description'), $desc);
     }
     // Location
     if (strlen($loc = $this->app->getLocation())) {
         $info->addProperty($this->lng->txt('cal_where'), $loc);
     }
     // completion
     if ($this->app->isMilestone() && $this->app->getCompletion() > 0) {
         $info->addProperty($this->lng->txt('cal_task_completion'), $this->app->getCompletion() . " %");
     }
     include_once './Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
     $cat_id = ilCalendarCategoryAssignments::_lookupCategory($this->app->getEntryId());
     $cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo($cat_id);
     $type = ilObject::_lookupType($cat_info['obj_id']);
     if ($this->app->isMilestone() && $cat_info['type'] == ilCalendarCategory::TYPE_OBJ && ($type == "grp" || $type == "crs")) {
         // users responsible
         $users = $this->app->readResponsibleUsers();
         $delim = "";
         foreach ($users as $r) {
             $value .= $delim . $r["lastname"] . ", " . $r["firstname"] . " [" . $r["login"] . "]";
             $delim = "<br />";
         }
         if (count($users) > 0) {
             $info->addProperty($this->lng->txt('cal_responsible'), $value);
         }
     }
     $category = new ilCalendarCategory($cat_id);
     if ($category->getType() == ilCalendarCategory::TYPE_OBJ) {
         $info->addSection($this->lng->txt('additional_info'));
         $cat_info = ilCalendarCategories::_getInstance()->getCategoryInfo($cat_id);
         $refs = ilObject::_getAllReferences($cat_info['obj_id']);
         include_once './Services/Link/classes/class.ilLink.php';
         $href = ilLink::_getStaticLink(current($refs), ilObject::_lookupType($cat_info['obj_id']), true);
         $info->addProperty($this->lng->txt('perma_link'), '<a class="small" href="' . $href . '" target="_top">' . $href . '</a>');
     }
     $tpl->setContent($info->getHTML());
 }
コード例 #8
0
 /**
  * show information screen
  */
 function infoScreenForward()
 {
     global $ilTabs, $ilErr, $ilToolbar;
     $ilTabs->activateTab("id_info");
     if (!$this->checkPermissionBool("visible")) {
         $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($this->checkPermissionBool("read", "sendfile")) {
         // #9876
         $this->lng->loadLanguageModule("file");
         // #14378
         include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
         $button = ilLinkButton::getInstance();
         $button->setCaption("file_download");
         $button->setPrimary(true);
         // get permanent download link for repository
         if ($this->id_type == self::REPOSITORY_NODE_ID) {
             $button->setUrl(ilObjFileAccess::_getPermanentDownloadLink($this->node_id));
         } else {
             $button->setUrl($this->ctrl->getLinkTarget($this, "sendfile"));
         }
         $ilToolbar->addButtonInstance($button);
     }
     $info->enablePrivateNotes();
     if ($this->checkPermissionBool("read")) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($this->checkPermissionBool("write")) {
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
             $info->setBlockProperty("news", "public_notifications_option", true);
         }
     }
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     $info->addSection($this->lng->txt("file_info"));
     $info->addProperty($this->lng->txt("filename"), $this->object->getFileName());
     // BEGIN WebDAV Guess file type.
     $info->addProperty($this->lng->txt("type"), $this->object->guessFileType());
     // END WebDAV Guess file type.
     $info->addProperty($this->lng->txt("size"), ilFormat::formatSize(ilObjFile::_lookupFileSize($this->object->getId()), 'long'));
     $info->addProperty($this->lng->txt("version"), $this->object->getVersion());
     // using getVersions function instead of ilHistory direct
     $uploader = $this->object->getVersions();
     $uploader = array_shift($uploader);
     $uploader = $uploader["user_id"];
     $this->lng->loadLanguageModule("file");
     include_once "Services/User/classes/class.ilUserUtil.php";
     $info->addProperty($this->lng->txt("file_uploaded_by"), ilUserUtil::getNamePresentation($uploader));
     // download link added in repository
     if ($this->id_type == self::REPOSITORY_NODE_ID && $this->checkPermissionBool("read", "sendfile")) {
         $tpl = new ilTemplate("tpl.download_link.html", true, true, "Modules/File");
         $tpl->setVariable("LINK", ilObjFileAccess::_getPermanentDownloadLink($this->node_id));
         $info->addProperty($this->lng->txt("download_link"), $tpl->get());
     }
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
     }
     // display previews
     include_once "./Services/Preview/classes/class.ilPreview.php";
     if (!$this->ctrl->isAsynch() && ilPreview::hasPreview($this->object->getId(), $this->object->getType()) && $this->checkPermissionBool("read")) {
         include_once "./Services/Preview/classes/class.ilPreviewGUI.php";
         // get context for access checks later on
         $context;
         switch ($this->id_type) {
             case self::WORKSPACE_NODE_ID:
             case self::WORKSPACE_OBJECT_ID:
                 $context = ilPreviewGUI::CONTEXT_WORKSPACE;
                 break;
             default:
                 $context = ilPreviewGUI::CONTEXT_REPOSITORY;
                 break;
         }
         $preview = new ilPreviewGUI($this->node_id, $context, $this->object->getId(), $this->access_handler);
         $info->addProperty($this->lng->txt("preview"), $preview->getInlineHTML());
     }
     // forward the command
     // $this->ctrl->setCmd("showSummary");
     // $this->ctrl->setCmdClass("ilinfoscreengui");
     $this->ctrl->forwardCommand($info);
 }
コード例 #9
0
 /**
  * Get assignment body for overview
  */
 function getOverviewBody($a_data)
 {
     global $lng, $ilCtrl, $ilUser;
     $tpl = new ilTemplate("tpl.assignment_body.html", true, true, "Modules/Exercise");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     if (IS_PAYMENT_ENABLED) {
         include_once './Services/Payment/classes/class.ilPaymentObject.php';
     }
     $info = new ilInfoScreenGUI(null);
     $info->setTableClass("");
     $not_started_yet = false;
     if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0) {
         $not_started_yet = true;
     }
     if (!$not_started_yet) {
         // instructions
         $info->addSection($lng->txt("exc_instruction"));
         $info->addProperty("", nl2br(ilUtil::makeClickable($a_data["instruction"], true)));
     }
     // schedule
     $info->addSection($lng->txt("exc_schedule"));
     if ($a_data["start_time"] > 0) {
         $info->addProperty($lng->txt("exc_start_time"), ilDatePresentation::formatDate(new ilDateTime($a_data["start_time"], IL_CAL_UNIX)));
     }
     if ($a_data["deadline"] > 0) {
         $info->addProperty($lng->txt("exc_edit_until"), ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
     }
     $time_str = $this->getTimeString($a_data["deadline"]);
     if (!$not_started_yet) {
         $info->addProperty($lng->txt("exc_time_to_send"), "<b>" . $time_str . "</b>");
     }
     // public submissions
     if ($this->exc->getShowSubmissions()) {
         $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
         if ($a_data["deadline"] - time() <= 0) {
             $link = '<a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "listPublicSubmissions") . '">' . $lng->txt("exc_list_submission") . '</a>';
             $info->addProperty($lng->txt("exc_public_submission"), $link);
         } else {
             $info->addProperty($lng->txt("exc_public_submission"), $lng->txt("exc_msg_public_submission"));
         }
         $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $_GET["ass_id"]);
     }
     $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
     if (!$not_started_yet) {
         // download files
         $files = ilExAssignment::getFiles($a_data["exc_id"], $a_data["id"]);
         if (count($files) > 0) {
             $info->addSection($lng->txt("exc_files"));
             foreach ($files as $file) {
                 // if download must be purchased first show a "buy"-button
                 if (IS_PAYMENT_ENABLED && (ilPaymentObject::_isBuyable($_GET['ref_id'], 'download') && !ilPaymentObject::_hasAccess($_GET['ref_id'], '', 'download'))) {
                     $info->addProperty($file["name"], $lng->txt("buy"), $ilCtrl->getLinkTargetByClass("ilShopPurchaseGUI", "showDetails"));
                 } else {
                     $ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file["name"]));
                     $info->addProperty($file["name"], $lng->txt("download"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFile"));
                     $ilCtrl->setParameterByClass("ilobjexercisegui", "file", "");
                 }
             }
         }
         // submission
         // if submission must be purchased first
         if (IS_PAYMENT_ENABLED && (ilPaymentObject::_isBuyable($_GET['ref_id'], 'upload') && !ilPaymentObject::_hasAccess($_GET['ref_id'], '', 'upload'))) {
             $info->addSection($lng->txt("exc_your_submission"));
             $ilCtrl->clearParameters($this);
             $ilCtrl->setParameter($this, "ref_id", $_GET['ref_id']);
             $ilCtrl->setParameter($this, 'subtype', 'upload');
             $info->addProperty($lng->txt('exc_hand_in'), $lng->txt("buy"), $ilCtrl->getLinkTargetByClass("ilShopPurchaseGUI", "showDetails"));
         } else {
             $info->addSection($lng->txt("exc_your_submission"));
             $delivered_files = ilExAssignment::getDeliveredFiles($a_data["exc_id"], $a_data["id"], $ilUser->getId());
             $times_up = false;
             if ($a_data["deadline"] > 0 && $a_data["deadline"] - time() < 0) {
                 $times_up = true;
             }
             $team_members = null;
             switch ($a_data["type"]) {
                 case ilExAssignment::TYPE_UPLOAD_TEAM:
                     $team_members = ilExAssignment::getTeamMembersByAssignmentId($a_data["id"], $ilUser->getId());
                     if (sizeof($team_members) > 1) {
                         $team = array();
                         foreach ($team_members as $member_id) {
                             $team[] = ilObjUser::_lookupFullname($member_id);
                         }
                         $info->addProperty($lng->txt("exc_team_members"), implode(", ", $team));
                     }
                     // fallthrough
                 // fallthrough
                 case ilExAssignment::TYPE_UPLOAD:
                     $titles = array();
                     foreach ($delivered_files as $file) {
                         $titles[] = $file["filetitle"];
                     }
                     $files_str = implode($titles, ", ");
                     if ($files_str == "") {
                         $files_str = $lng->txt("message_no_delivered_files");
                     }
                     $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
                     if (!$times_up) {
                         $files_str .= ' <a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreen") . '">' . (count($titles) == 0 ? $lng->txt("exc_hand_in") : $lng->txt("exc_edit_submission")) . '</a>';
                     } else {
                         if (count($titles) > 0) {
                             $files_str .= ' <a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreen") . '">' . $lng->txt("already_delivered_files") . '</a>';
                         }
                     }
                     $info->addProperty($lng->txt("exc_files_returned"), $files_str);
                     break;
                 case ilExAssignment::TYPE_BLOG:
                     $files_str = "";
                     $valid_blog = false;
                     if (sizeof($delivered_files)) {
                         $delivered_files = array_pop($delivered_files);
                         $blog_id = (int) $delivered_files["filetitle"];
                         include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
                         include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
                         $wsp_tree = new ilWorkspaceTree($ilUser->getId());
                         $node = $wsp_tree->getNodeData($blog_id);
                         if ($node["title"]) {
                             // #10116
                             // $blog_link = ilWorkspaceAccessHandler::getGotoLink($blog_id, $node["obj_id"]);
                             $ilCtrl->setParameterByClass("ilobjbloggui", "wsp_id", $blog_id);
                             $blog_link = $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilpersonalworkspacegui", "ilobjbloggui"), "");
                             $ilCtrl->setParameterByClass("ilobjbloggui", "wsp_id", "");
                             $files_str = '<a href="' . $blog_link . '">' . $node["title"] . '</a>';
                             $valid_blog = true;
                         }
                     }
                     if (!$times_up) {
                         if (!$valid_blog) {
                             $files_str .= '<a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "createBlog") . '">' . $lng->txt("exc_create_blog") . '</a>';
                         }
                         $files_str .= ' <a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "selectBlog") . '">' . $lng->txt("exc_select_blog" . ($valid_blog ? "_change" : "")) . '</a>';
                     }
                     if ($files_str) {
                         $info->addProperty($lng->txt("exc_blog_returned"), $files_str);
                     }
                     if ($delivered_files && substr($delivered_files["filename"], -1) != "/") {
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", $delivered_files["returned_id"]);
                         $dl_link = $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "download");
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", "");
                         $info->addProperty($lng->txt("exc_files_returned"), "<a href=\"" . $dl_link . "\">" . $lng->txt("download") . "</a>");
                     }
                     break;
                 case ilExAssignment::TYPE_PORTFOLIO:
                     $files_str = "";
                     $valid_prtf = false;
                     if (sizeof($delivered_files)) {
                         $delivered_files = array_pop($delivered_files);
                         $portfolio_id = (int) $delivered_files["filetitle"];
                         include_once "Services/Portfolio/classes/class.ilObjPortfolio.php";
                         include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
                         $portfolio = new ilObjPortfolio($portfolio_id, false);
                         if ($portfolio->getTitle()) {
                             // #10116
                             // $prtf_link = ilWorkspaceAccessHandler::getGotoLink($portfolio_id, $portfolio_id)
                             $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", $portfolio_id);
                             $prtf_link = $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilobjportfoliogui"), "pages");
                             $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", "");
                             $files_str = '<a href="' . $prtf_link . '">' . $portfolio->getTitle() . '</a>';
                             $valid_prtf = true;
                         }
                     }
                     if (!$times_up) {
                         if (!$valid_prtf) {
                             $files_str .= '<a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "createPortfolio") . '">' . $lng->txt("exc_create_portfolio") . '</a>';
                         }
                         $files_str .= ' <a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "selectPortfolio") . '">' . $lng->txt("exc_select_portfolio" . ($valid_prtf ? "_change" : "")) . '</a>';
                     }
                     if ($files_str) {
                         $info->addProperty($lng->txt("exc_portfolio_returned"), $files_str);
                     }
                     if ($delivered_files && substr($delivered_files["filename"], -1) != "/") {
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", $delivered_files["returned_id"]);
                         $dl_link = $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "download");
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", "");
                         $info->addProperty($lng->txt("exc_files_returned"), "<a href=\"" . $dl_link . "\">" . $lng->txt("download") . "</a>");
                     }
                     break;
             }
             $last_sub = ilExAssignment::getLastSubmission($a_data["id"], $ilUser->getId());
             if ($last_sub) {
                 $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
             } else {
                 $last_sub = "---";
             }
             if ($last_sub != "---") {
                 $info->addProperty($lng->txt("exc_last_submission"), $last_sub);
             }
             // feedback from tutor
             if ($a_data["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
                 $feedback_id = "t" . ilExAssignment::getTeamIdByAssignment($a_data["id"], $ilUser->getId());
             } else {
                 $feedback_id = $ilUser->getId();
             }
             $storage = new ilFSStorageExercise($a_data["exc_id"], $a_data["id"]);
             $cnt_files = $storage->countFeedbackFiles($feedback_id);
             $lpcomment = ilExAssignment::lookupCommentForUser($a_data["id"], $ilUser->getId());
             $mark = ilExAssignment::lookupMarkOfUser($a_data["id"], $ilUser->getId());
             $status = ilExAssignment::lookupStatusOfUser($a_data["id"], $ilUser->getId());
             if ($lpcomment != "" || $mark != "" || $status != "notgraded" || $cnt_files > 0) {
                 $info->addSection($lng->txt("exc_feedback_from_tutor"));
                 if ($lpcomment != "") {
                     $info->addProperty($lng->txt("exc_comment"), $lpcomment);
                 }
                 if ($mark != "") {
                     $info->addProperty($lng->txt("exc_mark"), $mark);
                 }
                 if ($status == "") {
                     //				  $info->addProperty($lng->txt("status"),
                     //						$lng->txt("message_no_delivered_files"));
                 } else {
                     if ($status != "notgraded") {
                         $img = '<img border="0" src="' . ilUtil::getImagePath("scorm/" . $status . ".png") . '" ' . ' alt="' . $lng->txt("exc_" . $status) . '" title="' . $lng->txt("exc_" . $status) . '" style="vertical-align:middle;"/>';
                         $info->addProperty($lng->txt("status"), $img . " " . $lng->txt("exc_" . $status));
                     }
                 }
                 if ($cnt_files > 0) {
                     $info->addSection($lng->txt("exc_fb_files"));
                     $files = $storage->getFeedbackFiles($feedback_id);
                     foreach ($files as $file) {
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file));
                         $info->addProperty($file, $lng->txt("download"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFeedbackFile"));
                         $ilCtrl->setParameter($this, "file", "");
                     }
                 }
             }
         }
     }
     $tpl->setVariable("CONTENT", $info->getHTML());
     return $tpl->get();
 }
コード例 #10
0
 /**
  * show information screen
  */
 function infoScreenForward()
 {
     global $ilTabs, $ilErr;
     $ilTabs->activateTab("id_info");
     if (!$this->checkPermissionBool("visible")) {
         $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($this->checkPermissionBool("read", "sendfile")) {
         // 9876
         $this->lng->loadLanguageModule("file");
         $info->addButton($this->lng->txt("file_download"), $this->ctrl->getLinkTarget($this, "sendfile"));
     }
     $info->enablePrivateNotes();
     if ($this->checkPermissionBool("read")) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($this->checkPermissionBool("write")) {
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
             $info->setBlockProperty("news", "public_notifications_option", true);
         }
     }
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     $info->addSection($this->lng->txt("file_info"));
     $info->addProperty($this->lng->txt("filename"), $this->object->getFileName());
     // BEGIN WebDAV Guess file type.
     $info->addProperty($this->lng->txt("type"), $this->object->guessFileType());
     // END WebDAV Guess file type.
     $info->addProperty($this->lng->txt("size"), ilFormat::formatSize(ilObjFile::_lookupFileSize($this->object->getId()), 'long'));
     $info->addProperty($this->lng->txt("version"), $this->object->getVersion());
     include_once "./Services/History/classes/class.ilHistory.php";
     $uploader = ilHistory::_getEntriesForObject($this->object->getId(), $this->object->getType());
     $uploader = array_shift($uploader);
     $uploader = $uploader["user_id"];
     $this->lng->loadLanguageModule("file");
     include_once "Services/User/classes/class.ilUserUtil.php";
     $info->addProperty($this->lng->txt("file_uploaded_by"), ilUserUtil::getNamePresentation($uploader));
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
     }
     // forward the command
     // $this->ctrl->setCmd("showSummary");
     // $this->ctrl->setCmdClass("ilinfoscreengui");
     $this->ctrl->forwardCommand($info);
 }
コード例 #11
0
 /**
  * show information screen
  */
 function infoScreen($session_lock = "")
 {
     global $ilAccess;
     global $ilUser;
     // Disabled
     if ($_GET['crs_show_result']) {
         $this->object->hideCorrectAnsweredQuestions();
     } else {
         if ($this->object->getTestSequence()->hasHiddenQuestions()) {
             $this->object->getTestSequence()->clearHiddenQuestions();
             $this->object->getTestSequence()->saveToDb();
         }
     }
     if ($_GET['createRandomSolutions']) {
         $this->object->createRandomSolutions($_GET['createRandomSolutions']);
     }
     if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $seq = $this->object->getTestSession()->getLastSequence();
     include_once "./Modules/Test/classes/class.ilTestOutputGUI.php";
     $output_gui =& new ilTestOutputGUI($this->object);
     $this->ctrl->setParameter($output_gui, "sequence", $seq);
     $info->setFormAction($this->ctrl->getFormAction($output_gui));
     if (strlen($session_lock)) {
         $info->addHiddenElement("lock", $session_lock);
     } else {
         $info->addHiddenElement("lock", md5($_COOKIE['PHPSESSID'] . time()));
     }
     $online_access = false;
     if ($this->object->getFixedParticipants()) {
         include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
         $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->object->getId(), $ilUser->getId());
         if ($online_access_result === true) {
             $online_access = true;
         } else {
             ilUtil::sendInfo($online_access_result);
         }
     }
     if ($this->object->isOnline() && $this->object->isComplete()) {
         if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             $executable = $this->object->isExecutable($ilUser->getId(), $allowPassIncrease = TRUE);
             if ($executable["executable"]) {
                 if ($this->object->areObligationsEnabled() && $this->object->hasObligations($this->object->getTestId())) {
                     ilUtil::sendInfo($GLOBALS['lng']->txt('tst_test_contains_obligatory_questions'));
                 }
                 if ($this->object->getTestSession()->getActiveId() > 0) {
                     // resume test
                     $resume_text = $this->lng->txt("tst_resume_test");
                     if ($seq < 1 || $seq == $this->object->getTestSequence()->getFirstSequence()) {
                         $resume_text = $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId());
                     }
                     //$info->addFormButton("resume", $resume_text);
                     $big_button[] = array('resume', $resume_text);
                 } else {
                     // start new test
                     //$info->addFormButton("start", $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId()));
                     $big_button[] = array("start", $this->object->getStartTestLabel($this->object->getTestSession()->getActiveId()));
                 }
             } else {
                 ilUtil::sendInfo($executable["errormessage"]);
             }
             if ($this->object->getTestSession()->getActiveId() > 0) {
                 // test results button
                 if ($this->object->canShowTestResults($ilUser->getId())) {
                     //$info->addFormButton("outUserResultsOverview", $this->lng->txt("tst_show_results"));
                     $big_button[] = array("outUserResultsOverview", $this->lng->txt("tst_show_results"));
                     if ($this->object->getHighscoreEnabled()) {
                         // Can also compare results then
                         $big_button[] = array("outResultsToplist", $this->lng->txt("tst_show_toplist"));
                     }
                 }
             }
         }
         if ($this->object->getTestSession()->getActiveId() > 0) {
             if ($this->object->canShowSolutionPrintview($ilUser->getId())) {
                 //$info->addFormButton("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"));
                 $big_button[] = array("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"));
             }
         }
     }
     if (!$this->object->isOnline()) {
         $message = $this->lng->txt("test_is_offline");
         if ($ilAccess->checkAccess("write", "", $this->ref_id)) {
             $message .= "<br /><a href=\"" . $this->ctrl->getLinkTarget($this, "properties") . "\">" . $this->lng->txt("test_edit_settings") . "</a>";
         }
         ilUtil::sendInfo($message);
     }
     if ($this->object->getShowInfo()) {
         $info->enablePrivateNotes();
     }
     /*
     		if (strlen($this->object->getIntroduction()))
     		{
     			$info->addSection($this->lng->txt("tst_introduction"));
     			$info->addProperty("", $this->object->prepareTextareaOutput($this->object->getIntroduction()));
     		}
     		 * */
     if ($big_button) {
         $out = '<div class="il_ButtonGroup il_BigButton">';
         foreach ($big_button as $button) {
             $out .= '<input type="submit" class="submit il_BigButton" name="cmd[' . $button[0] . ']" value="' . $button[1] . '" />';
         }
         $out .= '</div>';
         $big_button = $out;
     }
     if (strlen($this->object->getIntroduction())) {
         $introduction = $this->object->getIntroduction();
         $info->addSection($this->lng->txt("tst_introduction"));
         $info->addProperty("", $this->object->prepareTextareaOutput($this->object->getIntroduction()) . $big_button . "<br />" . $info->getHiddenToggleButton());
     } else {
         $info->addSection("");
         $info->addProperty("", $big_button . $info->getHiddenToggleButton());
     }
     $info->addSection($this->lng->txt("tst_general_properties"));
     if ($this->object->getShowInfo()) {
         $info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
         $info->addProperty($this->lng->txt("title"), $this->object->getTitle());
     }
     if ($this->object->isOnline() && $this->object->isComplete()) {
         if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             if ($this->object->getShowInfo() || !$this->object->getForceJS()) {
                 // use javascript
                 $checked_javascript = false;
                 if ($this->object->getJavaScriptOutput()) {
                     $checked_javascript = true;
                 }
                 if ($this->object->getForceJS()) {
                     $info->addProperty($this->lng->txt("tst_test_output"), $this->lng->txt("tst_use_javascript"));
                 } else {
                     $info->addPropertyCheckbox($this->lng->txt("tst_test_output"), "chb_javascript", 1, $this->lng->txt("tst_use_javascript"), $checked_javascript);
                 }
             }
             // hide previous results
             if (!$this->object->isRandomTest()) {
                 if ($this->object->getNrOfTries() != 1) {
                     if ($this->object->getUsePreviousAnswers() == 0) {
                         if ($this->object->getShowInfo()) {
                             $info->addProperty($this->lng->txt("tst_use_previous_answers"), $this->lng->txt("tst_dont_use_previous_answers"));
                         }
                     } else {
                         $use_previous_answers = FALSE;
                         if ($ilUser->prefs["tst_use_previous_answers"]) {
                             $checked_previous_answers = TRUE;
                         }
                         $info->addPropertyCheckbox($this->lng->txt("tst_use_previous_answers"), "chb_use_previous_answers", 1, $this->lng->txt("tst_use_previous_answers_user"), $checked_previous_answers);
                     }
                 }
             }
             if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
                 $info->addPropertyTextinput($this->lng->txt("enter_anonymous_code"), "anonymous_id", "", 8, "setAnonymousId", $this->lng->txt("submit"));
             }
         }
     }
     $info->hideFurtherSections(false);
     if ($this->object->getShowInfo()) {
         $info->addSection($this->lng->txt("tst_sequence_properties"));
         $info->addProperty($this->lng->txt("tst_sequence"), $this->lng->txt($this->object->getSequenceSettings() == TEST_FIXED_SEQUENCE ? "tst_sequence_fixed" : "tst_sequence_postpone"));
         $info->addSection($this->lng->txt("tst_heading_scoring"));
         $info->addProperty($this->lng->txt("tst_text_count_system"), $this->lng->txt($this->object->getCountSystem() == COUNT_PARTIAL_SOLUTIONS ? "tst_count_partial_solutions" : "tst_count_correct_solutions"));
         $info->addProperty($this->lng->txt("tst_score_mcmr_questions"), $this->lng->txt($this->object->getMCScoring() == SCORE_ZERO_POINTS_WHEN_UNANSWERED ? "tst_score_mcmr_zero_points_when_unanswered" : "tst_score_mcmr_use_scoring_system"));
         if ($this->object->isRandomTest()) {
             $info->addProperty($this->lng->txt("tst_pass_scoring"), $this->lng->txt($this->object->getPassScoring() == SCORE_BEST_PASS ? "tst_pass_best_pass" : "tst_pass_last_pass"));
         }
         $info->addSection($this->lng->txt("tst_score_reporting"));
         $score_reporting_text = "";
         switch ($this->object->getScoreReporting()) {
             case REPORT_AFTER_TEST:
                 $score_reporting_text = $this->lng->txt("tst_report_after_test");
                 break;
             case REPORT_ALWAYS:
                 $score_reporting_text = $this->lng->txt("tst_report_after_first_question");
                 break;
             case REPORT_AFTER_DATE:
                 $score_reporting_text = $this->lng->txt("tst_report_after_date");
                 break;
             case 4:
                 $score_reporting_text = $this->lng->txt("tst_report_never");
                 break;
         }
         $info->addProperty($this->lng->txt("tst_score_reporting"), $score_reporting_text);
         $reporting_date = $this->object->getReportingDate();
         if ($reporting_date) {
             #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
             #$txt_reporting_date = date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]));
             #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
             $info->addProperty($this->lng->txt('tst_score_reporting_date'), ilDatePresentation::formatDate(new ilDateTime($reporting_date, IL_CAL_TIMESTAMP)));
         }
         $info->addSection($this->lng->txt("tst_session_settings"));
         $info->addProperty($this->lng->txt("tst_nr_of_tries"), $this->object->getNrOfTries() == 0 ? $this->lng->txt("unlimited") : $this->object->getNrOfTries());
         if ($this->object->getNrOfTries() != 1) {
             $info->addProperty($this->lng->txt("tst_nr_of_tries_of_user"), $this->object->getTestSession()->getPass() == false ? $this->lng->txt("tst_no_tries") : $this->object->getTestSession()->getPass());
         }
         if ($this->object->getEnableProcessingTime()) {
             $info->addProperty($this->lng->txt("tst_processing_time"), $this->object->getProcessingTime());
         }
         if (strlen($this->object->getAllowedUsers()) && $this->object->getAllowedUsersTimeGap()) {
             $info->addProperty($this->lng->txt("tst_allowed_users"), $this->object->getAllowedUsers());
         }
         $starting_time = $this->object->getStartingTime();
         if ($starting_time) {
             $info->addProperty($this->lng->txt("tst_starting_time"), ilDatePresentation::formatDate(new ilDateTime($starting_time, IL_CAL_TIMESTAMP)));
         }
         $ending_time = $this->object->getEndingTime();
         if ($ending_time) {
             $info->addProperty($this->lng->txt("tst_ending_time"), ilDatePresentation::formatDate(new ilDateTime($ending_time, IL_CAL_TIMESTAMP)));
         }
         $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
         // forward the command
         if ($_GET['crs_show_result'] and !$this->object->getTestSequence()->getFirstSequence()) {
             #ilUtil::sendInfo($this->lng->txt('crs_all_questions_answered_successfully'));
         }
     }
     $this->ctrl->forwardCommand($info);
 }
コード例 #12
0
 /**
  * Get assignment body for overview
  */
 function getOverviewBody($a_data)
 {
     global $lng, $ilCtrl, $ilUser;
     $tpl = new ilTemplate("tpl.assignment_body.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI(null);
     $info->setTableClass("");
     $not_started_yet = false;
     if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0) {
         $not_started_yet = true;
     }
     if (!$not_started_yet) {
         // instructions
         $info->addSection($lng->txt("rep_robj_xeph_instruction"));
         $info->addProperty("", nl2br(ilUtil::makeClickable($a_data["instruction"], true)));
     }
     // schedule
     $info->addSection($lng->txt("rep_robj_xeph_schedule"));
     if ($a_data["start_time"] > 0) {
         $info->addProperty($lng->txt("rep_robj_xeph_start_time"), ilDatePresentation::formatDate(new ilDateTime($a_data["start_time"], IL_CAL_UNIX)));
     }
     $info->addProperty($lng->txt("rep_robj_xeph_edit_until"), ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
     $time_str = $this->getTimeString($a_data["deadline"]);
     if (!$not_started_yet) {
         $info->addProperty($lng->txt("rep_robj_xeph_time_to_send"), "<b>" . $time_str . "</b>");
     }
     // public submissions
     if ($this->eph->getShowSubmissions()) {
         $ilCtrl->setParameterByClass("ilobjephorusgui", "ass_id", $a_data["id"]);
         if ($a_data["deadline"] - time() <= 0) {
             $link = '<a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjephorusgui", "listPublicSubmissions") . '">' . $lng->txt("rep_robj_xeph_list_submission") . '</a>';
             $info->addProperty($lng->txt("rep_robj_xeph_public_submission"), $link);
         } else {
             $info->addProperty($lng->txt("rep_robj_xeph_public_submission"), $lng->txt("rep_robj_xeph_msg_public_submission"));
         }
         $ilCtrl->setParameterByClass("ilobjephorusgui", "ass_id", $_GET["ass_id"]);
     }
     $ilCtrl->setParameterByClass("ilobjephorusgui", "ass_id", $a_data["id"]);
     if (!$not_started_yet) {
         // download files
         $files = ilEphAssignment::getFiles($a_data["eph_id"], $a_data["id"]);
         if (count($files) > 0) {
             $info->addSection($lng->txt("rep_robj_xeph_files"));
             foreach ($files as $file) {
                 $ilCtrl->setParameterByClass("ilobjephorusgui", "file", urlencode($file["name"]));
                 $info->addProperty($file["name"], $lng->txt("rep_robj_xeph_download"), $ilCtrl->getLinkTargetByClass("ilobjephorusgui", "downloadFile"));
                 $ilCtrl->setParameterByClass("ilobjephorusgui", "file", "");
             }
         }
         // submission
         $info->addSection($lng->txt("rep_robj_xeph_your_submission"));
         $delivered_files = ilEphAssignment::getDeliveredFiles($a_data["eph_id"], $a_data["id"], $ilUser->getId());
         $times_up = false;
         if ($a_data["deadline"] - time() < 0) {
             $times_up = true;
         }
         $titles = array();
         foreach ($delivered_files as $file) {
             $titles[] = $file["filetitle"];
         }
         $files_str = implode($titles, ", ");
         if ($files_str == "") {
             $files_str = $lng->txt("rep_robj_xeph_message_no_delivered_files");
         }
         $ilCtrl->setParameterByClass("ilobjephorusgui", "ass_id", $a_data["id"]);
         if (!$times_up) {
             $files_str .= ' <a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjephorusgui", "submissionScreen") . '">' . (count($titles) == 0 ? $lng->txt("rep_robj_xeph_hand_in") : $lng->txt("rep_robj_xeph_edit_submission")) . '</a>';
         } else {
             if (count($titles) > 0) {
                 $files_str .= ' <a class="submit" href="' . $ilCtrl->getLinkTargetByClass("ilobjephorusgui", "submissionScreen") . '">' . $lng->txt("rep_robj_xeph_already_delivered_files") . '</a>';
             }
         }
         $info->addProperty($lng->txt("rep_robj_xeph_files_returned"), $files_str);
         $last_sub = ilEphAssignment::getLastSubmission($a_data["id"], $ilUser->getId());
         if ($last_sub) {
             $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
         } else {
             $last_sub = "---";
         }
         if ($last_sub != "---") {
             $info->addProperty($lng->txt("rep_robj_xeph_last_submission"), $last_sub);
         }
         // feedback from tutor
         $storage = new ilFSStorageEphorus($a_data["eph_id"], $a_data["id"]);
         $cnt_files = $storage->countFeedbackFiles($ilUser->getId());
         $lpcomment = ilEphAssignment::lookupCommentForUser($a_data["id"], $ilUser->getId());
         $mark = ilEphAssignment::lookupMarkOfUser($a_data["id"], $ilUser->getId());
         $status = ilEphAssignment::lookupStatusOfUser($a_data["id"], $ilUser->getId());
         if ($lpcomment != "" || $mark != "" || $status != "notgraded" || $cnt_files > 0) {
             $info->addSection($lng->txt("rep_robj_xeph_feedback_from_tutor"));
             if ($lpcomment != "") {
                 $info->addProperty($lng->txt("rep_robj_xeph_comment"), $lpcomment);
             }
             if ($mark != "") {
                 $info->addProperty($lng->txt("rep_robj_xeph_mark"), $mark);
             }
             if ($status == "") {
                 $info->addProperty($lng->txt("rep_robj_xeph_status"), $lng->txt("rep_robj_xeph_message_no_delivered_files"));
             } else {
                 if ($status != "notgraded") {
                     $img = '<img border="0" src="' . ilUtil::getImagePath("scorm/" . $status . ".png") . '" ' . ' alt="' . $lng->txt("rep_robj_xeph_" . $status) . '" title="' . $lng->txt("rep_robj_xeph_" . $status) . '" style="vertical-align:middle;"/>';
                     $info->addProperty($lng->txt("rep_robj_xeph_status"), $img . " " . $lng->txt("rep_robj_xeph_" . $status));
                 }
             }
             if ($cnt_files > 0) {
                 $info->addSection($lng->txt("fb_files"));
                 $files = $storage->getFeedbackFiles($ilUser->getId());
                 foreach ($files as $file) {
                     $ilCtrl->setParameterByClass("ilobjephorusgui", "file", urlencode($file));
                     $info->addProperty($file, $lng->txt("rep_robj_xeph_download"), $ilCtrl->getLinkTargetByClass("ilobjephorusgui", "downloadFeedbackFile"));
                     $ilCtrl->setParameter($this, "file", "");
                 }
             }
         }
     }
     $tpl->setVariable("CONTENT", $info->getHTML());
     return $tpl->get();
 }
コード例 #13
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess;
     global $ilUser;
     if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
     $output_gui =& new ilSurveyExecutionGUI($this->object);
     $info->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
     $info->enablePrivateNotes();
     $anonymize_key = NULL;
     if ($this->object->getAnonymize() == 1) {
         if ($_SESSION["anonymous_id"][$this->object->getId()]) {
             $anonymize_key = $_SESSION["anonymous_id"][$this->object->getId()];
         } else {
             if ($_POST["anonymous_id"]) {
                 $anonymize_key = $_POST["anonymous_id"];
             }
         }
     }
     $canStart = $this->object->canStartSurvey($anonymize_key);
     $showButtons = $canStart["result"];
     if (!$showButtons) {
         if ($canStart["edit_settings"] && $ilAccess->checkAccess("write", "", $this->ref_id)) {
             $canStart["messages"][] = "<a href=\"" . $this->ctrl->getLinkTarget($this, "properties") . "\">&raquo; " . $this->lng->txt("survey_edit_settings") . "</a>";
         }
         ilUtil::sendInfo(implode("<br />", $canStart["messages"]));
     }
     $big_button = false;
     if ($showButtons) {
         // output of start/resume buttons for personalized surveys
         if (!$this->object->getAnonymize()) {
             $survey_started = $this->object->isSurveyStarted($ilUser->getId(), "");
             // Anonymous User tries to start a personalized survey
             if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
                 ilUtil::sendInfo($this->lng->txt("anonymous_with_personalized_survey"));
             } else {
                 if ($survey_started === 1) {
                     ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                 } elseif ($survey_started === 0) {
                     $big_button = array("resume", $this->lng->txt("resume_survey"));
                 } elseif ($survey_started === FALSE) {
                     $big_button = array("start", $this->lng->txt("start_survey"));
                 }
             }
         } else {
             if ($this->object->getAnonymize() && !$this->object->isAccessibleWithoutCode()) {
                 if (($_SESSION["AccountId"] == ANONYMOUS_USER_ID || $this->object->isAccessibleWithCodeForAll()) && strlen($_POST["anonymous_id"]) == 0 && strlen($_SESSION["anonymous_id"][$this->object->getId()]) == 0) {
                     $info->setFormAction($this->ctrl->getFormAction($this, "infoScreen"));
                     $info->addSection($this->lng->txt("anonymization"));
                     $info->addProperty("", $this->lng->txt("anonymize_anonymous_introduction"));
                     $info->addPropertyTextinput($this->lng->txt("enter_anonymous_id"), "anonymous_id", "", 8, "infoScreen", $this->lng->txt("submit"));
                 } else {
                     if (strlen($_POST["anonymous_id"]) > 0) {
                         if (!$this->object->checkSurveyCode($_POST["anonymous_id"])) {
                             ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
                         } else {
                             $anonymize_key = $_POST["anonymous_id"];
                         }
                     } else {
                         if (strlen($_SESSION["anonymous_id"][$this->object->getId()]) > 0) {
                             if (!$this->object->checkSurveyCode($_SESSION["anonymous_id"][$this->object->getId()])) {
                                 ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
                             } else {
                                 $anonymize_key = $_SESSION["anonymous_id"][$this->object->getId()];
                             }
                         } else {
                             // registered users do not need to know that there is an anonymous key. The data is anonymized automatically
                             $anonymize_key = $this->object->getUserAccessCode($ilUser->getId());
                             if (!strlen($anonymize_key)) {
                                 $anonymize_key = $this->object->createNewAccessCode();
                                 $this->object->saveUserAccessCode($ilUser->getId(), $anonymize_key);
                             }
                         }
                     }
                     $info->addHiddenElement("anonymous_id", $anonymize_key);
                     $survey_started = $this->object->isSurveyStarted($ilUser->getId(), $anonymize_key);
                     if ($survey_started === 1) {
                         ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                     } elseif ($survey_started === 0) {
                         $big_button = array("resume", $this->lng->txt("resume_survey"));
                     } elseif ($survey_started === FALSE) {
                         $big_button = array("start", $this->lng->txt("start_survey"));
                     }
                 }
             } else {
                 // free access
                 $survey_started = $this->object->isSurveyStarted($ilUser->getId(), "");
                 if ($survey_started === 1) {
                     ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
                 } elseif ($survey_started === 0) {
                     $big_button = array("resume", $this->lng->txt("resume_survey"));
                 } elseif ($survey_started === FALSE) {
                     $big_button = array("start", $this->lng->txt("start_survey"));
                 }
             }
         }
     }
     if ($big_button) {
         $big_button = '<div class="il_ButtonGroup il_BigButton">' . '<input type="submit" class="submit il_BigButton" name="cmd[' . $big_button[0] . ']" value="' . $big_button[1] . '" /></div>';
     }
     if (strlen($this->object->getIntroduction())) {
         $introduction = $this->object->getIntroduction();
         $info->addSection($this->lng->txt("introduction"));
         $info->addProperty("", $this->object->prepareTextareaOutput($introduction) . $big_button . "<br />" . $info->getHiddenToggleButton());
     } else {
         $info->addSection("");
         $info->addProperty("", $big_button . $info->getHiddenToggleButton());
     }
     $info->hideFurtherSections(false);
     $info->addSection($this->lng->txt("svy_general_properties"));
     if (strlen($this->object->getAuthor())) {
         $info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
     }
     $info->addProperty($this->lng->txt("title"), $this->object->getTitle());
     switch ($this->object->getAnonymize()) {
         case ANONYMIZE_OFF:
             $info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("anonymize_personalized"));
             break;
         case ANONYMIZE_ON:
             if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
                 $info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_with_code"));
             } else {
                 $info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_registered_user"));
             }
             break;
         case ANONYMIZE_FREEACCESS:
             $info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_without_code"));
             break;
     }
     include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
     if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId())) {
         $info->addProperty($this->lng->txt("evaluation_access"), $this->lng->txt("evaluation_access_info"));
     }
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     $this->ctrl->forwardCommand($info);
 }
コード例 #14
0
 protected function addCustomInfoFields(ilInfoScreenGUI $a_info)
 {
     $a_info->addProperty($this->lng->txt('version'), $this->object->getVersion());
     $a_info->addProperty($this->lng->txt('rfil_version_tstamp'), ilDatePresentation::formatDate(new ilDateTime($this->object->getVersionDateTime(), IL_CAL_UNIX)));
 }
コード例 #15
0
 /**
  * Add info items
  * @param ilInfoScreenGUI $info 
  */
 public function addInfoItems($info)
 {
     global $ilCtrl, $ilUser;
     $access = true;
     if (ilViteroLockedUser::isLocked($ilUser->getId(), $this->object->getVGroupId())) {
         ilUtil::sendFailure(ilViteroPlugin::getInstance()->txt('user_locked_info'));
         $access = false;
     }
     $booking_id = ilViteroUtils::getOpenRoomBooking($this->object->getVGroupId());
     if ($booking_id and $access) {
         $this->ctrl->setParameter($this, 'bid', $booking_id);
         $info->setFormAction($ilCtrl->getFormAction($this), '_blank');
         $big_button = '<div class="il_ButtonGroup" style="margin:25px; text-align:center; font-size:25px;">' . '<input type="submit" class="submit" name="cmd[startSession]" value="' . ilViteroPlugin::getInstance()->txt('start_session') . '" style="padding:10px;" /></div>';
         $info->addSection("");
         $info->addProperty("", $big_button);
     }
     $start = new ilDateTime(time(), IL_CAL_UNIX);
     $end = clone $start;
     $end->increment(IL_CAL_YEAR, 1);
     $booking = ilViteroUtils::lookupNextBooking($start, $end, $this->object->getVGroupId());
     if (!$booking['start'] instanceof ilDateTime) {
         return true;
     }
     ilDatePresentation::setUseRelativeDates(false);
     $info->addSection(ilViteroPlugin::getInstance()->txt('info_next_appointment'));
     $info->addProperty(ilViteroPlugin::getInstance()->txt('info_next_appointment_dt'), ilDatePresentation::formatPeriod($booking['start'], $booking['end']));
 }
コード例 #16
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $rbacsystem, $ilUser, $ilSetting;
     $this->tabs_gui->setTabActive('info_short');
     if (!$rbacsystem->checkAccess("visible", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if (strlen($this->object->getInformation())) {
         $info->addSection($this->lng->txt('grp_general_informations'));
         $info->addProperty($this->lng->txt('grp_information'), nl2br(ilUtil::makeClickable($this->object->getInformation(), true)));
     }
     $info->enablePrivateNotes();
     $info->enableLearningProgress(true);
     $info->addSection($this->lng->txt('group_registration'));
     $info->showLDAPRoleGroupMappingInfo();
     if (!$this->object->isRegistrationEnabled()) {
         $info->addProperty($this->lng->txt('group_registration_mode'), $this->lng->txt('grp_reg_deac_info_screen'));
     } else {
         switch ($this->object->getRegistrationType()) {
             case GRP_REGISTRATION_DIRECT:
                 $info->addProperty($this->lng->txt('group_registration_mode'), $this->lng->txt('grp_reg_direct_info_screen'));
                 break;
             case GRP_REGISTRATION_REQUEST:
                 $info->addProperty($this->lng->txt('group_registration_mode'), $this->lng->txt('grp_reg_req_info_screen'));
                 break;
             case GRP_REGISTRATION_PASSWORD:
                 $info->addProperty($this->lng->txt('group_registration_mode'), $this->lng->txt('grp_reg_passwd_info_screen'));
                 break;
         }
         /*			
         $info->addProperty($this->lng->txt('group_registration_time'),
         	ilDatePresentation::formatPeriod(
         		$this->object->getRegistrationStart(),
         		$this->object->getRegistrationEnd()));
         */
         if ($this->object->isRegistrationUnlimited()) {
             $info->addProperty($this->lng->txt('group_registration_time'), $this->lng->txt('grp_registration_unlimited'));
         } elseif ($this->object->getRegistrationStart()->getUnixTime() < time()) {
             $info->addProperty($this->lng->txt("group_registration_time"), $this->lng->txt('cal_until') . ' ' . ilDatePresentation::formatDate($this->object->getRegistrationEnd()));
         } elseif ($this->object->getRegistrationStart()->getUnixTime() >= time()) {
             $info->addProperty($this->lng->txt("group_registration_time"), $this->lng->txt('cal_from') . ' ' . ilDatePresentation::formatDate($this->object->getRegistrationStart()));
         }
         if ($this->object->isMembershipLimited()) {
             $info->addProperty($this->lng->txt("mem_free_places"), max(0, $this->object->getMaxMembers() - $this->object->members_obj->getCountMembers()));
         }
     }
     // Confirmation
     include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
     $privacy = ilPrivacySettings::_getInstance();
     include_once 'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
     if ($privacy->groupConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledGroupExport()) {
         include_once 'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php';
         $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
         $this->lng->loadLanguageModule('ps');
         $info->addSection($this->lng->txt('grp_user_agreement_info'));
         $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
         if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
             $info->addProperty($this->lng->txt('ps_grp_user_fields'), $fields);
         }
     }
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #17
0
 /**
  * show information screen
  */
 function infoScreenForward()
 {
     global $ilTabs;
     $this->checkPermission('visible');
     $ilTabs->activateTab('id_info');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
     }
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #18
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilUser, $ilTabs, $lng;
     $ilTabs->activateTab("info_short");
     if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     if (trim($this->object->getIntroduction()) != "") {
         $info->addSection($lng->txt("wiki_introduction"));
         $info->addProperty("", nl2br($this->object->getIntroduction()));
     }
     // feedback from tutor; mark, status, comment
     include_once "./Modules/Wiki/classes/class.ilWikiContributor.php";
     include_once "./Services/Tracking/classes/class.ilLPMarks.php";
     $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
     $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
     $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
     if ($lpcomment != "" || $mark != "" || $status != ilWikiContributor::STATUS_NOT_GRADED) {
         $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
         if ($lpcomment != "") {
             $info->addProperty($this->lng->txt("wiki_comment"), $lpcomment);
         }
         if ($mark != "") {
             $info->addProperty($this->lng->txt("wiki_mark"), $mark);
         }
         if ($status == ilWikiContributor::STATUS_PASSED) {
             $info->addProperty($this->lng->txt("status"), $this->lng->txt("wiki_passed"));
         }
         if ($status == ilWikiContributor::STATUS_FAILED) {
             $info->addProperty($this->lng->txt("status"), $this->lng->txt("wiki_failed"));
         }
     }
     /*
     		$info->enableNews();
     		if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
     		{
     			//$info->enableNewsEditing();
     			$info->setBlockProperty("news", "settings", true);
     		}*/
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         $info->addButton($lng->txt("wiki_start_page"), ilObjWikiGUI::getGotoLink($this->object->getRefId()));
     }
     // general information
     $this->lng->loadLanguageModule("meta");
     $this->lng->loadLanguageModule("wiki");
     //$info->addSection($this->lng->txt("meta_general"));
     //$info->addProperty($this->lng->txt("mcst_nr_items"),
     //	(int) count($med_items));
     // forward the command
     $this->ctrl->forwardCommand($info);
     if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
         //			$this->setSideBlock();
     }
 }
コード例 #19
0
 /**
  * info screen
  *
  * @access protected
  * @param
  * @return
  */
 public function infoScreen()
 {
     global $ilAccess, $ilUser, $ilCtrl, $tree, $ilToolbar;
     $this->checkPermission('visible');
     $this->tabs_gui->setTabActive('info_short');
     $appointment_obj = $this->object->getFirstAppointment();
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($this->object->enabledRegistration()) {
         include_once './Modules/Session/classes/class.ilEventParticipants.php';
         if (ilEventParticipants::_isRegistered($ilUser->getId(), $this->object->getId())) {
             $ilToolbar->addFormButton($this->lng->txt('event_unregister'), 'join');
         } else {
             if (!isset($_SESSION['sess_hide_info'])) {
                 ilUtil::sendInfo($this->lng->txt('sess_join_info'));
             }
             $ilToolbar->addFormButton($this->lng->txt('join_session'), 'join', '', true);
         }
         $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
     }
     // Session information
     if (strlen($this->object->getLocation()) or strlen($this->object->getDetails())) {
         $info->addSection($this->lng->txt('event_section_information'));
     }
     if (strlen($location = $this->object->getLocation())) {
         $info->addProperty($this->lng->txt('event_location'), nl2br($this->object->getLocation()));
     }
     if (strlen($this->object->getDetails())) {
         $info->addProperty($this->lng->txt('event_details_workflow'), nl2br($this->object->getDetails()));
     }
     // Tutor information
     if ($this->object->hasTutorSettings()) {
         $info->addSection($this->lng->txt('event_tutor_data'));
         if (strlen($fullname = $this->object->getName())) {
             $info->addProperty($this->lng->txt('event_lecturer'), $fullname);
         }
         if (strlen($email = $this->object->getEmail())) {
             $info->addProperty($this->lng->txt('tutor_email'), $email);
         }
         if (strlen($phone = $this->object->getPhone())) {
             $info->addProperty($this->lng->txt('tutor_phone'), $phone);
         }
     }
     $html = '';
     include_once './Services/Object/classes/class.ilObjectActivation.php';
     include_once './Services/Container/classes/class.ilContainerSorting.php';
     include_once './Modules/Session/classes/class.ilSessionObjectListGUIFactory.php';
     $eventItems = ilObjectActivation::getItemsByEvent($this->object->getId());
     $parent_id = $tree->getParentId($this->object->getRefId());
     $parent_id = ilObject::_lookupObjId($parent_id);
     $eventItems = ilContainerSorting::_getInstance($parent_id)->sortSubItems('sess', $this->object->getId(), $eventItems);
     foreach ($eventItems as $item) {
         $list_gui = ilSessionObjectListGUIFactory::factory($item['type']);
         $list_gui->setContainerObject($this);
         $this->modifyItemGUI($list_gui, $item, false);
         $html .= $list_gui->getListItemHTML($item['ref_id'], $item['obj_id'], $item['title'], $item['description']);
     }
     if (strlen($html)) {
         $info->addSection($this->lng->txt('event_materials'));
         $info->addProperty('&nbsp;', $html);
     }
     // forward the command
     $this->ctrl->forwardCommand($info);
     // store read event
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     ilChangeEvent::_recordReadEvent($this->object->getType(), $this->object->getRefId(), $this->object->getId(), $ilUser->getId());
 }
コード例 #20
0
 /**
  * show info screen
  */
 public function infoScreen()
 {
     global $ilErr, $ilUser, $ilTabs;
     if (!$this->checkPermissionBool('visible')) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
     }
     $ilTabs->activateTab('info');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     if ($ilUser->getId() == ANONYMOUS_USER_ID || $this->object->isLocalObject()) {
         $info->addButton($this->lng->txt($this->getType() . '_call'), $this->object->getRemoteLink(), 'target="_blank"');
     } else {
         $info->addButton($this->lng->txt($this->getType() . '_call'), $this->ctrl->getLinkTarget($this, 'call'), 'target="_blank"');
     }
     $info->addSection($this->lng->txt('ecs_general_info'));
     $info->addProperty($this->lng->txt('title'), $this->object->getTitle());
     if (strlen($this->object->getOrganization())) {
         $info->addProperty($this->lng->txt('organization'), $this->object->getOrganization());
     }
     if (strlen($this->object->getDescription())) {
         $info->addProperty($this->lng->txt('description'), $this->object->getDescription());
     }
     if (strlen($loc = $this->object->getLocalInformation())) {
         $info->addProperty($this->lng->txt('ecs_local_information'), $this->object->getLocalInformation());
     }
     $this->addCustomInfoFields($info);
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, $this->getType(), $this->object->getId());
     $record_gui->setInfoObject($info);
     $record_gui->parse();
     $this->ctrl->forwardCommand($info);
 }
コード例 #21
0
 /**
  * Access- and Statusinformation Info
  * @return string HTML
  */
 function accessStatusInfo()
 {
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI(new stdClass());
     $info->setFormAction($this->ilCtrl->getFormAction($this));
     $info->addSection($this->lng->txt("info_access_and_status_info"));
     foreach ($this->getAccessStatusInfoData() as $data) {
         $info->addProperty($data[0], $data[1]);
     }
     return $info->getHTML();
 }
コード例 #22
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilErr, $ilAccess, $ilUser, $ilSetting;
     $this->checkPermission('visible');
     // Fill meta header tags
     include_once 'Services/MetaData/classes/class.ilMDUtils.php';
     ilMDUtils::_fillHTMLMetaTags($this->object->getId(), $this->object->getId(), 'crs');
     $this->tabs_gui->setTabActive('info_short');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     include_once 'Modules/Course/classes/class.ilCourseFile.php';
     $files =& ilCourseFile::_readFilesByCourse($this->object->getId());
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     $info->enableFeedback();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
     }
     if (strlen($this->object->getImportantInformation()) or strlen($this->object->getSyllabus()) or count($files)) {
         $info->addSection($this->lng->txt('crs_general_informations'));
     }
     if (strlen($this->object->getImportantInformation())) {
         $info->addProperty($this->lng->txt('crs_important_info'), "<strong>" . nl2br(ilUtil::makeClickable($this->object->getImportantInformation(), true) . "</strong>"));
     }
     if (strlen($this->object->getSyllabus())) {
         $info->addProperty($this->lng->txt('crs_syllabus'), nl2br(ilUtil::makeClickable($this->object->getSyllabus(), true)));
     }
     // files
     if (count($files)) {
         $tpl = new ilTemplate('tpl.event_info_file.html', true, true, 'Modules/Course');
         foreach ($files as $file) {
             $tpl->setCurrentBlock("files");
             $this->ctrl->setParameter($this, 'file_id', $file->getFileId());
             $tpl->setVariable("DOWN_LINK", $this->ctrl->getLinkTarget($this, 'sendfile'));
             $tpl->setVariable("DOWN_NAME", $file->getFileName());
             $tpl->setVariable("DOWN_INFO_TXT", $this->lng->txt('crs_file_size_info'));
             $tpl->setVariable("DOWN_SIZE", $file->getFileSize());
             $tpl->setVariable("TXT_BYTES", $this->lng->txt('bytes'));
             $tpl->parseCurrentBlock();
         }
         $info->addProperty($this->lng->txt('crs_file_download'), $tpl->get());
     }
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'crs', $this->object->getId());
     $record_gui->setInfoObject($info);
     $record_gui->parse();
     // meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     // contact
     if ($this->object->hasContactData()) {
         $info->addSection($this->lng->txt("crs_contact"));
     }
     if (strlen($this->object->getContactName())) {
         $info->addProperty($this->lng->txt("crs_contact_name"), $this->object->getContactName());
     }
     if (strlen($this->object->getContactResponsibility())) {
         $info->addProperty($this->lng->txt("crs_contact_responsibility"), $this->object->getContactResponsibility());
     }
     if (strlen($this->object->getContactPhone())) {
         $info->addProperty($this->lng->txt("crs_contact_phone"), $this->object->getContactPhone());
     }
     if ($this->object->getContactEmail()) {
         require_once 'Services/Mail/classes/class.ilMailFormCall.php';
         $emails = split(",", $this->object->getContactEmail());
         foreach ($emails as $email) {
             $email = trim($email);
             $etpl = new ilTemplate("tpl.crs_contact_email.html", true, true, 'Modules/Course');
             $etpl->setVariable("EMAIL_LINK", ilMailFormCall::getLinkTarget($info, 'showSummary', array(), array('type' => 'new', 'rcp_to' => $email, 'sig' => $this->createMailSignature())));
             $etpl->setVariable("CONTACT_EMAIL", $email);
             $mailString .= $etpl->get() . "<br />";
         }
         $info->addProperty($this->lng->txt("crs_contact_email"), $mailString);
     }
     if (strlen($this->object->getContactConsultation())) {
         $info->addProperty($this->lng->txt("crs_contact_consultation"), nl2br($this->object->getContactConsultation()));
     }
     //
     // access
     //
     // #10360
     $this->lng->loadLanguageModule("rep");
     $info->addSection($this->lng->txt("rep_activation_availability"));
     $info->showLDAPRoleGroupMappingInfo();
     // activation
     if ($this->object->getActivationUnlimitedStatus()) {
         $info->addProperty($this->lng->txt("rep_activation_access"), $this->lng->txt('crs_visibility_limitless'));
     } else {
         $info->addProperty($this->lng->txt('rep_activation_access'), ilDatePresentation::formatPeriod(new ilDateTime($this->object->getActivationStart(), IL_CAL_UNIX), new ilDateTime($this->object->getActivationEnd(), IL_CAL_UNIX)));
     }
     switch ($this->object->getSubscriptionLimitationType()) {
         case IL_CRS_SUBSCRIPTION_DEACTIVATED:
             $txt = $this->lng->txt("crs_info_reg_deactivated");
             break;
         default:
             switch ($this->object->getSubscriptionType()) {
                 case IL_CRS_SUBSCRIPTION_CONFIRMATION:
                     $txt = $this->lng->txt("crs_info_reg_confirmation");
                     break;
                 case IL_CRS_SUBSCRIPTION_DIRECT:
                     $txt = $this->lng->txt("crs_info_reg_direct");
                     break;
                 case IL_CRS_SUBSCRIPTION_PASSWORD:
                     $txt = $this->lng->txt("crs_info_reg_password");
                     break;
             }
     }
     // subscription
     $info->addProperty($this->lng->txt("crs_info_reg"), $txt);
     if ($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED) {
         if ($this->object->getSubscriptionUnlimitedStatus()) {
             $info->addProperty($this->lng->txt("crs_reg_until"), $this->lng->txt('crs_unlimited'));
         } elseif ($this->object->getSubscriptionStart() < time()) {
             $info->addProperty($this->lng->txt("crs_reg_until"), $this->lng->txt('crs_to') . ' ' . ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX)));
         } elseif ($this->object->getSubscriptionStart() > time()) {
             $info->addProperty($this->lng->txt("crs_reg_until"), $this->lng->txt('crs_from') . ' ' . ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX)));
         }
         if ($this->object->isSubscriptionMembershipLimited()) {
             include_once './Services/Membership/classes/class.ilParticipants.php';
             $info->addProperty($this->lng->txt("mem_free_places"), max(0, $this->object->getSubscriptionMaxMembers() - ilParticipants::lookupNumberOfMembers($this->object->getRefId())));
         }
     }
     // archive
     if ($this->object->getViewMode() == IL_CRS_VIEW_ARCHIVE) {
         if ($this->object->getArchiveType() != IL_CRS_ARCHIVE_NONE) {
             $info->addProperty($this->lng->txt("crs_archive"), ilDatePresentation::formatPeriod(new ilDateTime($this->object->getArchiveStart(), IL_CAL_UNIX), new ilDateTime($this->object->getArchiveStart(), IL_CAL_UNIX)));
         }
     }
     // Confirmation
     include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
     $privacy = ilPrivacySettings::_getInstance();
     include_once 'Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
     if ($privacy->courseConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledCourseExport()) {
         include_once 'Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php';
         $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
         $this->lng->loadLanguageModule('ps');
         $info->addSection($this->lng->txt('crs_user_agreement_info'));
         $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
         if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
             $info->addProperty($this->lng->txt('ps_crs_user_fields'), $fields);
         }
     }
     $info->enableLearningProgress(true);
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #23
0
ファイル: class.ilObjTestGUI.php プロジェクト: bheyser/qplskl
 /**
  * show information screen
  */
 function infoScreen($session_lock = "")
 {
     /**
      * @var $ilAccess  ilAccessHandler
      * @var $ilUser    ilObjUser
      * @var $ilToolbar ilToolbarGUI
      */
     global $ilAccess, $ilUser, $ilToolbar;
     require_once 'Modules/Test/classes/class.ilTestDynamicQuestionSetFilterSelection.php';
     $testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
     $testSession = $this->testSessionFactory->getSession();
     $testSequence = $this->testSequenceFactory->getSequenceByTestSession($testSession);
     $testSequence->loadFromDb();
     $testSequence->loadQuestions($testQuestionSetConfig, new ilTestDynamicQuestionSetFilterSelection());
     $testPlayerGUI = $this->testPlayerFactory->getPlayerGUI();
     if ($_GET['createRandomSolutions']) {
         $this->object->createRandomSolutions($_GET['createRandomSolutions']);
     }
     if (!$ilAccess->checkAccess("read", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $this->ctrl->setParameter($testPlayerGUI, "sequence", $testSession->getLastSequence());
     $info->setFormAction($this->ctrl->getFormAction($testPlayerGUI));
     if (strlen($session_lock)) {
         $info->addHiddenElement("lock", $session_lock);
     } else {
         $info->addHiddenElement("lock", md5($_COOKIE['PHPSESSID'] . time()));
     }
     $online_access = false;
     if ($this->object->getFixedParticipants()) {
         include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
         $online_access_result = ilObjTestAccess::_lookupOnlineTestAccess($this->object->getId(), $ilUser->getId());
         if ($online_access_result === true) {
             $online_access = true;
         } else {
             ilUtil::sendInfo($online_access_result);
         }
     }
     $enter_anonymous_code = false;
     if ($this->object->isOnline() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
         if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             $executable = $this->object->isExecutable($testSession, $ilUser->getId(), $allowPassIncrease = TRUE);
             if ($executable["executable"]) {
                 if ($this->object->areObligationsEnabled() && $this->object->hasObligations($this->object->getTestId())) {
                     ilUtil::sendInfo($GLOBALS['lng']->txt('tst_test_contains_obligatory_questions'));
                 }
                 if ($testSession->getActiveId() > 0) {
                     // resume test
                     require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
                     $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->object);
                     $testPassesSelector->setActiveId($testSession->getActiveId());
                     $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
                     $closedPasses = $testPassesSelector->getReportablePasses();
                     $existingPasses = $testPassesSelector->getExistingPasses();
                     if ($existingPasses > $closedPasses) {
                         $resumeTestLabel = $this->lng->txt("tst_resume_test");
                         $big_button[] = array('resumePlayer', $resumeTestLabel, true);
                     } else {
                         $resumeTestLabel = $this->object->getStartTestLabel($testSession->getActiveId());
                         $big_button[] = array('startPlayer', $resumeTestLabel, true);
                     }
                 } else {
                     // start new test
                     $big_button[] = array("startPlayer", $this->object->getStartTestLabel($testSession->getActiveId()), true);
                 }
             } else {
                 ilUtil::sendInfo($executable["errormessage"]);
             }
             if ($testSession->getActiveId() > 0) {
                 // test results button
                 require_once 'Modules/Test/classes/class.ilTestPassesSelector.php';
                 $testPassesSelector = new ilTestPassesSelector($GLOBALS['ilDB'], $this->object);
                 $testPassesSelector->setActiveId($testSession->getActiveId());
                 $testPassesSelector->setLastFinishedPass($testSession->getLastFinishedPass());
                 if ($this->object->canShowTestResults($testSession, $ilUser->getId()) && count($testPassesSelector->getReportablePasses())) {
                     //$info->addFormButton("outUserResultsOverview", $this->lng->txt("tst_show_results"));
                     $big_button[] = array(array('ilTestEvaluationGUI', 'outUserResultsOverview'), $this->lng->txt("tst_show_results"), false);
                     if ($this->object->getHighscoreEnabled()) {
                         // Can also compare results then
                         $big_button[] = array("outResultsToplist", $this->lng->txt("tst_show_toplist"), false);
                     }
                     if ($this->object->isSkillServiceToBeConsidered()) {
                         require_once 'Modules/Test/classes/class.ilTestSkillEvaluationGUI.php';
                         $big_button[] = array(array('ilTestSkillEvaluationGUI', ilTestSkillEvaluationGUI::CMD_SHOW), $this->lng->txt("tst_show_comp_results"), false);
                     }
                 }
             }
         }
         if ($testSession->getActiveId() > 0) {
             if ($this->object->canShowSolutionPrintview($ilUser->getId())) {
                 //$info->addFormButton("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"));
                 $big_button[] = array("outUserListOfAnswerPasses", $this->lng->txt("tst_list_of_answers_show"), false);
             }
         }
         if ($this->isDeleteDynamicTestResultsButtonRequired($testSession, $testSequence)) {
             $this->populateDeleteDynamicTestResultsButton($testSession, $big_button);
         }
         if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID) {
             $enter_anonymous_code = true;
         }
     }
     if (!$this->object->isOnline()) {
         $message = $this->lng->txt("test_is_offline");
         if ($ilAccess->checkAccess("write", "", $this->ref_id)) {
             $message .= "<br /><a href=\"" . $this->ctrl->getLinkTargetByClass('ilobjtestsettingsgeneralgui') . "\">" . $this->lng->txt("test_edit_settings") . "</a>";
         }
         ilUtil::sendInfo($message);
     }
     if ($this->areSkillLevelThresholdsMissing()) {
         ilUtil::sendFailure($this->getSkillLevelThresholdsMissingInfo());
     }
     if ($ilAccess->checkAccess("write", "", $this->ref_id)) {
         $testQuestionSetConfig = $this->testQuestionSetConfigFactory->getQuestionSetConfig();
         if ($testQuestionSetConfig->areDepenciesBroken()) {
             ilUtil::sendFailure($testQuestionSetConfig->getDepenciesBrokenMessage($this->lng));
             $big_button = array();
             $enter_anonymous_code = false;
         } elseif ($testQuestionSetConfig->areDepenciesInVulnerableState()) {
             ilUtil::sendInfo($testQuestionSetConfig->getDepenciesInVulnerableStateMessage($this->lng));
         }
     }
     if ($this->object->getShowInfo()) {
         $info->enablePrivateNotes();
     }
     if ($big_button || $enter_anonymous_code) {
         $ilToolbar->setFormAction($this->ctrl->getFormAction($testPlayerGUI));
         foreach ($big_button as $button) {
             if (is_array($button[0])) {
                 $link = $this->ctrl->getLinkTargetByClass($button[0][0], $button[0][1]);
                 $ilToolbar->addButton($button[1], $link, '', '', '', '', $button[2] ? 'submit emphSubmit' : 'submit');
             } else {
                 $ilToolbar->addFormButton($button[1], $button[0], "", $button[2]);
             }
         }
         if ($enter_anonymous_code) {
             if ($big_button) {
                 $ilToolbar->addSeparator();
             }
             require_once 'Services/Form/classes/class.ilTextInputGUI.php';
             $anonymous_id = new ilTextInputGUI($this->lng->txt('enter_anonymous_code'), 'anonymous_id');
             $anonymous_id->setSize(8);
             $ilToolbar->addInputItem($anonymous_id, true);
             $ilToolbar->addFormButton($this->lng->txt('submit'), 'setAnonymousId');
         }
         $ilToolbar->setCloseFormTag(false);
         $info->setOpenFormTag(false);
     }
     if (strlen($this->object->getIntroduction())) {
         $info->addSection($this->lng->txt("tst_introduction"));
         $info->addProperty("", $this->object->prepareTextareaOutput($this->object->getIntroduction(), true) . $info->getHiddenToggleButton());
     } else {
         $info->addSection("");
         $info->addProperty("", $info->getHiddenToggleButton());
     }
     $info->addSection($this->lng->txt("tst_general_properties"));
     if ($this->object->getShowInfo()) {
         $info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
         $info->addProperty($this->lng->txt("title"), $this->object->getTitle());
     }
     if ($this->object->isOnline() && $this->object->isComplete($this->testQuestionSetConfigFactory->getQuestionSetConfig())) {
         if ((!$this->object->getFixedParticipants() || $online_access) && $ilAccess->checkAccess("read", "", $this->ref_id)) {
             if ($this->object->getShowInfo() || !$this->object->getForceJS()) {
                 // use javascript
                 $checked_javascript = false;
                 if ($this->object->getJavaScriptOutput()) {
                     $checked_javascript = true;
                 }
             }
             // hide previous results
             if (!$this->object->isRandomTest() && !$this->getObjectiveOrientedContainer()->isObjectiveOrientedPresentationRequired()) {
                 if ($this->object->getNrOfTries() != 1) {
                     if ($this->object->getUsePreviousAnswers() == 0) {
                         if ($this->object->getShowInfo()) {
                             $info->addProperty($this->lng->txt("tst_use_previous_answers"), $this->lng->txt("tst_dont_use_previous_answers"));
                         }
                     } else {
                         $use_previous_answers = FALSE;
                         if ($ilUser->prefs["tst_use_previous_answers"]) {
                             $checked_previous_answers = TRUE;
                         }
                         $info->addPropertyCheckbox($this->lng->txt("tst_use_previous_answers"), "chb_use_previous_answers", 1, $this->lng->txt("tst_use_previous_answers_user"), $checked_previous_answers);
                     }
                 }
             }
         }
     }
     $info->hideFurtherSections(false);
     if ($this->object->getShowInfo()) {
         $info->addSection($this->lng->txt("tst_sequence_properties"));
         $info->addProperty($this->lng->txt("tst_sequence"), $this->lng->txt($this->object->getSequenceSettings() == TEST_FIXED_SEQUENCE ? "tst_sequence_fixed" : "tst_sequence_postpone"));
         $info->addSection($this->lng->txt("tst_heading_scoring"));
         $info->addProperty($this->lng->txt("tst_text_count_system"), $this->lng->txt($this->object->getCountSystem() == COUNT_PARTIAL_SOLUTIONS ? "tst_count_partial_solutions" : "tst_count_correct_solutions"));
         $info->addProperty($this->lng->txt("tst_score_mcmr_questions"), $this->lng->txt($this->object->getMCScoring() == SCORE_ZERO_POINTS_WHEN_UNANSWERED ? "tst_score_mcmr_zero_points_when_unanswered" : "tst_score_mcmr_use_scoring_system"));
         if ($this->object->isRandomTest()) {
             $info->addProperty($this->lng->txt("tst_pass_scoring"), $this->lng->txt($this->object->getPassScoring() == SCORE_BEST_PASS ? "tst_pass_best_pass" : "tst_pass_last_pass"));
         }
         $info->addSection($this->lng->txt("tst_score_reporting"));
         $score_reporting_text = "";
         switch ($this->object->getScoreReporting()) {
             case REPORT_AFTER_TEST:
                 $score_reporting_text = $this->lng->txt("tst_report_after_test");
                 break;
             case REPORT_ALWAYS:
                 $score_reporting_text = $this->lng->txt("tst_report_after_first_question");
                 break;
             case REPORT_AFTER_DATE:
                 $score_reporting_text = $this->lng->txt("tst_report_after_date");
                 break;
             case 4:
                 $score_reporting_text = $this->lng->txt("tst_report_never");
                 break;
         }
         $info->addProperty($this->lng->txt("tst_score_reporting"), $score_reporting_text);
         $reporting_date = $this->object->getReportingDate();
         if ($reporting_date) {
             #preg_match("/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/", $reporting_date, $matches);
             #$txt_reporting_date = date($this->lng->text["lang_dateformat"] . " " . $this->lng->text["lang_timeformat"], mktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]));
             #$info->addProperty($this->lng->txt("tst_score_reporting_date"), $txt_reporting_date);
             $info->addProperty($this->lng->txt('tst_score_reporting_date'), ilDatePresentation::formatDate(new ilDateTime($reporting_date, IL_CAL_TIMESTAMP)));
         }
         $info->addSection($this->lng->txt("tst_session_settings"));
         $info->addProperty($this->lng->txt("tst_nr_of_tries"), $this->object->getNrOfTries() == 0 ? $this->lng->txt("unlimited") : $this->object->getNrOfTries());
         if ($this->object->getNrOfTries() != 1) {
             $info->addProperty($this->lng->txt("tst_nr_of_tries_of_user"), $testSession->getPass() == false ? $this->lng->txt("tst_no_tries") : $testSession->getPass());
         }
         if ($this->object->getEnableProcessingTime()) {
             $info->addProperty($this->lng->txt("tst_processing_time"), $this->object->getProcessingTime());
         }
         if (strlen($this->object->getAllowedUsers()) && $this->object->getAllowedUsersTimeGap()) {
             $info->addProperty($this->lng->txt("tst_allowed_users"), $this->object->getAllowedUsers());
         }
         $starting_time = $this->object->getStartingTime();
         if ($starting_time) {
             $info->addProperty($this->lng->txt("tst_starting_time"), ilDatePresentation::formatDate(new ilDateTime($starting_time, IL_CAL_TIMESTAMP)));
         }
         $ending_time = $this->object->getEndingTime();
         if ($ending_time) {
             $info->addProperty($this->lng->txt("tst_ending_time"), ilDatePresentation::formatDate(new ilDateTime($ending_time, IL_CAL_TIMESTAMP)));
         }
         $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
         // forward the command
     }
     $this->ctrl->forwardCommand($info);
 }
 public function showContent()
 {
     /*
      * var $ilUser ilUser
      */
     global $ilUser, $tpl, $ilAccess;
     $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
     $this->pluginObj->includeClass('class.ilAdobeConnectServer.php');
     $has_write_permission = $ilAccess->checkAccess("write", "", $this->object->getRefId());
     $settings = ilAdobeConnectServer::_getInstance();
     if ($settings->getAuthMode() == ilAdobeConnectServer::AUTH_MODE_SWITCHAAI and ilAdobeConnectServer::useSwitchaaiAuthMode($ilUser->getAuthMode(true))) {
         //Login User - this creates a user if he not exists.
         $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
         $ilAdobeConnectUser->loginUser();
         //Add the user as Participant @adobe switch
         $status = ilXAVCMembers::_lookupStatus($ilUser->getId(), $this->object->getRefId());
         $this->object->addSwitchParticipant($ilUser->getEmail(), $status);
     }
     $this->tabs->setTabActive('contents');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->removeFormAction();
     $this->pluginObj->includeClass('class.ilAdobeConnectQuota.php');
     $this->pluginObj->includeClass("class.ilObjAdobeConnectAccess.php");
     $is_member = ilObjAdobeConnectAccess::_hasMemberRole($ilUser->getId(), $this->object->getRefId());
     $is_admin = ilObjAdobeConnectAccess::_hasAdminRole($ilUser->getId(), $this->object->getRefId());
     //SWITCHAAI: If the user has no SWITCHaai-Account, we show the room link without connecting to the adobe-connect server. This is used for guest logins.
     $show_only_roomlink = false;
     if ($settings->getAuthMode() == ilAdobeConnectServer::AUTH_MODE_SWITCHAAI and !ilAdobeConnectServer::useSwitchaaiAuthMode($ilUser->getAuthMode(true))) {
         $show_only_roomlink = true;
         $presentation_url = $settings->getPresentationUrl();
         $button_txt = $this->pluginObj->txt('enter_vc');
         $button_target = $presentation_url . $this->object->getURL();
         $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
         $button_tpl->setVariable('BUTTON_TARGET', $button_target);
         $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
         $big_button = $button_tpl->get();
         $info->addSection('');
         $info->addProperty('', $big_button . "<br />");
     }
     if (($this->access->checkAccess("write", "", $this->object->getRefId()) || $is_member || $is_admin) && !$show_only_roomlink) {
         $presentation_url = $settings->getPresentationUrl();
         $form = new ilPropertyFormGUI();
         $form->setTitle($this->pluginObj->txt('access_meeting_title'));
         $this->object->doRead();
         if ($this->object->getStartDate() != NULL) {
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
             $ilAdobeConnectUser->ensureAccountExistance();
             $xavc_login = $ilAdobeConnectUser->getXAVCLogin();
             $quota = new ilAdobeConnectQuota();
             // show button
             if (($this->object->getPermanentRoom() == 1 || $this->doProvideAccessLink()) && $this->object->isParticipant($xavc_login)) {
                 if (!$quota->mayStartScheduledMeeting($this->object->getScoId())) {
                     $href = $this->txt("meeting_not_available_no_slots");
                     $button_disabled = true;
                 } else {
                     $href = '<a href="' . $this->ctrl->getLinkTarget($this, 'performSso') . '" target="_blank" >' . $presentation_url . $this->object->getURL() . '</a>';
                     $button_disabled = false;
                 }
             } else {
                 $href = $this->txt("meeting_not_available");
                 $button_disabled = true;
             }
             if ($button_disabled == true) {
                 $button_txt = $href;
             } else {
                 $button_txt = $this->pluginObj->txt('enter_vc');
             }
             $button_target = ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this, 'performSso', '', false, false);
             $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
             $button_tpl->setVariable('BUTTON_TARGET', $button_target);
             $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
             $big_button = $button_tpl->get();
             $info->addSection('');
             if ($button_disabled == true) {
                 $info->addProperty('', $href);
             } else {
                 $info->addProperty('', $big_button . "<br />");
             }
             // show instructions
             if (strlen($this->object->getInstructions()) > 1) {
                 $info->addSection($this->lng->txt('exc_instruction'));
                 $info->addProperty('', nl2br($this->object->getInstructions()));
             }
             // show contact info
             if (strlen($this->object->getContactInfo()) > 1) {
                 $info->addSection($this->pluginObj->txt('contact_information'));
                 $info->addProperty('', nl2br($this->object->getContactInfo()));
             }
             //show contents
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_CONTENTS) && $this->object->getReadContents('content')) {
                 $info->addSection($this->pluginObj->txt('file_uploads'));
                 $info->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                     $has_access = true;
                     $tpl_sub_button = new ilTemplate("Services/InfoScreen/templates/default/tpl.submitbuttons.html", true, true);
                     $tpl_sub_button->setVariable('BTN_NAME', $this->txt("add_new_content"));
                     $tpl_sub_button->setVariable('BTN_COMMAND', 'showAddContent');
                     $info->addProperty('', $tpl_sub_button->get());
                 }
                 $info->addProperty('', $this->viewContents($has_access));
             }
             // show records
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_RECORDS) && $this->object->getReadRecords()) {
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                     $has_access = true;
                 }
                 $info->addSection($this->pluginObj->txt('records'));
                 $info->addProperty('', $this->viewRecords($has_access, 'record'));
             }
         } else {
             ilUtil::sendFailure($this->txt('error_connect_ac_server'));
         }
     }
     $info->hideFurtherSections();
     $tpl->setContent($info->getHTML() . $this->getPerformTriggerHtml());
     $tpl->setPermanentLink('xavc', $this->object->getRefId());
     $tpl->addILIASFooter();
 }
コード例 #25
0
 protected function addCustomInfoFields(ilInfoScreenGUI $a_info)
 {
     $a_info->addProperty($this->lng->txt('ecs_availability'), $this->availabilityToString());
 }
コード例 #26
0
 /**
  * Add Advanced Meta Data Information to the Info Screen
  *
  * @param ilInfoScreenGUI $info
  */
 protected function parseInfoScreen(ilInfoScreenGUI $info)
 {
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php';
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
     include_once 'Services/ADT/classes/class.ilADTFactory.php';
     $type = $this->object->getOrgUnitType();
     if (!$type) {
         return;
     }
     $assigned_record_ids = $type->getAssignedAdvancedMDRecordIds();
     foreach (ilAdvancedMDValues::getInstancesForObjectId($this->object->getId(), 'orgu') as $record_id => $a_values) {
         // Skip record ids not assigned to the type
         if (!in_array($record_id, $assigned_record_ids)) {
             continue;
         }
         // Note that we have to do this because with the instances above the sub-type and sub-id are missing...
         $a_values = new ilAdvancedMDValues($record_id, $this->object->getId(), 'orgu_type', $this->object->getOrgUnitTypeId());
         // this correctly binds group and definitions
         $a_values->read();
         $info->addSection(ilAdvancedMDRecord::_lookupTitle($record_id));
         $defs = $a_values->getDefinitions();
         foreach ($a_values->getADTGroup()->getElements() as $element_id => $element) {
             if (!$element->isNull()) {
                 $info->addProperty($defs[$element_id]->getTitle(), ilADTFactory::getInstance()->getPresentationBridgeForInstance($element)->getHTML());
             }
         }
     }
 }
コード例 #27
0
 /**
  * show information screen
  */
 function infoScreenForward()
 {
     global $ilTabs, $ilErr;
     $ilTabs->activateTab("id_info");
     if (!$this->checkPermissionBool("visible")) {
         $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
     }
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     if ($this->checkPermissionBool("read")) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($this->checkPermissionBool("write")) {
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
             $info->setBlockProperty("news", "public_notifications_option", true);
         }
     }
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     if ($this->id_type == self::WORKSPACE_NODE_ID) {
         $info->addProperty($this->lng->txt("perma_link"), $this->getPermanentLinkWidget());
     }
     $this->ctrl->forwardCommand($info);
 }
コード例 #28
0
 /**
  * Get assignment body for overview
  */
 function getOverviewBody($a_data)
 {
     global $lng, $ilCtrl, $ilUser;
     $tpl = new ilTemplate("tpl.assignment_body.html", true, true, "Modules/Exercise");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     include_once "./Services/UIComponent/Button/classes/class.ilLinkButton.php";
     if (IS_PAYMENT_ENABLED) {
         include_once './Services/Payment/classes/class.ilPaymentObject.php';
     }
     $info = new ilInfoScreenGUI(null);
     $info->setTableClass("");
     $not_started_yet = false;
     if ($a_data["start_time"] > 0 && time() - $a_data["start_time"] <= 0) {
         $not_started_yet = true;
     }
     if (!$not_started_yet) {
         // instructions
         $info->addSection($lng->txt("exc_instruction"));
         $is_html = strlen($a_data["instruction"]) != strlen(strip_tags($a_data["instruction"]));
         if (!$is_html) {
             $a_data["instruction"] = nl2br(ilUtil::makeClickable($a_data["instruction"], true));
         }
         $info->addProperty("", $a_data["instruction"]);
     }
     // schedule
     $info->addSection($lng->txt("exc_schedule"));
     if ($a_data["start_time"] > 0) {
         $info->addProperty($lng->txt("exc_start_time"), ilDatePresentation::formatDate(new ilDateTime($a_data["start_time"], IL_CAL_UNIX)));
     }
     if ($a_data["deadline"] > 0) {
         $info->addProperty($lng->txt("exc_edit_until"), ilDatePresentation::formatDate(new ilDateTime($a_data["deadline"], IL_CAL_UNIX)));
     }
     $time_str = $this->getTimeString($a_data["deadline"]);
     if (!$not_started_yet) {
         $info->addProperty($lng->txt("exc_time_to_send"), "<b>" . $time_str . "</b>");
     }
     // public submissions
     if ($this->exc->getShowSubmissions()) {
         $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
         if ($a_data["deadline"] - time() <= 0) {
             $button = ilLinkButton::getInstance();
             $button->setCaption("exc_list_submission");
             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "listPublicSubmissions"));
             $info->addProperty($lng->txt("exc_public_submission"), $button->render());
         } else {
             $info->addProperty($lng->txt("exc_public_submission"), $lng->txt("exc_msg_public_submission"));
         }
         $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $_GET["ass_id"]);
     }
     $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
     if (!$not_started_yet) {
         // download files
         $files = ilExAssignment::getFiles($a_data["exc_id"], $a_data["id"]);
         if (count($files) > 0) {
             $info->addSection($lng->txt("exc_files"));
             foreach ($files as $file) {
                 // if download must be purchased first show a "buy"-button
                 if (IS_PAYMENT_ENABLED && (ilPaymentObject::_isBuyable($_GET['ref_id'], 'download') && !ilPaymentObject::_hasAccess($_GET['ref_id'], '', 'download'))) {
                     $info->addProperty($file["name"], $lng->txt("buy"), $ilCtrl->getLinkTargetByClass("ilShopPurchaseGUI", "showDetails"));
                 } else {
                     $ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file["name"]));
                     $info->addProperty($file["name"], $lng->txt("download"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFile"));
                     $ilCtrl->setParameterByClass("ilobjexercisegui", "file", "");
                 }
             }
         }
         // submission
         // if submission must be purchased first
         if (IS_PAYMENT_ENABLED && (ilPaymentObject::_isBuyable($_GET['ref_id'], 'upload') && !ilPaymentObject::_hasAccess($_GET['ref_id'], '', 'upload'))) {
             $info->addSection($lng->txt("exc_your_submission"));
             $ilCtrl->clearParameters($this);
             $ilCtrl->setParameter($this, "ref_id", $_GET['ref_id']);
             $ilCtrl->setParameter($this, 'subtype', 'upload');
             $info->addProperty($lng->txt('exc_hand_in'), $lng->txt("buy"), $ilCtrl->getLinkTargetByClass("ilShopPurchaseGUI", "showDetails"));
         } else {
             $info->addSection($lng->txt("exc_your_submission"));
             $delivered_files = ilExAssignment::getDeliveredFiles($a_data["exc_id"], $a_data["id"], $ilUser->getId());
             $times_up = false;
             if ($a_data["deadline"] > 0 && $a_data["deadline"] - time() < 0) {
                 $times_up = true;
             }
             $team_members = null;
             switch ($a_data["type"]) {
                 case ilExAssignment::TYPE_UPLOAD_TEAM:
                     $no_team_yet = false;
                     $team_members = ilExAssignment::getTeamMembersByAssignmentId($a_data["id"], $ilUser->getId());
                     if (sizeof($team_members)) {
                         $team = array();
                         foreach ($team_members as $member_id) {
                             $team[] = ilObjUser::_lookupFullname($member_id);
                         }
                         $team = implode(", ", $team);
                         $button = ilLinkButton::getInstance();
                         $button->setCaption("exc_manage_team");
                         $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreenTeam"));
                         $team .= " " . $button->render();
                         $info->addProperty($lng->txt("exc_team_members"), $team);
                     } else {
                         $no_team_yet = true;
                         if (!$times_up) {
                             if (!sizeof($delivered_files)) {
                                 $team_info = $lng->txt("exc_no_team_yet_notice");
                             } else {
                                 $team_info = '<span class="warning">' . $lng->txt("exc_no_team_yet_notice") . '</span>';
                             }
                             $button = ilLinkButton::getInstance();
                             $button->setPrimary(true);
                             $button->setCaption("exc_create_team");
                             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "createTeam"));
                             $team_info .= " " . $button->render();
                             $team_info .= '<div class="ilFormInfo">' . $lng->txt("exc_no_team_yet_info") . '</div>';
                         } else {
                             $team_info = '<span class="warning">' . $lng->txt("exc_create_team_times_up_warning") . '</span>';
                         }
                         $info->addProperty($lng->txt("exc_team_members"), $team_info);
                     }
                     // fallthrough
                 // fallthrough
                 case ilExAssignment::TYPE_UPLOAD:
                     $titles = array();
                     foreach ($delivered_files as $file) {
                         $titles[] = $file["filetitle"];
                     }
                     $files_str = implode($titles, ", ");
                     if ($files_str == "") {
                         $files_str = $lng->txt("message_no_delivered_files");
                     }
                     // no team == no submission
                     if (!$no_team_yet) {
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
                         if (!$times_up) {
                             $title = count($titles) == 0 ? $lng->txt("exc_hand_in") : $lng->txt("exc_edit_submission");
                             $button = ilLinkButton::getInstance();
                             $button->setPrimary(true);
                             $button->setCaption($title, false);
                             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreen"));
                             $files_str .= " " . $button->render();
                         } else {
                             if (count($titles) > 0) {
                                 $button = ilLinkButton::getInstance();
                                 $button->setCaption("already_delivered_files");
                                 $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "submissionScreen"));
                                 $files_str .= " " . $button->render();
                             }
                         }
                     }
                     $info->addProperty($lng->txt("exc_files_returned"), $files_str);
                     break;
                 case ilExAssignment::TYPE_BLOG:
                     include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
                     $wsp_tree = new ilWorkspaceTree($ilUser->getId());
                     // #12939
                     if (!$wsp_tree->getRootId()) {
                         $wsp_tree->createTreeForUser($ilUser->getId());
                     }
                     $files_str = "";
                     $valid_blog = false;
                     if (sizeof($delivered_files)) {
                         $delivered_files = array_pop($delivered_files);
                         $blog_id = (int) $delivered_files["filetitle"];
                         $node = $wsp_tree->getNodeData($blog_id);
                         if ($node["title"]) {
                             // #10116
                             $ilCtrl->setParameterByClass("ilobjbloggui", "wsp_id", $blog_id);
                             $blog_link = $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilpersonalworkspacegui", "ilobjbloggui"), "");
                             $ilCtrl->setParameterByClass("ilobjbloggui", "wsp_id", "");
                             $files_str = '<a href="' . $blog_link . '">' . $node["title"] . '</a>';
                             $valid_blog = true;
                         } else {
                             if (substr($delivered_files["filename"], -1) == "/") {
                                 $this->exc->deleteResourceObject($delivered_files["ass_id"], $ilUser->getId(), $delivered_files["returned_id"]);
                             }
                         }
                     }
                     if (!$times_up) {
                         if (!$valid_blog) {
                             $button = ilLinkButton::getInstance();
                             $button->setCaption("exc_create_blog");
                             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "createBlog"));
                             $files_str .= $button->render();
                         }
                         // #10462
                         $blogs = sizeof($wsp_tree->getObjectsFromType("blog"));
                         if (!$valid_blog && $blogs || $valid_blog && $blogs > 1) {
                             $button = ilLinkButton::getInstance();
                             $button->setCaption("exc_select_blog" . ($valid_blog ? "_change" : ""));
                             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "selectBlog"));
                             $files_str .= " " . $button->render();
                         }
                     }
                     if ($files_str) {
                         $info->addProperty($lng->txt("exc_blog_returned"), $files_str);
                     }
                     if ($delivered_files && substr($delivered_files["filename"], -1) != "/") {
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", $delivered_files["returned_id"]);
                         $dl_link = $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "download");
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", "");
                         $button = ilLinkButton::getInstance();
                         $button->setCaption("download");
                         $button->setUrl($dl_link);
                         $info->addProperty($lng->txt("exc_files_returned"), $button->render());
                     }
                     break;
                 case ilExAssignment::TYPE_PORTFOLIO:
                     include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
                     $files_str = "";
                     $valid_prtf = false;
                     if (sizeof($delivered_files)) {
                         $delivered_files = array_pop($delivered_files);
                         $portfolio_id = (int) $delivered_files["filetitle"];
                         // #11746
                         if (ilObject::_exists($portfolio_id, false, "prtf")) {
                             $portfolio = new ilObjPortfolio($portfolio_id, false);
                             if ($portfolio->getTitle()) {
                                 // #10116 / #12791
                                 $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", $portfolio_id);
                                 $prtf_link = $ilCtrl->getLinkTargetByClass(array("ilpersonaldesktopgui", "ilportfoliorepositorygui", "ilobjportfoliogui"), "view");
                                 $ilCtrl->setParameterByClass("ilobjportfoliogui", "prt_id", "");
                                 $files_str = '<a href="' . $prtf_link . '">' . $portfolio->getTitle() . '</a>';
                                 $valid_prtf = true;
                             }
                         } else {
                             if (substr($delivered_files["filename"], -1) == "/") {
                                 $this->exc->deleteResourceObject($delivered_files["ass_id"], $ilUser->getId(), $delivered_files["returned_id"]);
                             }
                         }
                     }
                     if (!$times_up) {
                         if (!$valid_prtf) {
                             // if there are portfolio templates available show form first
                             include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
                             $has_prtt = sizeof(ilObjPortfolioTemplate::getAvailablePortfolioTemplates()) ? "Template" : "";
                             $button = ilLinkButton::getInstance();
                             $button->setCaption("exc_create_portfolio");
                             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "createPortfolio" . $has_prtt));
                             $files_str .= $button->render();
                         }
                         // #10462
                         $prtfs = sizeof(ilObjPortfolio::getPortfoliosOfUser($ilUser->getId()));
                         if (!$valid_prtf && $prtfs || $valid_prtf && $prtfs > 1) {
                             $button = ilLinkButton::getInstance();
                             $button->setCaption("exc_select_portfolio" . ($valid_prtf ? "_change" : ""));
                             $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "selectPortfolio"));
                             $files_str .= " " . $button->render();
                         }
                     }
                     if ($files_str) {
                         $info->addProperty($lng->txt("exc_portfolio_returned"), $files_str);
                     }
                     if ($delivered_files && substr($delivered_files["filename"], -1) != "/") {
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", $delivered_files["returned_id"]);
                         $dl_link = $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "download");
                         $ilCtrl->setParameterByClass("ilobjexercisegui", "delivered", "");
                         $button = ilLinkButton::getInstance();
                         $button->setCaption("download");
                         $button->setUrl($dl_link);
                         $info->addProperty($lng->txt("exc_files_returned"), $button->render());
                     }
                     break;
                 case ilExAssignment::TYPE_TEXT:
                     $ilCtrl->setParameterByClass("ilobjexercisegui", "ass_id", $a_data["id"]);
                     if (!$times_up) {
                         $button = ilLinkButton::getInstance();
                         $button->setPrimary(true);
                         $button->setCaption("exc_text_assignment_edit");
                         $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "editAssignmentText"));
                         $files_str = $button->render();
                     } else {
                         $button = ilLinkButton::getInstance();
                         $button->setCaption("exc_text_assignment_show");
                         $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "showAssignmentText"));
                         $files_str = $button->render();
                     }
                     $info->addProperty($lng->txt("exc_files_returned_text"), $files_str);
                     break;
             }
             $last_sub = ilExAssignment::getLastSubmission($a_data["id"], $ilUser->getId());
             if ($last_sub) {
                 $last_sub = ilDatePresentation::formatDate(new ilDateTime($last_sub, IL_CAL_DATETIME));
             } else {
                 $last_sub = "---";
             }
             if ($last_sub != "---") {
                 $info->addProperty($lng->txt("exc_last_submission"), $last_sub);
             }
             // peer feedback
             if ($times_up && $a_data["peer"]) {
                 $nr_missing_fb = ilExAssignment::getNumberOfMissingFeedbacks($a_data["id"], $a_data["peer_min"]);
                 if (!$a_data["peer_dl"] || $a_data["peer_dl"] > time()) {
                     $dl_info = "";
                     if ($a_data["peer_dl"]) {
                         $dl_info = " (" . sprintf($lng->txt("exc_peer_review_deadline_info_button"), ilDatePresentation::formatDate(new ilDateTime($a_data["peer_dl"], IL_CAL_UNIX))) . ")";
                     }
                     $button = ilLinkButton::getInstance();
                     $button->setPrimary($nr_missing_fb);
                     $button->setCaption($lng->txt("exc_peer_review_give") . $dl_info, false);
                     $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "editPeerReview"));
                     $edit_pc = $button->render();
                 } else {
                     if ($a_data["peer_dl"]) {
                         $edit_pc = $lng->txt("exc_peer_review_deadline_reached");
                     }
                 }
                 if ((!$a_data["peer_dl"] || $a_data["peer_dl"] < time()) && !$nr_missing_fb) {
                     $button = ilLinkButton::getInstance();
                     $button->setCaption("exc_peer_review_show");
                     $button->setUrl($ilCtrl->getLinkTargetByClass("ilobjexercisegui", "showPersonalPeerReview"));
                     $view_pc = $button->render();
                 }
                 /*
                 else 
                 {
                 	$view_pc = $lng->txt("exc_peer_review_show_not_rated_yet");
                 }
                 */
                 $info->addProperty($lng->txt("exc_peer_review"), $edit_pc . " " . $view_pc);
             }
             // feedback from tutor
             if ($a_data["type"] == ilExAssignment::TYPE_UPLOAD_TEAM) {
                 $feedback_id = "t" . ilExAssignment::getTeamIdByAssignment($a_data["id"], $ilUser->getId());
             } else {
                 $feedback_id = $ilUser->getId();
             }
             // global feedback / sample solution
             if ($a_data["fb_date"] == ilExAssignment::FEEDBACK_DATE_DEADLINE) {
                 $show_global_feedback = $times_up && $a_data["fb_file"];
             } else {
                 $show_global_feedback = $last_sub != "---" && $a_data["fb_file"];
             }
             $storage = new ilFSStorageExercise($a_data["exc_id"], $a_data["id"]);
             $cnt_files = $storage->countFeedbackFiles($feedback_id);
             $lpcomment = ilExAssignment::lookupCommentForUser($a_data["id"], $ilUser->getId());
             $mark = ilExAssignment::lookupMarkOfUser($a_data["id"], $ilUser->getId());
             $status = ilExAssignment::lookupStatusOfUser($a_data["id"], $ilUser->getId());
             if ($lpcomment != "" || $mark != "" || $status != "notgraded" || $cnt_files > 0 || $show_global_feedback) {
                 $info->addSection($lng->txt("exc_feedback_from_tutor"));
                 if ($lpcomment != "") {
                     $info->addProperty($lng->txt("exc_comment"), $lpcomment);
                 }
                 if ($mark != "") {
                     $info->addProperty($lng->txt("exc_mark"), $mark);
                 }
                 if ($status == "") {
                     //				  $info->addProperty($lng->txt("status"),
                     //						$lng->txt("message_no_delivered_files"));
                 } else {
                     if ($status != "notgraded") {
                         $img = '<img src="' . ilUtil::getImagePath("scorm/" . $status . ".svg") . '" ' . ' alt="' . $lng->txt("exc_" . $status) . '" title="' . $lng->txt("exc_" . $status) . '" />';
                         $info->addProperty($lng->txt("status"), $img . " " . $lng->txt("exc_" . $status));
                     }
                 }
                 if ($cnt_files > 0) {
                     $info->addSection($lng->txt("exc_fb_files") . '<a name="fb' . $a_data["id"] . '"></a>');
                     if ($cnt_files > 0) {
                         $files = $storage->getFeedbackFiles($feedback_id);
                         foreach ($files as $file) {
                             $ilCtrl->setParameterByClass("ilobjexercisegui", "file", urlencode($file));
                             $info->addProperty($file, $lng->txt("download"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadFeedbackFile"));
                             $ilCtrl->setParameterByClass("ilobjexercisegui", "file", "");
                         }
                     }
                 }
                 // #15002 - global feedback
                 if ($show_global_feedback) {
                     $info->addSection($lng->txt("exc_global_feedback_file"));
                     $info->addProperty($a_data["fb_file"], $lng->txt("download"), $ilCtrl->getLinkTargetByClass("ilobjexercisegui", "downloadGlobalFeedbackFile"));
                 }
             }
         }
     }
     $tpl->setVariable("CONTENT", $info->getHTML());
     return $tpl->get();
 }
コード例 #29
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilUser, $ilTabs, $lng;
     $ilTabs->activateTab("info");
     $this->checkPermission("visible");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
         $info->setBlockProperty("news", "settings", true);
     }
     // standard meta data
     //$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
     // instructions
     $info->addSection($this->lng->txt("exc_overview"));
     include_once "./Modules/Exercise/classes/class.ilExAssignment.php";
     $ass = ilExAssignment::getAssignmentDataOfExercise($this->object->getId());
     $cnt = 0;
     $mcnt = 0;
     foreach ($ass as $a) {
         $cnt++;
         if ($a["mandatory"]) {
             $mcnt++;
         }
     }
     $info->addProperty($lng->txt("exc_assignments"), $cnt);
     $info->addProperty($lng->txt("exc_mandatory"), $mcnt);
     if ($this->object->getPassMode() != "nr") {
         $info->addProperty($lng->txt("exc_pass_mode"), $lng->txt("exc_msg_all_mandatory_ass"));
     } else {
         $info->addProperty($lng->txt("exc_pass_mode"), sprintf($lng->txt("exc_msg_min_number_ass"), $this->object->getPassNr()));
     }
     // feedback from tutor
     include_once "Services/Tracking/classes/class.ilLPMarks.php";
     if ($ilAccess->checkAccess("read", "", $this->ref_id)) {
         $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
         $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
         //$status = ilExerciseMembers::_lookupStatus($this->object->getId(), $ilUser->getId());
         $st = $this->object->determinStatusOfUser($ilUser->getId());
         $status = $st["overall_status"];
         if ($lpcomment != "" || $mark != "" || $status != "notgraded") {
             $info->addSection($this->lng->txt("exc_feedback_from_tutor"));
             if ($lpcomment != "") {
                 $info->addProperty($this->lng->txt("exc_comment"), $lpcomment);
             }
             if ($mark != "") {
                 $info->addProperty($this->lng->txt("exc_mark"), $mark);
             }
             //if ($status == "")
             //{
             //  $info->addProperty($this->lng->txt("status"),
             //		$this->lng->txt("message_no_delivered_files"));
             //}
             //else
             if ($status != "notgraded") {
                 $img = '<img src="' . ilUtil::getImagePath("scorm/" . $status . ".svg") . '" ' . ' alt="' . $lng->txt("exc_" . $status) . '" title="' . $lng->txt("exc_" . $status) . '" />';
                 $add = "";
                 if ($st["failed_a_mandatory"]) {
                     $add = " (" . $lng->txt("exc_msg_failed_mandatory") . ")";
                 } else {
                     if ($status == "failed") {
                         $add = " (" . $lng->txt("exc_msg_missed_minimum_number") . ")";
                     }
                 }
                 $info->addProperty($this->lng->txt("status"), $img . " " . $this->lng->txt("exc_" . $status) . $add);
             }
         }
     }
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
 public function showContent()
 {
     /*
      * var $ilUser ilUser
      */
     global $ilUser, $tpl, $ilCtrl, $ilAccess;
     $this->pluginObj->includeClass('class.ilAdobeConnectUserUtil.php');
     $this->pluginObj->includeClass('class.ilAdobeConnectServer.php');
     $has_write_permission = $ilAccess->checkAccess("write", "", $this->object->getRefId());
     $settings = ilAdobeConnectServer::_getInstance();
     $this->tabs->setTabActive('contents');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->removeFormAction();
     $this->pluginObj->includeClass('class.ilAdobeConnectQuota.php');
     $this->pluginObj->includeClass("class.ilObjAdobeConnectAccess.php");
     $is_member = ilObjAdobeConnectAccess::_hasMemberRole($ilUser->getId(), $this->object->getRefId());
     $is_admin = ilObjAdobeConnectAccess::_hasAdminRole($ilUser->getId(), $this->object->getRefId());
     if ($this->access->checkAccess("write", "", $this->object->getRefId()) || $is_member || $is_admin) {
         $presentation_url = $settings->getPresentationUrl();
         $form = new ilPropertyFormGUI();
         $form->setTitle($this->pluginObj->txt('access_meeting_title'));
         $this->object->doRead();
         if ($this->object->getStartDate() != NULL) {
             $ilAdobeConnectUser = new ilAdobeConnectUserUtil($this->user->getId());
             $ilAdobeConnectUser->ensureAccountExistance();
             $xavc_login = $ilAdobeConnectUser->getXAVCLogin();
             $quota = new ilAdobeConnectQuota();
             // show button
             if (($this->object->getPermanentRoom() == 1 || $this->doProvideAccessLink()) && $this->object->isParticipant($xavc_login)) {
                 $this->pluginObj->includeClass('class.ilAdobeConnectRoles.php');
                 $xavcRoles = new ilAdobeConnectRoles($this->object->getRefId());
                 if (!$quota->mayStartScheduledMeeting($this->object->getScoId())) {
                     $href = $this->txt("meeting_not_available_no_slots");
                     $button_disabled = true;
                 } else {
                     if (!$xavcRoles->isAdministrator($this->user->getId()) && count($current_pax = $this->object->getCurrentPax()) > $this->object->getMaxPax() && !in_array($this->object->getPrincipalId($xavc_login), $current_pax)) {
                         $href = $this->txt("meeting_full");
                         $button_disabled = true;
                     } else {
                         $href = '<a href="' . $this->ctrl->getLinkTarget($this, 'performSso') . '" target="_blank" >' . $presentation_url . $this->object->getURL() . '</a>';
                         $button_disabled = false;
                     }
                 }
             } else {
                 $href = $this->txt("meeting_not_available");
                 $button_disabled = true;
             }
             if ($button_disabled == true) {
                 $button_txt = $href;
             } else {
                 $button_txt = $this->pluginObj->txt('enter_vc');
             }
             $button_target = ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this, 'performSso', '', false, false);
             $button_tpl = new ilTemplate($this->pluginObj->getDirectory() . "/templates/default/tpl.bigbutton.html", true, true);
             $button_tpl->setVariable('BUTTON_TARGET', $button_target);
             $button_tpl->setVariable('BUTTON_TEXT', $button_txt);
             $big_button = $button_tpl->get();
             $info->addSection('');
             if ($button_disabled == true) {
                 $info->addProperty('', $href);
             } else {
                 $info->addProperty('', $big_button . "<br />");
             }
             // show instructions
             if (strlen($this->object->getInstructions()) > 1) {
                 $info->addSection($this->lng->txt('exc_instruction'));
                 $info->addProperty('', nl2br($this->object->getInstructions()));
             }
             // show contact info
             if (strlen($this->object->getContactInfo()) > 1) {
                 $info->addSection($this->pluginObj->txt('contact_information'));
                 $info->addProperty('', nl2br($this->object->getContactInfo()));
             }
             //show contents
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_CONTENTS) && $this->object->getReadContents('content') || ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                 $admins_only = '';
                 if (!$this->object->getReadContents('content')) {
                     $admins_only = $this->pluginObj->txt('admins_only');
                 }
                 $info->addSection($this->pluginObj->txt('file_uploads') . ' ' . $admins_only);
                 $info->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
                 $has_access = false;
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_UPLOAD_CONTENT) || $has_write_permission) {
                     $has_access = true;
                     $tpl_sub_button = new ilTemplate("Services/InfoScreen/templates/default/tpl.submitbuttons.html", true, true);
                     $tpl_sub_button->setVariable('BTN_NAME', $this->txt("add_new_content"));
                     $tpl_sub_button->setVariable('BTN_COMMAND', 'showAddContent');
                     $info->addProperty('', $tpl_sub_button->get());
                 }
                 $info->addProperty('', $this->viewContents($has_access));
             }
             // show records
             if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->object->getRefId(), AdobeConnectPermissions::PERM_READ_RECORDS) && $this->object->getReadRecords() || ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                 $has_access = false;
                 $admins_only = '';
                 if (ilXAVCPermissions::hasAccess($ilUser->getId(), $this->ref_id, AdobeConnectPermissions::PERM_EDIT_RECORDS) || $has_write_permission) {
                     $has_access = true;
                     if (!$this->object->getReadRecords()) {
                         $admins_only = $this->pluginObj->txt('admins_only');
                     }
                 }
                 $info->addSection($this->pluginObj->txt('records') . ' ' . $admins_only);
                 $info->addProperty('', $this->viewRecords($has_access, 'record'));
             }
         } else {
             ilUtil::sendFailure($this->txt('error_connect_ac_server'));
         }
     }
     $info->hideFurtherSections('', true);
     $tpl->setContent($info->getHTML() . $this->getPerformTriggerHtml());
     $tpl->setPermanentLink('xavc', $this->object->getRefId());
     $tpl->addILIASFooter();
 }