diff --git a/admin/blocks.php b/admin/blocks.php index 3815328a97e..f6acc1a44b5 100644 --- a/admin/blocks.php +++ b/admin/blocks.php @@ -57,9 +57,7 @@ } if (!$confirm) { - notice_yesno(get_string('blockdeleteconfirm', '', $strblockname), - 'blocks.php?delete='.$block->id.'&confirm=1&sesskey='.sesskey(), - 'blocks.php'); + echo $OUTPUT->confirm(get_string('blockdeleteconfirm', '', $strblockname), 'blocks.php?delete='.$block->id.'&confirm=1', 'blocks.php'); echo $OUTPUT->footer(); exit; diff --git a/admin/delete.php b/admin/delete.php index 7855e75939d..215c766172b 100644 --- a/admin/delete.php +++ b/admin/delete.php @@ -22,16 +22,21 @@ if (empty($sure)) { $optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey()); - notice_yesno ('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', - 'delete.php', 'index.php', $optionsyes, NULL, 'post', 'get'); + + $formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes')); + $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get'); + echo $OUTPUT->confirm('Are you completely sure you want to delete everything inside the directory '. $deletedir .' ?', $formcontinue, $formcancel); echo $OUTPUT->footer(); exit; } if (!data_submitted() or empty($reallysure)) { $optionsyes = array('sure'=>'yes', 'sesskey'=>sesskey(), 'reallysure'=>'yes'); - notice_yesno ('Are you REALLY REALLY completely sure you want to delete everything inside the directory '. $deletedir .' (this includes all user images, and any other course files that have been created) ?', - 'delete.php', 'index.php', $optionsyes, NULL, 'post', 'get'); + $formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes')); + $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get'); + echo $OUTPUT->confirm('Are you REALLY REALLY completely sure you want to delete everything inside the directory '. + $deletedir .' (this includes all user images, and any other course files that have been created) ?', + $formcontinue, $formcancel); echo $OUTPUT->footer(); exit; } diff --git a/admin/enrol.php b/admin/enrol.php index 598b0cb7e03..4eafca50105 100644 --- a/admin/enrol.php +++ b/admin/enrol.php @@ -64,7 +64,7 @@ echo "
' . get_string('filterallwarning', 'filters') . '
'; echo $OUTPUT->footer(); diff --git a/admin/index.php b/admin/index.php index 5287a39abee..1b5be55960b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -127,8 +127,7 @@ if (!core_tables_exist()) { $copyrightnotice = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $copyrightnotice); // extremely ugly validation hack echo $OUTPUT->box($copyrightnotice, 'copyrightnotice'); echo ''; $baseurl = new moodle_url(null, array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage)); $pagingbar = moodle_paging_bar::make($aclcount, $page, $perpage, $baseurl); diff --git a/admin/mnet/index.php b/admin/mnet/index.php index 105e7fee768..beda619e34a 100644 --- a/admin/mnet/index.php +++ b/admin/mnet/index.php @@ -49,13 +49,10 @@ } elseif (!empty($form->submit) && $form->submit == get_string('delete')) { $MNET->get_private_key(); $SESSION->mnet_confirm_delete_key = md5(sha1($MNET->keypair['keypair_PEM'])).':'.time(); - notice_yesno(get_string("deletekeycheck", "mnet"), - "index.php?sesskey=".sesskey()."&confirm=".md5($MNET->public_key), - "index.php", - array('sesskey' => sesskey()), - NULL, - 'post', - 'get'); + + $formcontinue = html_form::make_button('index.php', array('confirm' => md5($MNET->public_key)), get_string('yes')); + $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get'); + echo $OUTPUT->confirm(get_string("deletekeycheck", "mnet"), $formcontinue, $formcancel); exit; } else { // We're deleting diff --git a/admin/mnet/mnet_themes.html b/admin/mnet/mnet_themes.html index 0fbe99e9022..67de832256a 100644 --- a/admin/mnet/mnet_themes.html +++ b/admin/mnet/mnet_themes.html @@ -47,7 +47,7 @@ print_tabs(array($tabs), 'mnetthemes'); $options['choose'] = $unlikely_name;// Something unlikely to ever be a theme name... initially $unlikely_name = 'ZoqZoqZ'; $options['sesskey'] = $sesskey; $options['hostid'] = $mnet_peer->id; - print_single_button('mnet_themes.php', $options, $strchoose); + echo $OUTPUT->button(html_form::make_button('mnet_themes.php', $options, $strchoose)); echo ''; echo ""; @@ -116,7 +116,7 @@ print_tabs(array($tabs), 'mnetthemes'); $options['choose'] = $theme; $options['sesskey'] = $sesskey; $options['hostid'] = $mnet_peer->id; - print_single_button('mnet_themes.php', $options, $strchoose); + echo $OUTPUT->button(html_form::make_button('mnet_themes.php', $options, $strchoose)); echo ''; echo ""; } diff --git a/admin/modules.php b/admin/modules.php index 6bbbdbdf439..a8938c16ac1 100644 --- a/admin/modules.php +++ b/admin/modules.php @@ -77,9 +77,7 @@ $strmodulename = get_string("modulename", "$delete"); if (!$confirm) { - notice_yesno(get_string("moduledeleteconfirm", "", $strmodulename), - "modules.php?delete=$delete&confirm=1&sesskey=".sesskey(), - "modules.php"); + echo $OUTPUT->confirm(get_string("moduledeleteconfirm", "", $strmodulename), "modules.php?delete=$delete&confirm=1", "modules.php"); echo $OUTPUT->footer(); exit; diff --git a/admin/multilangupgrade.php b/admin/multilangupgrade.php index 22e78606002..801c8b05850 100644 --- a/admin/multilangupgrade.php +++ b/admin/multilangupgrade.php @@ -18,7 +18,7 @@ $strmultilangupgrade = get_String('multilangupgradeinfo', 'admin'); if (!$go or !data_submitted() or !confirm_sesskey()) { /// Print a form $optionsyes = array('go'=>1, 'sesskey'=>sesskey()); - notice_yesno($strmultilangupgrade, 'multilangupgrade.php', 'index.php', $optionsyes, null, 'post', 'get'); + echo $OUTPUT->confirm($strmultilangupgrade, new moodle_url('multilangupgrade.php', $optionsyes), 'index.php'); echo $OUTPUT->footer(); die; } diff --git a/admin/portfolio.php b/admin/portfolio.php index fbba7452f2c..3dcdc2ef1d9 100644 --- a/admin/portfolio.php +++ b/admin/portfolio.php @@ -101,7 +101,7 @@ if (!empty($edit) || !empty($new)) { } exit; } - notice_yesno(get_string('sure', 'portfolio', $instance->get('name')), $sesskeyurl . '&delete=' . $delete . '&sure=yes', $baseurl); + echo $OUTPUT->confirm(get_string('sure', 'portfolio', $instance->get('name')), $sesskeyurl . '&delete=' . $delete . '&sure=yes', $baseurl); $return = false; } diff --git a/admin/qtypes.php b/admin/qtypes.php index fb5cb7f24c5..4e2ff798480 100644 --- a/admin/qtypes.php +++ b/admin/qtypes.php @@ -122,9 +122,9 @@ $qtypename = $QTYPES[$delete]->local_name(); admin_externalpage_print_header(); echo $OUTPUT->heading(get_string('deleteqtypeareyousure', 'admin', $qtypename)); - notice_yesno(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename), - admin_url('qtypes.php?delete=' . $delete . '&confirm=1&sesskey=' . sesskey()), - admin_url('qtypes.php'), NULL, NULL, 'post', 'get'); + echo $OUTPUT->confirm(get_string('deleteqtypeareyousuremessage', 'admin', $qtypename), + admin_url('qtypes.php?delete=' . $delete . '&confirm=1'), + admin_url('qtypes.php')); echo $OUTPUT->footer(); exit; } diff --git a/admin/report/configlog/index.php b/admin/report/configlog/index.php index 869644400cd..46fe4df471d 100644 --- a/admin/report/configlog/index.php +++ b/admin/report/configlog/index.php @@ -67,7 +67,7 @@ if (($CFG->fullnamedisplay == 'firstname lastname') or $fullnamedisplay = $hcolumns['lastname'].' / '.$hcolumns['firstname']; } -$table = new object(); +$table = new html_table(); $table->head = array($hcolumns['timemodified'], $fullnamedisplay, $hcolumns['plugin'], $hcolumns['name'], $hcolumns['value'], $hcolumns['oldvalue']); $table->align = array('left', 'left', 'left', 'left', 'left', 'left'); $table->size = array('30%', '10%', '10%', '10%', '20%', '20%'); @@ -104,6 +104,6 @@ foreach ($rs as $log) { } $rs->close(); -print_table($table); +echo $OUTPUT->table($table); echo $OUTPUT->footer(); diff --git a/admin/report/courseoverview/index.php b/admin/report/courseoverview/index.php index 54dbae9fb73..3f1a72961a6 100644 --- a/admin/report/courseoverview/index.php +++ b/admin/report/courseoverview/index.php @@ -48,6 +48,7 @@ echo ''; @@ -98,7 +99,7 @@ echo '