diff --git a/notes/delete.php b/notes/delete.php
index f187ff795e3..1d8ad9f3a9c 100644
--- a/notes/delete.php
+++ b/notes/delete.php
@@ -60,7 +60,7 @@ if (data_submitted() && confirm_sesskey()) {
$nav[] = array('name' => get_string('notes', 'notes'), 'link' => $CFG->wwwroot . '/notes/index.php?course=' . $course->id . '&user=' . $user->id, 'type' => 'misc');
$nav[] = array('name' => get_string('delete'), 'link' => '', 'type' => 'activity');
print_header($course->shortname . ': ' . $strnotes, $course->fullname, build_navigation($nav));
- notice_yesno(get_string('deleteconfirm', 'notes'), 'delete.php', 'index.php', $optionsyes, $optionsno, 'post', 'get');
+ echo $OUTPUT->confirm(get_string('deleteconfirm', 'notes'), new moodle_url('delete.php',$optionsyes), new moodle_url('index.php',$optionsno));
echo '
';
note_print($note, NOTES_SHOW_BODY | NOTES_SHOW_HEAD);
echo $OUTPUT->footer();
diff --git a/notes/lib.php b/notes/lib.php
index d0981424395..701ec0ed232 100644
--- a/notes/lib.php
+++ b/notes/lib.php
@@ -164,7 +164,7 @@ function note_get_state_names() {
* @param int $detail OR-ed NOTES_SHOW_xyz flags that specify which note parts to print
*/
function note_print($note, $detail = NOTES_SHOW_FULL) {
- global $CFG, $USER, $DB;
+ global $CFG, $USER, $DB, $OUTPUT;
if (!$user = $DB->get_record('user', array('id'=>$note->userid))) {
debugging("User $note->userid not found");
@@ -189,7 +189,7 @@ function note_print($note, $detail = NOTES_SHOW_FULL) {
if ($detail & NOTES_SHOW_HEAD) {
echo '