--- loncom/interface/loncommon.pm 2003/05/29 17:49:22 1.102 +++ loncom/interface/loncommon.pm 2003/06/20 14:44:06 1.106 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.102 2003/05/29 17:49:22 www Exp $ +# $Id: loncommon.pm,v 1.106 2003/06/20 14:44:06 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -586,6 +586,26 @@ ENDTEMPLATE } +# This is a quicky function for Latex cheatsheet editing, since it +# appears in at least four places +sub helpLatexCheatsheet { + my $other = shift; + my $addOther = ''; + if ($other) { + $addOther = Apache::loncommon::help_open_topic($other, shift, + undef, undef, 600) . + ''; + } + return '
'. + $addOther . + &Apache::loncommon::help_open_topic("Greek_Symbols",'Greek Symbols', + undef,undef,600) + .''. + &Apache::loncommon::help_open_topic("Other_Symbols",'Other Symbols', + undef,undef,600) + .'
'; +} + =pod =item csv_translate($text) @@ -1358,6 +1378,12 @@ sub display_languages { $languages{$_}=1; } } + if ($ENV{'course.'.$ENV{'request.course.id'}.'.languages'}) { + foreach (split(/\s*(\,|\;|\:)\s*/, + $ENV{'course.'.$ENV{'request.course.id'}.'.languages'})) { + $languages{$_}=1; + } + } &get_unprocessed_cgi($ENV{'QUERY_STRING'},['displaylanguage']); if ($ENV{'form.displaylanguage'}) { foreach (split(/\s*(\,|\;|\:)\s*/,$ENV{'form.displaylanguage'})) { @@ -1496,7 +1522,7 @@ sub get_student_view { } if ($target eq 'tex') {$moreenv{'form.grade_target'} = 'tex';} &Apache::lonnet::appenv(%moreenv); - my $userview=&Apache::lonnet::ssi('/res/'.$feedurl); + my $userview=&Apache::lonnet::ssi_body(&Apache::lonnet::clutter($feedurl)); &Apache::lonnet::delenv('form.grade_'); foreach my $element (@elements) { $ENV{'form.grade_'.$element}=$old{$element}; @@ -1731,20 +1757,11 @@ sub bodytag { unless ($realm) { $realm=' '; } # Set messages my $messages=&domainlogo($domain); -# Signal existance to Remote unless already done so - my $addscript=''; - unless (($ENV{'browser.interface'} eq 'textual') || - ($ENV{'environment.remote'} eq 'off') || ($addentries)) { - $addentries=' onLoad="'.&Apache::lonmenu::loadevents(). - '" onUnload="'.&Apache::lonmenu::unloadevents().'"'; - $addscript=&Apache::lonmenu::registerurl(); - } # Port for miniserver my $lonhttpdPort=$Apache::lonnet::perlvar{'lonhttpdPort'}; if (!defined($lonhttpdPort)) { $lonhttpdPort='8080'; } # construct main body tag my $bodytag = < END