--- loncom/interface/loncommon.pm 2008/12/23 19:22:13 1.728 +++ loncom/interface/loncommon.pm 2009/02/10 12:20:17 1.744 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.728 2008/12/23 19:22:13 raeburn Exp $ +# $Id: loncommon.pm,v 1.744 2009/02/10 12:20:17 ehlerst Exp $ # # Copyright Michigan State University Board of Trustees # @@ -943,24 +943,30 @@ ENDTEMPLATE # This is a quicky function for Latex cheatsheet editing, since it # appears in at least four places sub helpLatexCheatsheet { - my $other = shift; + my ($topic,$text,$not_author) = @_; + my $out; my $addOther = ''; - if ($other) { - $addOther = Apache::loncommon::help_open_topic($other, shift, - undef, undef, 600) . + if ($topic) { + $addOther = &Apache::loncommon::help_open_topic($topic,$text, + undef, undef, 600). ''; } - return '
'. - $addOther . - &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'), - undef,undef,600) - .''. - &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'), - undef,undef,600) - .''. - &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'), - undef,undef,600) - .'
'; + $out = ''; + unless ($not_author) { + $out .= ''; + } + $out .= '
'. + $addOther . + &Apache::loncommon::help_open_topic("Greek_Symbols",&mt('Greek Symbols'), + undef,undef,600). + ''. + &Apache::loncommon::help_open_topic("Other_Symbols",&mt('Other Symbols'), + undef,undef,600). + ''. + &Apache::loncommon::help_open_topic("Authoring_Output_Tags",&mt('Output Tags'), + undef,undef,600). + '
'; + return $out; } sub general_help { @@ -1629,7 +1635,7 @@ sub multiple_select_form { $size = scalar(keys(%$hash)); } } - $output.="\n'; my @order; if (ref($order) eq 'ARRAY') { @order = @{$order}; @@ -1740,7 +1746,7 @@ sub select_level_form { =pod -=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc) +=item * &select_dom_form($defdom,$name,$includeempty,$showdomdesc,$autosubmit) Returns a string containing a \n"; + my $selectdomain = "'); @@ -9934,11 +9958,13 @@ sub get_annotation { } sub clean_symb { - my ($symb) = @_; + my ($symb,$delete_enc) = @_; &Apache::lonenc::check_decrypt(\$symb); my $enc = $env{'request.enc'}; - delete($env{'request.enc'}); + if ($delete_enc) { + delete($env{'request.enc'}); + } return ($symb,$enc); }