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;
}
$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');
}
$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;
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()) {
}
$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);
}
$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
$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);
$t2->data[] = array('','',get_string('noreturns', 'enrol_authorize'),'','');
}
echo "<h4>" . get_string('returns', 'enrol_authorize') . "</h4>\n";
- print_table($t2);
+ echo $OUTPUT->table($t2);
}
}
* @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');
print_header($strloginto, $course->fullname, $navigation);
echo '<br />';
- notice_yesno(get_string('enrolmentconfirmation'), "enrol.php?id=$course->id&confirm=1",
- "enrol.php?id=$course->id&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;