Diff for /loncom/homework/structuretags.pm between versions 1.433 and 1.434

version 1.433, 2008/10/24 16:22:54 version 1.434, 2008/11/10 11:44:54
Line 36  use Apache::File(); Line 36  use Apache::File();
 use Apache::lonmenu;  use Apache::lonmenu;
 use Apache::lonlocal;  use Apache::lonlocal;
 use Apache::lonxml;  use Apache::lonxml;
   use Apache::londefdef;
 use Apache::lonenc();  use Apache::lonenc();
 use Time::HiRes qw( gettimeofday tv_interval );  use Time::HiRes qw( gettimeofday tv_interval );
 use lib '/home/httpd/lib/perl/';  use lib '/home/httpd/lib/perl/';
Line 74  sub start_tex { Line 75  sub start_tex {
     if ($target ne 'edit' && $target ne 'modified') {      if ($target ne 'edit' && $target ne 'modified') {
  my $bodytext=&Apache::lonxml::get_all_text("/tex",$parser,$style);   my $bodytext=&Apache::lonxml::get_all_text("/tex",$parser,$style);
  if ($target eq 'tex') {   if ($target eq 'tex') {
       
       # If inside a table, occurrences of \\ must be removed;
       # else the table blows up.
   
       if (&Apache::londefdef::is_inside_of($tagstack, "table")) {
    $bodytext =~ s/\\\\//g;
       }
     return $bodytext.'{}';      return $bodytext.'{}';
  }   }
     } elsif ($target eq "edit" ) {      } elsif ($target eq "edit" ) {
Line 148  sub page_start { Line 156  sub page_start {
   
     $extra_head .= &homework_js();      $extra_head .= &homework_js();
   
     unless ($env{'environment.wysiwygeditor'} eq 'on') {      if ($env{'environment.wysiwygeditor'} eq 'on') {
         $extra_head .= &Apache::lonhtmlcommon::dragmath_js();   $extra_head .= &Apache::lonhtmlcommon::dragmath_js("FCKEditMathPopup");
       } else {
           $extra_head .= &Apache::lonhtmlcommon::dragmath_js("EditMathPopup");
     }      }
   
     my %body_args;      my %body_args;
Line 1896  sub end_startouttext { Line 1906  sub end_startouttext {
     if ($target eq 'edit') {      if ($target eq 'edit') {
  my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth;   my $areaid = 'homework_edit_'.$Apache::lonxml::curdepth;
  $text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);   $text=&Apache::lonxml::get_all_text("endouttext",$parser,$style);
  $result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td>"  
                 .'<td><span clas="LC_nobreak">'.&mt('Delete?').' '   $result.=&Apache::edit::start_table($token)."<tr><td>".&mt('Text Block')."</td>
                 .&Apache::edit::deletelist($target,$token)  <td>".&mt('Delete:').
                 .'</span></td>';                   &Apache::edit::deletelist($target,$token)
    ."</td>";
         unless ($env{'environment.wysiwygeditor'} eq 'on') {          unless ($env{'environment.wysiwygeditor'} eq 'on') {
             $result.='<td align="left">'      $result .= '<td align="left">'
                      .&Apache::lonhtmlcommon::dragmath_button($areaid,1)   .&Apache::lonhtmlcommon::dragmath_button($areaid,1)
      .'</td>'   .'</td>'
                      .'<td>'   .'<td>'
                      .&Apache::edit::insertlist($target,$token)   .&Apache::edit::insertlist($target,$token)
      .'</td>';   .'</td>';
         }   }
  $result.='<td align="right" valign="top">' .   $result.='<td align="right" valign="top">' .
  &Apache::loncommon::helpLatexCheatsheet().      &Apache::loncommon::helpLatexCheatsheet().
  &Apache::edit::end_row().   &Apache::edit::end_row().
                  &Apache::edit::start_spanning_row()."\n".                   &Apache::edit::start_spanning_row()."\n".
  &Apache::edit::editfield($token->[1],$text,"",80,8,1);   &Apache::edit::editfield($token->[1],$text,"",80,8,1);

Removed from v.1.433  
changed lines
  Added in v.1.434


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