if ($params['itemtype'] != 'course' && $params['itemtype'] != 'category') {
$itemselect = '<input class="itemselect" type="checkbox" name="select_'.$params['eid'].'" onchange="toggleCategorySelector();"/>'; // TODO: convert to YUI handler
}
- return '<td class="cell last selection">' . $itemselect . '</td>';
+ //html_writer::table() will wrap the item cell contents in a <TD> so don't do it here
+ return $itemselect;
}
public function is_hidden($mode='simple') {
if (!empty($table->head)) {
$countcols = count($table->head);
+
$output .= html_writer::start_tag('thead', array()) . "\n";
$output .= html_writer::start_tag('tr', array()) . "\n";
$keys = array_keys($table->head);
$keys2 = array_keys($row->cells);
$lastkey = end($keys2);
+ $gotlastkey = false; //flag for sanity checking
foreach ($row->cells as $key => $cell) {
+ if ($gotlastkey) {
+ //This should never happen. Why do we have a cell after the last cell?
+ mtrace("A cell with key ($key) was found after the last key ($lastkey)");
+ }
+
if (!($cell instanceof html_table_cell)) {
$mycell = new html_table_cell();
$mycell->text = $cell;
$cell->attributes['class'] .= ' cell c' . $key;
if ($key == $lastkey) {
$cell->attributes['class'] .= ' lastcol';
+ $gotlastkey = true;
}
$tdstyle = '';
$tdstyle .= isset($table->align[$key]) ? $table->align[$key] : '';