--- loncom/interface/loncommon.pm 2005/01/14 21:15:09 1.246 +++ loncom/interface/loncommon.pm 2005/03/10 00:21:48 1.255 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.246 2005/01/14 21:15:09 matthew Exp $ +# $Id: loncommon.pm,v 1.255 2005/03/10 00:21:48 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -547,7 +547,7 @@ END $result .= "\n"; @@ -557,7 +557,7 @@ END my $seconddefault = $hashref->{$firstdefault}->{'default'}; foreach my $value (sort(keys(%select2))) { $result.=" \n"; } $result .= "\n"; @@ -687,16 +687,18 @@ sub help_open_menu { "
$text";
}
+ my $html=&Apache::lonxml::xmlbegin();
my $helpicon=&lonhttpdurl("/adm/lonIcons/helpgateway.gif");
$template .= <<"ENDTEMPLATE";
'.&mt("Unable to create new Excel file. ". + "This error has been logged. ". + "Please alert your LON-CAPA administrator"). + ' '); + return (undef); + } + # + $workbook->set_tempdir('/home/httpd/perl/tmp'); + # + my $format = &Apache::loncommon::define_excel_formats($workbook); + return ($workbook,$filename,$format); +} + +############################################################### +############################################################### + +=pod + =item * change_content_javascript(): This and the next function allow you to create small sections of an @@ -1044,7 +1091,7 @@ sub multiple_select_form { $output.="\n\n"; @@ -1075,7 +1122,7 @@ sub select_form { } foreach (@keys) { $selectform.="\n"; } $selectform.=""; @@ -1112,7 +1159,7 @@ sub select_level_form { my $selectform = ""; @@ -1142,7 +1189,7 @@ sub select_dom_form { my $selectdomain = ""; @@ -1241,9 +1288,11 @@ Outputs: ############################################################### ############################################################### sub decode_user_agent { + my ($r)=@_; my @browsertype=split(/\&/,$Apache::lonnet::perlvar{"lonBrowsDet"}); my %mathcap=split(/\&/,$$Apache::lonnet::perlvar{"lonMathML"}); my $httpbrowser=$ENV{"HTTP_USER_AGENT"}; + if (!$httpbrowser && $r) { $httpbrowser=$r->header_in('User-Agent'); } my $clientbrowser='unknown'; my $clientversion='0'; my $clientmathml=''; @@ -2350,7 +2399,7 @@ sub submlink { &Apache::lonxml::whichuser($symb); if (!$symb) { $symb=$cursymb; } } - if (!$symb) { $symb=&symbread(); } + if (!$symb) { $symb=&Apache::lonnet::symbread(); } $symb=&Apache::lonnet::escape($symb); if ($target) { $target="target=\"$target\""; } return ' END + if ($ENV{'environment.texengine'} eq 'jsMath') { + $bodytag.=''."\n". + ''."\n"; + } + my $upperleft=' |