function class_division_make_header(&$table, $url_options, $start, $end, $name_pattern, $order) { global $CFG, $wwwMyURL; $firstname = '<a href="' . $wwwMyURL . $url_options . '&sort=firstname&order=' . $order . '">' . get_string('firstname') . '</a>'; $lastname = '<a href="' . $wwwMyURL . $url_options . '&sort=lastname&order=' . $order . '">' . get_string('lastname') . '</a>'; $fullnamehead = jbxl_get_fullnamehead($name_pattern, $firstname, $lastname, '/'); // unset($table->head); unset($table->align); unset($table->size); unset($table->wrap); $table->head[] = '#'; $table->align[] = 'center'; $table->size[] = '20px'; $table->head[] = ''; $table->align[] = ''; $table->size[] = '20px'; $table->head[] = $fullnamehead; $table->align[] = 'left'; $table->size[] = '140px'; $table->wrap[2] = 'nowrap'; $cellnum = 4; if ($CFG->output_idnumber) { $table->head[] = '<a href="' . $wwwMyURL . $url_options . '&sort=idnumber&order=' . $order . '">ID</a>'; $table->align[] = 'center'; $table->size[] = '60px'; $table->wrap[] = 'nowrap'; $cellnum++; } $table->head[] = get_string('classname', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '80px'; $table->wrap[] = 'nowrap'; $table->head[] = "<a href=\"javascript:select_all_check_in('TD','cell c" . $cellnum . " lastcol',null,{$start},{$end});\">" . get_string('changeclass', 'block_autoattend') . "</a>"; $table->align[] = 'center'; $table->size[] = '80px'; $table->wrap[] = 'nowrap'; return; }
function report_make_header(&$table, $course_sess, $classes, $settings, $url_options, $name_pattern, $order = '') { global $CFG, $TIME_OFFSET; $wwwBlock = $CFG->wwwroot . '/blocks/autoattend'; $wwwMyURL = $wwwBlock . '/report.php'; if (empty($order) or $order == 'ASC') { $order = 'DESC'; } else { $order = 'ASC'; } $firstname = '<a href="' . $wwwMyURL . $url_options . '&sort=firstname&order=' . $order . '">' . get_string('firstname') . '</a>'; $lastname = '<a href="' . $wwwMyURL . $url_options . '&sort=lastname&order=' . $order . '">' . get_string('lastname') . '</a>'; $fullnamehead = jbxl_get_fullnamehead($name_pattern, $firstname, $lastname, '/'); unset($table->head); unset($table->align); unset($table->size); unset($table->wrap); // Header $table->head[] = ''; $table->align[] = ''; $table->size[] = '20px'; $table->wrap[] = 'nowrap'; $table->head[] = $fullnamehead; $table->align[] = 'left'; $table->size[] = '140px'; $table->wrap[] = 'nowrap'; if ($CFG->output_idnumber) { $table->head[] = '<a href="' . $wwwMyURL . $url_options . '&sort=idnumber&order=' . $order . '">ID</a>'; $table->align[] = 'center'; $table->size[] = '60px'; $table->wrap[] = 'nowrap'; } if ($classes) { $table->head[] = get_string('classname', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '80px'; $table->wrap[] = 'nowrap'; } $table->head[] = get_string('attendgradeshort', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '20px'; $table->wrap[] = 'nowrap'; // $table->head [] = '<a href="'.$wwwMyURL.$url_options.'&sort=percent&order='.$order.'">%</a>'; $table->head[] = '%'; $table->align[] = 'center'; $table->size[] = '40px'; $table->wrap[] = 'nowrap'; for ($i = 0; $i < 5; $i++) { $table->align[] = 'center'; $table->size[] = '20px'; $table->wrap[] = 'nowrap'; } array_push($table->head, $settings['P']->title, $settings['L']->title, $settings['E']->title, $settings['X']->title, $settings['Y']->title); if (!empty($course_sess)) { $i = 0; foreach ($course_sess as $sessdata) { if ($i > 0 and $i % PAGE_COLUMN_SIZE == 0) { $table->head[] = $fullnamehead; $table->align[] = 'left'; $table->size[] = '180px'; $table->wrap[] = 'nowrap'; } // $table->head[] = '<a href="' . $wwwBlock . '/updateAttendance.php' . $url_options . '&sessdate=' . $sessdata->sessdate . '&attsid=' . $sessdata->id . '">' . strftime(get_string('strftimedmshort', 'block_autoattend'), $sessdata->sessdate + $TIME_OFFSET) . '</a>'; $table->align[] = 'center'; $table->size[] = '40px'; $table->wrap[] = 'nowrap'; $i++; } } return; }
function updateAttendance_make_header(&$table, $settings, $url_options, $start, $end, $name_pattern, $order = '') { global $CFG, $wwwMyURL; if (empty($order) or $order == 'ASC') { $order = 'DESC'; } else { $order = 'ASC'; } $firstname = '<a href="' . $wwwMyURL . $url_options . '&sort=firstname&order=' . $order . '">' . get_string('firstname') . '</a>'; $lastname = '<a href="' . $wwwMyURL . $url_options . '&sort=lastname&order=' . $order . '">' . get_string('lastname') . '</a>'; $fullnamehead = jbxl_get_fullnamehead($name_pattern, $firstname, $lastname, '/'); // $i = 0; $n = 4; if ($CFG->output_idnumber) { $n = 5; } foreach ($settings as $set) { $cell = $i + $n; //$status = get_string($set->status.'acronym', 'block_autoattend'); $tabhead[] = "<a href=\"javascript:select_all_radio_in('TD', 'cell c{$cell}', null, {$start}, {$end});\"><u>{$set->title}</u></a>"; $i++; } unset($table->head); unset($table->align); unset($table->size); unset($table->wrap); $table->head[] = '#'; $table->align[] = 'center'; $table->size[] = '20px'; $table->head[] = ''; $table->align[] = ''; $table->size[] = '20px'; $table->head[] = $fullnamehead; $table->align[] = 'left'; $table->size[] = '140px'; $table->wrap[2] = 'nowrap'; if ($CFG->output_idnumber) { $table->head[] = '<a href="' . $wwwMyURL . $url_options . '&sort=idnumber&order=' . $order . '">ID</a>'; $table->align[] = 'center'; $table->size[] = '60px'; $table->wrap[] = 'nowrap'; } $table->head[] = get_string('classname', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '60px'; $table->wrap[] = 'nowrap'; foreach ($tabhead as $hd) { $table->head[] = $hd; $table->align[] = 'center'; $table->size[] = '20px'; $table->wrap[] = 'nowrap'; } $table->head[] = get_string('callmethod', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '60px'; $table->wrap[] = 'nowrap'; //$table->head [] = get_string('calleddate', 'block_autoattend'); //$table->align[] = 'center'; //$table->size [] = '40px'; //$table->wrap [] = 'nowrap'; $table->head[] = get_string('calledtime', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '60px'; $table->wrap[] = 'nowrap'; $table->head[] = get_string('ipaddress', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '80px'; $table->wrap[] = 'nowrap'; $table->head[] = get_string('remarks', 'block_autoattend'); $table->align[] = 'center'; $table->size[] = '80px'; $table->wrap[] = 'nowrap'; return; }