';
-echo '';
-echo $OUTPUT->user_picture($user, array('courseid'=>$course->id, 'size'=>100));
-echo ' | ';
+echo ' ';
+echo html_writer::link($CFG->wwwroot.'/user/profile.php?id='.$id, get_string('fullprofile'));
+echo ' ';
-// Print the description
+echo '';
+echo $OUTPUT->user_picture($user, array('size'=>100));
+echo ' ';
+// Print the description
+echo '';
if ($user->description && !isset($hiddenfields['description'])) {
- if (!$isfrontpage && !empty($CFG->profilesforenrolledusersonly) && !$DB->record_exists('role_assignments', array('userid'=>$id))) {
+ if (!empty($CFG->profilesforenrolledusersonly) && !$DB->record_exists('role_assignments', array('userid'=>$id))) {
echo get_string('profilenotshown', 'moodle').' ';
} else {
$user->description = file_rewrite_pluginfile_urls($user->description, 'pluginfile.php', $usercontext->id, 'user_profile', $id);
echo format_text($user->description, $user->descriptionformat)." ";
}
}
+echo '';
+
// Print all the little details in a list
-echo '';
+echo '';
if (! isset($hiddenfields['country']) && $user->country) {
- $countries = get_string_manager()->get_list_of_countries();
- print_row(get_string('country') . ':', $countries[$user->country]);
+ print_row(get_string('country') . ':', get_string($user->country, 'countries'));
}
if (! isset($hiddenfields['city']) && $user->city) {
@@ -286,7 +248,7 @@
}
if ($user->maildisplay == 1
- or ($user->maildisplay == 2 and !$isfrontpage and !isguestuser())
+ or ($user->maildisplay == 2 && !isguestuser())
or has_capability('moodle/course:useremail', $coursecontext)) {
$emailswitch = '';
@@ -337,7 +299,7 @@
if (strpos($user->url, '://') === false) {
$url = 'http://'. $url;
}
- print_row(get_string("webpage") .":", ''.s($user->url).'');
+ print_row(get_string('webpage') .':', ''.s($user->url).'');
}
if ($user->icq && !isset($hiddenfields['icqnumber'])) {
@@ -390,7 +352,7 @@
break;
}
}
- print_row(get_string('courses').':', rtrim($courselisting,', '));
+ print_row(get_string('courseprofiles').':', rtrim($courselisting,', '));
}
}
if (!isset($hiddenfields['firstaccess'])) {
@@ -439,8 +401,6 @@
echo " ";
-echo " ";
-
$userauth = get_auth_plugin($user->auth);
$passwordchangeurl = false;
@@ -454,107 +414,10 @@
}
}
-// Print other functions
-echo '';
-
-if ($passwordchangeurl) {
- $params = array('id'=>$course->id);
-
- if (session_is_loggedinas()) {
- $passwordchangeurl = ''; // do not use actual change password url - might contain sensitive data
- } else {
- $parts = explode('?', $passwordchangeurl);
- $passwordchangeurl = reset($parts);
- $after = next($parts);
- preg_match_all('/([^&=]+)=([^&=]+)/', $after, $matches);
- if (count($matches)) {
- foreach($matches[0] as $key=>$match) {
- $params[$matches[1][$key]] = $matches[2][$key];
- }
- }
- }
- echo " ";
-}
-
-if (!$isfrontpage && empty($course->metacourse)) { // Mostly only useful at course level
-
- if ($currentuser) {
- if (is_enrolled($coursecontext, NULL, 'moodle/role:unassignself')) {
- echo ' ';
- }
- } else {
- if (is_enrolled($coursecontext, $user->id, 'moodle/role:assign')) { // I can unassign roles
- // add some button to unenroll user
- }
- }
-}
-
-if (!$user->deleted and !$currentuser && !session_is_loggedinas() && has_capability('moodle/user:loginas', $coursecontext) && !is_siteadmin($user->id)) {
- echo ' ';
-}
-
-if (!$user->deleted and !empty($CFG->messaging) and !isguestuser() and has_capability('moodle/site:sendmessage', $systemcontext)) {
- if (isloggedin() and $currentuser) {
- if ($countmessages = $DB->count_records('message', array('useridto'=>$user->id))) {
- $messagebuttonname = get_string("messages", "message")."($countmessages)";
- } else {
- $messagebuttonname = get_string("messages", "message");
- }
- echo " ";
- } else {
- echo " ";
- }
-}
-
-// Authorize.net: User Payments
-// TODO: replace this hack with proper callback into all plugins
-if ($course->enrol == 'authorize' || (empty($course->enrol) && $CFG->enrol == 'authorize')) {
- echo " ";
-}
-echo " \n";
+// Buttons gone! TODO: Make sure there's a good way to message someone from the profile pages
if ($CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) && $currentuser) { // Show user object
- echo ' ';
+ echo '
';
echo $OUTPUT->heading('DEBUG MODE: User session variables');
print_object($USER);
}
diff --git a/version.php b/version.php
index 891d51ec70c40..747637f3b5966 100644
--- a/version.php
+++ b/version.php
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2010050300; // YYYYMMDD = date of the last version bump
+ $version = 2010050400; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 dev (Build: 20100504)'; // Human-friendly version name
|