本文整理汇总了PHP中ouwiki_print_footer函数的典型用法代码示例。如果您正苦于以下问题:PHP ouwiki_print_footer函数的具体用法?PHP ouwiki_print_footer怎么用?PHP ouwiki_print_footer使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ouwiki_print_footer函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reportsuser_usereditstable
// print table listing edits by user in chronological order with links to the page and changes
reportsuser_usereditstable($subwiki, $cm, $userid, $header, $cell, $csv);
// print table listing comments by user in chronological order with links to the page
reportsuser_usercommentstable($subwiki, $cm, $userid, $header, $csv);
// print table for activity by user in order of date counting edits and comments for each date
reportsuser_useractivitybydatetable($subwiki->id, $userid, $header, $csv);
// That's it for downloading csv file
if ($csv) {
exit;
}
// Display csv download links
$wikiparams = ouwiki_display_wiki_parameters(null, $subwiki, $cm);
print '<ul class="csv-links"><li><a href="reportsuser.php?id=' . $wikiid . '&userid=' . $userid . '&format=csv">' . get_string('csvdownload', 'ouwiki') . '</a></li>
<li><a href="reportsuser.php?id=' . $wikiid . '&userid=' . $userid . '&format=excelcsv">' . get_string('excelcsvdownload', 'ouwiki') . '</a></li></ul>';
// Footer
ouwiki_print_footer($course, $cm, $subwiki);
// functions for printing tables:
/**
* Show the table for the user's edit and comment (etc) summary info
*
* @param unknown_type $subwiki the subwiki info
* @param unknown_type $userid the id of the user
* @param unknown_type $header the header text for the tables
*/
function reportsuser_usersummarytable($subwikiid, $userid, $header, $csv)
{
// get info from database:
// get the number of pages created by each user in this subwiki
$usercreates = ouwiki_get_userspagecreate($subwikiid);
// get the user name, number of edits, number of pages edited,
// start and finish days for editing by this user, in this subwiki
示例2: has_capability
$viewfullnames = has_capability('moodle/site:viewfullnames', $context);
$groupname = '';
if ($groupid) {
$groupname = $DB->get_field('groups', 'name', array('id' => $groupid));
}
// all enrolled users for table pagination
$coursecontext = context_course::instance($course->id);
$participation = ouwiki_get_participation($ouwiki, $subwiki, $context, $groupid);
// is grading enabled and available for the current user
$grading_info = array();
if ($ouwiki->grade != 0 && has_capability('mod/ouwiki:grade', $context) && (!$groupid || ($groupid && has_capability('moodle/site:accessallgroups', $context) || $groupid && groups_is_member($groupid)))) {
$grading_info = grade_get_grades($course->id, 'mod', 'ouwiki', $ouwiki->id, array_keys($participation));
}
$ouwikioutput = $PAGE->get_renderer('mod_ouwiki');
// Headers
if (empty($download)) {
echo $ouwikioutput->ouwiki_print_start($ouwiki, $cm, $course, $subwiki, get_string('userparticipation', 'ouwiki'), $context);
// gets a message after grades updated
if (isset($SESSION->ouwikigradesupdated)) {
$message = $SESSION->ouwikigradesupdated;
unset($SESSION->ouwikigradesupdated);
echo $OUTPUT->notification($message, 'notifysuccess');
}
}
$ouwikioutput->ouwiki_render_participation_list($cm, $course, $pagename, $groupid, $ouwiki, $subwiki, $download, $page, $grading_info, $participation, $coursecontext, $viewfullnames, $groupname);
// Footer
if (empty($download)) {
$pageversion = ouwiki_get_current_page($subwiki, $pagename);
echo $ouwikioutput->get_bottom_buttons($subwiki, $cm, $context, $pageversion, false);
ouwiki_print_footer($course, $cm, $subwiki, $pagename, null, 'view');
}
示例3: has_capability
// Check permission - Allow anyone with edit capability to revert to a previous version
$canrevert = has_capability('mod/ouwiki:edit', $context);
if (!$canrevert) {
print_error('reverterrorcapability', 'ouwiki');
}
// Check if reverting to previous version has been confirmed
$confirmed = optional_param('confirm', null, PARAM_RAW);
if ($confirmed) {
// Lock something - but maybe this should be the current version
list($lockok, $lock) = ouwiki_obtain_lock($ouwiki, $pageversion->pageid);
// Revert to previous version
ouwiki_save_new_version($course, $cm, $ouwiki, $subwiki, $pagename, $pageversion->xhtml);
// Unlock whatever we locked
ouwiki_release_lock($pageversion->pageid);
// Redirect to view what is now the current version
redirect('view.php?' . ouwiki_display_wiki_parameters($pagename, $subwiki, $cm, OUWIKI_PARAMS_URL));
exit;
} else {
// Display confirm form
$nav = get_string('revertversion', 'ouwiki');
ouwiki_print_start($ouwiki, $cm, $course, $subwiki, $pagename, $context, array(array('name' => $nav, 'type' => 'ouwiki')), true, true);
print_box_start();
$a = ouwiki_nice_date($pageversion->timecreated);
print get_string('revertversionconfirm', 'ouwiki', $a);
print '<form action="revert.php" method="post">';
print ouwiki_display_wiki_parameters($pagename, $subwiki, $cm, OUWIKI_PARAMS_FORM);
print '<input type="hidden" name="version" value="' . $versionid . '" />' . '<input type="submit" name="confirm" value="' . get_string('revertversion', 'ouwiki') . '"/> ' . '<input type="submit" name="cancel" value="' . get_string('cancel') . '"/>';
print '</form>';
print_box_end();
ouwiki_print_footer($course, $cm, $subwiki, $pagename);
}
示例4: ou_set_is_mobile
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package ouwiki
*/
/** */
require 'basicpage.php';
if (class_exists('ouflags')) {
require_once '../../local/mobile/ou_lib.php';
global $OUMOBILESUPPORT;
$OUMOBILESUPPORT = true;
ou_set_is_mobile(ou_get_is_mobile_from_cookies());
if (ou_get_is_mobile()) {
ou_mobile_configure_theme();
}
}
ouwiki_print_start($ouwiki, $cm, $course, $subwiki, get_string('searchresults'), $context);
require_once '../../blocks/ousearch/searchlib.php';
$querytext = stripslashes(required_param('query', PARAM_RAW));
$query = new ousearch_search($querytext);
$query->set_coursemodule($cm);
if ($subwiki->groupid) {
$query->set_group_id($subwiki->groupid);
}
if ($subwiki->userid) {
$query->set_user_id($subwiki->userid);
}
$foundsomething = ousearch_display_results($query, 'search.php?' . ouwiki_display_wiki_parameters(null, $subwiki, $cm));
// Footer
ouwiki_print_footer($course, $cm, $subwiki, null, 'search.php?query=' . urlencode($querytext), $foundsomething ? null : 'searchfailure', $querytext);
?>