]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19795 upgraded calls to print_table, print_single_button, print_user_picture...
authornicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:40:32 +0000 (08:40 +0000)
committernicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:40:32 +0000 (08:40 +0000)
enrol/authorize/enrol.php
enrol/authorize/locallib.php
enrol/manual/enrol.html
enrol/manual/enrol.php

index 08491e7b384707bf5737b3213ef6b2202c126348..b6eff1f84cc45437e332bd794a18150e66a191e4 100755 (executable)
@@ -315,13 +315,13 @@ class enrolment_plugin_authorize
 
                     load_all_capabilities();
 
-                    $OUTPUT->box_start('generalbox notice');
+                    echo $OUTPUT->box_start('generalbox notice');
                     echo '<p>'. get_string('paymentthanks', 'moodle', $course->fullname) .'</p>';
-                    echo '<div class="buttons">';
-                    print_single_button("$CFG->wwwroot/enrol/authorize/index.php", array('order'=>$order->id), get_string('payments'));
-                    print_single_button("$CFG->wwwroot/course/view.php", array('id'=>$course->id), $course->fullname);
-                    echo '</div>';
-                    $OUTPUT->box_end();
+                    echo $OUTPUT->container_start('buttons');
+                    echo $OUTPUT->button(html_form::make_button("$CFG->wwwroot/enrol/authorize/index.php", array('order'=>$order->id), get_string('payments')));
+                    echo $OUTPUT->button(html_form::make_button("$CFG->wwwroot/course/view.php", array('id'=>$course->id), $course->fullname));
+                    echo $OUTPUT->container_end();
+                    echo $OUTPUT->box_end();
                     echo $OUTPUT->footer();
                     exit; // break;
                 }
index 14dae45f56203a2bde97e73606af408a228c2b68..057dc2171a6d912189fe217a65bfc5cf5ed79804 100644 (file)
@@ -274,7 +274,7 @@ function authorize_print_order($orderid)
     $navigation = build_navigation($navlinks);
     print_header("$course->shortname: $authstrs->paymentmanagement", $authstrs->orderdetails, $navigation, '', '', false, $buttons);
 
-    $table = new stdClass;
+    $table = new html_table();
     $table->width = '100%';
     $table->size = array('30%', '70%');
     $table->align = array('right', 'left');
@@ -322,7 +322,7 @@ function authorize_print_order($orderid)
         }
         $table->data[] = array("<b>$strs->confirm:</b>", get_string('captureyes', 'enrol_authorize') . '<br />' .
                                authorize_print_action_button($orderid, ORDER_CAPTURE, 0, true, false, $strs->no));
-        print_table($table);
+        echo $OUTPUT->table($table);
     }
     elseif (ORDER_REFUND == $do && in_array(ORDER_REFUND, $statusandactions->actions)) {
         $refunded = 0.0;
@@ -377,7 +377,7 @@ function authorize_print_order($orderid)
                      get_string('canbecredit', 'enrol_authorize', $a) . '<br />';
         $table->data[] = array("<b>$strs->confirm:</b>",
                                authorize_print_action_button($orderid, ORDER_REFUND, 0, true, $authstrs->unenrolstudent, $strs->no, $extrahtml));
-        print_table($table);
+        echo $OUTPUT->table($table);
     }
     elseif (ORDER_DELETE == $do && in_array(ORDER_DELETE, $statusandactions->actions)) {
         if ($confirm && confirm_sesskey()) {
@@ -389,7 +389,7 @@ function authorize_print_order($orderid)
         }
         $table->data[] = array("<b>$strs->confirm:</b>",
                                authorize_print_action_button($orderid, ORDER_DELETE, 0, true, $authstrs->unenrolstudent,$strs->no));
-        print_table($table);
+        echo $OUTPUT->table($table);
     }
     elseif (ORDER_VOID == $do) { // special case: cancel original or refunded transaction?
         $suborderid = optional_param('suborder', 0, PARAM_INT);
@@ -411,7 +411,7 @@ function authorize_print_order($orderid)
             }
             $table->data[] = array("<b>$strs->confirm:</b>", get_string('voidyes', 'enrol_authorize') . '<br />' .
                                    authorize_print_action_button($orderid, ORDER_VOID, 0, true, false, $strs->no));
-            print_table($table);
+            echo $OUTPUT->table($table);
         }
         elseif (!empty($suborderid)) { // cancel refunded
             $sql = "SELECT r.*, e.courseid, e.paymentmethod
@@ -452,15 +452,15 @@ function authorize_print_order($orderid)
                 $a->amount = $suborder->amount;
                 $table->data[] = array("<b>$strs->confirm:</b>", get_string('subvoidyes', 'enrol_authorize', $a) . '<br />' .
                                        authorize_print_action_button($orderid, ORDER_VOID, $suborderid, true, $authstrs->unenrolstudent, $strs->no));
-                print_table($table);
+                echo $OUTPUT->table($table);
             }
         }
     }
     else {
-        print_table($table);
+        echo $OUTPUT->table($table);
 
         if ($settled) { // show refunds.
-            $t2 = new stdClass;
+            $t2 = new html_table();
             $t2->size = array('45%', '15%', '20%', '10%', '10%');
             $t2->align = array('right', 'right', 'right', 'right', 'right');
             $t2->head = array($authstrs->settlementdate, $authstrs->transid, $strs->status, $strs->action, $authstrs->amount);
@@ -504,7 +504,7 @@ function authorize_print_order($orderid)
                 $t2->data[] = array('','',get_string('noreturns', 'enrol_authorize'),'','');
             }
             echo "<h4>" . get_string('returns', 'enrol_authorize') . "</h4>\n";
-            print_table($t2);
+            echo $OUTPUT->table($t2);
         }
     }
 
index b1ff63de5ff8489315f8248f177f8ddcd7e40cda..d94dc14059e08ac3bd771c6ab1d1900c6c35bd5f 100644 (file)
@@ -40,7 +40,7 @@
     if (isguestuser()) {
         echo $OUTPUT->box_start('centerpara');
         $loginurl = get_login_url();
-        print_single_button($loginurl, null, get_string('login'));
+        echo $OUTPUT->button(html_form::make_button($loginurl, null, get_string('login')));
         echo $OUTPUT->box_end();
     }
 ?>
index fcf320b8e06827b2ec48d46e399bdd0f3977b8c6..862b8db3f16399b51aac6a288be4114c24862618 100644 (file)
@@ -48,7 +48,7 @@ var $errormsg;
 * @param    course  current course object
 */
 function print_entry($course) {
-    global $CFG, $USER, $SESSION, $THEME;
+    global $CFG, $USER, $SESSION, $THEME, $OUTPUT;
 
     $strloginto = get_string('loginto', '', $course->shortname);
     $strcourses = get_string('courses');
@@ -71,8 +71,7 @@ function print_entry($course) {
 
             print_header($strloginto, $course->fullname, $navigation);
             echo '<br />';
-            notice_yesno(get_string('enrolmentconfirmation'), "enrol.php?id=$course->id&amp;confirm=1",
-                                                              "enrol.php?id=$course->id&amp;cancel=1");
+            echo $OUTPUT->confirm(get_string('enrolmentconfirmation'), "enrol.php?id=$course->id&confirm=1", "enrol.php?id=$course->id&cancel=1");
             echo $OUTPUT->footer();
             exit;