当前位置: 首页>>代码示例>>PHP>>正文


PHP include_course_ajax函数代码示例

本文整理汇总了PHP中include_course_ajax函数的典型用法代码示例。如果您正苦于以下问题:PHP include_course_ajax函数的具体用法?PHP include_course_ajax怎么用?PHP include_course_ajax使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了include_course_ajax函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_string

                $streditsummary = get_string('editsummary');
                echo "<a title=\"$streditsummary\" ".
                     " href=\"course/editsection.php?id=$section->id\"><img src=\"" . $OUTPUT->pix_url('t/edit') . "\" ".
                     " class=\"iconsmall\" alt=\"$streditsummary\" /></a><br /><br />";
            }

            print_section($SITE, $section, $mods, $modnamesused, true);

            if ($editing) {
                print_section_add_menus($SITE, $section->section, $modnames);
            }
            echo $OUTPUT->box_end();
        }
    }
    // Include course AJAX
    if (include_course_ajax($SITE, $modnamesused)) {
        // Add the module chooser
        $renderer = $PAGE->get_renderer('core', 'course');
        echo $renderer->course_modchooser(get_module_metadata($SITE, $modnames), $SITE);
    }

    if (isloggedin() and !isguestuser() and isset($CFG->frontpageloggedin)) {
        $frontpagelayout = $CFG->frontpageloggedin;
    } else {
        $frontpagelayout = $CFG->frontpage;
    }

    foreach (explode(',',$frontpagelayout) as $v) {
        switch ($v) {     /// Display the main part of the front page.
            case FRONTPAGENEWS:
                if ($SITE->newsitems) { // Print forums only when needed
开发者ID:ncsu-delta,项目名称:moodle,代码行数:31,代码来源:index.php

示例2: stdClass

if (!($sections = $modinfo->get_section_info_all())) {
    // No sections found
    $section = new stdClass();
    $section->course = $course->id;
    // Create a default section.
    $section->section = 0;
    $section->visible = 1;
    $section->summaryformat = FORMAT_HTML;
    $section->id = $DB->insert_record('course_sections', $section);
    rebuild_course_cache($course->id);
    $modinfo = get_fast_modinfo($COURSE);
    if (!($sections = $modinfo->get_section_info_all())) {
        // Try again
        print_error('cannotcreateorfindstructs', 'error');
    }
}
// CAUTION, hacky fundamental variable defintion to follow!
// Note that because of the way course fromats are constructed though
// inclusion we pass parameters around this way..
$displaysection = $section;
// Include the actual course format.
require $CFG->dirroot . '/course/format/' . $course->format . '/format.php';
// Content wrapper end.
echo html_writer::end_tag('div');
// Include course AJAX
if (include_course_ajax($course, $modnamesused)) {
    // Add the module chooser
    $renderer = $PAGE->get_renderer('core', 'course');
    echo $renderer->course_modchooser(get_module_metadata($course, $modnames), $course);
}
echo $OUTPUT->footer();
开发者ID:nicusX,项目名称:moodle,代码行数:31,代码来源:view.php

示例3: array

if ($completion->is_enabled()) {
    // This value tracks whether there has been a dynamic change to the page.
    // It is used so that if a user does this - (a) set some tickmarks, (b)
    // go to another page, (c) clicks Back button - the page will
    // automatically reload. Otherwise it would start with the wrong tick
    // values.
    echo html_writer::start_tag('form', array('action' => '.', 'method' => 'get'));
    echo html_writer::start_tag('div');
    echo html_writer::empty_tag('input', array('type' => 'hidden', 'id' => 'completion_dynamic_change', 'name' => 'completion_dynamic_change', 'value' => '0'));
    echo html_writer::end_tag('div');
    echo html_writer::end_tag('form');
}
// Course wrapper start.
echo html_writer::start_tag('div', array('class' => 'course-content'));
$modinfo = get_fast_modinfo($COURSE);
if (!($sections = $subpage->get_sections())) {
    // No sections found
    // Double-check to be extra sure.
    $subpage->add_section();
    if (!($sections = $subpage->get_sections())) {
        // Try again.
        print_error('cannotcreateorfindstructs', 'error');
    }
}
$renderer = $PAGE->get_renderer('mod_subpage');
echo $renderer->render_subpage($subpage, $modinfo, $sections, $PAGE->user_is_editing(), $move, has_capability('moodle/course:movesections', $modcontext), has_capability('moodle/course:sectionvisibility', $modcontext));
// Content wrapper end.
echo html_writer::end_tag('div');
$modnamesused = $modinfo->get_used_module_names();
include_course_ajax($COURSE, $modnamesused);
echo $OUTPUT->footer();
开发者ID:ninelanterns,项目名称:moodle-mod_subpage,代码行数:31,代码来源:view.php


注:本文中的include_course_ajax函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。