$group = $_GET['group']; } $now = time(); $user = $DB->get_record_select('user', 'id=' . $userid); $category_id = $DB->get_field_select('course', 'category', 'id=' . $courseid); $category_name = $DB->get_field_select('course_categories', 'name', 'id=' . $category_id); echo '<h1>' . $category_name . '</h1>'; if (isset($group)) { $g = $DB->get_field('groups', 'name', array('id' => $group)); echo '<h2>' . get_string('summaryfor', 'block_progress') . ' ' . $g . '</h2>'; } else { echo '<h2>' . get_string('summary', 'block_progress') . '</h2>'; } ?> <p class="noprint"><?php echo generate_group_links($courseid); ?> </p> <p class="printonly"><?php echo $user->firstname . ' ' . $user->lastname; ?> </p> <p class="printonly"><?php echo date('jS F Y', $now); ?> </p> <?php $student_role = $DB->get_field('role', 'id', array('shortname' => 'student')); $context = get_context_instance(CONTEXT_COURSE, $courseid); if (has_capability('mod/assignment:grade', $context)) { $all_courses = array();
</h1> <p class="printonly">printed by <?php echo $user->firstname . ' ' . $user->lastname; ?> </p> <p class="printonly"><?php echo date('jS F Y', $now); ?> </p> <?php if (!array_key_exists('home', $_GET)) { echo '<p class="noprint"><a href="javascript:history.go(-1)">' . get_string('back', 'block_progress') . '</a></p>'; } ?> <p class="noprint"><?php echo generate_group_links($course->id, 'summary_course.php'); ?> </p> <?php if (array_key_exists('group', $_GET)) { $students = get_students($course->id, $_GET['prefix'], $_GET['group']); } else { $students = get_students($course->id, $_GET['prefix']); } echo display_grid($CFG->prefix, $course->id, $students, $criteria); echo display_key($CFG->prefix, $course->id, $criteria); ?> <p class="noprint footer"><a href="#" onClick="window.print();return false"><?php print_string('print', 'block_progress'); ?> </a></p>