--- loncom/xml/lonxml.pm 2009/05/28 11:31:03 1.495 +++ loncom/xml/lonxml.pm 2009/10/04 03:36:08 1.499 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.495 2009/05/28 11:31:03 bisitz Exp $ +# $Id: lonxml.pm,v 1.499 2009/10/04 03:36:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -757,6 +757,8 @@ sub init_safespace { '&maxima_cas_formula_fix'); $safehole->wrap(\&Apache::lonr::r_eval,$safeeval,'&r_eval'); + $safehole->wrap(\&Apache::lonr::Rentry,$safeeval,'&Rentry'); + $safehole->wrap(\&Apache::lonr::Rarray,$safeeval,'&Rarray'); $safehole->wrap(\&Apache::lonr::r_check,$safeeval,'&r_check'); $safehole->wrap(\&Apache::lonr::r_cas_formula_fix,$safeeval, '&r_cas_formula_fix'); @@ -1041,7 +1043,7 @@ sub get_id { my ($parstack,$safeeval)=@_; my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); if ($env{'request.state'} eq 'construct' && $id =~ /([._]|[^\w\d\s[:punct:]])/) { - &error(&mt("ID "[_1]" contains invalid characters, IDs are only allowed to contain letters, numbers, spaces and -",''.$id.'')); + &error(&mt('ID [_1] contains invalid characters. IDs are only allowed to contain letters, numbers, spaces and -','"'.$id.'"')); } if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; } return $id; @@ -1704,6 +1706,21 @@ sub handler { $request->set_last_modified(&Apache::lonnet::metadata($request->uri, 'lastrevisiondate')); } + # Embedded Flash movies from Camtasia served from https will not display in IE + # if XML config file has expired from cache. + if ($ENV{'SERVER_PORT'} == 443) { + if ($request->uri =~ /\.xml$/) { + my ($httpbrowser,$clientbrowser) = + &Apache::loncommon::decode_user_agent($request); + if ($clientbrowser =~ /^explorer$/i) { + delete $request->headers_out->{'Cache-control'}; + delete $request->headers_out->{'Pragma'}; + my $expiration = time + 60; + my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime($expiration)); + $request->headers_out->set("Expires" => $date); + } + } + } $request->send_http_header; return OK if $request->header_only; @@ -1798,7 +1815,7 @@ ENDNOTFOUND if ($env{'environment.remote'} eq 'off') { my $brcrum; if ($env{'request.state'} eq 'construct') { - $brcrum = [{'href' => '', # FIXME Add link to /priv/[user] + $brcrum = [{'href' => &Apache::loncommon::authorspace(), 'text' => 'Construction Space'}, {'href' => '', 'text' => 'Editor'}]; @@ -1837,7 +1854,7 @@ ENDNOTFOUND 'onload' => $add_to_onload, }); $options{'bread_crumbs'} = [{ - 'href' => '', # FIXME Add link to /priv/[user] + 'href' => &Apache::loncommon::authorspace(), 'text' => 'Construction Space'}, {'href' => '', 'text' => 'HTML Editor'}];