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


PHP Modules::getStatus方法代码示例

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


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

示例1: setRangeObject

 /**
  * Sets the range object and checks whether the calendar is available.
  *
  * @param string $range_id The id of a course, institute or user.
  * @throws AccessDeniedException
  */
 private function setRangeObject($range_id)
 {
     $this->range_object = get_object_by_range_id($range_id);
     if (!is_object($this->range_object)) {
         throw new AccessDeniedException();
     }
     $range_map = array('User' => Calendar::RANGE_USER, 'Course' => Calendar::RANGE_SEM, 'Institute' => Calendar::RANGE_INST);
     $this->range = $range_map[get_class($this->range_object)];
     if ($this->range == Calendar::RANGE_INST || $this->range == Calendar::RANGE_SEM) {
         $modules = new Modules();
         if (!$modules->getStatus('calendar', $this->range_object->getId())) {
             throw new AccessDeniedException();
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:21,代码来源:SingleCalendar.php

示例2: StudipDocumentTree

    /**
    * constructor
    *
    * do not use directly, call TreeAbstract::GetInstance("StudipDocumentTree")
    * @access private
    */ 
    function StudipDocumentTree($args)
    {
        DbView::addView('core');

        $this->range_id = $args['range_id'];
        $this->entity_type = $args['entity_type'] ?: get_object_type($this->range_id);
        if ($args['get_root_name']) {
            list($name,) = array_values(get_object_name($this->range_id, $this->entity_type));
        }
        $this->root_name = $name;
        $this->must_have_perm = $this->entity_type == 'sem' ? 'tutor' : 'autor';
        $modules = new Modules();
        $this->permissions_activated = $modules->getStatus('documents_folder_permissions', $this->range_id, $this->entity_type);
        parent::TreeAbstract(); //calling the baseclass constructor 
        $this->tree_data['root']['permission'] = $this->default_perm;
    }
开发者ID:ratbird,项目名称:hope,代码行数:22,代码来源:StudipDocumentTree.class.php

示例3: createCourse

 /**
  * Wizard finished: we can create the course now. First store an empty,
  * invisible course for getting an ID. Then, iterate through steps and
  * set values from each step.
  * @return Course
  * @throws Exception
  */
 private function createCourse()
 {
     // Create a new (empty) course so that we get an ID.
     $course = new Course();
     $course->visible = 0;
     $course->store();
     // Each (required) step stores its own values at the course object.
     for ($i = 0; $i < sizeof($this->steps); $i++) {
         $step = $this->getStep($i);
         if ($step->isRequired($this->getValues())) {
             if ($stored = $step->storeValues($course, $this->getValues())) {
                 $course = $stored;
             } else {
                 $course = false;
                 break;
                 //throw new Exception(_('Die Daten aus Schritt ' . $i . ' konnten nicht gespeichert werden, breche ab.'));
             }
         }
     }
     // Check if "documents" module is activated and create "General" folder.
     $m = new Modules();
     if ($m->getStatus('documents', $course->id)) {
         $f = new DocumentFolder();
         $f->name = _('Allgemeiner Dateiordner');
         $f->description = _('Ablage für allgemeine Ordner und Dokumente der Veranstaltung');
         $f->range_id = $course->id;
         $f->seminar_id = $course->id;
         $f->user_id = $GLOBALS['user']->id;
         $f->permission = 7;
         $f->store();
     }
     // Cleanup session data.
     unset($_SESSION['coursewizard'][$this->temp_id]);
     return $course;
 }
开发者ID:ratbird,项目名称:hope,代码行数:42,代码来源:wizard.php

示例4: Modules

if ($msg) {
    echo "<tr><td class='blank' colspan=3>&nbsp;";
    parse_msg($msg);
    echo "</td></tr>";
}
if ($question) {
    echo $question;
}

    //Ordner die fehlen, anlegen: Allgemeiner, wenn nicht da, Ordner zu Terminen, die keinen Ordner haben
    if ($rechte){
        if ($folder_system_data['mode']){
            $module_check = new Modules();
            $my_sem = $my_inst = array();
            foreach(search_range('%') as $key => $value){
                if ($module_check->getStatus('documents', $key, $value['type']) && $key != $SessSemName[1]){
                    if ($value['type'] == 'sem'){
                        $my_sem[$key] = $value['name'];
                    } else {
                        $my_inst[$key] = $value['name'];
                    }
                }
            }
            asort($my_sem, SORT_STRING);
            asort($my_inst, SORT_STRING);
            $button_name = $folder_system_data["mode"] == 'move' ? _('verschieben') : _('kopieren');
            echo '<form action="'.URLHelper::getLink('').'" method="post">';
            echo CSRFProtection::tokenTag();
            echo "\n" . '<tr><td class="blank" colspan="3" width="100%" style="font-size:80%;">';
            echo "\n" . '<div style="margin-left:25px;">';
            echo "\n<b>" . ($folder_system_data["mode"] == 'move' ? _("Verschiebemodus") : _("Kopiermodus")) . "</b><br>";
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:folder.php


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