mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-19787 upgraded calls to print_table, print_single_button, print_user_picture, print_container* and notice_yesno
This commit is contained in:
parent
7755599dfe
commit
414a4a91b1
@ -57,9 +57,7 @@
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -22,16 +22,21 @@
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@
|
||||
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%');
|
||||
@ -103,7 +103,7 @@
|
||||
}
|
||||
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>";
|
||||
|
@ -120,9 +120,10 @@
|
||||
$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;
|
||||
}
|
||||
@ -181,7 +182,7 @@
|
||||
}
|
||||
$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');
|
||||
@ -217,7 +218,7 @@
|
||||
$table->rowclasses[] = 'dimmed_text';
|
||||
}
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
echo '<p class="filtersettingnote">' . get_string('filterallwarning', 'filters') . '</p>';
|
||||
echo $OUTPUT->footer();
|
||||
|
||||
|
@ -127,8 +127,7 @@ if (!core_tables_exist()) {
|
||||
$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;
|
||||
}
|
||||
|
@ -36,8 +36,9 @@
|
||||
|
||||
} 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();
|
||||
}
|
||||
|
||||
|
@ -104,8 +104,8 @@
|
||||
|
||||
} 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;
|
||||
|
@ -163,6 +163,7 @@ if (!$acl) {
|
||||
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%";
|
||||
@ -183,7 +184,7 @@ if (!$acl) {
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -49,13 +49,10 @@
|
||||
} 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
|
||||
|
@ -47,7 +47,7 @@ print_tabs(array($tabs), 'mnetthemes');
|
||||
$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>";
|
||||
|
||||
@ -116,7 +116,7 @@ print_tabs(array($tabs), 'mnetthemes');
|
||||
$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>";
|
||||
}
|
||||
|
@ -77,9 +77,7 @@
|
||||
$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;
|
||||
|
||||
|
@ -18,7 +18,7 @@ $strmultilangupgrade = get_String('multilangupgradeinfo', 'admin');
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ if (!empty($edit) || !empty($new)) {
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -122,9 +122,9 @@
|
||||
$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;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ if (($CFG->fullnamedisplay == 'firstname lastname') or
|
||||
$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%');
|
||||
@ -104,6 +104,6 @@ foreach ($rs as $log) {
|
||||
}
|
||||
$rs->close();
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -48,6 +48,7 @@
|
||||
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');
|
||||
|
||||
@ -64,7 +65,7 @@
|
||||
'<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>';
|
||||
|
||||
@ -98,7 +99,7 @@
|
||||
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)) {
|
||||
@ -121,7 +122,7 @@
|
||||
}
|
||||
$table->data[] = $a;
|
||||
}
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
}
|
||||
}
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -78,7 +78,7 @@ if ($requestedqtype) {
|
||||
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'),
|
||||
@ -124,7 +124,7 @@ if ($requestedqtype) {
|
||||
$totalhidden);
|
||||
|
||||
// Print it.
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
}
|
||||
|
||||
// Footer.
|
||||
|
@ -74,7 +74,7 @@ $url = "$CFG->wwwroot/$CFG->admin/report/security/index.php";
|
||||
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');
|
||||
@ -92,7 +92,7 @@ if ($issue and ($result = $issue(true))) {
|
||||
|
||||
$table->data[] = $row;
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
echo $OUTPUT->box($result->details, 'generalbox boxwidthnormal boxaligncenter'); // TODO: add proper css
|
||||
|
||||
@ -101,7 +101,7 @@ if ($issue and ($result = $issue(true))) {
|
||||
} 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');
|
||||
@ -121,7 +121,7 @@ if ($issue and ($result = $issue(true))) {
|
||||
|
||||
$table->data[] = $row;
|
||||
}
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
}
|
||||
|
||||
echo $OUTPUT->footer();
|
||||
|
@ -156,7 +156,7 @@ if (!empty($edit) || !empty($new)) {
|
||||
}
|
||||
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)) {
|
||||
|
@ -122,7 +122,8 @@ if (!empty($edit) || !empty($new)) {
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
||||
|
||||
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>';
|
||||
|
||||
|
@ -402,7 +402,7 @@
|
||||
|
||||
// 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) {
|
||||
@ -414,17 +414,18 @@
|
||||
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'));
|
||||
@ -441,12 +442,12 @@
|
||||
$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 . '">' .
|
||||
|
@ -131,21 +131,21 @@
|
||||
|
||||
/// 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.
|
||||
|
@ -1335,7 +1335,7 @@ abstract class role_allow_role_page {
|
||||
* 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;
|
||||
|
@ -89,7 +89,10 @@
|
||||
$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;
|
||||
}
|
||||
@ -169,7 +172,9 @@
|
||||
} 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;
|
||||
}
|
||||
@ -195,7 +200,7 @@
|
||||
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');
|
||||
@ -256,11 +261,11 @@
|
||||
|
||||
$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;
|
||||
|
@ -245,6 +245,7 @@
|
||||
} 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'));
|
||||
@ -258,7 +259,7 @@
|
||||
$description, $overridecounts[$roleid]);
|
||||
}
|
||||
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
if (!$isfrontpage && ($url = get_context_url($context))) {
|
||||
echo '<div class="backlink"><a href="' . $url . '">' .
|
||||
|
@ -92,7 +92,7 @@ if (empty($SITE->fullname)) {
|
||||
$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);
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
$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;
|
||||
|
@ -73,7 +73,7 @@
|
||||
$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) {
|
||||
@ -213,6 +213,8 @@
|
||||
} 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%";
|
||||
@ -296,7 +298,7 @@
|
||||
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>');
|
||||
|
@ -43,11 +43,10 @@ if ($confirm and confirm_sesskey()) {
|
||||
$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();
|
||||
|
@ -43,11 +43,10 @@ if ($confirm and confirm_sesskey()) {
|
||||
$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();
|
||||
|
@ -46,6 +46,7 @@ function sort_compare($a, $b) {
|
||||
}
|
||||
usort($users, 'sort_compare');
|
||||
|
||||
$table = new html_table();
|
||||
$table->width = "95%";
|
||||
$columns = array('fullname', /*'username', */'email', 'city', 'country', 'lastaccess');
|
||||
foreach ($columns as $column) {
|
||||
@ -73,7 +74,7 @@ foreach($users as $user) {
|
||||
}
|
||||
|
||||
echo $OUTPUT->heading("$usercount / $usertotal ".get_string('users'));
|
||||
print_table($table);
|
||||
echo $OUTPUT->table($table);
|
||||
|
||||
echo $OUTPUT->continue_button($return);
|
||||
|
||||
|
@ -45,6 +45,7 @@ usort($users, 'sort_compare');
|
||||
|
||||
//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)
|
||||
@ -124,7 +125,7 @@ foreach($users as $user)
|
||||
$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>';
|
||||
|
@ -55,14 +55,13 @@ if ($msgform->is_cancelled()) {
|
||||
$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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user