当前位置: 首页>>代码示例>>PHP>>正文


PHP ilUtil::getDataDir方法代码示例

本文整理汇总了PHP中ilUtil::getDataDir方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::getDataDir方法的具体用法?PHP ilUtil::getDataDir怎么用?PHP ilUtil::getDataDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilUtil的用法示例。


在下文中一共展示了ilUtil::getDataDir方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: lookupExportDirectory

 /**
  * Overwritten for qpl
  * @param string $a_obj_type
  * @param int $a_obj_id
  * @param string $a_export_type 
  */
 public static function lookupExportDirectory($a_obj_type, $a_obj_id, $a_export_type = 'xml', $a_entity = "")
 {
     if ($a_export_type == 'xml') {
         return ilUtil::getDataDir() . "/qpl_data" . "/qpl_" . $a_obj_id . "/export_zip";
     }
     return ilUtil::getDataDir() . "/qpl_data" . "/qpl_" . $a_obj_id . "/export_" . $a_export_type;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:13,代码来源:class.ilTestQuestionPoolExporter.php

示例2: lookupExportDirectory

 /**
  * export directory lookup
  * @return string export directory
  */
 public static function lookupExportDirectory($a_obj_type, $a_obj_id, $a_export_type = 'xml', $a_entity = "")
 {
     $ent = $a_entity == "" ? "" : "_" . $a_entity;
     if ($a_export_type == 'xml') {
         return ilUtil::getDataDir() . "/" . $a_obj_type . $ent . "_data" . "/" . $a_obj_type . "_" . $a_obj_id . "/export";
     }
     return ilUtil::getDataDir() . "/" . $a_obj_type . $ent . "_data" . "/" . $a_obj_type . "_" . $a_obj_id . "/export_" . $a_export_type;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilXmlExporter.php

示例3: getRelativePathExMailDirectory

 public function getRelativePathExMailDirectory()
 {
     switch ($this->getStorageType()) {
         case self::STORAGE_DATA:
             $path = ilUtil::getDataDir();
             break;
         case self::STORAGE_WEB:
             $path = ilUtil::getWebspaceDir();
             break;
     }
     $path = ilUtil::removeTrailingPathSeparators($path);
     $path .= '/';
     // Append path prefix
     $path .= $this->getPathPrefix() . '/';
     return str_replace($path, '', $this->getAbsolutePath());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilFSStorageMail.php

示例4: ilSCORMOfflineMode

     $lng->loadLanguageModule("sop");
     $this->lng =& $lng;
     $this->ctrl =& $ilCtrl;
     $this->ctrl->saveParameter($this, "ref_id");
     $this->offlineMode = new ilSCORMOfflineMode();
     $this->online_icon = 'icon_slm_b.png';
     $this->offline_icon = 'icon_slm_b_offline.png';
     $this->icon = $this->online_icon;
 }
 function executeCommand()
 {
     global $tpl, $ilCtrl;
     $this->lmId = ilObject::_lookupObjectId($_GET["ref_id"]);
     $this->clientIdSop = $this->offlineMode->getClientIdSop();
     $cmd = $ilCtrl->getCmd();
     $this->setOfflineModeTabs($cmd);
     switch ($cmd) {
         case 'offlineMode_il2sopContent':
             ilUtil::deliverFile(ilUtil::getDataDir() . "/lm_data/lm_" . $this->lmId . ".zip", "lm_" . $this->lmId . ".zip");
             break;
         case 'offlineMode_il2sop':
             $this->offlineMode->il2sop();
             break;
         case 'offlineMode_il2sopStop':
             $this->offlineMode->setOfflineMode("online");
             $this->view($this->offlineMode->getOfflineMode(), "msg_export_failure");
             break;
         case 'offlineMode_il2sopOk':
             $this->offlineMode->setOfflineMode("offline");
             $this->view($this->offlineMode->getOfflineMode(), "msg_export_ok");
             break;
         case 'offlineMode_sop2il':
             $this->offlineMode->sop2il();
             break;
         case 'offlineMode_sop2ilStop':
             $this->offlineMode->setOfflineMode("offline");
             $this->view($this->offlineMode->getOfflineMode(), "msg_push_tracking_failure");
             break;
         case 'offlineMode_sop2ilOk':
             $this->offlineMode->setOfflineMode("online");
             $this->view($this->offlineMode->getOfflineMode(), "msg_push_tracking_ok");
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:41,代码来源:class.ilSCORMOfflineModeGUI.php

示例5: createExportDirectory

 function createExportDirectory()
 {
     $lm_data_dir = ilUtil::getDataDir() . "/lm_data";
     if (!is_writable($lm_data_dir)) {
         $this->ilias->raiseError("Content object Data Directory (" . $lm_data_dir . ") not writeable.", $this->ilias->error_obj->FATAL);
     }
     // create learning module directory (data_dir/lm_data/lm_<id>)
     $lm_dir = $lm_data_dir . "/lm_" . $this->module_id;
     ilUtil::makeDir($lm_dir);
     if (!@is_dir($lm_dir)) {
         $this->ilias->raiseError("Creation of Learning Module Directory failed.", $this->ilias->error_obj->FATAL);
     }
     //$export_dir = $lm_dir."/export_".$this->mode;
     ilUtil::makeDir($this->export_dir);
     if (!@is_dir($this->export_dir)) {
         $this->ilias->raiseError("Creation of Export Directory failed.", $this->ilias->error_obj->FATAL);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilSCORM2004Export.php

示例6: getExportDirectory

 /**
  * get export directory of lm
  */
 function getExportDirectory($a_type = "xml")
 {
     switch ($a_type) {
         case "html":
             $export_dir = ilUtil::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export_html";
             break;
         case "scorm":
             $export_dir = ilUtil::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export_scorm";
             break;
         default:
             // = xml
             $export_dir = ilUtil::getDataDir() . "/lm_data" . "/lm_" . $this->getId() . "/export";
             break;
     }
     return $export_dir;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:19,代码来源:class.ilObjContentObject.php

示例7: zipLmForOfflineMode

 public function zipLmForOfflineMode()
 {
     $lmDir = ilUtil::getWebspaceDir("filesystem") . "/lm_data/lm_" . $this->getId();
     $zipFile = ilUtil::getDataDir() . "/lm_data/lm_" . $this->getId();
     return ilUtil::zip($lmDir, $zipFile, true);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:6,代码来源:class.ilObjSAHSLearningModule.php

示例8: checkDirectory

 /**
  * Checks if external chatroom directory exists or can be created.
  * @return string
  * @throws Exception
  */
 protected function checkDirectory()
 {
     $srv_prp_path = ilUtil::getDataDir() . '/chatroom/';
     if (!file_exists($srv_prp_path)) {
         if (!ilUtil::makeDir($srv_prp_path)) {
             throw new Exception('Directory cannot be created');
         }
     }
     return $srv_prp_path;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilChatroomViewTask.php

示例9: initConsumer

 public function initConsumer()
 {
     include_once "Auth/OpenID/Consumer.php";
     include_once "Auth/OpenID/FileStore.php";
     include_once 'Auth/OpenID/DumbStore.php';
     if (is_object($this->consumer)) {
         return true;
     }
     $this->initTempDir();
     $store = new Auth_OpenID_FileStore(ilUtil::getDataDir() . DIRECTORY_SEPARATOR . 'tmp');
     return $this->consumer = new Auth_OpenID_Consumer($store);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilOpenIdSettings.php

示例10: rebuildUploadedFiles

 /**
  * try to rebuild files		
  */
 protected function rebuildUploadedFiles()
 {
     global $ilUser;
     if ($_POST["ilfilehash"]) {
         $user_id = $ilUser->getId();
         $temp_path = ilUtil::getDataDir() . "/temp";
         if (is_dir($temp_path) && $user_id && $user_id != ANONYMOUS_USER_ID) {
             $reload = array();
             $temp_files = glob($temp_path . "/" . $ilUser->getId() . "~~" . $_POST["ilfilehash"] . "~~*");
             if (is_array($temp_files)) {
                 foreach ($temp_files as $full_file) {
                     $file = explode("~~", basename($full_file));
                     $field = $file[2];
                     $idx = $file[3];
                     $idx2 = $file[4];
                     $type = $file[5] . "/" . $file[6];
                     $name = $file[7];
                     if ($idx2 != "") {
                         if (!$_FILES[$field]["tmp_name"][$idx][$idx2]) {
                             $reload[$field]["tmp_name"][$idx][$idx2] = $full_file;
                             $reload[$field]["name"][$idx][$idx2] = $name;
                             $reload[$field]["type"][$idx][$idx2] = $type;
                             $reload[$field]["error"][$idx][$idx2] = 0;
                             $reload[$field]["size"][$idx][$idx2] = filesize($full_file);
                         }
                     } else {
                         if ($idx != "") {
                             if (!$_FILES[$field]["tmp_name"][$idx]) {
                                 $reload[$field]["tmp_name"][$idx] = $full_file;
                                 $reload[$field]["name"][$idx] = $name;
                                 $reload[$field]["type"][$idx] = $type;
                                 $reload[$field]["error"][$idx] = 0;
                                 $reload[$field]["size"][$idx] = filesize($full_file);
                             }
                         } else {
                             if (!$_FILES[$field]["tmp_name"]) {
                                 $reload[$field]["tmp_name"] = $full_file;
                                 $reload[$field]["name"] = $name;
                                 $reload[$field]["type"] = $type;
                                 $reload[$field]["error"] = 0;
                                 $reload[$field]["size"] = filesize($full_file);
                             }
                         }
                     }
                 }
             }
             $this->reloaded_files = $reload;
         }
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:53,代码来源:class.ilPropertyFormGUI.php

示例11: _createImportDirectory

 /**
  * creates data directory for import files
  * (data_dir/qpl_data/qpl_<id>/import, depending on data
  * directory that is set in ILIAS setup/ini)
  */
 static function _createImportDirectory()
 {
     global $ilias;
     include_once "./Services/Utilities/classes/class.ilUtil.php";
     $qpl_data_dir = ilUtil::getDataDir() . "/qpl_data";
     ilUtil::makeDir($qpl_data_dir);
     if (!is_writable($qpl_data_dir)) {
         $ilias->raiseError("Questionpool Data Directory (" . $qpl_data_dir . ") not writeable.", $ilias->error_obj->FATAL);
     }
     // create questionpool directory (data_dir/qpl_data/qpl_import)
     $qpl_dir = $qpl_data_dir . "/qpl_import";
     ilUtil::makeDir($qpl_dir);
     if (!@is_dir($qpl_dir)) {
         $ilias->raiseError("Creation of Questionpool Directory failed.", $ilias->error_obj->FATAL);
     }
     return $qpl_dir;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:22,代码来源:class.ilObjQuestionPool.php

示例12: createExportDirectory

 /**
  * creates data directory for export files
  * (data_dir/usrf_data/export, depending on data
  * directory that is set in ILIAS setup/ini)
  */
 function createExportDirectory()
 {
     if (!@is_dir($this->getExportDirectory())) {
         $usrf_data_dir = ilUtil::getDataDir() . "/usrf_data";
         ilUtil::makeDir($usrf_data_dir);
         if (!is_writable($usrf_data_dir)) {
             $this->ilias->raiseError("Userfolder data directory (" . $usrf_data_dir . ") not writeable.", $this->ilias->error_obj->MESSAGE);
         }
         // create Export subdirectory (data_dir/lm_data/lm_<id>/Export)
         $export_dir = $usrf_data_dir . "/export";
         ilUtil::makeDir($export_dir);
         if (!@is_dir($export_dir)) {
             $this->ilias->raiseError("Creation of Userfolder Export Directory failed.", $this->ilias->error_obj->MESSAGE);
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:21,代码来源:class.ilObjUserFolder.php

示例13: getImportDir

 /**
  * get user import directory name
  */
 function getImportDir()
 {
     // For each user session a different directory must be used to prevent
     // that one user session overwrites the import data that another session
     // is currently importing.
     global $ilUser;
     $importDir = ilUtil::getDataDir() . '/user_import/usr_' . $ilUser->getId() . '_' . session_id();
     ilUtil::makeDirParents($importDir);
     return $importDir;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.ilObjUserFolderGUI.php

示例14: getImportDirectory

 /**
  * get import directory of glossary
  */
 function getImportDirectory()
 {
     $export_dir = ilUtil::getDataDir() . "/glo_data" . "/glo_" . $this->getId() . "/import";
     return $export_dir;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:8,代码来源:class.ilObjGlossary.php

示例15: _getImportDir

 /**
  * get user import directory name
  */
 function _getImportDir()
 {
     return ilUtil::getDataDir() . "/cat_import";
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:7,代码来源:class.ilObjCategoryGUI.php


注:本文中的ilUtil::getDataDir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。