]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19807 upgraded calls to print_table, print_single_button, print_user_picture...
authornicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:44:14 +0000 (08:44 +0000)
committernicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:44:14 +0000 (08:44 +0000)
mod/feedback/analysis.php
mod/feedback/analysis_course.php
mod/feedback/import.php
mod/feedback/index.php
mod/feedback/lib.php
mod/feedback/show_entries.php

index afda4ad3a1b3d3b0674277d46f15fa878c3e1f3f..2368e66a8b08f3a9e50e6ea17d4b8455069ac6b8 100644 (file)
         //button "export to excel"
         //echo '<div class="mdl-align">';
         // echo '<div class="feedback_centered_button">';
-        echo '<div class="form-buttons">';
+        echo $OUTPUT->container_start('form-buttons');
         $export_button_link = 'analysis_to_excel.php';
         $export_button_options = array('sesskey'=>sesskey(), 'id'=>$id);
         $export_button_label = get_string('export_to_excel', 'feedback');
-        print_single_button($export_button_link, $export_button_options, $export_button_label, 'post');
-        echo '</div>';
+        echo $OUTPUT->button(html_form::make_button($export_button_link, $export_button_options, $export_button_label));
+        echo $OUTPUT->container_end();
     }
 
     //get completed feedbacks
index 7f02393aa9d33833dfcb7ffea3288c0ca3fc274b..e69b9ad49c9711e5111951f54109219b66e563db 100644 (file)
 
     if( $capabilities->viewreports ) {
         //button "export to excel"
-        echo '<div class="mdl-align">';
+        echo $OUTPUT->container_start('mdl-align');
         $export_button_link = 'analysis_to_excel.php';
         $export_button_options = array('sesskey'=>sesskey(), 'id'=>$id, 'coursefilter'=>$coursefilter);
         $export_button_label = get_string('export_to_excel', 'feedback');
-        print_single_button($export_button_link, $export_button_options, $export_button_label, 'post');
-        echo '</div>';
+        echo $OUTPUT->button(html_form::make_button($export_button_link, $export_button_options, $export_button_label));
+        echo $OUTPUT->container_end();
     }
 
     //get the groupid
index 6aa40313027232302f45861da20061f2617578a2..3267b2b0f88013918208b78ce7c34824aad2610b 100644 (file)
 
      <?php
 
-    echo '<div class="mdl-align">';
-    print_single_button('edit.php', array('id'=>$id, 'do_show'=>'templates'), get_string('cancel'));
-    echo '</div>';
+    echo $OUTPUT->container_start('mdl-align');
+    echo $OUTPUT->button(html_form::make_button('edit.php', array('id'=>$id, 'do_show'=>'templates'), get_string('cancel')));
+    echo $OUTPUT->container_end();
     echo $OUTPUT->footer();
 
     function feedback_load_xml_data($filename) {
index fc310d6b329178b47aa12c0195e85d8515d23477..dcef4b584446c182e21cd0627f1736caf3028ee8 100644 (file)
@@ -50,6 +50,8 @@
     $strtopic  = get_string("topic");
     $strresponses = get_string('responses', 'feedback');
 
+    $table = new html_table();
+
     if ($course->format == "weeks") {
         if($capabilities->viewreports) {
             $table->head  = array ($strweek, $strname, $strresponses);
 
     echo "<br />";
 
-    print_table($table);
+    echo $OUTPUT->table($table);
 
     /// Finish the page
 
index 13f72ed693c0b4e6b94f6117794ff3e0c239c8d2..1b4b9ab9216add323419c739fce0b8e77a447eef 100644 (file)
@@ -329,7 +329,7 @@ function feedback_print_recent_mod_activity($activity, $courseid, $detail, $modn
     echo '<table border="0" cellpadding="3" cellspacing="0" class="forum-recent">';
 
     echo "<tr><td class=\"userpicture\" valign=\"top\">";
-    print_user_picture($activity->user->userid, $courseid, $activity->user->picture);
+    echo $OUTPUT->user_picture(moodle_user_picture::make($activity->user, $courseid));
     echo "</td><td>";
 
     if ($detail) {
index 5a93c32530cf7c68c2f7f74382e127f714503beb..62eed2f5289bef85d6e7f3538f4c2c913dab409d 100644 (file)
                         <table width="100%">
                             <tr>
                                 <td align="left">
-                                    <?php echo print_user_picture($student->id, $course->id, $student->picture, false, true);?>
+                                    <?php echo $OUTPUT->user_picture(moodle_user_picture::make($student, $course->id));?>
                                 </td>
                                 <td align="left">
                                     <?php echo fullname($student);?>
                                     $show_button_link = $ME;
                                     $show_button_options = array('sesskey'=>sesskey(), 'userid'=>$student->id, 'do_show'=>'showoneentry', 'id'=>$id);
                                     $show_button_label = get_string('show_entries', 'feedback');
-                                    print_single_button($show_button_link, $show_button_options, $show_button_label, 'post');
+                                    echo $OUTPUT->button(html_form::make_button($show_button_link, $show_button_options, $show_button_label));
                                 ?>
                                 </td>
                     <?php
                                     $delete_button_link = 'delete_completed.php';
                                     $delete_button_options = array('sesskey'=>sesskey(), 'completedid'=>$feedbackcompleted->id, 'do_show'=>'showoneentry', 'id'=>$id);
                                     $delete_button_label = get_string('delete_entry', 'feedback');
-                                    print_single_button($delete_button_link, $delete_button_options, $delete_button_label, 'post');
+                                    echo $OUTPUT->button(html_form::make_button($delete_button_link, $delete_button_options, $delete_button_label));
                                 ?>
                                 </td>
                     <?php
                             $show_anon_button_link = 'show_entries_anonym.php';
                             $show_anon_button_options = array('sesskey'=>sesskey(), 'userid'=>0, 'do_show'=>'showoneentry', 'id'=>$id);
                             $show_anon_button_label = get_string('show_entries', 'feedback');
-                            print_single_button($show_anon_button_link, $show_anon_button_options, $show_anon_button_label, 'post');
+                            echo $OUTPUT->button(html_form::make_button($show_anon_button_link, $show_anon_button_options, $show_anon_button_label));
                         ?>
                     </td>
                 </tr>