From 768cefa084e7e0f7d3f2246b3acdf7c8bac4185a Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Thu, 20 Aug 2009 08:41:11 +0000 Subject: [PATCH] MDL-19798 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno --- group/autogroup.php | 4 ++-- group/delete.php | 4 +++- group/group.php | 4 +++- group/grouping.php | 4 +++- group/groupings.php | 10 +++++----- group/overview.php | 4 ++-- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/group/autogroup.php b/group/autogroup.php index 557c4ae0fe..b937baf518 100644 --- a/group/autogroup.php +++ b/group/autogroup.php @@ -143,7 +143,7 @@ if ($editform->is_cancelled()) { } if (isset($data->preview)) { - $table = new object(); + $table = new html_table(); if ($data->allocateby == 'no') { $table->head = array(get_string('groupscount', 'group', $numgrps)); $table->size = array('100%'); @@ -176,7 +176,7 @@ if ($editform->is_cancelled()) { $table->data[] = $line; } - $preview .= print_table($table, true); + $preview .= $OUTPUT->table($table); } else { $grouping = null; diff --git a/group/delete.php b/group/delete.php index 8dccd6a14a..c7868d671d 100644 --- a/group/delete.php +++ b/group/delete.php @@ -66,7 +66,9 @@ if ($confirm && data_submitted()) { } $message.=''; } - notice_yesno($message, 'delete.php', 'index.php', $optionsyes, $optionsno, 'post', 'get'); + $formcontinue = html_form::make_button('delete.php', $optionsyes, get_string('yes'), 'post'); + $formcancel = html_form::make_button('index.php', $optionsno, get_string('no'), 'get'); + echo $OUTPUT->confirm($message, $formcontinue, $formcancel); echo $OUTPUT->footer(); } ?> diff --git a/group/group.php b/group/group.php index d3c6dd9461..df9cfeadfe 100644 --- a/group/group.php +++ b/group/group.php @@ -60,7 +60,9 @@ if ($id and $delete) { print_header(get_string('deleteselectedgroup', 'group'), get_string('deleteselectedgroup', 'group')); $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('id'=>$courseid); - notice_yesno(get_string('deletegroupconfirm', 'group', $group->name), 'group.php', 'index.php', $optionsyes, $optionsno, 'get', 'get'); + $formcontinue = html_form::make_button('group.php', $optionsyes, get_string('yes'), 'get'); + $formcancel = html_form::make_button($baseurl, $optionsno, get_string('no'), 'get'); + echo $OUTPUT->confirm(get_string('deletegroupconfirm', 'group', $group->name), $formcontinue, $formcancel); echo $OUTPUT->footer(); die; diff --git a/group/grouping.php b/group/grouping.php index 83dd504b9d..61b2ff97b0 100644 --- a/group/grouping.php +++ b/group/grouping.php @@ -54,7 +54,9 @@ if ($id and $delete) { print_header(get_string('deletegrouping', 'group'), get_string('deletegrouping', 'group')); $optionsyes = array('id'=>$id, 'delete'=>1, 'courseid'=>$courseid, 'sesskey'=>sesskey(), 'confirm'=>1); $optionsno = array('id'=>$courseid); - notice_yesno(get_string('deletegroupingconfirm', 'group', $grouping->name), 'grouping.php', 'groupings.php', $optionsyes, $optionsno, 'get', 'get'); + $formcontinue = html_form::make_button('grouping.php', $optionsyes, get_string('yes'), 'get'); + $formcancel = html_form::make_button('groupings.php', $optionsno, get_string('no'), 'get'); + echo $OUTPUT->confirm(get_string('deletegroupingconfirm', 'group', $grouping->name), $formcontinue, $formcancel); echo $OUTPUT->footer(); die; diff --git a/group/groupings.php b/group/groupings.php index 190b435bd3..a6619d7101 100644 --- a/group/groupings.php +++ b/group/groupings.php @@ -67,17 +67,17 @@ if ($groupings = $DB->get_records('groupings', array('courseid'=>$course->id), ' $data[] = $line; } } -$table = new object(); +$table = new html_table(); $table->head = array($strgrouping, $strgroups, $struses, $stredit); $table->size = array('30%', '50%', '10%', '10%'); $table->align = array('left', 'left', 'center', 'center'); $table->width = '90%'; $table->data = $data; -print_table($table); +echo $OUTPUT->table($table); -echo '
'; -print_single_button('grouping.php', array('courseid'=>$courseid), $srtnewgrouping); -echo '
'; +echo $OUTPUT->container_start('buttons'); +echo $OUTPUT->button(html_form::make_button('grouping.php', array('courseid'=>$courseid), $srtnewgrouping)); +echo $OUTPUT->container_end(); echo $OUTPUT->footer(); diff --git a/group/overview.php b/group/overview.php index 66ea5f8484..53b7b4ec37 100644 --- a/group/overview.php +++ b/group/overview.php @@ -151,7 +151,7 @@ foreach ($members as $gpgid=>$groupdata) { if ($groupingid and $groupingid != $gpgid) { continue; // do not show } - $table = new object(); + $table = new html_table(); $table->head = array(get_string('groupscount', 'group', count($groupdata)), get_string('groupmembers', 'group'), get_string('usercount', 'group')); $table->size = array('20%', '70%', '10%'); $table->align = array('left', 'left', 'center'); @@ -191,7 +191,7 @@ foreach ($members as $gpgid=>$groupdata) { echo $OUTPUT->box(format_text($groupings[$gpgid]->description), 'generalbox boxwidthnarrow boxaligncenter'); } } - print_table($table, false); + echo $OUTPUT->table($table); $printed = true; } -- 2.39.5