[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Sat Nov 11 13:50:51 EST 2023


raeburn		Sat Nov 11 18:50:51 2023 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Support domain default or user override for activation or deactivation
    of CodeMirror.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1415 loncom/interface/loncommon.pm:1.1416
--- loncom/interface/loncommon.pm:1.1415	Fri Nov  3 01:31:57 2023
+++ loncom/interface/loncommon.pm	Sat Nov 11 18:50:51 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1415 2023/11/03 01:31:57 raeburn Exp $
+# $Id: loncommon.pm,v 1.1416 2023/11/11 18:50:51 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6461,6 +6461,17 @@
     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';
+        }
+    }
+    return $nocodem;
+}
+
 ###############################################
 ###############################################
 




More information about the LON-CAPA-cvs mailing list