$meta = '<meta name="robots" content="none" />'; // prevent duplicate content in search engines MDL-7299 $lastlogin = time() - COURSE_MAX_RECENT_PERIOD; if (!isguestuser() and !empty($USER->lastcourseaccess[$COURSE->id])) { if ($USER->lastcourseaccess[$COURSE->id] > $lastlogin) { $lastlogin = $USER->lastcourseaccess[$COURSE->id]; } } $param = new object(); $param->user = 0; $param->modid = 'all'; $param->group = 0; $param->sortby = 'default'; $param->date = $lastlogin; $param->id = $COURSE->id; $mform = new recent_form(); $mform->set_data($param); if ($formdata = $mform->get_data()) { $param = $formdata; } $userinfo = get_string('allparticipants'); $dateinfo = get_string('alldays'); if (!empty($param->user)) { if (!($u = $DB->get_record('user', array('id' => $param->user)))) { print_error("That's an invalid user!"); } $userinfo = fullname($u); } $strrecentactivity = get_string('recentactivity'); $navlinks = array(); $navlinks[] = array('name' => $strrecentactivity, 'link' => "recent.php?id={$course->id}", 'type' => 'misc');