]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19798 upgraded calls to print_table, print_single_button, print_user_picture...
authornicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:41:11 +0000 (08:41 +0000)
committernicolasconnault <nicolasconnault>
Thu, 20 Aug 2009 08:41:11 +0000 (08:41 +0000)
group/autogroup.php
group/delete.php
group/group.php
group/grouping.php
group/groupings.php
group/overview.php

index 557c4ae0fef9739406da4550421fc39429c1b9b9..b937baf518720208a866c70c471e9ea2a89b473f 100644 (file)
@@ -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;
index 8dccd6a14ac2aa333be950ca19d8f9310fb79e4e..c7868d671d0431d4888db8190faf80fb6a5fcc3c 100644 (file)
@@ -66,7 +66,9 @@ if ($confirm && data_submitted()) {
         }
         $message.='</ul>';
     }
-    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();
 }
 ?>
index d3c6dd94612a46aafcacf56f1796dc1600eedad6..df9cfeadfe106a801924f7a8b12de4e747e65994 100644 (file)
@@ -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;
 
index 83dd504b9da1e641ed9156826e2162862a375f3f..61b2ff97b02aee3c53051f34e185f882b94a3442 100644 (file)
@@ -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;
 
index 190b435bd33c137fca511f42b8fb121e020fe588..a6619d71014fa628c9fd2a8dc4eb2a0aee86689e 100644 (file)
@@ -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 '<div class="buttons">';
-print_single_button('grouping.php', array('courseid'=>$courseid), $srtnewgrouping);
-echo '</div>';
+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();
 
index 66ea5f8484c23661a025ae68ab5bd0a626333701..53b7b4ec377de11ffc841e91ed424c3dae1f9db9 100644 (file)
@@ -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;
 }