--- loncom/interface/loncommon.pm 2023/11/03 01:12:15 1.1414 +++ loncom/interface/loncommon.pm 2023/11/11 23:09:23 1.1417 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1414 2023/11/03 01:12:15 raeburn Exp $ +# $Id: loncommon.pm,v 1.1417 2023/11/11 23:09:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6461,6 +6461,20 @@ sub CSTR_pageheader { return $output; } +sub nocodemirror { + my $nocodem = $env{'environment.nocodemirror'}; + unless ($nocodem) { + my %domdefs = &Apache::lonnet::get_domain_defaults($env{'user.domain'}); + if ($domdefs{'nocodemirror'}) { + $nocodem = 'yes'; + } + } + if ($nocodem eq 'yes') { + return 1; + } + return; +} + ############################################### ############################################### @@ -17563,7 +17577,8 @@ sub init_user_environment { my $public=($username eq 'public' && $domain eq 'public'); - my ($filename,$cookie,$userroles,$firstaccenv,$timerintenv); + my ($filename,$cookie,$userroles,$firstaccenv,$timerintenv, + $coauthorenv); my $now=time; if ($public) {