本文整理匯總了PHP中hierarchy::get_upcoming_school_semesters方法的典型用法代碼示例。如果您正苦於以下問題:PHP hierarchy::get_upcoming_school_semesters方法的具體用法?PHP hierarchy::get_upcoming_school_semesters怎麽用?PHP hierarchy::get_upcoming_school_semesters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hierarchy
的用法示例。
在下文中一共展示了hierarchy::get_upcoming_school_semesters方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: hierarchy
function definition_after_data() {
global $DB;
$mform = $this->_form;
$hierarchy = new hierarchy();
//$eid = $this->_customdata['temp'];
// if ($eid->id < 0) {
$school = $mform->getElementValue('schoolid');
$tools = array();
if ($school[0] > 0 || $school>0) {
$fid = $school[0];
if(isset($school[0]))
$schoolid=$school[0];
else
$schoolid = $school;
$hierarchy = new hierarchy();
$upcomingsemester = $hierarchy->get_upcoming_school_semesters($schoolid);
// print_object($upcomingsemester);
$activesemester = $hierarchy->get_allmyactivesemester(null, $schoolid);
// print_object($activesemester);
$active_upcomingsemester = $upcomingsemester + $activesemester;
$newel = $mform->createElement('select', 'semesterid', get_string('selectsemester_timetable', 'local_timetable'), $active_upcomingsemester);
$mform->insertElementBefore($newel, 'addsemesterlisthere');
$mform->addRule('semesterid', get_string('selectsemester_timetable', 'local_timetable'), 'required', null, 'client');
// $formatvalue2 [0];
}
// }
}