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


PHP navmenu函数代码示例

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


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

示例1: show_header

 function show_header()
 {
     global $CFG, $USER;
     $swwwroot = htmlspecialchars($CFG->wwwroot);
     $navtail = get_string('summary_title', ANNOTATION_STRINGS);
     $navmiddle = "";
     require_js(ANNOTATION_PATH . '/marginalia/3rd-party.js');
     require_js(ANNOTATION_PATH . '/marginalia/log.js');
     require_js(ANNOTATION_PATH . '/marginalia-config.js');
     require_js(ANNOTATION_PATH . '/marginalia/domutil.js');
     require_js(ANNOTATION_PATH . '/marginalia/prefs.js');
     require_js(ANNOTATION_PATH . '/marginalia/rest-prefs.js');
     require_js(ANNOTATION_PATH . '/marginalia/annotation.js');
     require_js(ANNOTATION_PATH . '/marginalia/rest-annotate.js');
     require_js(ANNOTATION_PATH . '/smartquote.js');
     require_js(ANNOTATION_PATH . '/summary.js');
     $meta = "<link rel='stylesheet' type='text/css' href='" . s(ANNOTATION_PATH) . "/summary-styles.php'/>\n";
     if (null != $this->course && $this->course->category) {
         print_header($this->course->shortname . ': ' . get_string('summary_title', ANNOTATION_STRINGS), $this->course->fullname, '<a href=' . $CFG->wwwroot . '/course/view.php?id=' . $this->course->id . '>' . $this->course->shortname . '</a> -> ' . $navtail, "", $meta, true, "", navmenu($this->course));
     } elseif (null != $this->course) {
         print_header($this->course->shortname . ': ' . get_string('summary_title', ANNOTATION_STRINGS), $this->course->fullname, $navtail, "", $meta, true, "", navmenu($this->course));
     } else {
         print_header(get_string('summary_title', ANNOTATION_STRINGS), null, "{$navtail}", "", $meta, true, "", null);
     }
     //		echo $tagsHtml;
     if (isloggedin()) {
         $sannotationpath = s(ANNOTATION_PATH);
         echo "<script language='JavaScript' type='text/javascript'>\n" . "var annotationService = new RestAnnotationService('{$sannotationpath}/annotate.php', { csrfCookie: 'MoodleSessionTest' } );\n" . "window.annotationSummary = new AnnotationSummary(annotationService" . ", '{$swwwroot}'" . ", '" . s($USER->username) . "');\n" . "window.preferences = new Preferences( new RestPreferenceService('{$sannotationpath}/user-preference.php' ) );\n" . "</script>\n";
     }
 }
开发者ID:njorth,项目名称:marginalia,代码行数:30,代码来源:summary.php

示例2: print_header

 function print_header($title, $morenavlinks = NULL, $bodytags = '', $meta = '', $extrabuttons = '')
 {
     global $USER, $CFG;
     $this->init_full();
     $replacements = array('%fullname%' => format_string($this->activityrecord->name));
     foreach ($replacements as $search => $replace) {
         $title = str_replace($search, $replace, $title);
     }
     if (empty($morenavlinks) && $this->user_allowed_editing()) {
         // mmmm, tables
         $buttons = '<table><tr>';
         $buttons .= '<td>' . $extrabuttons . '</td>';
         $buttons .= '<td>' . update_module_button(optional_param('clone', $this->modulerecord->id, PARAM_INT), $this->courserecord->id, get_string('modulename', $this->activityname)) . '</td>';
         if (!empty($CFG->showblocksonmodpages)) {
             $clonething = optional_param('clone', 0, PARAM_INT);
             $clonething = $clonething ? '<input type="hidden" name="clone" value="' . $clonething . '" />' : '';
             $buttons .= '<td><form ' . $CFG->frametarget . ' method="get" action="view.php"><div>' . '<input type="hidden" name="id" value="' . $this->modulerecord->id . '" />' . $clonething . '<input type="hidden" name="edit" value="' . ($this->user_is_editing() ? 'off' : 'on') . '" />' . '<input type="submit" value="' . get_string($this->user_is_editing() ? 'blockseditoff' : 'blocksediton') . '" /></div></form></td>';
         }
         $buttons .= '</tr></table>';
     } else {
         $buttons = $extrabuttons ? $extrabuttons : '&nbsp;';
     }
     if (empty($morenavlinks)) {
         $morenavlinks = array();
     }
     $navigation = build_navigation($morenavlinks, $this->modulerecord);
     print_header($title, $this->courserecord->fullname, $navigation, '', $meta, true, $buttons, navmenu($this->courserecord, $this->modulerecord), false, $bodytags);
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:28,代码来源:pagelib.php

示例3: resource_base

 /**
  * Constructor for the base resource class
  *
  * Constructor for the base resource class.
  * If cmid is set create the cm, course, resource objects.
  * and do some checks to make sure people can be here, and so on.
  *
  * @param cmid   integer, the current course module id - not set for new resources
  */
 function resource_base($cmid = 0)
 {
     global $CFG, $COURSE;
     $this->navlinks = array();
     if ($cmid) {
         if (!($this->cm = get_coursemodule_from_id('resource', $cmid))) {
             error("Course Module ID was incorrect");
         }
         if (!($this->course = get_record("course", "id", $this->cm->course))) {
             error("Course is misconfigured");
         }
         if (!($this->resource = get_record("resource", "id", $this->cm->instance))) {
             error("Resource ID was incorrect");
         }
         $this->strresource = get_string("modulename", "resource");
         $this->strresources = get_string("modulenameplural", "resource");
         if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $this->cm->id))) {
             $pagetitle = strip_tags($this->course->shortname . ': ' . $this->strresource);
             $navigation = build_navigation($this->navlinks, $this->cm);
             print_header($pagetitle, $this->course->fullname, $navigation, "", "", true, '', navmenu($this->course, $this->cm));
             notice(get_string("activityiscurrentlyhidden"), "{$CFG->wwwroot}/course/view.php?id={$this->course->id}");
         }
     } else {
         $this->course = $COURSE;
     }
 }
开发者ID:edwinphillips,项目名称:moodle-485cb39,代码行数:35,代码来源:lib.php

示例4: url_print_header

/**
 * Print url header.
 * @param object $url
 * @param object $cm
 * @param object $course
 * @return void
 */
function url_print_header($url, $cm, $course)
{
    global $PAGE, $OUTPUT;
    $PAGE->set_title($course->shortname . ': ' . $url->name);
    $PAGE->set_heading($course->fullname);
    $PAGE->set_activity_record($url);
    $PAGE->set_button(update_module_button($cm->id, '', get_string('modulename', 'url')));
    echo $OUTPUT->header(build_navigation('', $cm), navmenu($course, $cm));
}
开发者ID:ajv,项目名称:Offline-Caching,代码行数:16,代码来源:locallib.php

示例5: display

 function display()
 {
     global $CFG;
     $formatoptions = new object();
     $formatoptions->noclean = true;
     /// Are we displaying the course blocks?
     if ($this->resource->options == 'showblocks') {
         parent::display_course_blocks_start();
         $entry = get_record('kaltura_entries', 'context', "R_" . "{$this->resource}->id");
         if (trim(strip_tags($this->resource->alltext))) {
             echo $entry->title;
             $context = get_context_instance(CONTEXT_COURSE, $this->course->id);
             $formatoptions = new object();
             $formatoptions->noclean = true;
             print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $this->course->id), "center");
             if (has_capability('moodle/course:manageactivities', $context)) {
                 echo embed_kaltura($resource->alltext, get_width($entry), get_height($entry), $entry->entry_type, $entry->design, true);
             } else {
                 echo embed_kaltura($resource->alltext, get_width($entry), get_height($entry), KalturaEntryType::MEDIA_CLIP, $entry->design, true);
             }
         }
         parent::display_course_blocks_end();
     } else {
         /// Set up generic stuff first, including checking for access
         parent::display();
         /// Set up some shorthand variables
         $cm = $this->cm;
         $course = $this->course;
         $resource = $this->resource;
         $entry = get_record('kaltura_entries', 'context', "R_" . "{$resource->id}");
         $pagetitle = strip_tags($course->shortname . ': ' . format_string($resource->name));
         $inpopup = optional_param('inpopup', '', PARAM_BOOL);
         add_to_log($course->id, "resource", "view", "view.php?id={$cm->id}", $resource->id, $cm->id);
         $navigation = build_navigation($this->navlinks, $cm);
         print_header($pagetitle, $course->fullname, $navigation, "", "", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));
         if (trim(strip_tags($this->resource->alltext))) {
             echo $entry->title;
             $context = get_context_instance(CONTEXT_COURSE, $this->course->id);
             $formatoptions = new object();
             $formatoptions->noclean = true;
             print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $this->course->id), "center");
             if (has_capability('moodle/course:manageactivities', $context)) {
                 echo embed_kaltura($resource->alltext, get_width($entry), get_height($entry), $entry->entry_type, $entry->design, true);
             } else {
                 echo embed_kaltura($resource->alltext, get_width($entry), get_height($entry), KalturaEntryType::MEDIA_CLIP, $entry->design, true);
             }
         }
         /*       print_simple_box(format_text($resource->alltext, $resource->reference, $formatoptions, $course->id),
                         "center", "", "", "20");
         */
         $strlastmodified = get_string("lastmodified");
         echo "<div class=\"modified\">{$strlastmodified}: " . userdate($resource->timemodified) . "</div>";
         print_footer($course);
     }
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:55,代码来源:resource.class.php

示例6: print_grade_page_head_local

/**
 * Prints the page headers, breadcrumb trail, page heading, (optional) dropdown navigation menu and
 * (optional) navigation tabs for any gradebook page. All gradebook pages MUST use these functions
 * in favour of the usual print_header(), print_header_simple(), print_heading() etc.
 * !IMPORTANT! Use of tabs.php file in gradebook pages is forbidden unless tabs are switched off at
 * the site level for the gradebook ($CFG->grade_navmethod = GRADE_NAVMETHOD_DROPDOWN).
 *
 * @param int $courseid
 * @param string $active_type The type of the current page (report, settings, import, export, scales, outcomes, letters)
 * @param string $active_plugin The plugin of the current page (grader, fullview etc...)
 * @param string $heading The heading of the page. Tries to guess if none is given
 * @param boolean $return Whether to return (true) or echo (false) the HTML generated by this function
 * @param string $bodytags Additional attributes that will be added to the <body> tag
 * @param string $buttons Additional buttons to display on the page
 *
 * @return string HTML code or nothing if $return == false
 */
function print_grade_page_head_local($courseid, $active_type, $active_plugin = null, $heading = false, $return = false, $bodytags = '', $buttons = false, $extracss = array())
{
    global $CFG, $COURSE;
    $strgrades = get_string('grades');
    $plugin_info = grade_get_plugin_info($courseid, $active_type, $active_plugin);
    // Determine the string of the active plugin
    $stractive_plugin = $active_plugin ? $plugin_info['strings']['active_plugin_str'] : $heading;
    $stractive_type = $plugin_info['strings'][$active_type];
    $navlinks = array();
    $first_link = '';
    if ($active_type == 'settings' && $active_plugin != 'coursesettings') {
        $first_link = $plugin_info['report'][$active_plugin]['link'];
    } elseif ($active_type != 'report') {
        $first_link = $CFG->wwwroot . '/grade/index.php?id=' . $COURSE->id;
    }
    if ($active_type == 'preferences') {
        $CFG->stylesheets[] = $CFG->wwwroot . '/grade/report/styles.css';
    }
    foreach ($extracss as $css_url) {
        $CFG->stylesheets[] = $css_url;
    }
    $navlinks[] = array('name' => $strgrades, 'link' => $first_link, 'type' => 'misc');
    $active_type_link = '';
    if (!empty($plugin_info[$active_type]['link']) && $plugin_info[$active_type]['link'] != qualified_me()) {
        $active_type_link = $plugin_info[$active_type]['link'];
    }
    if (!empty($plugin_info[$active_type]['parent']['link'])) {
        $active_type_link = $plugin_info[$active_type]['parent']['link'];
        $navlinks[] = array('name' => $stractive_type, 'link' => $active_type_link, 'type' => 'misc');
    }
    if (empty($plugin_info[$active_type]['id'])) {
        $navlinks[] = array('name' => $stractive_type, 'link' => $active_type_link, 'type' => 'misc');
    }
    $navlinks[] = array('name' => $stractive_plugin, 'link' => null, 'type' => 'misc');
    $navigation = build_navigation($navlinks);
    $title = ': ' . $stractive_plugin;
    if (empty($plugin_info[$active_type]['id']) || !empty($plugin_info[$active_type]['parent'])) {
        $title = ': ' . $stractive_type . ': ' . $stractive_plugin;
    }
    $returnval = print_header_simple($strgrades . ': ' . $stractive_type, $title, $navigation, '', $bodytags, true, $buttons, navmenu($COURSE), false, '', $return);
    // Guess heading if not given explicitly
    if (!$heading) {
        $heading = $stractive_plugin;
    }
    if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_DROPDOWN) {
        $returnval .= print_grade_plugin_selector($plugin_info, $return);
    }
    $returnval .= print_heading($heading);
    if ($CFG->grade_navmethod == GRADE_NAVMETHOD_COMBO || $CFG->grade_navmethod == GRADE_NAVMETHOD_TABS) {
        $returnval .= grade_print_tabs($active_type, $active_plugin, $plugin_info, $return);
    }
    if ($return) {
        return $returnval;
    }
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:72,代码来源:locallib.php

示例7: webquestscorm

 /**
  * Constructor for the webquestscorm class
  *
  * Constructor for the base assignment class.
  * If cmid is set create the cm, course, assignment objects.
  * If the assignment is hidden and the user is not a teacher then
  * this prints a page header and notice.
  *
  * @param cmid   integer, the current course module id - not set for new assignments
  * @param assignment   object, usually null, but if we have it we pass it to save db access
  * @param cm   object, usually null, but if we have it we pass it to save db access
  * @param course   object, usually null, but if we have it we pass it to save db access
  */
 function webquestscorm($cmid = 0, $webquestscorm = NULL, $cm = NULL, $course = NULL)
 {
     global $CFG;
     if ($cmid) {
         if ($cm) {
             $this->cm = $cm;
         } else {
             if (!($this->cm = get_coursemodule_from_id('webquestscorm', $cmid))) {
                 error('Course Module ID was incorrect');
             }
         }
         $this->context = get_context_instance(CONTEXT_MODULE, $this->cm->id);
         if ($course) {
             $this->course = $course;
         } else {
             if (!($this->course = get_record('course', 'id', $this->cm->course))) {
                 error('Course is misconfigured');
             }
         }
         if ($webquestscorm) {
             $this->webquestscorm = $webquestscorm;
         } else {
             if (!($this->webquestscorm = get_record('webquestscorm', 'id', $this->cm->instance))) {
                 error('webquestscorm ID was incorrect');
             }
         }
         $this->strwebquestscorm = get_string('modulename', 'webquestscorm');
         $this->strwebquestscorms = get_string('modulenameplural', 'webquestscorm');
         $this->strsubmissions = get_string('submissions', 'webquestscorm');
         $this->strlastmodified = get_string('lastmodified');
         if ($this->course->category) {
             $this->navigation = "<a target=\"{$CFG->framename}\" href=\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\">{$this->course->shortname}</a> -> " . "<a target=\"{$CFG->framename}\" href=\"index.php?id={$this->course->id}\">{$this->strwebquestscorms}</a> ->";
         } else {
             $this->navigation = "<a target=\"{$CFG->framename}\" href=\"index.php?id={$this->course->id}\">{$this->strwebquestscorms}</a> ->";
         }
         $this->pagetitle = strip_tags($this->course->shortname . ': ' . $this->strwebquestscorm . ': ' . format_string($this->webquestscorm->name, true));
         // visibility
         $this->context = get_context_instance(CONTEXT_MODULE, $this->cm->id);
         if (!$this->cm->visible and !has_capability('moodle/course:viewhiddenactivities', $this->context)) {
             $this->pagetitle = strip_tags($this->course->shortname . ': ' . $this->strwebquestscorm);
             print_header($this->pagetitle, $this->course->fullname, "{$this->navigation} {$this->strwebquestscorm}", "", "", true, '', navmenu($this->course, $this->cm));
             notice(get_string("activityiscurrentlyhidden"), "{$CFG->wwwroot}/course/view.php?id={$this->course->id}");
         }
         $this->currentgroup = get_current_group($this->course->id);
         $this->path = $CFG->dataroot . '/' . $this->cm->course . '/moddata/webquestscorm' . '/' . $this->cm->id;
     }
     if ($this->usehtmleditor = can_use_html_editor()) {
         $this->defaultformat = FORMAT_HTML;
     } else {
         $this->defaultformat = FORMAT_MOODLE;
     }
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:65,代码来源:webquestscorm.class.php

示例8: print_header_and_tabs

 function print_header_and_tabs($cm, $course, $quiz, $reportmode = "overview", $meta = "")
 {
     global $CFG;
     /// Define some strings
     $strquizzes = get_string("modulenameplural", "quiz");
     $strquiz = get_string("modulename", "quiz");
     /// Print the page header
     print_header_simple(format_string($quiz->name), "", "<a href=\"index.php?id={$course->id}\">{$strquizzes}</a>\n                      -> " . format_string($quiz->name), '', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
     /// Print the tabs
     $currenttab = 'reports';
     $mode = $reportmode;
     require $CFG->dirroot . '/mod/quiz/tabs.php';
 }
开发者ID:veritech,项目名称:pare-project,代码行数:13,代码来源:default.php

示例9: print_header_and_tabs

 function print_header_and_tabs($cm, $course, $quiz, $reportmode = "overview", $meta = "")
 {
     global $CFG;
     /// Define some strings
     $strquizzes = get_string("modulenameplural", "quiz");
     $strquiz = get_string("modulename", "quiz");
     /// Print the page header
     $navlinks = array();
     $navlinks[] = array('name' => $strquizzes, 'link' => "index.php?id={$course->id}", 'type' => 'activity');
     $navlinks[] = array('name' => format_string($quiz->name), 'link' => '', 'type' => 'activityinstance');
     $navigation = build_navigation($navlinks);
     print_header_simple(format_string($quiz->name), "", $navigation, '', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
     /// Print the tabs
     $currenttab = 'reports';
     $mode = $reportmode;
     require $CFG->dirroot . '/mod/quiz/tabs.php';
 }
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:17,代码来源:default.php

示例10: webquestscorm_print_header

function webquestscorm_print_header($name, $currenttab = '', $course = NULL, $cm = NULL, $cmid = 0)
{
    global $CFG;
    if ($cmid) {
        if (!isset($cm)) {
            if (!($cm = get_coursemodule_from_id('webquestscorm', $cmid))) {
                error('Course Module ID was incorrect');
            }
        }
        if (!isset($course)) {
            if (!($course = get_record('course', 'id', $this->cm->course))) {
                error('Course is misconfigured');
            }
        }
        if (!isset($name)) {
            if (!($webquestscorm = get_record('webquestscorm', 'id', $this->cm->instance))) {
                error('webquestscorm ID was incorrect');
            }
            $name = $webquestscorm->name;
        }
    } else {
        if (!isset($cm)) {
            error('Course Module ID was incorrect');
        }
        if (!isset($course)) {
            error('Course is misconfigured');
        }
        if (!isset($name)) {
            error('webquestscorm name was incorrect');
        }
    }
    $strwebquestscorms = get_string('modulenameplural', 'webquestscorm');
    $strwebquestscorm = get_string('modulename', 'webquestscorm');
    $strname = format_string($name);
    $button = update_module_button($cm->id, $course->id, $strwebquestscorm);
    $meta = '';
    if ($CFG->version < 2007101500) {
        print_header_simple(format_string($strname), "", "<a href=\"index.php?id={$course->id}\">{$strwebquestscorms}</a> -> " . format_string($name), "", "", true, update_module_button($cm->id, $course->id, $strwebquestscorm), navmenu($course, $cm));
    } else {
        $navigation = build_navigation('', $cm);
        print_header($course->shortname . ':' . $strname, $course->fullname, $navigation, '', $meta, true, $button, navmenu($course, $cm));
    }
    print_heading(format_string($name, true));
    require_once "tabs.php";
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:45,代码来源:locallib.php

示例11: print_header_and_tabs

 function print_header_and_tabs($cm, $course, $game, $reportmode = "overview", $meta = "")
 {
     global $CFG;
     /// Define some strings
     $strgames = get_string("modulenameplural", "game");
     $strgame = get_string("modulename", "game");
     /// Print the page header
     if (function_exists('build_navigation')) {
         $navigation = build_navigation('', $cm);
         print_header($course->shortname, $course->shortname, $navigation);
     } else {
         print_header_simple(format_string($game->name), "", "<a href=\"index.php?id={$course->id}\">{$strgames}</a>\n                      -> " . format_string($game->name), '', $meta, true, update_module_button($cm->id, $course->id, $strgame), navmenu($course, $cm));
     }
     /// Print the tabs
     $currenttab = 'reports';
     $mode = $reportmode;
     include 'tabs.php';
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:18,代码来源:default.php

示例12: print_header_and_tabs

 function print_header_and_tabs($cm, $course, $quiz, $reportmode = "overview")
 {
     global $CFG;
     /// Define some strings
     $strquizzes = get_string("modulenameplural", "quiz");
     $strquiz = get_string("modulename", "quiz");
     /// Print the page header
     $navigation = build_navigation('', $cm);
     print_header_simple(format_string($quiz->name), "", $navigation, '', '', true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
     /// Print the tabs
     $currenttab = 'reports';
     $mode = $reportmode;
     require $CFG->dirroot . '/mod/quiz/tabs.php';
     $course_context = get_context_instance(CONTEXT_COURSE, $course->id);
     if (has_capability('gradereport/grader:view', $course_context) && has_capability('moodle/grade:viewall', $course_context)) {
         echo '<div class="allcoursegrades"><a href="' . $CFG->wwwroot . '/grade/report/grader/index.php?id=' . $course->id . '">' . get_string('seeallcoursegrades', 'grades') . '</a></div>';
     }
 }
开发者ID:ajv,项目名称:Offline-Caching,代码行数:18,代码来源:default.php

示例13: print_header

 function print_header($title, $morebreadcrumbs = NULL)
 {
     global $USER, $CFG;
     $this->init_full();
     $replacements = array('%fullname%' => format_string($this->activityrecord->name));
     foreach ($replacements as $search => $replace) {
         $title = str_replace($search, $replace, $title);
     }
     if ($this->courserecord->id == SITEID) {
         $breadcrumbs = array();
     } else {
         $breadcrumbs = array($this->courserecord->shortname => $CFG->wwwroot . '/course/view.php?id=' . $this->courserecord->id);
     }
     $breadcrumbs[get_string('modulenameplural', "bigbluebutton")] = $CFG->wwwroot . '/mod/bigbluebutton/index.php?id=' . $this->courserecord->id;
     $breadcrumbs[format_string($this->activityrecord->name)] = $CFG->wwwroot . '/mod/bigbluebutton/view.php?id=' . $this->modulerecord->id;
     if (!empty($morebreadcrumbs)) {
         $breadcrumbs = array_merge($breadcrumbs, $morebreadcrumbs);
     }
     $total = count($breadcrumbs);
     $current = 1;
     $crumbtext = '';
     foreach ($breadcrumbs as $text => $href) {
         if ($current++ == $total) {
             $crumbtext .= ' ' . $text;
         } else {
             $crumbtext .= ' <a href="' . $href . '">' . $text . '</a> ->';
         }
     }
     if (empty($morebreadcrumbs) && $this->user_allowed_editing()) {
         $buttons = '<table><tr><td>' . update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'bigbluebutton')) . '</td>';
         if (!empty($CFG->showblocksonmodpages)) {
             $buttons .= '<td><form target="' . $CFG->framename . '" method="get" action="view.php">' . '<input type="hidden" name="id" value="' . $this->modulerecord->id . '" />' . '<input type="hidden" name="edit" value="' . ($this->user_is_editing() ? 'off' : 'on') . '" />' . '<input type="submit" value="' . get_string($this->user_is_editing() ? 'blockseditoff' : 'blocksediton') . '" /></form></td>';
         }
         $buttons .= '</tr></table>';
     } else {
         $buttons = '&nbsp;';
     }
     print_header($title, $this->courserecord->fullname, $crumbtext, '', '', true, $buttons, navmenu($this->courserecord, $this->modulerecord));
 }
开发者ID:nagyistoce,项目名称:moodle-Teach-Pilot,代码行数:39,代码来源:pagelib.php

示例14: array

    /// course header
    $navlinks = array();
    if ($courseid != SITEID) {
        if (has_capability('moodle/course:viewparticipants', get_context_instance(CONTEXT_COURSE, $course->id))) {
            $navlinks[] = array('name' => $strparticipants, 'link' => "{$CFG->wwwroot}/user/index.php?id={$course->id}", 'type' => 'misc');
        }
        $navlinks[] = array('name' => $fullname, 'link' => "{$CFG->wwwroot}/user/view.php?id={$userid}&amp;course={$courseid}", 'type' => 'misc');
        $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
        $navigation = build_navigation($navlinks);
        print_header("{$fullname}", "{$fullname}", $navigation, "", "", true, "&nbsp;", navmenu($course));
        /// site header
    } else {
        $navlinks[] = array('name' => $fullname, 'link' => "{$CFG->wwwroot}/user/view.php?id={$userid}&amp;course={$courseid}", 'type' => 'misc');
        $navlinks[] = array('name' => $straction, 'link' => null, 'type' => 'misc');
        $navigation = build_navigation($navlinks);
        print_header("{$course->fullname}: {$fullname}", $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
    }
    $showroles = 1;
    $currenttab = 'assign';
    include_once $CFG->dirroot . '/user/tabs.php';
} else {
    if ($context->contextlevel == CONTEXT_SYSTEM) {
        admin_externalpage_setup('assignroles', '', array('contextid' => $contextid, 'roleid' => $roleid));
        admin_externalpage_print_header('');
    } else {
        if ($context->contextlevel == CONTEXT_COURSE and $context->instanceid == SITEID) {
            admin_externalpage_setup('frontpageroles', '', array('contextid' => $contextid, 'roleid' => $roleid));
            admin_externalpage_print_header('');
            $currenttab = 'assign';
            include_once 'tabs.php';
        } else {
开发者ID:kai707,项目名称:ITSA-backup,代码行数:31,代码来源:assign.php

示例15: current

        $firstscorm = current($scorms);
        if (!($course->format == 'scorm' && $firstscorm->id == $scorm->id)) {
            $navlinks[] = array('name' => $strscorms, 'link' => "index.php?id={$course->id}", 'type' => 'activity');
        }
    }
}
$pagetitle = strip_tags($course->shortname . ': ' . format_string($scorm->name));
add_to_log($course->id, 'scorm', 'pre-view', 'view.php?id=' . $cm->id, "{$scorm->id}");
if (has_capability('mod/scorm:skipview', get_context_instance(CONTEXT_MODULE, $cm->id)) && scorm_simple_play($scorm, $USER)) {
    exit;
}
//
// Print the page header
//
$navlinks = array();
$navlinks[] = array('name' => format_string($scorm->name, true), 'link' => "view.php?id={$cm->id}", 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header($pagetitle, $course->fullname, $navigation, '', '', true, update_module_button($cm->id, $course->id, $strscorm), navmenu($course, $cm));
if (has_capability('mod/scorm:viewreport', $context)) {
    $trackedusers = scorm_get_count_users($scorm->id, $cm->groupingid);
    if ($trackedusers > 0) {
        echo "<div class=\"reportlink\"><a {$CFG->frametarget} href=\"report.php?id={$cm->id}\"> " . get_string('viewalluserreports', 'scorm', $trackedusers) . '</a></div>';
    } else {
        echo '<div class="reportlink">' . get_string('noreports', 'scorm') . '</div>';
    }
}
// Print the main part of the page
print_heading(format_string($scorm->name));
print_box(format_text($scorm->summary), 'generalbox', 'intro');
scorm_view_display($USER, $scorm, 'view.php?id=' . $cm->id, $cm);
print_footer($course);
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:view.php


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