MDL-19798 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno

This commit is contained in:
nicolasconnault
2009-08-20 08:41:11 +00:00
parent 03fcc729ab
commit 768cefa084
6 changed files with 18 additions and 12 deletions
+2 -2
View 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;
+3 -1
View 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();
}
?>
+3 -1
View 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;
+3 -1
View 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;
+5 -5
View 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();
+2 -2
View 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;
}