]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19810 upgraded calls to print_table, print_single_button, print_user_picture...
authornicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:45:12 +0000 (08:45 +0000)
committernicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:45:12 +0000 (08:45 +0000)
mod/hotpot/index.php
mod/hotpot/lib.php
mod/hotpot/report/overview/report.php
mod/hotpot/report/simplestat/report.php
mod/hotpot/review.php

index 0ba4995fbbce74919d2287884a8bf0a1f019f896..46bce06793a7823f5e50361b6b7b548e4c40983f 100644 (file)
     $strregraderequired = get_string('regraderequired', 'hotpot');
 
     // column headings and attributes
+    $table = new html_table();
     $table->head = array();
     $table->align = array();
 
 
     echo "<br />";
 
-    print_table($table);
+    echo $OUTPUT->table($table);
 
     // Finish the page
     echo $OUTPUT->footer();
index 57b866ca1d55c2c4d19c76839022542495af646e..5e2ec5b573ff3ff772ee22fa381ea22f3b25c642 100644 (file)
@@ -1262,7 +1262,7 @@ function hotpot_print_recent_mod_activity($activity, $course, $detail=false) {
     print '<table border="0" cellpadding="3" cellspacing="0">';
 
     print '<tr><td'.$bgcolor.' class="forumpostpicture" width="35" valign="top">';
-    print_user_picture($activity->user->userid, $course, $activity->user->picture);
+    echo $OUTPUT->user_picture(moodle_user_picture::make($activity->user, $course));
     print '</td><td width="100%"><font size="2">';
 
     if ($detail) {
index 266ee9d21cb5a79bd3dcb60a2637e351b3e290a4..73ae4da87a356add83cc3f4ee109712d114dfb43 100644 (file)
@@ -9,7 +9,7 @@ class hotpot_report extends hotpot_default_report {
                return true;
        }
        function create_overview_table(&$hotpot, &$cm, &$course, &$users, &$attempts, &$questions, &$options, &$tables) {
-               global $CFG;
+               global $CFG, $OUTPUT;
                $strtimeformat = get_string('strftimedatetime');
                $is_html = ($options['reportformat']=='htm');
                $spacer = $is_html ? '&nbsp;' : ' ';
@@ -48,7 +48,7 @@ class hotpot_report extends hotpot_default_report {
                        $picture = '';
                        $name = fullname($u);
                        if ($is_html) {
-                               $picture = print_user_picture($u->userid, $course->id, $u->picture, false, true);
+                               $picture = $OUTPUT->user_picture(moodle_user_picture::make($u->userid, $course->id));
                                $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&amp;course='.$course->id.'">'.$name.'</a>';
                        }
                        $grade = isset($user->grade) && $user->grade<>'&nbsp;' ? $user->grade : $spacer;
index 1cda711c663d72d1d9b1622fa54f5a0915df678c..3c17612272ae47508901e52772736b8ef3f4192f 100644 (file)
@@ -10,7 +10,7 @@ class hotpot_report extends hotpot_default_report {
                return true;
        }
        function create_scores_table(&$hotpot, &$course, &$users, &$attempts, &$questions, &$options, &$tables) {
-               global $CFG;
+               global $CFG, $OUTPUT;
                $download = ($options['reportformat']=='htm') ? false : true;
                $is_html = ($options['reportformat']=='htm');
                $blank = ($download ? '' : '&nbsp;');
@@ -57,8 +57,8 @@ class hotpot_report extends hotpot_default_report {
                        $picture = '';
                        $name = fullname($u);
                        if ($is_html) {
-                               $picture = print_user_picture($u->userid, $course->id, $u->picture, false, true);
-                               $name = '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$u->userid.'&amp;course='.$course->id.'">'.$name.'</a>';
+                               $picture = $OUTPUT->user_picture(moodle_user_picture::make($u, $course->id));
+                               $name = $OUTPUT->link($CFG->wwwroot.'/user/view.php?id='.$u->userid.'&course='.$course->id, $name);
                        }
                        if (isset($user->grade)) {
                                $grade = $user->grade;
index 617ffa45d9a7e387057e786486ed7114ec2c407a..ef194add698191a71219ae19c7e5651f12bdbc41 100644 (file)
@@ -131,16 +131,16 @@ function hotpot_print_attempt_summary(&$hotpot, &$attempt) {
     echo $OUTPUT->box_end();
 }
 function hotpot_print_review_buttons(&$course, &$hotpot, &$attempt, $context) {
-    global $DB;
+    global $DB, $OUTPUT;
 
     print "\n".'<table border="0" align="center" cellpadding="2" cellspacing="2" class="generaltable">';
     print "\n<tr>\n".'<td align="center">';
-    print_single_button("report.php?hp=$hotpot->id", NULL, get_string('continue'), 'post');
+    echo $OUTPUT->button(html_form::make_button("report.php?hp=$hotpot->id", NULL, get_string('continue')));
     if (has_capability('mod/hotpot:viewreport',$context) && $DB->record_exists('hotpot_details', array('attempt'=>$attempt->id))) {
         print "</td>\n".'<td align="center">';
-        print_single_button("review.php?hp=$hotpot->id&attempt=$attempt->id&action=showxmlsource", NULL, get_string('showxmlsource', 'hotpot'), 'post');
+        echo $OUTPUT->button(html_form::make_button("review.php?hp=$hotpot->id&attempt=$attempt->id&action=showxmlsource", NULL, get_string('showxmlsource', 'hotpot')));
         print "</td>\n".'<td align="center">';
-        print_single_button("review.php?hp=$hotpot->id&attempt=$attempt->id&action=showxmltree", NULL, get_string('showxmltree', 'hotpot'), 'post');
+        echo $OUTPUT->button(html_form::make_button("review.php?hp=$hotpot->id&attempt=$attempt->id&action=showxmltree", NULL, get_string('showxmltree', 'hotpot')));
         $colspan = 3;
     } else {
         $colspan = 1;