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


PHP hierarchy::get_manager方法代码示例

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


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

示例1: check_loginuser_registrar_admin

 /**
  * @method  check_loginuser_registrar_admin
  * @todo to display school list based logged in user (registrar, admin)     * 
  * @param boolean $schoolids_in_formofstring (used to get schoolids in the form of string)    
  * @return based on condition it returns array of objects or string type of data
  */
 public function check_loginuser_registrar_admin($schoolids_in_formofstring = false) {
     global $DB, $USER, $CFG;
     $hier1 = new hierarchy();
     //  checking of login user is admin..
     if (is_siteadmin($USER->id)) {
         $schoolid = $DB->get_records('local_school', array('visible' => 1));
        
     } else {
         //------------if registrar not assigned to any school it throws exception    
         $users = $hier1->get_manager();
         $schoolid = $hier1->get_assignedschools();
         
     } // end of else
     if (empty($schoolid)) {
         throw new schoolnotfound_exception();
     }
     if ($schoolids_in_formofstring) {
         foreach ($schoolid as $sid) {
             $temp[] = $sid->id;
         }
         $school_id = implode(',', $temp);
         return $school_id;
     } else
         return $schoolid;
 }
开发者ID:anilch,项目名称:Personel,代码行数:31,代码来源:lib.php

示例2: array

    $table->head = array(
        get_string('schoolname', 'local_collegestructure'), get_string('username', 'local_collegestructure'));
}

$table->size = array('40%', '40%', '20%');
$table->align = array('left', 'left', 'left', 'center');
$table->width = '99%';
$table->data = $data;
echo html_writer::table($table);

echo '<br/><br/>';
echo $OUTPUT->box(get_string('assignregistrartxt', 'local_collegestructure'));


$hierarchy = new hierarchy();
$users = $hierarchy->get_manager();
$PAGE->requires->js('/local/collegestructure/js/school.js');
if (!$users) {
    echo $OUTPUT->heading(get_string("nousersyet", 'local_collegestructure'));
} else {
    echo '<form id="movemodules" action="assignusers.php" method="post"><div>';
    echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
    echo '<table border="0" cellspacing="2" width="50%" cellpadding="4" class="generalbox boxaligncenter"><tr>';
    echo '<th class="header" align="left">' . get_string('username', 'local_collegestructure') . '</th>';
    echo '<th class="header" scope="col" align="center">' . get_string('select') . '</th>';
    echo '</tr>';

    $count = 0;
    $abletomoveusers = false;
    /* ---for now--- */
开发者ID:anilch,项目名称:Personel,代码行数:30,代码来源:assignusers.php


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