Skip to content

Commit

Permalink
Benutzer-Einstellungen: Links deaktivieren
Browse files Browse the repository at this point in the history
  • Loading branch information
lichtbit-mirror committed Nov 2, 2023
1 parent 164b86d commit d8498e4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5198,7 +5198,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
$useraccount = $usersetting->add(get_string('useraccount'), null, self::TYPE_CONTAINER, null, 'useraccount');

// Add the profile edit link.
if (isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if (false && isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if (($currentuser || is_siteadmin($USER) || !is_siteadmin($user)) &&
has_capability('moodle/user:update', $systemcontext)) {
$url = new moodle_url('/user/editadvanced.php', array('id'=>$user->id, 'course'=>$course->id));
Expand Down Expand Up @@ -5227,15 +5227,15 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr

// Default homepage.
$defaulthomepageuser = (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_USER));
if (isloggedin() && !isguestuser($user) && $defaulthomepageuser) {
if (false && isloggedin() && !isguestuser($user) && $defaulthomepageuser) {
if ($currentuser && has_capability('moodle/user:editownprofile', $systemcontext) ||
has_capability('moodle/user:editprofile', $usercontext)) {
$url = new moodle_url('/user/defaulthomepage.php', ['id' => $user->id]);
$useraccount->add(get_string('defaulthomepageuser'), $url, self::TYPE_SETTING, null, 'defaulthomepageuser');
}
}

if (isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if (false && isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if ($currentuser && has_capability('moodle/user:editownprofile', $systemcontext) ||
has_capability('moodle/user:editprofile', $usercontext)) {
$url = new moodle_url('/user/language.php', array('id' => $user->id, 'course' => $course->id));
Expand All @@ -5244,15 +5244,15 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
}
$pluginmanager = core_plugin_manager::instance();
$enabled = $pluginmanager->get_enabled_plugins('mod');
if (isset($enabled['forum']) && isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if (false && isset($enabled['forum']) && isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if ($currentuser && has_capability('moodle/user:editownprofile', $systemcontext) ||
has_capability('moodle/user:editprofile', $usercontext)) {
$url = new moodle_url('/user/forum.php', array('id' => $user->id, 'course' => $course->id));
$useraccount->add(get_string('forumpreferences'), $url, self::TYPE_SETTING);
}
}
$editors = editors_get_enabled();
if (count($editors) > 1) {
if (false && count($editors) > 1) {
if (isloggedin() && !isguestuser($user) && !is_mnet_remote_user($user)) {
if ($currentuser && has_capability('moodle/user:editownprofile', $systemcontext) ||
has_capability('moodle/user:editprofile', $usercontext)) {
Expand All @@ -5263,7 +5263,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
}

// Add "Calendar preferences" link.
if (isloggedin() && !isguestuser($user)) {
if (false && isloggedin() && !isguestuser($user)) {
if ($currentuser && has_capability('moodle/user:editownprofile', $systemcontext) ||
has_capability('moodle/user:editprofile', $usercontext)) {
$url = new moodle_url('/user/calendar.php', array('id' => $user->id));
Expand All @@ -5272,7 +5272,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
}

// Add "Content bank preferences" link.
if (isloggedin() && !isguestuser($user)) {
if (false && isloggedin() && !isguestuser($user)) {
if ($currentuser && has_capability('moodle/user:editownprofile', $systemcontext) ||
has_capability('moodle/user:editprofile', $usercontext)) {
$url = new moodle_url('/user/contentbank.php', ['id' => $user->id]);
Expand Down Expand Up @@ -5353,7 +5353,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
}

// Messaging.
if (($currentuser && has_capability('moodle/user:editownmessageprofile', $systemcontext)) || (!isguestuser($user) &&
if (false && ($currentuser && has_capability('moodle/user:editownmessageprofile', $systemcontext)) || (!isguestuser($user) &&
has_capability('moodle/user:editmessageprofile', $usercontext) && !is_primary_admin($user->id))) {
$messagingurl = new moodle_url('/message/edit.php', array('id' => $user->id));
$notificationsurl = new moodle_url('/message/notificationpreferences.php', array('userid' => $user->id));
Expand Down

0 comments on commit d8498e4

Please sign in to comment.