本文整理汇总了PHP中hierarchy::get_alldepartments方法的典型用法代码示例。如果您正苦于以下问题:PHP hierarchy::get_alldepartments方法的具体用法?PHP hierarchy::get_alldepartments怎么用?PHP hierarchy::get_alldepartments使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hierarchy
的用法示例。
在下文中一共展示了hierarchy::get_alldepartments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_userdetails_accounts
public function get_userdetails_accounts($userid)
{
global $DB, $OUTPUT;
$hierarchy = new hierarchy();
$requests = new requests();
$help_desk_lib = new user_filtering_accounts();
$user = $DB->get_record('user', array('id' => $userid));
$local_user = $DB->get_record('local_users', array('userid' => $userid));
$local_user_data = $DB->get_record('local_userdata', array('userid' => $userid));
$fullname = $user->firstname . ' ' . $user->lastname;
$out = '<div class="userprofilebox clearfix"><div class="profilepicture">';
$out .= $OUTPUT->user_picture($user, array('size' => 50));
$out .= '</div>';
$table = new html_table();
$table->id = 'accounts_viewmore';
$table->size = array('20%', '80%');
$table->align = array('right', 'left');
$get_alldepartments = $hierarchy->get_alldepartments($user->id);
$get_allmyactivesemester = $hierarchy->get_allmyactivesemester($user->id);
$student_semesters = student_semesters($user->id);
//School with department
if ($school = $requests->school($user->id)) {
foreach ($school as $schools) {
$schoolid = $schools->id;
$schoolname = $schools->fullname;
$s1[] = $schoolname;
$programs = $requests->program($schoolid, $user->id);
foreach ($programs as $program) {
$proid = $program->id;
$p[] = $DB->get_field('local_program', 'fullname', array('id' => $proid));
if ($serviceid = $requests->service($schoolid, $proid, $user->id)) {
$s3[] = $serviceid->serviceid;
}
}
}
if ($s1) {
$s2 = implode(', ', $s1);
$myschools = "<p><b>School: </b>" . $s2 . "</p>";
}
if ($p) {
$pro = implode(' ', $p);
$myschools .= "<span style='margin-left: 6%;'><b>Program: </b>" . $pro . "</span>";
}
}
//End of school
print_object($help_desk_lib->user_enrolled_courses($userid));
$table->data = array(array(get_string('username'), $user->username), array(get_string('fullname'), $fullname), array(get_string('firstname'), $user->firstname), array(get_string('lastname'), $user->lastname), array(get_string('email'), $user->email), array(get_string('phone'), $user->phone1), array(get_string('phone2'), $user->phone2), array(get_string('dob', 'local_admission'), date('Y-m-d', $local_user->dob)), array(get_string('doj', 'local_users'), date('Y-m-d', $local_user->timecreated)), array(get_string('genderheading', 'local_admission'), $local_user->gender), array(get_string('serviceid', 'local_users'), implode(', ', $s3)), array(get_string('idnumber'), $user->idnumber), array(get_string('hschool', 'local_users'), $local_user->primaryschoolname), array(get_string('primaryyear', 'local_admission'), $local_user->primaryyear), array(get_string('score', 'local_admission'), $local_user->primaryscore), array(get_string('pcountry', 'local_admission'), $local_user->primaryplace), array(get_string('contactname', 'local_admission'), $local_user->fathername), array(get_string('hno', 'local_admission'), $local_user->currenthno), array(get_string('pob', 'local_admission'), $local_user->pob), array(get_string('city'), $local_user->region), array(get_string('state'), $local_user->state), array(get_string('icqnumber'), $user->icq), array(get_string('skypeid'), $user->skype), array(get_string('yahooid'), $user->yahoo), array(get_string('aimid'), $user->aim), array(get_string('msnid'), $user->msn), array(get_string('language'), $user->lang), array(get_string('timezone'), usertimezone($user->timezone)), array(get_string('departments', 'local_help_desk'), $hierarchy->get_alldepartments($user->id)), array(get_string('activesemister', 'local_help_desk'), $hierarchy->get_allmyactivesemester($user->id)), array(get_string('studentsemister', 'local_help_desk'), student_semesters($user->id)), array(get_string('myschools', 'local_help_desk'), $myschools));
//get_string('dob', 'local_admission') . "</b></;" . date("Y-m-d", $local_users->dob) . "
//get_string('doj', 'local_users') . "</b></td>< date("Y-m-d", $local_users->timecreated)
//get_string('genderheading', 'local_admission')nbsp; " . $local_users->gender . "</
//print_object($get_alldepartments);
//print_object($get_allmyactivesemester);
//print_object($student_semesters);
//print_object(date('D M Y', $user->dob));
$edit_url = new moodle_url('/user/edit.php', array('id' => $userid));
$out .= html_writer::tag('a', 'EDIT', array('href' => $edit_url, 'id' => 'EDIT'));
$out .= html_writer::table($table);
return $out;
}