本文整理汇总了PHP中hierarchy::get_allregisters方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::get_allregisters方法的具体用法?PHP hierarchy::get_allregisters怎么用?PHP hierarchy::get_allregisters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hierarchy
的用法示例。
在下文中一共展示了hierarchy::get_allregisters方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: distinct
//$hierarche->get_school_items();
echo $OUTPUT->box(get_string('asignregistrartabdes', 'local_collegestructure'));
if (is_siteadmin())
$sql = "SELECT * FROM {local_school}";
else
$sql = " SELECT distinct(s.id),s.* FROM {local_school} s where id in(select schoolid from {local_school_permissions} where userid={$USER->id}) ORDER BY s.sortorder ";
$schoolusers = $DB->get_records_sql($sql);
$data = array();
if ($schoolusers) {
foreach ($schoolusers as $schooluser) {
$line = array();
$reg = array();
$line[] = $schooluser->fullname;
$reg[] = $hierarche->get_allregisters($schooluser->id);
$line[] = $reg[0];
$data[] = $line;
}
} else {
$line = array();
$line[] = "No user is assigned till now";
$data[] = $line;
}
$table = new html_table();
if ($schoolusers) {
$table->head = array(
get_string('schoolname', 'local_collegestructure'), get_string('username', 'local_collegestructure'));
}
$table->size = array('40%', '40%', '20%');