Diff for /loncom/xml/lonxml.pm between versions 1.484 and 1.484.4.3

version 1.484, 2008/08/08 16:50:39 version 1.484.4.3, 2009/10/04 03:42:42
Line 658  sub setup_globals { Line 658  sub setup_globals {
   $Apache::lonxml::request=$request;    $Apache::lonxml::request=$request;
   $errorcount=0;    $errorcount=0;
   $warningcount=0;    $warningcount=0;
     $Apache::lonxml::internal_error=0;
   $Apache::lonxml::default_homework_loaded=0;    $Apache::lonxml::default_homework_loaded=0;
   $Apache::lonxml::usestyle=1;    $Apache::lonxml::usestyle=1;
   &init_counter();    &init_counter();
Line 1586  FULLPAGE Line 1587  FULLPAGE
       my $spelllink .=&Apache::lonhtmlcommon::spelllink('xmledit','filecont');        my $spelllink .=&Apache::lonhtmlcommon::spelllink('xmledit','filecont');
       my $textarea_events = &Apache::edit::element_change_detection();        my $textarea_events = &Apache::edit::element_change_detection();
       my $form_events     = &Apache::edit::form_change_detection();        my $form_events     = &Apache::edit::form_change_detection();
       my $htmlerror=&verify_html($filecontents);        my $htmlerror;
       if ($htmlerror) {        if ($filetype eq 'html') {
          $htmlerror='<span class="LC_error">'.$htmlerror.'</span>';            $htmlerror=&verify_html($filecontents);
             if ($htmlerror) {
                 $htmlerror='<span class="LC_error">'.$htmlerror.'</span>';
             }
       }        }
       my $editfooter=(<<ENDFOOTER);        my $editfooter=(<<ENDFOOTER);
 $initialize  $initialize
Line 1662  sub handler { Line 1666  sub handler {
  $request->set_last_modified(&Apache::lonnet::metadata($request->uri,   $request->set_last_modified(&Apache::lonnet::metadata($request->uri,
       'lastrevisiondate'));        'lastrevisiondate'));
     }      }
       # Embedded Flash movies (e.g., 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;      $request->send_http_header;
           
     return OK if $request->header_only;      return OK if $request->header_only;
Line 1828  sub error { Line 1847  sub error {
   
     $errorcount++;      $errorcount++;
   
       $Apache::lonxml::internal_error=1;
   
     if (defined($Apache::inputtags::part)) {      if (defined($Apache::inputtags::part)) {
  if ( @Apache::inputtags::response ) {   if ( @Apache::inputtags::response ) {
     push(@errors,      push(@errors,
Line 1854  sub error { Line 1875  sub error {
  my ($symb)=&Apache::lonnet::symbread();   my ($symb)=&Apache::lonnet::symbread();
  if ( !$symb ) {   if ( !$symb ) {
     #public or browsers      #public or browsers
     $errormsg=&mt("An error occured while processing this resource. The author has been notified.");      $errormsg=&mt("An error occurred while processing this resource. The author has been notified.");
  }   }
  my $host=$Apache::lonnet::perlvar{'lonHostID'};   my $host=$Apache::lonnet::perlvar{'lonHostID'};
  push(@errors,   push(@errors,
Line 1893  sub error { Line 1914  sub error {
  }   }
     }      }
     if ($env{'request.role.adv'}) {      if ($env{'request.role.adv'}) {
  $errormsg=&mt("An error occured while processing this resource. The course personnel ([_1]) and the author have been notified.",join(', ',@userlist));   $errormsg=&mt("An error occurred while processing this resource. The course personnel ([_1]) and the author have been notified.",join(', ',@userlist));
     } else {      } else {
  $errormsg=&mt("An error occured while processing this resource. The instructor has been notified.");   $errormsg=&mt("An error occurred while processing this resource. The instructor has been notified.");
     }      }
  }   }
  push(@Apache::lonxml::error_messages,"<b>$errormsg</b> <br />");   push(@Apache::lonxml::error_messages,"<b>$errormsg</b> <br />");

Removed from v.1.484  
changed lines
  Added in v.1.484.4.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>