]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19805 upgraded calls to print_table, print_single_button, print_user_picture...
authornicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:43:12 +0000 (08:43 +0000)
committernicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:43:12 +0000 (08:43 +0000)
mod/choice/index.php
mod/choice/lib.php
mod/choice/report.php
mod/choice/view.php

index ab6525a778cb93775e62e46690d9cfdf32b9f15f..4b497099f458fc4a4e5a868f5d35dc6f3472e071 100644 (file)
@@ -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();
 
index 105455b8cce5264383f34afbb565b4ed375ecbf8..b6d2cd25b29198cddcd43f3861173116002c4184 100644 (file)
@@ -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&amp;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&amp;course=$course->id\">";
                             echo fullname($user, $hascapfullnames);
index 62bba2471052f317bd7853eba9405ae40dfce89c..fe09d7dad20ecb41da59567f8528bb37c331d11f 100644 (file)
         $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>";
     }
index 6836fca034c36a98e231cfb07d7833381b746511..f69df4660e469c272bbb1ac0b963015a56c09d42 100644 (file)
         $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();
 
         }