當前位置: 首頁>>代碼示例>>PHP>>正文


PHP hierarchy::get_schools方法代碼示例

本文整理匯總了PHP中hierarchy::get_schools方法的典型用法代碼示例。如果您正苦於以下問題:PHP hierarchy::get_schools方法的具體用法?PHP hierarchy::get_schools怎麽用?PHP hierarchy::get_schools使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在hierarchy的用法示例。


在下文中一共展示了hierarchy::get_schools方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: hierarchy

if ($CFG->forcelogin) {
    require_login();
} else {
    user_accesstime_log();
}
if (!has_capability('local/help_desk:manage', $systemcontext)) {
    print_error('You dont have permissions');
}
$string = get_string('pluginname', 'local_help_desk');
$PAGE->set_url('/local/help_desk/index.php');
$PAGE->set_title($string);
$PAGE->navbar->add(get_string('pluginname', 'local_help_desk'));
$output = $PAGE->get_renderer('local_help_desk');
$hierarchy = new hierarchy();
$help_desk = new help_desk();
//Header and the navigation bar
$PAGE->set_heading($SITE->fullname);
$tab = 'report';
echo $OUTPUT->header();
$help_desk->createtabview($tab);
$schools_list = $hierarchy->get_schools();
$sem_list = $school > 0 ? $help_desk->school_semesters($school) : array('0' => 'Select');
$school_url = new moodle_url('/local/help_desk/report.php');
$select_school = new single_select($school_url, 'school', $schools_list, $school);
$select_school->set_label(get_string('school', 'local_help_desk'), array('class' => 'form-item form-label'));
$term_url = new moodle_url('/local/help_desk/report.php', array('school' => $school));
$select_term = new single_select($term_url, 'term', $sem_list, $term);
$select_term->set_label(get_string('term', 'local_help_desk'), array('class' => 'form-item form-label'));
echo "<div class='form-item clearfix' >" . $OUTPUT->render($select_school) . "</div>";
echo "<div class='form-item clearfix' >" . $OUTPUT->render($select_term) . "</div>";
echo $OUTPUT->footer();
開發者ID:harshasunny,項目名稱:alltasks,代碼行數:31,代碼來源:report.php


注:本文中的hierarchy::get_schools方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。