コード例 #1
0
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilAccess, $lng, $ilTabs, $ilCtrl, $ilErr;
     if ($this->ctrl->getRedirectSource() == "ilinternallinkgui") {
         $this->explorer();
         return;
     }
     if ($this->ctrl->getCmdClass() == "ilinternallinkgui") {
         $this->ctrl->setReturn($this, "explorer");
     }
     // get next class that processes or forwards current command
     $next_class = $this->ctrl->getNextClass($this);
     // get current command
     //		$cmd = $this->ctrl->getCmd("", array("downloadExportFile"));
     if ($_GET["to_props"] == 1) {
         $cmd = $this->ctrl->getCmd("properties");
     } else {
         $cmd = $this->ctrl->getCmd("chapters");
     }
     //echo "-$cmd-".$next_class."-";
     switch ($next_class) {
         case "illearningprogressgui":
             $this->addHeaderAction();
             $this->addLocations();
             include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
             $this->setTabs("learning_progress");
             $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId());
             $new_gui->activateStatistics();
             $this->ctrl->forwardCommand($new_gui);
             break;
         case 'ilmdeditorgui':
             if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
                 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
             }
             $this->addHeaderAction();
             $this->addLocations();
             include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
             $this->setTabs("meta");
             $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
             $md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
             $this->ctrl->forwardCommand($md_gui);
             break;
         case "ilobjstylesheetgui":
             $this->addLocations();
             include_once "./Services/Style/classes/class.ilObjStyleSheetGUI.php";
             $this->ctrl->setReturn($this, "editStyleProperties");
             $style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
             $style_gui->omitLocator();
             if ($cmd == "create" || $_GET["new_type"] == "sty") {
                 $style_gui->setCreationMode(true);
             }
             $ret =& $this->ctrl->forwardCommand($style_gui);
             //$ret =& $style_gui->executeCommand();
             if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
                 $style_id = $ret;
                 $this->object->setStyleSheetId($style_id);
                 $this->object->update();
                 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
             }
             break;
         case "illmpageobjectgui":
             $ilTabs->setBackTarget($lng->txt("learning module"), $ilCtrl->getLinkTarget($this, "chapters"));
             $this->ctrl->saveParameter($this, array("obj_id"));
             $this->addLocations();
             $this->ctrl->setReturn($this, "chapters");
             //echo "!";
             //$this->lm_obj =& $this->ilias->obj_factory->getInstanceByRefId($this->ref_id);
             $pg_gui =& new ilLMPageObjectGUI($this->object);
             if ($_GET["obj_id"] != "") {
                 $obj =& ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
                 $pg_gui->setLMPageObject($obj);
             }
             //$ret =& $pg_gui->executeCommand();
             $ret =& $this->ctrl->forwardCommand($pg_gui);
             if ($cmd == "save" || $cmd == "cancel") {
                 //					$this->ctrl->redirect($this, "pages");
             }
             break;
         case "ilstructureobjectgui":
             $ilTabs->setBackTarget($lng->txt("learning module"), $ilCtrl->getLinkTarget($this, "chapters"));
             $this->ctrl->saveParameter($this, array("obj_id"));
             $this->addLocations();
             $this->ctrl->setReturn($this, "chapters");
             $st_gui =& new ilStructureObjectGUI($this->object, $this->object->lm_tree);
             if ($_GET["obj_id"] != "") {
                 $obj =& ilLMObjectFactory::getInstance($this->object, $_GET["obj_id"]);
                 $st_gui->setStructureObject($obj);
             }
             //$ret =& $st_gui->executeCommand();
             $ret =& $this->ctrl->forwardCommand($st_gui);
             if ($cmd == "save" || $cmd == "cancel") {
                 if ($_GET["obj_id"] == "") {
                     $this->ctrl->redirect($this, "chapters");
                 } else {
                     $this->ctrl->setCmd("subchap");
                     $this->executeCommand();
                 }
             }
             break;
         case 'ilpermissiongui':
             if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
                 $this->prepareOutput();
             } else {
                 $this->addHeaderAction();
                 $this->addLocations(true);
                 $this->setTabs("perm");
             }
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
             // infoscreen
         // infoscreen
         case 'ilinfoscreengui':
             $this->addHeaderAction();
             $this->addLocations(true);
             $this->setTabs("info");
             include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
             $info = new ilInfoScreenGUI($this);
             $info->enablePrivateNotes();
             $info->enableLearningProgress();
             $info->enableNews();
             if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
                 $info->enableNewsEditing();
                 $info->setBlockProperty("news", "settings", true);
             }
             // show standard meta data section
             $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
             $ret =& $this->ctrl->forwardCommand($info);
             break;
         case "ilexportgui":
             $this->addHeaderAction();
             $this->addLocations(true);
             $this->setTabs("export");
             include_once "./Services/Export/classes/class.ilExportGUI.php";
             $exp_gui = new ilExportGUI($this);
             $exp_gui->addFormat("xml", "", $this, "export");
             $exp_gui->addFormat("html", "", $this, "exportHTML");
             $exp_gui->addFormat("scorm", "", $this, "exportSCORM");
             $exp_gui->addCustomColumn($lng->txt("cont_public_access"), $this, "getPublicAccessColValue");
             $exp_gui->addCustomMultiCommand($lng->txt("cont_public_access"), $this, "publishExportFile");
             $ret = $this->ctrl->forwardCommand($exp_gui);
             break;
         case "ilcommonactiondispatchergui":
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
         case "ilpagemultilanggui":
             $this->addHeaderAction();
             $this->addLocations(true);
             $ilCtrl->setReturn($this, "properties");
             include_once "./Services/COPage/classes/class.ilPageMultiLangGUI.php";
             $ml_gui = new ilPageMultiLangGUI("lm", $this->object->getId());
             $this->setTabs("settings");
             $this->setSubTabs("cont_multilinguality");
             $ret = $this->ctrl->forwardCommand($ml_gui);
             break;
         default:
             $new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
             if ($cmd == "create" && !in_array($new_type, array("dbk", "lm"))) {
                 //$this->addLocations();
                 switch ($new_type) {
                     case "pg":
                         $this->setTabs();
                         $this->ctrl->setCmdClass("ilLMPageObjectGUI");
                         $ret =& $this->executeCommand();
                         break;
                     case "st":
                         $this->setTabs();
                         $this->ctrl->setCmdClass("ilStructureObjectGUI");
                         $ret =& $this->executeCommand();
                         break;
                 }
             } else {
                 // creation of new dbk/lm in repository
                 if ($this->getCreationMode() == true && in_array($new_type, array("dbk", "lm"))) {
                     $this->prepareOutput();
                     if ($cmd == "") {
                         $cmd = "create";
                     }
                     $cmd .= "Object";
                     $ret =& $this->{$cmd}();
                 } else {
                     $this->addHeaderAction();
                     $this->addLocations();
                     $ret =& $this->{$cmd}();
                 }
             }
             break;
     }
     return $ret;
 }
コード例 #2
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);
 }
コード例 #3
0
 /**
  * execute command
  */
 function &executeCommand()
 {
     global $ilAccess, $ilTabs, $ilErr;
     if (strtolower($_GET["baseClass"]) == "iladministrationgui" || $this->getCreationMode() == true) {
         $this->prepareOutput();
     } else {
         $this->getTemplate();
         $this->setLocator();
         $this->setTabs();
     }
     $next_class = $this->ctrl->getNextClass($this);
     $cmd = $this->ctrl->getCmd();
     switch ($next_class) {
         case 'ilmdeditorgui':
             if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
                 $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
             }
             include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
             $md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
             $md_gui->addObserver($this->object, 'MDUpdateListener', 'General');
             $this->ctrl->forwardCommand($md_gui);
             break;
         case 'ilpermissiongui':
             include_once "Services/AccessControl/classes/class.ilPermissionGUI.php";
             $perm_gui =& new ilPermissionGUI($this);
             $ret =& $this->ctrl->forwardCommand($perm_gui);
             break;
         case "ilfilesystemgui":
             $this->fs_gui =& new ilFileSystemGUI($this->object->getDataDirectory());
             $this->fs_gui->setTableId("sahsfs" . $this->object->getId());
             $ret =& $this->ctrl->forwardCommand($this->fs_gui);
             break;
         case "ilcertificategui":
             include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
             include_once "./Modules/ScormAicc/classes/class.ilSCORMCertificateAdapter.php";
             $output_gui = new ilCertificateGUI(new ilSCORMCertificateAdapter($this->object));
             $ret =& $this->ctrl->forwardCommand($output_gui);
             break;
         case "illearningprogressgui":
             include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
             $new_gui =& new ilLearningProgressGUI(ilLearningProgressGUI::LP_CONTEXT_REPOSITORY, $this->object->getRefId());
             $this->ctrl->forwardCommand($new_gui);
             break;
         case 'illicensegui':
             include_once "./Services/License/classes/class.ilLicenseGUI.php";
             $license_gui =& new ilLicenseGUI($this);
             $ret =& $this->ctrl->forwardCommand($license_gui);
             break;
         case "ilinfoscreengui":
             include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
             $info = new ilInfoScreenGUI($this);
             $info->enablePrivateNotes();
             $info->enableLearningProgress();
             // add read / back button
             if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
                 if (!$this->object->getEditable()) {
                     $info->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilSAHSPresentationGUI&ref_id=" . $this->object->getRefID(), ' target="ilContObj' . $this->object->getId() . '" ');
                 }
             }
             $info->enableNews();
             if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
                 $info->enableNewsEditing();
                 $news_set = new ilSetting("news");
                 $enable_internal_rss = $news_set->get("enable_rss_for_internal");
                 if ($enable_internal_rss) {
                     $info->setBlockProperty("news", "settings", true);
                 }
             }
             // show standard meta data section
             $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
             // forward the command
             $this->ctrl->forwardCommand($info);
             break;
         case "ilcommonactiondispatchergui":
             include_once "Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
             $gui = ilCommonActionDispatcherGUI::getInstanceFromAjaxCall();
             $this->ctrl->forwardCommand($gui);
             break;
         case "ilobjstylesheetgui":
             //$this->addLocations();
             $this->ctrl->setReturn($this, "properties");
             $ilTabs->clearTargets();
             $style_gui =& new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
             $style_gui->omitLocator();
             if ($cmd == "create" || $_GET["new_type"] == "sty") {
                 $style_gui->setCreationMode(true);
             }
             //$ret =& $style_gui->executeCommand();
             if ($cmd == "confirmedDelete") {
                 $this->object->setStyleSheetId(0);
                 $this->object->update();
             }
             $ret =& $this->ctrl->forwardCommand($style_gui);
             if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
                 $style_id = $ret;
                 $this->object->setStyleSheetId($style_id);
                 $this->object->update();
                 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
             }
             break;
         default:
             if ($this->object && !$this->object->getEditable()) {
                 $cmd = $this->ctrl->getCmd("properties");
             } else {
                 $cmd = $this->ctrl->getCmd("frameset");
             }
             if ((strtolower($_GET["baseClass"]) == "iladministrationgui" || $this->getCreationMode() == true) && $cmd != "frameset") {
                 $cmd .= "Object";
             }
             // #9225
             if ($cmd == "redrawHeaderAction") {
                 $cmd .= "Object";
             }
             $ret =& $this->{$cmd}();
             break;
     }
 }
コード例 #4
0
 /**
  * info screen
  */
 function outputInfoScreen()
 {
     global $ilBench, $ilAccess, $ilTabs;
     $this->setTabs();
     $ilTabs->activateTab("info");
     $this->lng->loadLanguageModule("meta");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this->glossary_gui);
     $info->enablePrivateNotes();
     //$info->enableLearningProgress();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
         }
     }
     // add read / back button
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         /*
         			if ($_GET["obj_id"] > 0)
         			{
         				$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
         				$info->addButton($this->lng->txt("back"),
         					$this->ctrl->getLinkTarget($this, "layout"));
         			}
         			else
         			{
         				$info->addButton($this->lng->txt("view"),
         					$this->ctrl->getLinkTarget($this, "layout"));
         			}*/
     }
     // show standard meta data section
     $info->addMetaDataSections($this->glossary->getId(), 0, $this->glossary->getType());
     include_once "./Modules/Glossary/classes/class.ilObjGlossaryGUI.php";
     ilObjGlossaryGUI::addUsagesToInfo($info, $this->glossary->getId());
     if ($this->offlineMode()) {
         $this->tpl->setContent($info->getHTML());
         return $this->tpl->get();
     } else {
         // forward the command
         $this->ctrl->forwardCommand($info);
     }
 }
コード例 #5
0
 /**
  * info screen
  */
 function outputInfoScreen($a_standard_locator = true)
 {
     global $ilBench, $ilLocator, $ilAccess, $ilTabs;
     $ilTabs->activateTab('id_info');
     $this->lng->loadLanguageModule("meta");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     $info->enableLearningProgress();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
         }
     }
     // add read / back button
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $info->addButton($this->lng->txt("view"), "ilias.php?baseClass=ilHTLMPresentationGUI&ref_id=" . $this->object->getRefID(), ' target="ilContObj' . $this->object->getId() . '" ');
     }
     // show standard meta data section
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #6
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);
 }
コード例 #7
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);
 }
コード例 #8
0
 /**
  * info screen
  */
 function outputInfoScreen()
 {
     global $ilAccess;
     //$this->tpl->setHeaderPageTitle("PAGETITLE", " - ".$this->lm->getTitle());
     // set style sheets
     /*
     		if (!$this->offlineMode())
     		{
     			$this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
     		}
     		else
     		{
     			$style_name = $this->ilias->account->prefs["style"].".css";;
     			$this->tpl->setStyleSheetLocation("./".$style_name);
     		}*/
     $this->setInfoTabs("info_short");
     $this->lng->loadLanguageModule("meta");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this->slm_gui);
     $info->enablePrivateNotes();
     //$info->enableLearningProgress();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $info->enableNewsEditing();
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
         }
     }
     // add read / back button
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         include_once './Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
         $sahs_obj = new ilObjSAHSLearningModule($_GET["ref_id"]);
         $om = $sahs_obj->getOpenMode();
         $width = $sahs_obj->getWidth();
         $height = $sahs_obj->getHeight();
         if ($om != 0) {
             $info->addButton($this->lng->txt("view"), "javascript:void(0); onclick=startSAHS('" . $this->ctrl->getLinkTarget($this, "") . "','ilContObj" . $this->slm_gui->object->getId() . "'," . $om . "," . $width . "," . $height . ");", '');
         } else {
             $info->addButton($this->lng->txt("view"), $this->ctrl->getLinkTarget($this, ""), ' target="ilContObj' . $this->slm_gui->object->getId() . '" ');
         }
     }
     // show standard meta data section
     $info->addMetaDataSections($this->slm_gui->object->getId(), 0, $this->slm_gui->object->getType());
     /*
     		if ($this->offlineMode())
     		{
     			$this->tpl->setContent($info->getHTML());
     			return $this->tpl->get();
     		}
     		else
     		{*/
     // forward the command
     $this->ctrl->forwardCommand($info);
     //$this->tpl->setContent("aa");
     $this->tpl->show();
     //}
 }
コード例 #9
0
 /**
  * Show info screen
  *
  * @param
  * @return
  */
 function showInfoScreen()
 {
     global $ilAccess;
     $this->getTemplate();
     $this->setTabs();
     $this->setLocator();
     $this->lng->loadLanguageModule("meta");
     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();
         $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->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     ilObjGlossaryGUI::addUsagesToInfo($info, $this->object->getId());
     $this->ctrl->forwardCommand($info);
 }
コード例 #10
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess, $ilCtrl;
     if (!$ilAccess->checkAccess("visible", "", $this->ref_id)) {
         $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"), $this->ilias->error_obj->MESSAGE);
     }
     // #10986
     $this->tabs_gui->setTabActive('info_short');
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this);
     $info->enablePrivateNotes();
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $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);
         }
     }
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php';
     $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'cat', $this->object->getId());
     $record_gui->setInfoObject($info);
     $record_gui->parse();
     // standard meta data
     $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
     // forward the command
     if ($ilCtrl->getNextClass() == "ilinfoscreengui") {
         $ilCtrl->forwardCommand($info);
     } else {
         return $ilCtrl->getHTML($info);
     }
 }
コード例 #11
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);
 }
コード例 #12
0
 /**
  * info screen
  */
 function outputInfoScreen($a_standard_locator = false)
 {
     global $ilBench, $ilLocator, $ilAccess;
     $this->renderPageTitle();
     // set style sheets
     if (!$this->offlineMode()) {
         $this->tpl->setStyleSheetLocation(ilUtil::getStyleSheetLocation());
     } else {
         $style_name = $this->ilias->account->prefs["style"] . ".css";
         $this->tpl->setStyleSheetLocation("./" . $style_name);
     }
     $this->tpl->getStandardTemplate();
     $this->tpl->setTitle($this->lm->getTitle());
     $this->tpl->setTitleIcon(ilUtil::getImagePath("icon_lm_b.png"));
     $this->tpl->setVariable("TABS", $this->lm_gui->setilLMMenu($this->offlineMode(), $this->getExportFormat(), "info", true));
     // Full locator, if read permission is given
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $this->ilLocator();
     } else {
         $ilLocator->addRepositoryItems();
         $this->tpl->setLocator();
     }
     $this->lng->loadLanguageModule("meta");
     include_once "./Services/InfoScreen/classes/class.ilInfoScreenGUI.php";
     $info = new ilInfoScreenGUI($this->lm_gui);
     $info->enablePrivateNotes();
     $info->enableLearningProgress();
     $info->enableNews();
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $news_set = new ilSetting("news");
         $enable_internal_rss = $news_set->get("enable_rss_for_internal");
         $info->enableNewsEditing();
         if ($enable_internal_rss) {
             $info->setBlockProperty("news", "settings", true);
         }
     }
     // add read / back button
     /*
     		if ($ilAccess->checkAccess("read", "", $_GET["ref_id"]))
     		{
     			if ($_GET["obj_id"] > 0)
     			{
     				$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
     				$info->addButton($this->lng->txt("back"),
     					$this->ctrl->getLinkTarget($this, "layout"));
     			}
     			else
     			{
     				$info->addButton($this->lng->txt("view"),
     					$this->ctrl->getLinkTarget($this, "layout"));
     			}
     		}*/
     // show standard meta data section
     $info->addMetaDataSections($this->lm->getId(), 0, $this->lm->getType());
     if ($this->offlineMode()) {
         $this->tpl->setContent($info->getHTML());
         return $this->tpl->get();
     } else {
         // forward the command
         $this->ctrl->forwardCommand($info);
         //$this->tpl->setContent("aa");
         $this->tpl->show();
     }
 }
コード例 #13
0
 function infoScreen()
 {
     global $ilAccess, $ilCtrl;
     $this->tabs_gui->setTabActive('info');
     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);
     $info->enablePrivateNotes();
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $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);
         }
     }
     // forward the command
     if ($ilCtrl->getNextClass() == "ilinfoscreengui") {
         $ilCtrl->forwardCommand($info);
     } else {
         return $ilCtrl->getHTML($info);
     }
 }
コード例 #14
0
 /**
  * show information screen
  */
 function infoScreen()
 {
     global $ilAccess;
     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);
     $info->enablePrivateNotes();
     if ($ilAccess->checkAccess("read", "", $_GET["ref_id"])) {
         $info->enableNews();
     }
     // no news editing for files, just notifications
     $info->enableNewsEditing(false);
     if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
         $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());
     // forward the command
     $this->ctrl->forwardCommand($info);
 }
コード例 #15
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"));
     }
     $this->lng->loadLanguageModule("cntr");
     $ilToolbar->addButton($this->lng->txt("prtf_create_portfolio_from_template"), $this->ctrl->getLinkTarget($this, "createfromtemplate"), "", "", "", "", "submit emphsubmit");
     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());
     $this->ctrl->forwardCommand($info);
 }
コード例 #16
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);
 }
コード例 #17
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);
 }