--- loncom/interface/loncommon.pm 2023/11/17 17:02:20 1.1418 +++ loncom/interface/loncommon.pm 2023/11/18 21:12:45 1.1419 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1418 2023/11/17 17:02:20 raeburn Exp $ +# $Id: loncommon.pm,v 1.1419 2023/11/18 21:12:45 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6461,6 +6461,19 @@ sub CSTR_pageheader { return $output; } +############################################## +=pod + +=item * &nocodemirror() + +Input: None + +Returns: 1 if CodeMirror is deactivated based on + user's preference, or domain default, + if user indicated use of default. + +=cut + sub nocodemirror { my $nocodem = $env{'environment.nocodemirror'}; unless ($nocodem) { @@ -6475,6 +6488,25 @@ sub nocodemirror { return; } +############################################## +=pod + +=item * &permitted_editors() + +Input: None + +Returns: %editors hash in which keys are editors + permitted in current Authoring Space. + Value for each key is 1. Possible keys + are: edit, xml, and daxe. If no specific + set of editors has been set for the Author + who owns the Authoring Space, then the + domain default will be used. If no domain + default has been set, then the keys will be + edit and xml. + +=cut + sub permitted_editors { my ($is_author,$is_coauthor,$auname,$audom,%editors); if ($env{'request.role'} =~ m{^au\./}) {