mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-19817 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno
This commit is contained in:
parent
02f78a2688
commit
7ce73e926e
@ -151,8 +151,8 @@
|
||||
case "removepages":
|
||||
if($form->proceed) {
|
||||
if(!$confirm && $form->pagestodelete) {
|
||||
notice_yesno(get_string("removepagecheck", "wiki")."<br />".join(", ", $form->pagestodelete),
|
||||
$link."&confirm=".urlencode(join(" ",$form->pagestodelete)), $link);
|
||||
echo $OUTPUT->confirm(get_string("removepagecheck", "wiki")."<br />".join(", ", $form->pagestodelete),
|
||||
$link."&confirm=".urlencode(join(" ",$form->pagestodelete)), $link);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
@ -172,8 +172,7 @@
|
||||
foreach($form->pagestostrip as $pagetostrip) {
|
||||
$pagestostrip[]=htmlspecialchars(urldecode($pagetostrip));
|
||||
}
|
||||
notice_yesno(get_string("strippagecheck", "wiki")."<br />".join(", ", $pagestostrip),
|
||||
$link.$confirm, $link);
|
||||
echo $OUTPUT->confirm(get_string("strippagecheck", "wiki")."<br />".join(", ", $pagestostrip), $link.$confirm, $link);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
@ -184,8 +183,7 @@
|
||||
if($form->proceed) {
|
||||
if(!$confirm && $form->pagetocheck) {
|
||||
$confirm="&confirm=".$form->pagetocheck;
|
||||
notice_yesno(get_string("checklinkscheck", "wiki").$form->pagetocheck,
|
||||
$link.$confirm, $link);
|
||||
echo $OUTPUT->confirm(get_string("checklinkscheck", "wiki").$form->pagetocheck, $link.$confirm, $link);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
}
|
||||
@ -204,8 +202,7 @@
|
||||
"&confirm[deleteversions]=".urlencode($form->deleteversions);
|
||||
$revertedpages=wiki_admin_revert("", $form->authorfieldpattern, $form->changesfield, $form->howtooperate, $form->deleteversions);
|
||||
if($revertedpages) {
|
||||
notice_yesno(get_string("revertpagescheck", "wiki")."<br />".$revertedpages,
|
||||
$link.$confirm, $link);
|
||||
echo $OUTPUT->confirm(get_string("revertpagescheck", "wiki")."<br />".$revertedpages, $link.$confirm, $link);
|
||||
echo $OUTPUT->footer();
|
||||
exit;
|
||||
} else {
|
||||
|
@ -874,7 +874,7 @@ function ewiki_script($asid="", $id=false, $params="", $bin=0, $html=1, $script=
|
||||
if (strlen($params)) {
|
||||
$url .= (strpos($url,"?")!==false ? "&":"?") . $params;
|
||||
}
|
||||
#-- fin
|
||||
#-- fin
|
||||
if ($html) {
|
||||
//Don't replace & if it's part of encoded character (bug 2209)
|
||||
$url = preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,5};)/","&", $url);
|
||||
@ -1157,7 +1157,7 @@ function ewiki_page_search($id, &$data, $action) {
|
||||
function ewiki_page_info($id, &$data, $action) {
|
||||
|
||||
global $ewiki_plugins, $ewiki_config, $ewiki_links;
|
||||
global $CFG, $COURSE, $DB; // MOODLE HACK
|
||||
global $CFG, $COURSE, $DB, $OUTPUT; // MOODLE HACK
|
||||
|
||||
$pnum = optional_param(EWIKI_UP_PAGENUM, 0);
|
||||
$pend = optional_param(EWIKI_UP_PAGEEND, 0);
|
||||
@ -1281,8 +1281,10 @@ function ewiki_page_info($id, &$data, $action) {
|
||||
if (!isset($COURSE->id)) {
|
||||
$COURSE->id = SITEID;
|
||||
}
|
||||
$picture = print_user_picture($user->id, $COURSE->id, $user->picture, false, true, true);
|
||||
$value = $picture." <a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$COURSE->id\">".fullname($user)."</a>";
|
||||
$userpic = moodle_user_picture::make($user->id, $COURSE->id);
|
||||
$userpic->link = true;
|
||||
$picture = $OUTPUT->user_picture($userpic);
|
||||
$value = $picture . $OUTPUT->link("$CFG->wwwroot/user/view.php?id=$user->id&course=$COURSE->id", fullname($user));
|
||||
} else {
|
||||
continue;
|
||||
//$value = @$current['author'];
|
||||
|
@ -348,9 +348,10 @@ function ewiki_entry_downloads($row, $show_section=0, $fullinfo=false) {
|
||||
if (!isset($course->id)) {
|
||||
$course->id = 1;
|
||||
}
|
||||
$picture = print_user_picture($user->id, $course->id, $user->picture, false, true, true);
|
||||
$value = $picture." <a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">".
|
||||
fullname($user)."</a>";
|
||||
$userpic = moodle_user_picture::make($user->id, $course->id);
|
||||
$userpic->link = true;
|
||||
$picture = $OUTPUT->user_picture($userpic);
|
||||
$value = $picture . $OUTPUT->link("$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id", fullname($user));
|
||||
}
|
||||
|
||||
$o .= '<a href="'.$info->url.'">'.$info->icon.$info->title.'</a>'.$info->size.'<br />'.
|
||||
|
@ -47,6 +47,7 @@
|
||||
$strweek = get_string('week');
|
||||
$strtopic = get_string('topic');
|
||||
|
||||
$table = new html_table();
|
||||
if ($course->format == "weeks") {
|
||||
$table->head = array ($strweek, $strname, $strsummary, $strtype, $strlastmodified);
|
||||
$table->align = array ('CENTER', 'LEFT', 'LEFT', 'LEFT', 'LEFT');
|
||||
@ -99,7 +100,7 @@
|
||||
|
||||
echo "<br />";
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
/// Finish the page
|
||||
|
||||
|
@ -1596,7 +1596,7 @@ function wiki_admin_get_flagarray() {
|
||||
*/
|
||||
function wiki_admin_setpageflags_list($pageflagstatus) {
|
||||
$FD = wiki_admin_get_flagarray();
|
||||
$table = new Object();
|
||||
$table = new html_table();
|
||||
$table->head = array(get_string("pagename","wiki"), get_string("flags","wiki"));
|
||||
if($pageflagstatus) {
|
||||
$table->head[]=get_string("status","wiki");
|
||||
@ -1675,7 +1675,7 @@ function wiki_admin_setpageflags($pageflags) {
|
||||
*/
|
||||
function wiki_admin_remove_list($listall="") {
|
||||
/// Table header
|
||||
$table = new Object();
|
||||
$table = new html_table();
|
||||
$table->head = array(" ", get_string("pagename","wiki"), get_string("errororreason","wiki"));
|
||||
|
||||
/// Get all pages
|
||||
@ -1808,7 +1808,7 @@ function wiki_admin_remove($pagestodelete, $course, $wiki, $userid, $groupid) {
|
||||
*/
|
||||
function wiki_admin_strip_list($pagestostrip="",$version="",$err="") {
|
||||
/// Table header
|
||||
$table = new Object();
|
||||
$table = new html_table();
|
||||
$table->head = array(" ", get_string("pagename","wiki"), get_string("deleteversions","wiki"));
|
||||
|
||||
$vc=ewiki_database("COUNTVERSIONS", array());
|
||||
|
@ -14,7 +14,7 @@
|
||||
<input type="hidden" name="wikipage" value="<?php print $wikipage?>" />
|
||||
<?php
|
||||
$remove_table=wiki_admin_remove_list($form->listall);
|
||||
print_table($remove_table);
|
||||
echo $OUTPUT->table($remove_table);
|
||||
?>
|
||||
<div class="boxaligncenter">
|
||||
<?php
|
||||
|
@ -11,7 +11,7 @@
|
||||
<input type="hidden" name="wikipage" value="<?php print $wikipage?>" />
|
||||
<?php
|
||||
$pageflags_table=wiki_admin_setpageflags_list($pageflagstatus);
|
||||
print_table($pageflags_table);
|
||||
echo $OUTPUT->table($pageflags_table);
|
||||
?>
|
||||
<br />
|
||||
<div class="boxaligncenter">
|
||||
|
@ -11,7 +11,7 @@
|
||||
<input type="hidden" name="wikipage" value="<?php print $wikipage?>" />
|
||||
<?php
|
||||
$strip_table=wiki_admin_strip_list($form->pagestostrip, $form->version, $err);
|
||||
print_table($strip_table);
|
||||
echo $OUTPUT->table($strip_table);
|
||||
?>
|
||||
<div class="boxaligncenter">
|
||||
<?php
|
||||
@ -20,4 +20,4 @@
|
||||
}
|
||||
?>
|
||||
<input type="submit" name="proceed" value="<?php print get_string("strippages","wiki"); ?>" />
|
||||
</div></fieldset></form>
|
||||
</div></fieldset></form>
|
||||
|
Loading…
x
Reference in New Issue
Block a user