--- loncom/interface/loncommon.pm 2023/11/27 23:24:05 1.1423 +++ loncom/interface/loncommon.pm 2024/10/12 21:41:25 1.1442 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1423 2023/11/27 23:24:05 raeburn Exp $ +# $Id: loncommon.pm,v 1.1442 2024/10/12 21:41:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1372,7 +1372,7 @@ sub helpLatexCheatsheet { $out .= '' .&help_open_topic('Authoring_Output_Tags',&mt('Output Tags'),$stayOnPage,undef,600) .' ' - .&help_open_topic('Authoring_Multilingual_Problems',&mt('How to create problems in different languages'),$stayOnPage,undef,600) + .&help_open_topic('Authoring_Multilingual_Problems',&mt('Languages'),$stayOnPage,undef,600) .''; } $out .= ''; # End cheatsheet @@ -1764,8 +1764,6 @@ the id of the element to resize, second surrounds everything that comes after the textarea, this routine needs to be attached to the
for the onload and onresize events. -=back - =cut sub resize_textarea_js { @@ -2439,10 +2437,76 @@ sub show_crsfiles_js { END } +sub crsauthor_rights { + my ($rightsfile,$path,$docroot,$cnum,$cdom) = @_; + my $sourcerights = "$path/$rightsfile"; + my $now = time; + if (!-e $sourcerights) { + my $cid = $cdom.'_'.$cnum; + if (!-e "$docroot/priv/$cdom") { + mkdir("$docroot/priv/$cdom",0755); + } + if (!-e "$docroot/priv/$cdom/$cnum") { + mkdir("$docroot/priv/$cdom/$cnum",0755); + } + if (open(my $fh,">$sourcerights")) { + print $fh <