mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-17143
don't display the user description at all when user isn't enrolled in any courses, backported to 1.8
This commit is contained in:
parent
61f34d4260
commit
7e62718e7c
6 changed files with 32 additions and 1 deletions
|
@ -201,7 +201,13 @@
|
|||
// Print the description
|
||||
|
||||
if ($user->description && !isset($hiddenfields['description'])) {
|
||||
echo format_text($user->description, FORMAT_MOODLE)."<hr />";
|
||||
$has_courseid = ($course->id != SITEID);
|
||||
if (!$has_courseid && !empty($CFG->profilesforenrolledusersonly)
|
||||
&& !record_exists('role_assignments', 'userid', $id)) {
|
||||
echo get_string('profilenotshown', 'moodle').'<hr />';
|
||||
} else {
|
||||
echo format_text($user->description, FORMAT_MOODLE)."<hr />";
|
||||
}
|
||||
}
|
||||
|
||||
// Print all the little details in a list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue