當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。