diff --git a/mod/choice/index.php b/mod/choice/index.php index ab6525a778c..4b497099f45 100644 --- a/mod/choice/index.php +++ b/mod/choice/index.php @@ -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 "
"; - print_table($table); + echo $OUTPUT->table($table); echo $OUTPUT->footer(); diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 105455b8cce..b6d2cd25b29 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -475,7 +475,7 @@ function choice_show_results($choice, $course, $cm, $allresponses, $forcepublish foreach ($allresponses[0] as $user) { echo ""; echo ""; - print_user_picture($user->id, $course->id, $user->picture); + echo $OUTPUT->user_picture(moodle_user_picture::make($user->id, $course->id)); echo ""; echo "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 ''; } echo ''; - print_user_picture($user->id, $course->id, $user->picture); + echo $OUTPUT->user_picture(moodle_user_picture::make($user->id, $course->id)); echo ''; echo "wwwroot/user/view.php?id=$user->id&course=$course->id\">"; echo fullname($user, $hascapfullnames); diff --git a/mod/choice/report.php b/mod/choice/report.php index 62bba247105..fe09d7dad20 100644 --- a/mod/choice/report.php +++ b/mod/choice/report.php @@ -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 ""; $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 ""; $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 ""; } diff --git a/mod/choice/view.php b/mod/choice/view.php index 6836fca034c..f69df4660e4 100644 --- a/mod/choice/view.php +++ b/mod/choice/view.php @@ -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').'

'.get_string('liketologin'), - get_login_url(), $_SERVER['HTTP_REFERER']); + echo $OUTPUT->confirm(get_string('noguestchoose', 'choice').'

'.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 '

'. get_string('noguestchoose', 'choice') .'

'; - echo '
'; - print_single_button($CFG->wwwroot.'/course/enrol.php?id='.$course->id, NULL, - get_string('enrolme', '', format_string($course->shortname)), 'post', $CFG->framename); - echo '
'."\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(); }