id); if (! $user = get_record('user', 'id', $USER->id) ) { error(get_string('nosuchuser','block_autoattend')); } // Printing if ($printing) { print_header('', $course->fullname); if (isteacher($course->id)) { if ($student = get_record('user', 'id', $studentid) ) { autoattend_print_user($student, $course, 'printing'); } else { error(get_string('nosuchuser','block_autoattend')); } } else { autoattend_print_user($user, $course, 'printing'); } exit(); } // DownLoad if (isteacher($course->id)) { if($action == 'excel') { add_to_log($course->id, 'autoattend', 'download Excel', 'index.php?course='.$course->id.'&action=excel'); autoattend_download($course->id, 'xls'); exit(); } else if($action == 'text') { add_to_log($course->id, 'autoattend', 'download Text', 'index.php?course='.$course->id.'&action=text'); autoattend_download($course->id,'txt'); exit(); } } // Print Navi Header if ($course->category) { print_header("$course->shortname: ".get_string('autoattend','block_autoattend'), $course->fullname, 'id}\">$course->shortname -> ". get_string('autoattend','block_autoattend'), "", "", true, " ", navmenu($course)); } else { print_header("$course->shortname: ".get_string('autoattend','block_autoattend'), $course->fullname, get_string('autoattend','block_autoattend'), "", "", true, " ", navmenu($course)); } // for Teacher if (isteacher($course->id)) { if(!count_records('autoattend_sessions', 'courseid', $course->id)) { $currenttab = 'autoattend'; include('tabs.php'); print_heading(get_string('nosessionexists','block_autoattend')); } else { if($studentid > 0) { // 個人データを出力 $currenttab = 'none'; include('tabs.php'); //print_heading(get_string('attendforuser','block_autoattend').' :: ' .$course->fullname); if ($student = get_record('user', 'id', $studentid) ) { autoattend_print_user($student, $course); add_to_log($course->id, 'autoattend', 'view teacher', 'index.php?course='.$course->id, $student->studentid); } else { error(get_string('nosuchuser','block_autoattend')); } } else { // 出欠項目のデータを出力 add_to_log($course->id, 'autoattend', 'view teacher', 'index.php?course='.$course->id); $currenttab = 'autoattend'; include('tabs.php'); print_sessions_list($course); } } } // for Guest else if(isguest()) { print_heading(get_string('notaccessguest', 'block_autoattend')); } // for Student else { add_to_log($course->id, 'autoattend', 'view own', 'index.php?course='.$course->id); print_heading(get_string('attendforuser','block_autoattend').' :: ' .$course->fullname); autoattend_print_user($user, $course); } print_footer($course); // // 出欠リスト一覧の表示 // function print_sessions_list($course) { global $CFG; $sesss = get_records('autoattend_sessions', 'courseid', $course->id, 'sessdate, starttime asc'); ?>
id)); foreach($sesss as $key=>$sessdata) { $usercount = count_records_select('autoattend_students', "attsid=$key AND status<>'Y'"); $i++; ?>
#
sessdate);?> '.strftime(get_string('strftimehourmin','block_autoattend'), $sessdata->starttime).'';?> '.strftime(get_string('strftimehourmin','block_autoattend'), $sessdata->endtime).'';?> description ? $sessdata->description: get_string('nodescription', 'block_autoattend')); ?> '.($sessdata->attendkey ? $sessdata->attendkey: get_string('novalue', 'block_autoattend')).'';?> '.get_string($sessdata->method.'methodfull', 'block_autoattend'). ''; ?> '.get_string($sessdata->state.'statefull', 'block_autoattend'); if ($sessdata->state=='O') { echo ' ('.$usercount.'/'.$ttlcount.')'; } echo ''; ?> id} &attsid={$sessdata->id}\">"; if($sessdata->state=='C') { echo "pixpath}/t/go.gif\" alt=\"$title\" /> "; } else if($sessdata->state=='O') { echo "pixpath}/b.gif\" alt=\"$title\" /> "; } else { echo "pixpath}/t/stop.gif\" alt=\"$title\" /> "; } $title = get_string('editsession','block_autoattend'); echo "id} &attsid={$sessdata->id}\">"; echo "pixpath}/t/edit.gif\" alt=\"$title\" />"; /* $title = get_string('deletesession','block_autoattend'); echo "id} &attsid={$sessdata->id}\">"; echo "pixpath}/t/delete.gif\" alt=\"$title\" /> "; */ ?>
[]   []