当前位置: 首页>>代码示例>>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;未经允许,请勿转载。