mirror of
https://github.com/moodle/moodle.git
synced 2025-03-13 20:26:32 +01:00
MDL-19809 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno
This commit is contained in:
parent
59e28d8f5d
commit
0b36c9489d
@ -134,7 +134,7 @@ function glossary_comment_delete() {
|
||||
|
||||
glossary_comment_print_header($course, $cm, $glossary, $entry, 'delete');
|
||||
glossary_print_comment($course, $cm, $glossary, $entry, $comment);
|
||||
notice_yesno($strdeletewarning, $linkyes, $linkno, $optionsyes, $optionsno, 'post', 'get');
|
||||
echo $OUTPUT->confirm($strdeletewarning, new moodle_url($linkyes, $optionsyes), new moodle_url($linkno, $optionsno));
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@
|
||||
$optionsyes = array('id'=>$cm->id, 'entry'=>$entry->id, 'confirm'=>1, 'sesskey'=>sesskey(), 'prevmode'=>$prevmode, 'hook'=>$hook);
|
||||
$optionsno = array('id'=>$cm->id, 'mode'=>$prevmode, 'hook'=>$hook);
|
||||
|
||||
notice_yesno($areyousure, $linkyes, $linkno, $optionsyes, $optionsno, 'post', 'get');
|
||||
echo $OUTPUT->confirm($areyousure, new moodle_url($linkyes, $optionsyes), new moodle_url($linkno, $optionsno));
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
}
|
||||
|
@ -129,7 +129,7 @@
|
||||
<?php
|
||||
unset($options);
|
||||
$options = array ("id" => $id);
|
||||
print_single_button("editcategories.php", $options, get_string("no") );
|
||||
echo $OUTPUT->button(html_form::make_button("editcategories.php", $options, get_string("no")));
|
||||
echo "</td></tr></table>";
|
||||
echo "</div>";
|
||||
echo $OUTPUT->box_end();
|
||||
@ -224,12 +224,12 @@
|
||||
$options['action'] = "add";
|
||||
|
||||
echo "<table border=\"0\"><tr><td align=\"right\">";
|
||||
echo print_single_button("editcategories.php", $options, get_string("add") . " " . get_string("category","glossary"), "get");
|
||||
echo $OUTPUT->button(html_form::make_button("editcategories.php", $options, get_string("add") . " " . get_string("category","glossary")));
|
||||
echo "</td><td align=\"left\">";
|
||||
unset($options['action']);
|
||||
$options['mode'] = 'cat';
|
||||
$options['hook'] = $hook;
|
||||
echo print_single_button("view.php", $options, get_string("back","glossary") );
|
||||
echo $OUTPUT->button(html_form::make_button("view.php", $options, get_string("back","glossary")));
|
||||
echo "</td></tr>";
|
||||
echo "</table>";
|
||||
|
||||
|
@ -80,7 +80,7 @@
|
||||
$optionsyes = array('id'=>$entry->id, 'confirm'=>1, 'sesskey'=>sesskey(), 'prevmode'=>$prevmode, 'hook'=>$hook);
|
||||
$optionsno = array('id'=>$cm->id, 'mode'=>$prevmode, 'hook'=>$hook);
|
||||
|
||||
notice_yesno($areyousure, $linkyes, $linkno, $optionsyes, $optionsno, 'post', 'get');
|
||||
echo $OUTPUT->confirm($areyousure, new moodle_url($linkyes, $optionsyes), new moodle_url($linkno, $optionsno));
|
||||
echo '</div>';
|
||||
echo $OUTPUT->footer();
|
||||
die;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php // $Id$
|
||||
|
||||
function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='', $hook='', $printicons=1, $ratings=NULL, $aliases=true) {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$entry->userid));
|
||||
@ -15,7 +15,7 @@ function glossary_show_entry_TEMPLATE($course, $cm, $glossary, $entry, $mode='',
|
||||
|
||||
//Use this function to show author's image
|
||||
//Comments: Configuration not supported
|
||||
print_user_picture($user, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
|
||||
|
||||
//Line separator to show this template fine. :-)
|
||||
echo '<br />';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php // $Id$
|
||||
|
||||
function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode='',$hook='',$printicons=1,$ratings=NULL, $aliases=true) {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$entry->userid));
|
||||
@ -13,7 +13,7 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
|
||||
echo '<tr valign="top">';
|
||||
echo '<td class="left picture">';
|
||||
|
||||
print_user_picture($user, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
|
||||
|
||||
echo '</td>';
|
||||
echo '<th class="entryheader">';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php // $Id$
|
||||
|
||||
function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mode="", $hook="", $printicons=1, $ratings=NULL, $aliases=true) {
|
||||
global $CFG, $USER, $DB;
|
||||
global $CFG, $USER, $DB, $OUTPUT;
|
||||
|
||||
|
||||
$user = $DB->get_record('user', array('id'=>$entry->userid));
|
||||
@ -13,7 +13,7 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
|
||||
echo '<tr valign="top">';
|
||||
|
||||
echo '<td class="picture">';
|
||||
print_user_picture($user, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
|
||||
echo '</td>';
|
||||
|
||||
echo '<th class="entryheader">';
|
||||
|
@ -49,6 +49,8 @@
|
||||
$strtopic = get_string("topic");
|
||||
$strentries = get_string("entries", "glossary");
|
||||
|
||||
$table = new html_table();
|
||||
|
||||
if ($course->format == "weeks") {
|
||||
$table->head = array ($strweek, $strname, $strentries);
|
||||
$table->align = array ("CENTER", "LEFT", "CENTER");
|
||||
@ -125,7 +127,7 @@
|
||||
|
||||
echo "<br />";
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
/// Finish the page
|
||||
|
||||
|
@ -1478,7 +1478,7 @@ function glossary_print_categories_menu($cm, $glossary, $hook, $category) {
|
||||
$options['id'] = $cm->id;
|
||||
$options['mode'] = 'cat';
|
||||
$options['hook'] = $hook;
|
||||
echo print_single_button("editcategories.php", $options, get_string("editcategories","glossary"), "get");
|
||||
echo $OUTPUT->button(html_form::make_button("editcategories.php", $options, get_string("editcategories","glossary"), "get"));
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
@ -1743,7 +1743,7 @@ function glossary_print_comment($course, $cm, $glossary, $entry, $comment) {
|
||||
echo '<table class="glossarycomment" cellspacing="0">';
|
||||
echo '<tr valign="top">';
|
||||
echo '<td class="left picture">';
|
||||
print_user_picture($user, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
|
||||
echo '</td>';
|
||||
echo '<td class="entryheader">';
|
||||
|
||||
|
@ -68,7 +68,9 @@
|
||||
echo '<tr>';
|
||||
}
|
||||
echo '<td class="picture">';
|
||||
print_user_picture($rating->id, $glossary->course, $rating->picture, false, false, true);
|
||||
$userpic = moodle_user_picture::make($rating, $glossary->course);
|
||||
$userpic->link = true;
|
||||
echo $OUTPUT->user_picture($userpic);
|
||||
echo '</td>';
|
||||
echo '<td class="author"><a href="'.$CFG->wwwroot.'/user/view.php?id='.$rating->id.'&course='.$glossary->course.'">'.fullname($rating).'</a></td>';
|
||||
echo '<td style="white-space:nowrap" align="center" class="rating">'.$scalemenu[$rating->rating].'</td>';
|
||||
|
@ -441,7 +441,7 @@
|
||||
echo '<th align="left">';
|
||||
|
||||
$user = $DB->get_record("user", array("id"=>$entry->userid));
|
||||
print_user_picture($user, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user, $course->id));
|
||||
$pivottoshow = fullname($user, has_capability('moodle/site:viewfullnames', get_context_instance(CONTEXT_COURSE, $course->id)));
|
||||
} else {
|
||||
echo '<th >';
|
||||
|
Loading…
x
Reference in New Issue
Block a user