if (empty($groupexists)) { $group_id = 0; } else { $groupincourse = groups_get_group_by_name($course_id, $groupexists->name); if (empty($groupincourse)) { $group_id = 0; } } $pagetitle = $course->shortname; if (stripos($CFG->release, "2.") !== false) { $ucourses = enrol_get_users_courses($USER->id, false, NULL, 'shortname ASC'); } else { $ucourses = $dbc->get_user_courses($USER->id); } $user_courses = array(); foreach ($ucourses as $uc) { $coursecontext = get_context_instance(CONTEXT_COURSE, $uc->id); //if the user has the capability to view the course then add it to the array if (has_capability('block/ilp:viewotherilp', $coursecontext, $USER->id, false)) { $user_courses[] = $uc; } } } else { //get the list of tutees for this user $student = $dbc->get_user_tutees($USER->id); $pagetitle = get_string('mytutees', 'block_ilp'); } $status_items = $dbc->get_status_items(ILP_DEFAULT_USERSTATUS_RECORD); $baseurl = $CFG->wwwroot . "/blocks/ilp/actions/view_studentlist.php"; //require the view_studentlist.html page require_once $CFG->dirroot . '/blocks/ilp/views/view_studentlist.html';