本文整理汇总了PHP中coursecat::can_move_courses_out_of方法的典型用法代码示例。如果您正苦于以下问题:PHP coursecat::can_move_courses_out_of方法的具体用法?PHP coursecat::can_move_courses_out_of怎么用?PHP coursecat::can_move_courses_out_of使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类coursecat
的用法示例。
在下文中一共展示了coursecat::can_move_courses_out_of方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: course_bulk_actions
/**
* Renderers bulk actions that can be performed on courses.
*
* @param coursecat $category The currently selected category and the category in which courses that
* are selectable belong.
* @return string
*/
public function course_bulk_actions(coursecat $category)
{
$html = html_writer::start_div('course-bulk-actions bulk-actions');
if ($category->can_move_courses_out_of()) {
$options = coursecat::make_categories_list('moodle/category:manage');
$select = html_writer::select($options, 'movecoursesto', '', array('' => 'choosedots'), array('aria-labelledby' => 'moveselectedcoursesto'));
$submit = array('type' => 'submit', 'name' => 'bulkmovecourses', 'value' => get_string('move'));
$html .= $this->detail_pair(html_writer::span(get_string('moveselectedcoursesto'), '', array('id' => 'moveselectedcoursesto')), $select . html_writer::empty_tag('input', $submit));
}
$html .= html_writer::end_div();
return $html;
}