// print_heading(get_string('attendanceforthecourse','attforblock').' :: ' .$course->fullname); /// Prints out tabs $currenttab = $mode; $studstr = $student ? '&student=' . $student->id : ''; $toprow = array(); $toprow[] = new tabobject('thiscourse', "view.php?id={$id}&mode=thiscourse{$studstr}", get_string('thiscourse', 'attforblock')); $toprow[] = new tabobject('allcourses', "view.php?id={$id}&mode=allcourses{$studstr}", get_string('allcourses', 'attforblock')); $toprow[] = new tabobject('outstanding', "view.php?id={$id}&mode=outstanding{$studstr}", get_string('outstanding', 'attforblock')); $toprow[] = new tabobject('submitted', "view.php?id={$id}&mode=submitted{$studstr}", get_string('submitted', 'attforblock')); $toprow[] = new tabobject('cleared', "view.php?id={$id}&mode=cleared{$studstr}", get_string('cleared', 'attforblock')); print_tabs(array($toprow), $currenttab); if ($mode === 'thiscourse') { print_user_attendaces($user, $cm, $course); } else { if ($mode === 'allcourses') { print_user_attendaces($user, $cm); } else { if ($mode === 'outstanding') { print_outstanding_items($user, $cm, $course); } else { if ($mode === 'submitted') { print_submitted_items($user, $cm, $course); } else { if ($mode === 'cleared') { print_cleared_items($user, $cm, $course); } } } } } print_footer($course);
function attforblock_user_complete($course, $user, $mod, $attforblock) { /// Print a detailed representation of what a user has done with /// a given particular instance of this module, for user activity reports. require_once 'locallib.php'; if (isstudent($course->id, $user->id)) { // if (! $cm = get_coursemodule_from_instance("attforblock", $attforblock->id, $course->id)) { // error("Course Module ID was incorrect"); // } print_user_attendaces($user, $mod, $course); } //return true; }
function attforblock_user_complete($course, $user, $mod, $attforblock) { /// Print a detailed representation of what a user has done with /// a given particular instance of this module, for user activity reports. require_once 'locallib.php'; $context = get_context_instance(CONTEXT_COURSE, $course->id); if (has_capability('moodle/course:view', $context)) { // if (! $cm = get_coursemodule_from_instance("attforblock", $attforblock->id, $course->id)) { // error("Course Module ID was incorrect"); // } print_user_attendaces($user, $mod, $course); } //return true; }