mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 08:55:15 +02:00
MDL-19805 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno
This commit is contained in:
parent
af7bad7997
commit
d3fd549372
@ -42,6 +42,8 @@
|
||||
|
||||
$timenow = time();
|
||||
|
||||
$table = new html_table();
|
||||
|
||||
if ($course->format == "weeks") {
|
||||
$table->head = array (get_string("week"), get_string("question"), get_string("answer"));
|
||||
$table->align = array ("center", "left", "left");
|
||||
@ -92,7 +94,7 @@
|
||||
}
|
||||
}
|
||||
echo "<br />";
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
@ -475,7 +475,7 @@ function choice_show_results($choice, $course, $cm, $allresponses, $forcepublish
|
||||
foreach ($allresponses[0] as $user) {
|
||||
echo "<tr>";
|
||||
echo "<td class=\"picture\">";
|
||||
print_user_picture($user->id, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user->id, $course->id));
|
||||
echo "</td><td class=\"fullname\">";
|
||||
echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">";
|
||||
echo fullname($user, $hascapfullnames);
|
||||
@ -501,7 +501,7 @@ function choice_show_results($choice, $course, $cm, $allresponses, $forcepublish
|
||||
echo '<input type="checkbox" name="attemptid[]" value="'. $user->id. '" />';
|
||||
}
|
||||
echo '</td><td class="picture">';
|
||||
print_user_picture($user->id, $course->id, $user->picture);
|
||||
echo $OUTPUT->user_picture(moodle_user_picture::make($user->id, $course->id));
|
||||
echo '</td><td class="fullname">';
|
||||
echo "<a href=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">";
|
||||
echo fullname($user, $hascapfullnames);
|
||||
|
@ -213,13 +213,13 @@
|
||||
$options = array();
|
||||
$options["id"] = "$cm->id";
|
||||
$options["download"] = "ods";
|
||||
print_single_button("report.php", $options, get_string("downloadods"));
|
||||
echo $OUTPUT->button(html_form::make_button("report.php", $options, get_string("downloadods")));
|
||||
echo "</td><td>";
|
||||
$options["download"] = "xls";
|
||||
print_single_button("report.php", $options, get_string("downloadexcel"));
|
||||
echo $OUTPUT->button(html_form::make_button("report.php", $options, get_string("downloadexcel")));
|
||||
echo "</td><td>";
|
||||
$options["download"] = "txt";
|
||||
print_single_button("report.php", $options, get_string("downloadtext"));
|
||||
echo $OUTPUT->button(html_form::make_button("report.php", $options, get_string("downloadtext")));
|
||||
|
||||
echo "</td></tr></table>";
|
||||
}
|
||||
|
@ -126,8 +126,8 @@
|
||||
$sitecontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
|
||||
if (has_capability('moodle/legacy:guest', $sitecontext, NULL, false)) { // Guest on whole site
|
||||
notice_yesno(get_string('noguestchoose', 'choice').'<br /><br />'.get_string('liketologin'),
|
||||
get_login_url(), $_SERVER['HTTP_REFERER']);
|
||||
echo $OUTPUT->confirm(get_string('noguestchoose', 'choice').'<br /><br />'.get_string('liketologin'),
|
||||
get_login_url(), new moodle_url);
|
||||
|
||||
} else if (has_capability('moodle/legacy:guest', $context, NULL, false)) { // Guest in this course only
|
||||
$SESSION->wantsurl = $FULLME;
|
||||
@ -135,10 +135,9 @@
|
||||
|
||||
echo $OUTPUT->box_start('generalbox', 'notice');
|
||||
echo '<p align="center">'. get_string('noguestchoose', 'choice') .'</p>';
|
||||
echo '<div class="continuebutton">';
|
||||
print_single_button($CFG->wwwroot.'/course/enrol.php?id='.$course->id, NULL,
|
||||
get_string('enrolme', '', format_string($course->shortname)), 'post', $CFG->framename);
|
||||
echo '</div>'."\n";
|
||||
echo $OUTPUT->container_start('continuebutton');
|
||||
echo $OUTPUT->button(html_form::make_button($CFG->wwwroot.'/course/enrol.php?id='.$course->id, NULL, get_string('enrolme', '', format_string($course->shortname))));
|
||||
echo $OUTPUT->container_end();
|
||||
echo $OUTPUT->box_end();
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user