Diff for /loncom/homework/structuretags.pm between versions 1.255 and 1.260.2.3

version 1.255, 2004/06/03 16:42:02 version 1.260.2.3, 2004/08/25 20:12:15
Line 61  sub start_tex { Line 61  sub start_tex {
     if ($target eq 'tex') {      if ($target eq 'tex') {
  return $bodytext.' ';   return $bodytext.' ';
     }      }
     return $result;;      return $result;
 }  }
   
 sub end_tex {  sub end_tex {
Line 84  sub page_start { Line 84  sub page_start {
        $parstack,$parser,$safeeval);         $parstack,$parser,$safeeval);
  $head_tag_start='<head>'.&Apache::lonmenu::registerurl(undef,$target).   $head_tag_start='<head>'.&Apache::lonmenu::registerurl(undef,$target).
     &Apache::lonhtmlcommon::htmlareaheaders();      &Apache::lonhtmlcommon::htmlareaheaders();
  @Apache::lonxml::htmlareafields=();  
     }      }
     my $body_tag_start;      my $body_tag_start;
     if (!defined($found{'body'})) {      if (!defined($found{'body'})) {
Line 192  sub problem_edit_header { Line 191  sub problem_edit_header {
        <input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> <hr />         <input type="submit" name="Undo" accesskey="u" value="'.&mt('undo').'" /> <hr />
        <input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes and Edit').'" />         <input type="submit" name="submit" accesskey="s" value="'.&mt('Submit Changes and Edit').'" />
        <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /><table><tr><td>'.         <input type="submit" name="submit" accesskey="v" value="'.&mt('Submit Changes and View').'" /><table><tr><td>'.
        &Apache::loncommon::help_open_topic('Problem_Editor_XML_Index',         &Apache::loncommon::help_open_menu('','Problem Editing Help','Problem_Editor_XML_Index','',5,'Authoring',undef,undef,undef,'Problem Editing Help')
    'Problem Editing Help').'</td><td>'.         .'</td></tr></table>'.
        &Apache::loncommon::help_open_faq(5).  
        &Apache::loncommon::help_open_bug('Authoring').'</td></tr></table>'.  
        '<table border="0"><tr><td bgcolor="#DDDDDD">';         '<table border="0"><tr><td bgcolor="#DDDDDD">';
 }  }
   
Line 568  sub start_problem { Line 565  sub start_problem {
     my @due_file_content = <$temp_file>;      my @due_file_content = <$temp_file>;
     my $due_file_content = $due_file_content[$#due_file_content];      my $due_file_content = $due_file_content[$#due_file_content];
     chomp $due_file_content;      chomp $due_file_content;
     my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval));      my $name_of_resourse= &Apache::lonxml::latex_special_symbols(&get_resource_name($parstack,$safeeval),'header');
     if ($due_file_content ne $duedate) {      if ($due_file_content ne $duedate) {
  $temp_file = Apache::File->new('>'.$filename);   $temp_file = Apache::File->new('>'.$filename);
  print $temp_file "$duedate\n";   print $temp_file "$duedate\n";
Line 647  sub end_problem { Line 644  sub end_problem {
  if (not $ENV{'form.problem_split'}=~/yes/) {   if (not $ENV{'form.problem_split'}=~/yes/) {
     $endminipage = '\end{minipage}';      $endminipage = '\end{minipage}';
  }   }
                   if ($ENV{'form.print_discussions'} eq 'yes') {
       $result.=&Apache::lonxml::xmlend();
       $result=~s/<\/html>//;
    }
  $result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}';   $result .= '\keephidden{ENDOFPROBLEM}\vskip 0.5mm\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}';
  if (not $ENV{'request.symb'} =~ m/\.page_/) {   if (not $ENV{'request.symb'} =~ m/\.page_/) {
     $result .= $endminipage.'\end{document} ';      $result .= $endminipage.'\end{document} ';
Line 670  sub end_problem { Line 671  sub end_problem {
     $result=&Apache::response::mandatory_part_meta;      $result=&Apache::response::mandatory_part_meta;
  }   }
  $result.=&Apache::response::meta_part_order();   $result.=&Apache::response::meta_part_order();
    $result.=&Apache::response::meta_response_order();
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  &Apache::lonxml::debug("in end_problem with $target, edit");   &Apache::lonxml::debug("in end_problem with $target, edit");
  $result = &problem_edit_footer();   $result = &problem_edit_footer();
Line 1038  sub start_part { Line 1040  sub start_part {
     @Apache::inputtags::previous_version=();      @Apache::inputtags::previous_version=();
     $Apache::lonhomework::problemstatus=&get_problem_status($id);      $Apache::lonhomework::problemstatus=&get_problem_status($id);
     my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);      my $hidden=&Apache::loncommon::check_if_partid_hidden($Apache::inputtags::part);
       my $newtype=&Apache::lonnet::EXT("resource.$id.type");
       if ($newtype) { $Apache::lonhomework::type=$newtype; }
   
     my $expression='$external::part=\''.$Apache::inputtags::part.'\';';      my $expression='$external::part=\''.$Apache::inputtags::part.'\';';
       $expression.='$external::type=\''.$Apache::lonhomework::type.'\';';
     &Apache::run::run($expression,$safeeval);      &Apache::run::run($expression,$safeeval);
   
     if ($target eq 'meta') {      if ($target eq 'meta') {
Line 1077  sub start_part { Line 1083  sub start_part {
     } else {      } else {
  if ($target eq 'tex') {   if ($target eq 'tex') {
     if (not $ENV{'form.problem_split'}=~/yes/) {      if (not $ENV{'form.problem_split'}=~/yes/) {
  $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';   if ($$tagstack[-2] eq 'td') {
       $result.='\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
    } else {
       $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
    }
     }      }
     my $weight = &Apache::lonnet::EXT("resource.$id.weight");      my $weight = &Apache::lonnet::EXT("resource.$id.weight");
     my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages');      my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages');
Line 1137  sub end_part { Line 1147  sub end_part {
     $gradestatus='';      $gradestatus='';
  }   }
  $result=$gradestatus;   $result=$gradestatus;
    if ($$tagstack[-2] eq 'td' and $target eq 'tex') {$result.='\end{minipage}';} 
     } elsif ($target eq 'edit') {      } elsif ($target eq 'edit') {
  $result=&Apache::edit::end_table();   $result=&Apache::edit::end_table();
     }      }

Removed from v.1.255  
changed lines
  Added in v.1.260.2.3


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