本文整理匯總了PHP中hierarchy::get_school_programs方法的典型用法代碼示例。如果您正苦於以下問題:PHP hierarchy::get_school_programs方法的具體用法?PHP hierarchy::get_school_programs怎麽用?PHP hierarchy::get_school_programs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hierarchy
的用法示例。
在下文中一共展示了hierarchy::get_school_programs方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
//$a = $bform->definition();
////echo implode(',',$bform->definition());
////echo $a/*[0]*/ = $bform->definition();
////$bform->display();
// print_object($a);
}else{
//displays selection form when coming from manage batches block
//$id = $classid;
//$sform = new local_clclasses_selection_form();
//$sform->display();
$classinfo = $DB->get_record('local_clclasses',array('id'=>$id));
if($classinfo){
//------------------program single_select-----------------------------------
echo '<div class="selfilterposition" style="text-align:center;margin:20px;">';
$programs_list = $hierarchy->get_school_programs($classinfo->schoolid);
$select = new single_select(new moodle_url('/local/clclasses/classenrol.php',array('id'=>$id)), 'programid', $programs_list, $programid, null);
$select->set_label(get_string('program', 'local_programs'));
echo $OUTPUT->render($select);
echo '</div>';
//------------------batch single_select-----------------------------------
echo '<div class="selfilterposition" style="text-align:center;margin:20px;">';
$batch_list = $batch->get_batches_list($classinfo->schoolid, $programid);
$select = new single_select(new moodle_url('/local/clclasses/classenrol.php',array('id'=>$id,'programid'=>$programid)), 'batchid', $batch_list, $batchid, null);
$select->set_label(get_string('batch', 'local_batches'));
echo $OUTPUT->render($select);
echo '</div>';