Merge branch 'MDL-36554' of git://github.com/rwijaya/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2013-01-15 18:02:26 +01:00
commit ada893d339
10 changed files with 45 additions and 48 deletions

View File

@ -1245,10 +1245,9 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('report'),
get_string('status'),
);
$servertable->align = array('center', 'center', 'left', 'center');
$servertable->wrap = array('nowrap', '', '', 'nowrap');
$servertable->size = array('10', 10, '100%', '10');
$servertable->attributes['class'] = 'environmenttable generaltable';
$servertable->colclasses = array('centeralign name', 'centeralign status', 'leftalign report', 'centeralign info');
$servertable->attributes['class'] = 'admintable environmenttable generaltable';
$servertable->id = 'serverstatus';
$serverdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());
@ -1258,10 +1257,9 @@ class core_admin_renderer extends plugin_renderer_base {
get_string('report'),
get_string('status'),
);
$othertable->align = array('center', 'left', 'center');
$othertable->wrap = array('', '', 'nowrap');
$othertable->size = array(10, '100%', '10');
$othertable->attributes['class'] = 'environmenttable generaltable';
$othertable->colclasses = array('aligncenter info', 'alignleft report', 'aligncenter status');
$othertable->attributes['class'] = 'admintable environmenttable generaltable';
$othertable->id = 'otherserverstatus';
$otherdata = array('ok'=>array(), 'warn'=>array(), 'error'=>array());

View File

@ -189,7 +189,7 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
<form id="assignform" method="post" action="<?php echo $assignurl ?>"><div>
<input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
<table summary="" class="roleassigntable generaltable generalbox boxaligncenter" cellspacing="0">
<table id="assigningrole" summary="" class="admintable roleassigntable generaltable" cellspacing="0">
<tr>
<td id="existingcell">
<p><label for="removeselect"><?php print_string('extusers', 'role'); ?></label></p>
@ -278,15 +278,13 @@ $assignurl = new moodle_url($PAGE->url, array('roleid'=>$roleid));
// Print overview table
$table = new html_table();
$table->tablealign = 'center';
$table->width = '60%';
$table->id = 'assignrole';
$table->head = array(get_string('role'), get_string('description'), get_string('userswiththisrole', 'role'));
$table->wrap = array('nowrap', '', 'nowrap');
$table->align = array('left', 'left', 'center');
$table->colclasses = array('leftalign role', 'leftalign', 'centeralign userrole');
$table->attributes['class'] = 'admintable generaltable';
if ($showroleholders) {
$table->headspan = array(1, 1, 2);
$table->wrap[] = 'nowrap';
$table->align[] = 'left';
$table->colclasses[] = 'leftalign roleholder';
}
foreach ($assignableroles as $roleid => $rolename) {

View File

@ -186,10 +186,9 @@
/// Initialise table.
$table = new html_table();
$table->tablealign = 'center';
$table->align = array('left', 'left', 'left', 'left');
$table->wrap = array('nowrap', '', 'nowrap','nowrap');
$table->width = '90%';
$table->colclasses = array('leftalign', 'leftalign', 'leftalign', 'leftalign');
$table->id = 'roles';
$table->attributes['class'] = 'admintable generaltable';
$table->head = array(
get_string('role') . ' ' . $OUTPUT->help_icon('roles', 'role'),
get_string('description'),

View File

@ -120,7 +120,7 @@ class main_view extends XMLDBAction {
$result = $this->launch('get_db_directories');
// Display list of DB directories if everything is ok
if ($result && !empty($XMLDB->dbdirs)) {
$o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1" class="boxaligncenter flexible">';
$o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1" class="admintable generaltable">';
$row = 0;
foreach ($XMLDB->dbdirs as $key => $dbdir) {
// Detect if this is the lastused dir

View File

@ -256,25 +256,26 @@
$table = new html_table();
$table->head = array ();
$table->align = array();
$table->colclasses = array();
$table->head[] = $fullnamedisplay;
$table->align[] = 'left';
$table->attributes['class'] = 'admintable generaltable';
$table->colclasses[] = 'leftalign';
foreach ($extracolumns as $field) {
$table->head[] = ${$field};
$table->align[] = 'left';
$table->colclasses[] = 'leftalign';
}
$table->head[] = $city;
$table->align[] = 'left';
$table->colclasses[] = 'leftalign';
$table->head[] = $country;
$table->align[] = 'left';
$table->colclasses[] = 'leftalign';
$table->head[] = $lastaccess;
$table->align[] = 'left';
$table->colclasses[] = 'leftalign';
$table->head[] = get_string('edit');
$table->align[] = 'center';
$table->colclasses[] = 'centeralign';
$table->head[] = "";
$table->align[] = 'center';
$table->colclasses[] = 'centeralign';
$table->width = "95%";
$table->id = "users";
foreach ($users as $user) {
if (isguestuser($user)) {
continue; // do not display guest here

View File

@ -134,9 +134,9 @@ foreach($cohorts['cohorts'] as $cohort) {
$table = new html_table();
$table->head = array(get_string('name', 'cohort'), get_string('idnumber', 'cohort'), get_string('description', 'cohort'),
get_string('memberscount', 'cohort'), get_string('component', 'cohort'), get_string('edit'));
$table->size = array('20%', '10%', '40%', '10%', '10%', '10%');
$table->align = array('left', 'left', 'left', 'left','center', 'center');
$table->width = '80%';
$table->colclasses = array('leftalign name', 'leftalign id', 'leftalign description', 'leftalign size','centeralign source', 'centeralign action');
$table->id = 'cohorts';
$table->attributes['class'] = 'admintable generaltable';
$table->data = $data;
echo html_writer::table($table);
echo $OUTPUT->paging_bar($cohorts['totalcohorts'], $page, 25, $baseurl);

View File

@ -160,8 +160,9 @@ class comment_manager {
get_string('content'),
get_string('action')
);
$table->align = array ('left', 'left', 'left', 'left');
$table->attributes = array('class'=>'generaltable commentstable');
$table->colclasses = array ('leftalign', 'leftalign', 'leftalign', 'leftalign');
$table->attributes = array('class'=>'admintable generaltable');
$table->id = 'commentstable';
$table->data = array();
$link = new moodle_url('/comment/index.php', array('action' => 'delete', 'sesskey' => sesskey()));

View File

@ -254,7 +254,7 @@ $parentlist = array();
$displaylist[0] = get_string('top');
make_categories_list($displaylist, $parentlist);
echo '<table class="generaltable editcourse boxaligncenter"><tr class="header">';
echo '<table id="coursecategories" class="admintable generaltable editcourse"><tr class="header">';
echo '<th class="header" scope="col">'.$strcategories.'</th>';
echo '<th class="header" scope="col">'.$strcourses.'</th>';
echo '<th class="header" scope="col">'.$stredit.'</th>';
@ -309,7 +309,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
$category->context = context_coursecat::instance($category->id);
}
echo '<tr><td align="left" class="name">';
echo '<tr><td class="leftalign name">';
for ($i=0; $i<$depth;$i++) {
echo '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
}
@ -319,9 +319,9 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
format_string($category->name, true, array('context' => $category->context)).'</a>';
echo '</td>';
echo '<td class="count">'.$category->coursecount.'</td>';
echo '<td class="centeralign count">'.$category->coursecount.'</td>';
echo '<td class="icons">'; /// Print little icons
echo '<td class="centeralign icons">'; /// Print little icons
if (has_capability('moodle/category:manage', $category->context)) {
echo '<a title="'.$str->edit.'" href="editcategory.php?id='.$category->id.'"><img'.
@ -358,7 +358,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
}
echo '</td>';
echo '<td align="left">';
echo '<td class="leftalign">';
if (has_capability('moodle/category:manage', $category->context)) {
$tempdisplaylist = $displaylist;
unset($tempdisplaylist[$category->id]);

View File

@ -92,9 +92,9 @@ if (($CFG->fullnamedisplay == 'firstname lastname') or
$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%');
$table->width = '95%';
$table->colclasses = array('leftalign date', 'leftalign name', 'leftalign plugin', 'leftalign setting', 'leftalign newvalue', 'leftalign originalvalue');
$table->id = 'configchanges';
$table->attributes['class'] = 'admintable generaltable';
$table->data = array();
if ($sort == 'firstname' or $sort == 'lastname') {

View File

@ -76,9 +76,9 @@ if ($issue and ($result = $issue(true))) {
$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->attributes = array('class'=>'scurityreporttable generaltable');
$table->rowclasses = array('leftalign issue', 'leftalign status', 'leftalign desc', 'leftalign config');
$table->attributes = array('class'=>'admintable securityreport generaltable');
$table->id = 'securityissuereporttable';
$table->data = array();
// print detail of one issue only
@ -103,9 +103,9 @@ if ($issue and ($result = $issue(true))) {
$table = new html_table();
$table->head = array($strissue, $strstatus, $strdesc);
$table->size = array('30%', '10%', '60%' );
$table->align = array('left', 'left', 'left');
$table->attributes = array('class'=>'scurityreporttable generaltable');
$table->colclasses = array('leftalign issue', 'leftalign status', 'leftalign desc');
$table->attributes = array('class'=>'admintable securityreport generaltable');
$table->id = 'securityreporttable';
$table->data = array();
foreach ($issues as $issue) {