From d8498e4e9b01f1c345397ba1500c1276b5d86fb2 Mon Sep 17 00:00:00 2001 From: lichtbit Date: Thu, 2 Nov 2023 09:26:10 +0000 Subject: [PATCH] Benutzer-Einstellungen: Links deaktivieren --- lib/navigationlib.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index eb5f5dcd7300e..c0afac8af9cfb 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -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)); @@ -5227,7 +5227,7 @@ 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]); @@ -5235,7 +5235,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr } } - 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)); @@ -5244,7 +5244,7 @@ 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)); @@ -5252,7 +5252,7 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr } } $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)) { @@ -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)); @@ -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]); @@ -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));