本文整理汇总了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();