}
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;
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;
}
echo "<div>";
echo "<input type=\"hidden\" name=\"sesskey\" value=\"".sesskey()."\" />";
- $table = new stdClass();
+ $table = new html_table();
$table->head = array(get_string('name'), get_string('enable'), get_string('default'), $str->settings);
$table->align = array('left', 'center', 'center', 'center');
$table->size = array('60%', '', '', '15%');
}
asort($table->data);
- print_table($table);
+ echo $OUTPUT->table($table);
echo "<div style=\"text-align:center\"><input type=\"submit\" value=\"".get_string("savechanges")."\" /></div>\n";
echo "</div>";
$title = get_string('deletefilterareyousure', 'admin', $filtername);
admin_externalpage_print_header();
echo $OUTPUT->heading($title);
- notice_yesno(get_string('deletefilterareyousuremessage', 'admin', $filtername), $returnurl .
- '?action=delete&filterpath=' . $filterpath . '&confirm=1&sesskey=' . sesskey(),
- $returnurl, NULL, NULL, 'post', 'get');
+
+ $linkcontinue = new moodle_url($returnurl, array('action' => 'delete', 'filterpath' => $filterpath, 'confirm' => 1));
+ $formcancel = html_form::make_button($returnurl, null, get_string('no'), 'get');
+ echo $OUTPUT->confirm(get_string('deletefilterareyousuremessage', 'admin', $filtername), $linkcontinue, $formcancel);
echo $OUTPUT->footer();
exit;
}
}
$stringfilters = filter_get_string_filters();
- $table = new object();
+ $table = new html_table();
$table->head = array(get_string('filter'), get_string('isactive', 'filters'),
get_string('order'), get_string('applyto', 'filters'), get_string('settings'), get_string('delete'));
$table->align = array('left', 'left', 'center', 'left', 'left');
$table->rowclasses[] = 'dimmed_text';
}
- print_table($table);
+ echo $OUTPUT->table($table);
echo '<p class="filtersettingnote">' . get_string('filterallwarning', 'filters') . '</p>';
echo $OUTPUT->footer();
$copyrightnotice = str_replace('target="_blank"', 'onclick="this.target=\'_blank\'"', $copyrightnotice); // extremely ugly validation hack
echo $OUTPUT->box($copyrightnotice, 'copyrightnotice');
echo '<br />';
- notice_yesno(get_string('doyouagree'), "index.php?agreelicense=1&lang=$CFG->lang",
- "http://docs.moodle.org/en/License");
+ echo $OUTPUT->confirm(get_string('doyouagree'), "index.php?agreelicense=1&lang=$CFG->lang", "http://docs.moodle.org/en/License");
echo $OUTPUT->footer();
die;
}
} else {
$optionsyes = array('confirm'=>'1', 'sesskey'=>sesskey());
- notice_yesno('Are you sure you want convert all your tables to the InnoDB format?',
- 'innodb.php', 'index.php', $optionsyes, NULL, 'post', 'get');
+ $formcontinue = html_form::make_button('innodb.php', $optionsyes, get_string('yes'));
+ $formcancel = html_form::make_button('index.php', null, get_string('no'), 'get');
+ echo $OUTPUT->confirm('Are you sure you want convert all your tables to the InnoDB format?', $formcontinue, $formcancel);
echo $OUTPUT->footer();
}
} else if (!$confirm && confirm_sesskey()) {
admin_externalpage_print_header();
- notice_yesno(get_string('uninstallconfirm', 'admin', $uninstalllang),
- 'langimport.php?mode='.DELETION_OF_SELECTED_LANG.'&uninstalllang='.$uninstalllang.'&confirm=1&sesskey='.sesskey(),
+ echo $OUTPUT->confirm(get_string('uninstallconfirm', 'admin', $uninstalllang),
+ 'langimport.php?mode='.DELETION_OF_SELECTED_LANG.'&uninstalllang='.$uninstalllang.'&confirm=1',
'langimport.php');
echo $OUTPUT->footer();
die;
echo $OUTPUT->heading(get_string('noaclentries','mnet'));
$table = NULL;
} else {
+ $table = new html_table();
$table->head = $headings;
$table->align = array('left', 'left', 'center');
$table->width = "95%";
}
if (!empty($table)) {
- print_table($table);
+ echo $OUTPUT->table($table);
echo '<p> </p>';
$baseurl = new moodle_url(null, array('sort' => $sort, 'dir' => $dir, 'perpage' => $perpage));
$pagingbar = moodle_paging_bar::make($aclcount, $page, $perpage, $baseurl);
} 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
$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 '</td>';
echo "</tr>";
$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 '</td>';
echo "</tr>";
}
$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;
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;
}
}
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;
}
$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;
}
$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%');
}
$rs->close();
-print_table($table);
+echo $OUTPUT->table($table);
echo $OUTPUT->footer();
echo '<form action="index.php" method="post">'."\n";
echo '<div>';
+ $table = new html_table();
$table->width = '*';
$table->align = array('left','left','left','left','left','left');
'<input type="text" name="numcourses" size="3" maxlength="2" value="'.$numcourses.'" />',
'<input type="submit" value="'.get_string('view').'" />') ;
- print_table($table);
+ echo $OUTPUT->table($table);
echo '</div>';
echo '</form>';
echo '<div class="graph"><img alt="'.get_string('courseoverviewgraph').'" src="'.$CFG->wwwroot.'/'.$CFG->admin.'/report/courseoverview/reportsgraph.php?time='.$time.'&report='.$report.'&numcourses='.$numcourses.'" /></div>';
}
- $table = new StdClass;
+ $table = new html_table();
$table->align = array('left','center','center','center');
$table->head = array(get_string('course'),$param->line1);
if (!empty($param->line2)) {
}
$table->data[] = $a;
}
- print_table($table);
+ echo $OUTPUT->table($table);
}
}
echo $OUTPUT->footer();
echo $OUTPUT->heading($title);
// Initialise the table.
- $table = new stdClass;
+ $table = new html_table();
$table->head = array(
get_string('context', 'role'),
get_string('totalquestions', 'report_questioninstances'),
$totalhidden);
// Print it.
- print_table($table);
+ echo $OUTPUT->table($table);
}
// Footer.
if ($issue and ($result = $issue(true))) {
report_security_hide_timearning();
- $table = new object();
+ $table = new html_table();
$table->head = array($strissue, $strstatus, $strdesc, $strconfig);
$table->size = array('30%', '10%', '50%', '10%' );
$table->align = array('left', 'left', 'left', 'left');
$table->data[] = $row;
- print_table($table);
+ echo $OUTPUT->table($table);
echo $OUTPUT->box($result->details, 'generalbox boxwidthnormal boxaligncenter'); // TODO: add proper css
} else {
report_security_hide_timearning();
- $table = new object();
+ $table = new html_table();
$table->head = array($strissue, $strstatus, $strdesc);
$table->size = array('30%', '10%', '60%' );
$table->align = array('left', 'left', 'left');
$table->data[] = $row;
}
- print_table($table);
+ echo $OUTPUT->table($table);
}
echo $OUTPUT->footer();
}
exit;
}
- notice_yesno(get_string('confirmremove', 'repository', $repositorytype->get_readablename()), $sesskeyurl . '&delete=' . $delete . '&sure=yes', $baseurl);
+ echo $OUTPUT->confirm(get_string('confirmremove', 'repository', $repositorytype->get_readablename()), $sesskeyurl . '&delete=' . $delete . '&sure=yes', $baseurl);
$return = false;
}
else if (!empty($move) && !empty($type)) {
}
exit;
}
- notice_yesno(get_string('confirmdelete', 'repository', $instance->name), $sesskeyurl . '&type=' . $type . '&delete=' . $delete . '&sure=yes', "$CFG->wwwroot/$CFG->admin/repositoryinstance.php?session=". sesskey());
+
+ echo $OUTPUT->confirm(get_string('confirmdelete', 'repository', $instance->name), "$sesskeyurl&type=$type'&delete=$delete'&sure=yes", "$CFG->wwwroot/$CFG->admin/repositoryinstance.php?session=". sesskey());
$return = false;
}
echo '<form action="' . $baseurl . '" method="post">';
echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
- print_table($table);
+ echo $OUTPUT->table($table);
echo '<div class="buttons"><input type="submit" name="submit" value="'.get_string('savechanges').'"/>';
echo '</div></form>';
// Get the names of role holders for roles with between 1 and MAX_USERS_TO_LIST_PER_ROLE users,
// and so determine whether to show the extra column.
- $rolehodlernames = array();
+ $roleholdernames = array();
$strmorethanmax = get_string('morethan', 'role', MAX_USERS_TO_LIST_PER_ROLE);
$showroleholders = false;
foreach ($assignableroles as $roleid => $notused) {
foreach ($roleusers as $user) {
$strroleusers[] = '<a href="' . $CFG->wwwroot . '/user/view.php?id=' . $user->id . '" >' . fullname($user) . '</a>';
}
- $rolehodlernames[$roleid] = implode('<br />', $strroleusers);
+ $roleholdernames[$roleid] = implode('<br />', $strroleusers);
$showroleholders = true;
}
} else if ($assigncounts[$roleid] > MAX_USERS_TO_LIST_PER_ROLE) {
- $rolehodlernames[$roleid] = '<a href="'.$baseurl.'&roleid='.$roleid.'">'.$strmorethanmax.'</a>';
+ $roleholdernames[$roleid] = '<a href="'.$baseurl.'&roleid='.$roleid.'">'.$strmorethanmax.'</a>';
} else {
- $rolehodlernames[$roleid] = '';
+ $roleholdernames[$roleid] = '';
}
}
// Print overview table
+ $table = new html_table();
$table->tablealign = 'center';
$table->width = '60%';
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'role'));
$row = array('<a href="'.$baseurl.'&roleid='.$roleid.'">'.$rolename.'</a>',
$description, $assigncounts[$roleid]);
if ($showroleholders) {
- $row[] = $rolehodlernames[$roleid];
+ $row[] = $roleholdernames[$roleid];
}
$table->data[] = $row;
}
- print_table($table);
+ echo $OUTPUT->table($table);
if (!$isfrontpage && ($url = get_context_url($context))) {
echo '<div class="backlink"><a href="' . $url . '">' .
/// On the view page, show some extra controls at the top.
if ($action == 'view') {
- echo '<div class="buttons">';
+ echo $OUTPUT->container_start('buttons');
$options = array();
$options['roleid'] = $roleid;
$options['action'] = 'edit';
- print_single_button($defineurl, $options, get_string('edit'));
+ echo $OUTPUT->button(html_form::make_button($defineurl, $options, get_string('edit')));
$options['action'] = 'reset';
if ($definitiontable->get_legacy_type()) {
- print_single_button($manageurl, $options, get_string('resetrole', 'role'));
+ echo $OUTPUT->button(html_form::make_button($manageurl, $options, get_string('resetrole', 'role')));
} else {
- print_single_button($manageurl, $options, get_string('resetrolenolegacy', 'role'));
+ echo $OUTPUT->button(html_form::make_button($manageurl, $options, get_string('resetrolenolegacy', 'role')));
}
$options['action'] = 'duplicate';
- print_single_button($defineurl, $options, get_string('duplicaterole', 'role'));
- print_single_button($manageurl, null, get_string('listallroles', 'role'));
- echo "</div>\n";
+ echo $OUTPUT->button(html_form::make_button($defineurl, $options, get_string('duplicaterole', 'role')));
+ echo $OUTPUT->button(html_form::make_button($manageurl, null, get_string('listallroles', 'role')));
+ echo $OUTPUT->container_end();
}
// Start the form.
* one cell for each checkbox.
*/
public function get_table() {
- $table = new stdClass;
+ $table = new html_table();
$table->tablealign = 'center';
$table->cellpadding = 5;
$table->cellspacing = 0;
$a->name = $roles[$roleid]->name;
$a->shortname = $roles[$roleid]->shortname;
$a->count = $DB->count_records('role_assignments', array('roleid'=>$roleid));
- notice_yesno(get_string('deleterolesure', 'role', $a), $baseurl, $baseurl, $optionsyes, NULL, 'post', 'get');
+
+ $formcontinue = html_form::make_button($baseurl, array('confirm' => 1, 'msg' => $msg), get_string('yes'));
+ $formcancel = html_form::make_button($baseurl, $optionsno, get_string('no'), 'get');
+ echo $OUTPUT->confirm(get_string('deleterolesure', 'role', $a), $formcontinue, $formcancel);
echo $OUTPUT->footer();
die;
}
} else {
$warning = get_string('resetrolesure', 'role', $a);
}
- notice_yesno($warning, 'manage.php', 'manage.php', $optionsyes, $optionsno, 'post', 'get');
+ $formcontinue = html_form::make_button('manage.php', array('confirm' => 1, 'msg' => $msg), get_string('yes'));
+ $formcancel = html_form::make_button('manage.php', $optionsno, get_string('no'), 'get');
+ echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel);
echo $OUTPUT->footer();
die;
}
include_once('managetabs.php');
/// Initialise table.
- $table = new object;
+ $table = new html_table();
$table->tablealign = 'center';
$table->align = array('left', 'left', 'left', 'left');
$table->wrap = array('nowrap', '', 'nowrap','nowrap');
$table->data[] = $row;
}
- print_table($table);
+ echo $OUTPUT->table($table);
- echo '<div class="buttons">';
- print_single_button($defineurl, array('action' => 'add'), get_string('addrole', 'role'), 'get');
- echo '</div>';
+ echo $OUTPUT->container_start('buttons');
+ echo $OUTPUT->button(html_form::make_button($defineurl, array('action' => 'add'), get_string('addrole', 'role'), 'get'));
+ echo $OUTPUT->container_end();
echo $OUTPUT->footer();
die;
} else {
/// Show UI for choosing a role to assign.
+ $table = new html_table();
$table->tablealign = 'center';
$table->width = '60%';
$table->head = array(get_string('role'), get_string('description'), get_string('overrides', 'role'));
$description, $overridecounts[$roleid]);
}
- print_table($table);
+ echo $OUTPUT->table($table);
if (!$isfrontpage && ($url = get_context_url($context))) {
echo '<div class="backlink"><a href="' . $url . '">' .
$caption = get_string('blocksediton');
$options['adminedit'] = 'on';
}
- $buttons = print_single_button($PAGE->url->out(false), $options, $caption, 'get', '', true);
+ $buttons = $OUTPUT->button(html_form::make_button($PAGE->url->out(false), $options, $caption, 'get'));
}
$visiblepathtosection = array_reverse($settingspage->visiblepath);
$message = get_string("configintrotimezones", 'admin', $message);
- notice_yesno($message, 'timezoneimport.php?ok=1&sesskey='.sesskey(), 'index.php');
+ echo $OUTPUT->confirm($message, 'timezoneimport.php?ok=1', 'index.php');
echo $OUTPUT->footer();
exit;
$fullname = fullname($user, true);
echo $OUTPUT->heading(get_string('deleteuser', 'admin'));
$optionsyes = array('delete'=>$delete, 'confirm'=>md5($delete), 'sesskey'=>sesskey());
- notice_yesno(get_string('deletecheckfull', '', "'$fullname'"), 'user.php', 'user.php', $optionsyes, NULL, 'post', 'get');
+ echo $OUTPUT->confirm(get_string('deletecheckfull', '', "'$fullname'"), new moodle_url('user.php', $optionsyes), 'user.php');
echo $OUTPUT->footer();
die;
} else if (data_submitted() and !$user->deleted) {
} else { // ($CFG->fullnamedisplay == 'language' and $fullnamelanguage == 'lastname firstname')
$fullnamedisplay = "$lastname / $firstname";
}
+
+ $table = new html_table();
$table->head = array ($fullnamedisplay, $email, $city, $country, $lastaccess, "", "", "");
$table->align = array ("left", "left", "left", "left", "left", "center", "center", "center");
$table->width = "95%";
echo $OUTPUT->heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
}
if (!empty($table)) {
- print_table($table);
+ echo $OUTPUT->table($table);
echo $OUTPUT->paging_bar(moodle_paging_bar::make($usercount, $page, $perpage, $baseurl));
if (has_capability('moodle/user:create', $sitecontext)) {
echo $OUTPUT->heading('<a href="'.$securewwwroot.'/user/editadvanced.php?id=-1">'.get_string('addnewuser').'</a>');
$in = implode(',', $SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id IN ($in)", null, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
$usernames = implode(', ', $userlist);
- $optionsyes = array();
- $optionsyes['confirm'] = 1;
- $optionsyes['sesskey'] = sesskey();
echo $OUTPUT->heading(get_string('confirmation', 'admin'));
- notice_yesno(get_string('confirmcheckfull', '', $usernames), 'user_bulk_confirm.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
+ $formcontinue = html_form::make_button('user_bulk_confirm.php', array('confirm' => 1), get_string('yes'));
+ $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
+ echo $OUTPUT->confirm(get_string('confirmcheckfull', '', $usernames), $formcontinue, $formcancel);
}
echo $OUTPUT->footer();
$in = implode(',', $SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id IN ($in)", null, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
$usernames = implode(', ', $userlist);
- $optionsyes = array();
- $optionsyes['confirm'] = 1;
- $optionsyes['sesskey'] = sesskey();
echo $OUTPUT->heading(get_string('confirmation', 'admin'));
- notice_yesno(get_string('deletecheckfull', '', $usernames), 'user_bulk_delete.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
+ $formcontinue = html_form::make_button('user_bulk_delete.php', array('confirm' => 1), get_string('yes'));
+ $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
+ echo $OUTPUT->confirm(get_string('deletecheckfull', '', $usernames), $formcontinue, $formcancel);
}
echo $OUTPUT->footer();
}
usort($users, 'sort_compare');
+$table = new html_table();
$table->width = "95%";
$columns = array('fullname', /*'username', */'email', 'city', 'country', 'lastaccess');
foreach ($columns as $column) {
}
echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users'));
-print_table($table);
+echo $OUTPUT->table($table);
echo $OUTPUT->continue_button($return);
//Take courses data (id, shortname, and fullname)
$courses = get_courses_page(1, 'c.sortorder ASC', 'c.id,c.shortname,c.fullname,c.visible', $totalcount);
+$table = new html_table();
$table->width = "95%";
$columns = array('fullname');
foreach ($courses as $v)
$table->data[] = $temparray;
}
echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users'));
-print_table($table);
+echo $OUTPUT->table($table);
echo '<div class="continuebutton">';
echo '<input type="submit" name="multienrolsubmit" value="save changes" />';
echo '</div>';
$in = implode(',', $SESSION->bulk_users);
$userlist = $DB->get_records_select_menu('user', "id IN ($in)", null, 'fullname', 'id,'.$DB->sql_fullname().' AS fullname');
$usernames = implode(', ', $userlist);
- $optionsyes = array();
- $optionsyes['confirm'] = 1;
- $optionsyes['sesskey'] = sesskey();
- $optionsyes['msg'] = $msg;
admin_externalpage_print_header();
echo $OUTPUT->heading(get_string('confirmation', 'admin'));
echo $OUTPUT->box($msg, 'boxwidthnarrow boxaligncenter generalbox', 'preview');
- notice_yesno(get_string('confirmmessage', 'bulkusers', $usernames), 'user_bulk_message.php', 'user_bulk.php', $optionsyes, NULL, 'post', 'get');
+
+ $formcontinue = html_form::make_button('user_bulk_message.php', array('confirm' => 1, 'msg' => $msg), get_string('yes'));
+ $formcancel = html_form::make_button('user_bulk.php', $optionsno, get_string('no'), 'get');
+ echo $OUTPUT->confirm(get_string('confirmmessage', 'bulkusers', $usernames), $formcontinue, $formcancel);
echo $OUTPUT->footer();
die;
}