$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");
}
}
echo "<br />";
- print_table($table);
+ echo $OUTPUT->table($table);
echo $OUTPUT->footer();
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);
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);
$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>";
}
$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;
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();
}