--- loncom/lonnet/perl/lonnet.pm 2022/02/27 02:19:13 1.1172.2.147 +++ loncom/lonnet/perl/lonnet.pm 2024/07/01 23:30:15 1.1172.2.148 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1172.2.147 2022/02/27 02:19:13 raeburn Exp $ +# $Id: lonnet.pm,v 1.1172.2.148 2024/07/01 23:30:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3437,10 +3437,15 @@ sub can_edit_resource { return; } } elsif (!$crsedit) { + if ($env{'request.role'} =~ m{^st\./$cdom/$cnum}) { # # No edit allowed where CC has switched to student role. # - return; + return; + } elsif (($resurl !~ m{^/res/$match_domain/$match_username/}) || + ($resurl =~ m{^/res/lib/templates/})) { + return; + } } } }