本文整理汇总了PHP中forum_print_mode_form函数的典型用法代码示例。如果您正苦于以下问题:PHP forum_print_mode_form函数的具体用法?PHP forum_print_mode_form怎么用?PHP forum_print_mode_form使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了forum_print_mode_form函数的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: portfolio_add_button
$button = new portfolio_add_button();
$button->set_callback_options('forum_portfolio_caller', array('discussionid' => $discussion->id), 'mod_forum');
$button = $button->to_html(PORTFOLIO_ADD_FULL_FORM, get_string('exportdiscussion', 'mod_forum'));
$buttonextraclass = '';
if (empty($button)) {
// no portfolio plugin available.
$button = ' ';
$buttonextraclass = ' noavailable';
}
echo html_writer::tag('div', $button, array('class' => 'discussioncontrol exporttoportfolio' . $buttonextraclass));
} else {
echo html_writer::tag('div', ' ', array('class' => 'discussioncontrol nullcontrol'));
}
// groups selector not needed here
echo '<div class="discussioncontrol displaymode">';
forum_print_mode_form($discussion->id, $displaymode);
echo "</div>";
if ($forum->type != 'single' && has_capability('mod/forum:movediscussions', $modcontext)) {
echo '<div class="discussioncontrol movediscussion">';
// Popup menu to move discussions to other forums. The discussion in a
// single discussion forum can't be moved.
$modinfo = get_fast_modinfo($course);
if (isset($modinfo->instances['forum'])) {
$forummenu = array();
// Check forum types and eliminate simple discussions.
$forumcheck = $DB->get_records('forum', array('course' => $course->id), '', 'id, type');
foreach ($modinfo->instances['forum'] as $forumcm) {
if (!$forumcm->uservisible || !has_capability('mod/forum:startdiscussion', context_module::instance($forumcm->id))) {
continue;
}
$section = $forumcm->sectionnum;