• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP print_header_simple函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: 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


示例3: print_header

 function print_header()
 {
     global $USER, $CFG;
     $tagname = tag_display_name($this->tag_object);
     $navlinks = array();
     $navlinks[] = array('name' => get_string('tags', 'tag'), 'link' => "{$CFG->wwwroot}/tag/search.php", 'type' => '');
     $navlinks[] = array('name' => $tagname, 'link' => '', 'type' => '');
     $navigation = build_navigation($navlinks);
     $title = get_string('tag', 'tag') . ' - ' . $tagname;
     $button = '';
     if ($this->user_allowed_editing()) {
         $button = update_tag_button($this->id);
     }
     print_header_simple($title, '', $navigation, '', '', '', $button);
 }
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:15,代码来源:pagelib.php


示例4: printHeader

 public static function printHeader($title = '', $course_id = SITEID, $cache = false)
 {
     $navlinks = array();
     if ($course_id != SITEID) {
         $navlinks[] = array('name' => get_field('course', 'shortname', 'id', $course_id), 'link' => $GLOBALS['CFG']->wwwroot . '/course/view.php?id=' . $course_id, 'type' => 'title');
     }
     $navlinks[] = array('name' => $title, 'link' => '', 'type' => 'title');
     print_header_simple($title, '', build_navigation($navlinks), '', '', $cache);
     echo '<div style="float:right;">';
     /*		helpbutton('repository', sharing_cart_plugins::get_string('title', 'repository'),
     				'block_sharing_cart/plugins/repository', true, false, '', false);*/
     echo '</div>';
     echo '<div style="clear:both;"><!-- clear float --></div>';
     print_heading($title);
 }
开发者ID:nadavkav,项目名称:Moodle2-Hebrew-plugins,代码行数:15,代码来源:SharingCart_Repository.php


示例5: 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


示例6: 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


示例7: 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


示例8: 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


示例9: print_header

 function print_header($title, $morebreadcrumbs = NULL)
 {
     global $USER, $CFG, $WS;
     $this->init_full();
     if ($this->user_allowed_editing()) {
         $buttons = wiki_table_start('', true);
         $buttons .= update_module_button($this->modulerecord->id, $this->courserecord->id, get_string('modulename', 'wiki'));
         if (!empty($CFG->showblocksonmodpages)) {
             $buttons .= wiki_change_column('', true);
             $prop = null;
             $prop->method = "get";
             $prop->action = "view.php";
             $prop->events = 'onsubmit="this.target=\'_top\'; return true"';
             $buttons .= wiki_form_start($prop, true);
             $buttons .= wiki_div_start('', true);
             $prop = null;
             $prop->name = "id";
             $prop->value = $this->modulerecord->id;
             $buttons .= wiki_input_hidden($prop, true);
             $prop = null;
             $prop->name = "edit";
             $prop->value = $this->user_is_editing() ? 'off' : 'on';
             $buttons .= wiki_input_hidden($prop, true);
             $prop = null;
             $prop->value = get_string($this->user_is_editing() ? 'blockseditoff' : 'blocksediton');
             $buttons .= wiki_input_submit($prop, true);
             $buttons .= wiki_div_end(true);
             $buttons .= wiki_form_end(true);
         }
         $buttons .= wiki_table_end('', true);
     } else {
         $buttons = '&nbsp;';
     }
     //        print_header($title, $this->courserecord->fullname, $crumbtext, '', '', true, $buttons, navmenu($this->courserecord, $this->modulerecord));
     /// Print header.
     $navlinks = array();
     $navlinks[] = array('name' => get_string('modulenameplural', 'wiki'), 'link' => $CFG->wwwroot . '/mod/wiki/index.php?id=' . $this->courserecord->id, 'type' => 'activity');
     $navlinks[] = array('name' => format_string($this->activityrecord->name), 'link' => "view.php", 'type' => 'activityinstance');
     $navigation = build_navigation($navlinks);
     print_header_simple(format_string($this->activityrecord->name), "", $navigation, "", "", true, $buttons, navmenu($this->courserecord, $WS->cm));
 }
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:41,代码来源:pagelib.php


示例10: key_form

}
/// First create the form
$editform = new key_form();
$editform->set_data($key);
if ($editform->is_cancelled()) {
    redirect($returnurl);
} elseif ($data = $editform->get_data()) {
    if ($data->id) {
        $record = new object();
        $record->id = $data->id;
        $record->iprestriction = $data->iprestriction;
        $record->validuntil = $data->validuntil;
        update_record('user_private_key', $record);
    } else {
        create_user_key('grade/export', $USER->id, $course->id, $data->iprestriction, $data->validuntil);
    }
    redirect($returnurl);
}
$strkeys = get_string('userkeys', 'userkey');
$strgrades = get_string('grades');
if ($id) {
    $strheading = get_string('edituserkey', 'userkey');
} else {
    $strheading = get_string('createuserkey', 'userkey');
}
$navlinks = array(array('name' => $strgrades, 'link' => $CFG->wwwroot . '/grade/index.php?id=' . $courseid, 'type' => 'misc'), array('name' => $strkeys, 'link' => $CFG->wwwroot . '/grade/export/keymanager.php?id=' . $courseid, 'type' => 'misc'), array('name' => $strheading, 'link' => '', 'type' => 'misc'));
$navigation = build_navigation($navlinks);
/// Print header
print_header_simple($strkeys, ': ' . $strkeys, $navigation, '', '', true, '', navmenu($course));
$editform->display();
print_footer($course);
开发者ID:BackupTheBerlios,项目名称:samouk-svn,代码行数:31,代码来源:key.php


示例11: array

/// processing posted grades & feedback here
if ($data = data_submitted() and confirm_sesskey() and has_capability('moodle/grade:edit', $context)) {
    $warnings = $report->process_data($data);
} else {
    $warnings = array();
}
// Override perpage if set in URL
if ($perpageurl) {
    $report->user_prefs['studentsperpage'] = $perpageurl;
}
// final grades MUST be loaded after the processing
$report->load_users();
$numusers = $report->get_numusers();
$report->load_final_grades();
/// Print header
print_header_simple($strgrades . ': ' . $reportname, ': ' . $strgrades, $navigation, '', '', true, $buttons, navmenu($course));
/// Print the plugin selector at the top
print_grade_plugin_selector($courseid, 'report', 'grader');
// Add tabs
$currenttab = 'graderreport';
require 'tabs.php';
echo $report->group_selector;
echo '<div class="clearer"></div>';
echo $report->get_toggles_html();
//show warnings if any
foreach ($warnings as $warning) {
    notify($warning);
}
$studentsperpage = $report->get_pref('studentsperpage');
// Don't use paging if studentsperpage is empty or 0 at course AND site levels
if (!empty($studentsperpage)) {
开发者ID:r007,项目名称:PMoodle,代码行数:31,代码来源:index.php


示例12: error

    } else {
        error("courseid is not correct");
    }
}
if (!$capabilities->complete) {
    error(get_string('error'));
}
/// Print the page header
$strfeedbacks = get_string("modulenameplural", "feedback");
$strfeedback = get_string("modulename", "feedback");
$buttontext = update_module_button($cm->id, $course->id, $strfeedback);
$navlinks = array();
$navlinks[] = array('name' => $strfeedbacks, 'link' => "index.php?id={$course->id}", 'type' => 'activity');
$navlinks[] = array('name' => format_string($feedback->name), 'link' => "", 'type' => 'activityinstance');
$navigation = build_navigation($navlinks);
print_header_simple(format_string($feedback->name), "", $navigation, "", "", true, $buttontext, navmenu($course, $cm));
//ishidden check.
//feedback in courses
if (empty($cm->visible) and !$capabilities->viewhiddenactivities and $course->id != SITEID) {
    notice(get_string("activityiscurrentlyhidden"));
}
//ishidden check.
//feedback on mainsite
if (empty($cm->visible) and !$capabilities->viewhiddenactivities and $courseid == SITEID) {
    notice(get_string("activityiscurrentlyhidden"));
}
feedback_print_errors();
//check, if the feedback is open (timeopen, timeclose)
$checktime = time();
if ($feedback->timeopen > $checktime or $feedback->timeclose < $checktime and $feedback->timeclose > 0) {
    // print_simple_box_start('center');
开发者ID:kai707,项目名称:ITSA-backup,代码行数:31,代码来源:complete.php


示例13: error

if (!($course = get_record('course', 'id', $certrequest->courseid))) {
    error('Invalid Course');
}
if ($certrequest->status != 'submitted') {
    error('Invalid Certification');
}
require_login($course->id);
$strtitle = get_string('approvecertification', 'block_tao_certification_path');
//check this user is an MT for this user.
$ptcontext = get_context_instance(CONTEXT_USER, $certrequest->userid);
require_capability('moodle/local:ismt', $ptcontext);
$navlinks = array();
$navlinks[] = array('name' => get_string('certification', 'block_tao_certification_path'), 'link' => "{$CFG->wwwroot}/local/lp/certification.php", 'type' => 'misc');
$navlinks[] = array('name' => $strtitle, 'link' => "", 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header_simple($strtitle, $strtitle, $navigation);
if ($action == 'approved') {
    $certrequest->status = 'approved';
    $certrequest->changeuserid = $USER->id;
    $certrequest->timechanged = time();
    $certrequest->description = $description;
    if (!update_record('tao_user_certification_status', $certrequest)) {
        notify("Error updating certification status");
        print_footer(NULL, $course);
        die;
    }
    //now save event
    $eventdata = new object();
    $eventdata->userid = $certrequest->userid;
    $eventdata->course = $course->id;
    $eventdata->certification = $certrequest->certtype;
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:approverequest.php


示例14: require_login

            }
        }
    }
}
require_login($course->id);
// needed to setup proper $COURSE
$context = get_context_instance(CONTEXT_COURSE, $course->id);
require_capability('moodle/course:manageactivities', $context);
$streditinga = get_string("editinga", "moodle", $fullmodulename);
$strmodulenameplural = get_string("modulenameplural", $module->name);
if ($module->name == "label") {
    $focuscursor = "form.content";
} else {
    $focuscursor = "form.name";
}
print_header_simple($streditinga, '', "<a href=\"{$CFG->wwwroot}/mod/{$module->name}/index.php?id={$course->id}\">{$strmodulenameplural}</a> ->\n     {$strnav} {$streditinga}", $focuscursor, "", false);
if (!empty($cm->id)) {
    $context = get_context_instance(CONTEXT_MODULE, $cm->id);
    $currenttab = 'update';
    include_once $CFG->dirroot . '/' . $CFG->admin . '/roles/tabs.php';
}
unset($SESSION->modform);
// Clear any old ones that may be hanging around.
$modform = "../mod/{$module->name}/mod.html";
if (file_exists($modform)) {
    if ($usehtmleditor = can_use_html_editor()) {
        $defaultformat = FORMAT_HTML;
        $editorfields = '';
    } else {
        $defaultformat = FORMAT_MOODLE;
    }
开发者ID:veritech,项目名称:pare-project,代码行数:31,代码来源:mod.php


示例15: get_context_instance

    if ($user->id == $USER->id) {
        $context = get_context_instance(CONTEXT_SYSTEM);
    } else {
        $context = get_context_instance(CONTEXT_USER, $user->id);
    }
    $link_values = '?concernspost=' . $concernspost;
    $title = "{$strconcerns}: " . fullname($user);
    $footer = '';
}
$navlinks[] = array('name' => $strilps, 'link' => "{$CFG->wwwroot}/blocks/ilp/list.php?courseid={$courseid}", 'type' => 'misc');
$navlinks[] = array('name' => $strilp, 'link' => "{$CFG->wwwroot}/blocks/ilp/view.php?id={$user->id}&amp;courseid={$courseid}", 'type' => 'misc');
$navlinks[] = array('name' => fullname($user), 'link' => FALSE, 'type' => 'misc');
$navlinks[] = array('name' => $strconcerns, 'link' => FALSE, 'type' => 'misc');
$navlinks[] = array('name' => $strcomments, 'link' => FALSE, 'type' => 'misc');
$navigation = build_navigation($navlinks);
print_header_simple($title, '', $navigation, '', '', true, '', '');
//Allow users to see their own profile, but prevent others
if (has_capability('moodle/legacy:guest', $context, NULL, false)) {
    error("You are logged in as Guest.");
}
if ($USER->id != $user->id) {
    require_capability('mod/ilpconcern:view', $context);
}
$mform = new ilpconcern_updatecomment_form('', array('userid' => $user->id, 'id' => $id, 'courseid' => $courseid, 'concernspost' => $concernspost, 'commentid' => $commentid));
echo '<div class="ilp_post yui-t4">';
echo '<div class="bd" role="main">';
echo '<div class="yui-main">';
echo '<div class="yui-b">';
if (isset($post->name)) {
    echo '<div class="yui-gd">';
    echo '<div class="yui-u first">';
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:concerns_comments.php


示例16: required_param

require_once "lib.php";
$id = required_param('id', PARAM_INT);
// course
if (!($course = get_record("course", "id", $id))) {
    error("Course ID is incorrect");
}
require_course_login($course);
add_to_log($course->id, "journal", "view all", "index.php?id={$course->id}", "");
$strjournal = get_string("modulename", "journal");
$strjournals = get_string("modulenameplural", "journal");
$strweek = get_string("week");
$strtopic = get_string("topic");
$navlinks = array();
$navlinks[] = array('name' => $strjournals, 'link' => '', 'type' => 'activity');
$navigation = build_navigation($navlinks);
print_header_simple("{$strjournals}", "", $navigation, "", "", true, "", navmenu($course));
if (!($journals = get_all_instances_in_course("journal", $course))) {
    notice(get_string('thereareno', 'moodle', $strjournals), "../../course/view.php?id={$course->id}");
    die;
}
$timenow = time();
if ($course->format == "weeks") {
    $strsection = $strweek;
} else {
    if ($course->format == "topics") {
        $strsection = $strtopic;
    } else {
        $strsection = "";
    }
}
foreach ($journals as $journal) {
开发者ID:JackCanada,项目名称:moodle-hacks,代码行数:31,代码来源:index.php


示例17: print_error

    } else {
        print_error('nofieldindatabase', 'data');
    }
}
// populate objets for this databases fields
$fields = array();
foreach ($fieldrecords as $fieldrecord) {
    $fields[] = data_get_field($fieldrecord, $data);
}
$mform = new mod_data_export_form('export.php?d=' . $data->id, $fields, $cm);
if ($mform->is_cancelled()) {
    redirect('view.php?d=' . $data->id);
} elseif (!($formdata = (array) $mform->get_data())) {
    // build header to match the rest of the UI
    $nav = build_navigation('', $cm);
    print_header_simple($data->name, '', $nav, '', '', true, update_module_button($cm->id, $course->id, get_string('modulename', 'data')), navmenu($course, $cm), '', '');
    echo $OUTPUT->heading(format_string($data->name));
    // these are for the tab display
    $currentgroup = groups_get_activity_group($cm);
    $groupmode = groups_get_activity_groupmode($cm);
    $currenttab = 'export';
    include 'tabs.php';
    $mform->display();
    echo $OUTPUT->footer();
    die;
}
if (array_key_exists('portfolio', $formdata) && !empty($formdata['portfolio'])) {
    // fake  portfolio callback stuff and redirect
    $formdata['id'] = $cm->id;
    $formdata['exporttype'] = 'csv';
    // force for now
开发者ID:ajv,项目名称:Offline-Caching,代码行数:31,代码来源:export.php


示例18: pagemenu_print_header

/**
 * Print the standard header for pagemenu module
 *
 * @uses $CFG
 * @uses $USER tabs.php requires it
 * @param object $cm Course module record object
 * @param object $course Couse record object
 * @param object $pagemenu pagemenu module record object
 * @param string $currenttab File location and tab to be selected
 * @param string $focus Focus
 * @param boolean $showtabs Display tabs yes/no
 * @return void
 **/
function pagemenu_print_header($cm, $course, $pagemenu, $currenttab = 'view', $focus = '', $showtabs = true)
{
    global $CFG, $USER;
    $strpagemenus = get_string('modulenameplural', 'pagemenu');
    $strpagemenu = get_string('modulename', 'pagemenu');
    $strname = format_string($pagemenu->name);
    /// Log it!
    add_to_log($course->id, 'pagemenu', $currenttab, "{$currenttab}.php?id={$cm->id}", $strname, $cm->id);
    /// Print header, heading, tabs and messages
    print_header_simple($strname, $strname, build_navigation('', $cm), $focus, '', true, update_module_button($cm->id, $course->id, $strpagemenu), navmenu($course, $cm));
    print_heading($strname);
    if ($showtabs) {
        pagemenu_print_tabs($cm, $currenttab);
    }
    pagemenu_print_messages();
}
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:29,代码来源:locallib.php


示例19: groups_get_activity_group

$currentgroup = groups_get_activity_group($cm, true);
if (empty($currentgroup)) {
    $currentgroup = 0;
}
if (empty($elluminate->meetingid) && $elluminate->groupmode != 0) {
    elluminate_group_instance_check($elluminate, $cm->id);
}
$baseurl = $CFG->wwwroot . '/mod/elluminate/preload.php?id=' . $elluminate->id;
/// Print the page header
$strelluminates = get_string('modulenameplural', 'elluminate');
$strelluminate = get_string('modulename', 'elluminate');
$straddpreload = get_string('addpreload', 'elluminate');
$strdelpreload = get_string('deletewhiteboardpreload', 'elluminate');
$buttontext = update_module_button($cm->id, $course->id, $strelluminate);
$navigation = build_navigation(empty($delete) ? $straddpreload : $strdelpreload, $cm);
print_header_simple(format_string($elluminate->name), '', $navigation, '', '', true, $buttontext, navmenu($course, $cm));
/// Delete a preload file for this meeting.
if (!empty($delete)) {
    if (!empty($elluminate->meetingid)) {
        if ($preload = elluminate_list_meeting_preloads($elluminate->meetingid)) {
            if ($preload->presentationid == $delete) {
                /// Delete the preload from the meeting.
                if (!elluminate_delete_preload($preload->presentationid, $elluminate->meetingid)) {
                    error(get_string('preloaddeleteerror', 'elluminate'));
                }
                redirect($CFG->wwwroot . '/mod/elluminate/view.php?id=' . $cm->id, get_string('preloaddeletesuccess', 'elluminate'), 5);
            }
        }
    }
}
if (($data = data_submitted($CFG->wwwroot . '/mod/elluminate/preload.php')) && confirm_sesskey()) {
开发者ID:hmatulis,项目名称:RTL-BIDI-Hebrew-Moodle-Plugins,代码行数:31,代码来源:preload.php


示例20: dirname

 *
 */
require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
require_once $CFG->libdir . '/formslib.php';
require_once $CFG->dirroot . '/local/forms.php';
$strheading = get_string('messagegroup', 'block_tao_team_groups');
$courseid = required_param('id', PARAM_INT);
$groupid = required_param('groupid', PARAM_INT);
if (!($COURSE = get_record('course', 'id', $courseid))) {
    error('Invalid course idnumber');
}
if (!empty($groupid) && !($group = get_record('groups', 'id', $groupid, 'courseid', $courseid))) {
    error('Invalid group id');
}
require_login();
print_header_simple($strheading, $strheading, build_navigation($strheading));
if (groups_is_member($groupid)) {
    $grpmembers = groups_get_members($groupid);
    if (count($grpmembers) > 1) {
        require_once $CFG->dirroot . '/local/forms.php';
        require_once $CFG->dirroot . '/message/lib.php';
        $messageform = new tao_group_message_send_form('', array('course' => $COURSE, 'group' => $group, 'count' => count($grpmembers) - 1));
        if ($data = $messageform->get_data()) {
            foreach ($grpmembers as $touser) {
                if ($touser->id != $USER->id) {
                    //don't send a message to yourself.
                    message_post_message($USER, $touser, $data->body, $data->format, 'direct');
                }
            }
            notify(get_string('groupmessagesent', 'block_tao_team_groups'), 'notifysuccess');
            print_continue($CFG->wwwroot . '/course/view.php?id=' . $COURSE->id);
开发者ID:nadavkav,项目名称:MoodleTAO,代码行数:31,代码来源:messagegroup.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP print_heading函数代码示例发布时间:2022-05-15
下一篇:
PHP print_header_redirect函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap