ÿØÿà JFIF ÿÛ „ ( %"1!%)+...383,7(-.+ -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ ß â" ÿÄ ÿÄ H !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ ÿÄ % !1AQa"23‘ÿÚ ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6 öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷ó²·˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%Ìòh´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ÇýÊTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆÑªQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$ËÚsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇl¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉä¢mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ.. /** * Display profile for a particular user * * @package core_user * @copyright 1999 Martin Dougiamas http://dougiamas.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once("../config.php"); require_once($CFG->dirroot.'/user/profile/lib.php'); require_once($CFG->dirroot.'/user/lib.php'); require_once($CFG->libdir . '/filelib.php'); require_once($CFG->libdir . '/badgeslib.php'); $id = optional_param('id', 0, PARAM_INT); // User id. $courseid = optional_param('course', SITEID, PARAM_INT); // course id (defaults to Site). $showallcourses = optional_param('showallcourses', 0, PARAM_INT); // See your own profile by default. if (empty($id)) { require_login(); $id = $USER->id; } if ($courseid == SITEID) { // Since Moodle 2.0 all site-level profiles are shown by profile.php. redirect($CFG->wwwroot.'/user/profile.php?id='.$id); // Immediate redirect. } $PAGE->set_url('/user/view.php', array('id' => $id, 'course' => $courseid)); $user = $DB->get_record('user', array('id' => $id), '*', MUST_EXIST); $course = $DB->get_record('course', array('id' => $courseid), '*', MUST_EXIST); $currentuser = ($user->id == $USER->id); $systemcontext = context_system::instance(); $coursecontext = context_course::instance($course->id); $usercontext = context_user::instance($user->id, IGNORE_MISSING); // Check we are not trying to view guest's profile. if (isguestuser($user)) { // Can not view profile of guest - thre is nothing to see there. throw new \moodle_exception('invaliduserid'); } $PAGE->set_context($coursecontext); if (!empty($CFG->forceloginforprofiles)) { require_login(); // We can not log in to course due to the parent hack below. // Guests do not have permissions to view anyone's profile if forceloginforprofiles is set. if (isguestuser()) { $PAGE->set_secondary_navigation(false); echo $OUTPUT->header(); echo $OUTPUT->confirm(get_string('guestcantaccessprofiles', 'error'), get_login_url(), $CFG->wwwroot); echo $OUTPUT->footer(); die; } } $PAGE->set_course($course); $PAGE->set_pagetype('course-view-' . $course->format); // To get the blocks exactly like the course. $PAGE->add_body_class('path-user'); // So we can style it independently. $PAGE->set_other_editing_capability('moodle/course:manageactivities'); // Set the Moodle docs path explicitly because the default behaviour // of inhereting the pagetype will lead to an incorrect docs location. $PAGE->set_docs_path('user/profile'); $isparent = false; if (!$currentuser and !$user->deleted and $DB->record_exists('role_assignments', array('userid' => $USER->id, 'contextid' => $usercontext->id)) and has_capability('moodle/user:viewdetails', $usercontext)) { // TODO: very ugly hack - do not force "parents" to enrol into course their child is enrolled in, // this way they may access the profile where they get overview of grades and child activity in course, // please note this is just a guess! require_login(); $isparent = true; $PAGE->navigation->set_userid_for_parent_checks($id); } else { // Normal course. require_login($course); // What to do with users temporary accessing this course? should they see the details? } $strpersonalprofile = get_string('personalprofile'); $strparticipants = get_string("participants"); $struser = get_string("user"); $fullname = fullname($user, has_capability('moodle/site:viewfullnames', $coursecontext)); // Now test the actual capabilities and enrolment in course. if ($currentuser) { if (!is_viewing($coursecontext) && !is_enrolled($coursecontext)) { // Need to have full access to a course to see the rest of own info. $referer = get_local_referer(false); if (!empty($referer)) { redirect($referer, get_string('notenrolled', '', $fullname)); } echo $OUTPUT->header(); echo $OUTPUT->heading(get_string('notenrolled', '', $fullname)); echo $OUTPUT->footer(); die; } } else { // Somebody else. $PAGE->set_title("$strpersonalprofile: "); $PAGE->set_heading("$strpersonalprofile: "); // Check to see if the user can see this user's profile. if (!user_can_view_profile($user, $course, $usercontext) && !$isparent) { throw new \moodle_exception('cannotviewprofile'); } if (!is_enrolled($coursecontext, $user->id)) { // TODO: the only potential problem is that managers and inspectors might post in forum, but the link // to profile would not work - maybe a new capability - moodle/user:freely_acessile_profile_for_anybody // or test for course:inspect capability. if (has_capability('moodle/role:assign', $coursecontext)) { $PAGE->navbar->add($fullname); $notice = get_string('notenrolled', '', $fullname); } else { $PAGE->navbar->add($struser); $notice = get_string('notenrolledprofile', '', $fullname); } $referer = get_local_referer(false); if (!empty($referer)) { redirect($referer, $notice); } echo $OUTPUT->header(); echo $OUTPUT->heading($notice); echo $OUTPUT->footer(); exit; } if (!isloggedin() or isguestuser()) { // Do not use require_login() here because we might have already used require_login($course). redirect(get_login_url()); } } $PAGE->set_title("$course->fullname: $strpersonalprofile: $fullname"); $PAGE->set_heading($course->fullname); $PAGE->set_pagelayout('mypublic'); $PAGE->add_body_class('limitedwidth'); // Locate the users settings in the settings navigation and force it open. // This MUST be done after we've set up the page as it is going to cause theme and output to initialise. if (!$currentuser) { $PAGE->navigation->extend_for_user($user); if ($node = $PAGE->settingsnav->get('userviewingsettings'.$user->id)) { $node->forceopen = true; } } else if ($node = $PAGE->settingsnav->get('usercurrentsettings', navigation_node::TYPE_CONTAINER)) { $node->forceopen = true; } if ($node = $PAGE->settingsnav->get('courseadmin')) { $node->forceopen = false; } echo $OUTPUT->header(); echo '