Diff for /loncom/homework/structuretags.pm between versions 1.295 and 1.301

version 1.295, 2005/06/28 19:17:36 version 1.301, 2005/09/23 18:39:55
Line 88  sub body_tag_start { Line 88  sub body_tag_start {
  $body_tag_start.=' style="font-size: x-large;" ';   $body_tag_start.=' style="font-size: x-large;" ';
     }      }
     $body_tag_start.='>'.&Apache::lonmenu::menubuttons(undef,$target,1);      $body_tag_start.='>'.&Apache::lonmenu::menubuttons(undef,$target,1);
       
       &Apache::lontexconvert::jsMath_reset();
     if ($env{'environment.texengine'} eq 'jsMath') {      if ($env{'environment.texengine'} eq 'jsMath') {
  $body_tag_start.='<script type="text/javascript">   $body_tag_start.=&Apache::lontexconvert::jsMath_header();
                      function NoFontMessage () {}  
                    </script>'."\n".  
        '<script src="/adm/jsMath/jsMath.js"></script>'."\n";  
     }      }
     return $body_tag_start;      return $body_tag_start;
 }  }
Line 119  sub page_start { Line 118  sub page_start {
     my $body_tag_start;      my $body_tag_start;
     if (!defined($found{'body'}) && $env{'request.state'} eq 'construct'      if (!defined($found{'body'}) && $env{'request.state'} eq 'construct'
  && $env{'environment.remote'} eq 'off') {   && $env{'environment.remote'} eq 'off') {
  $body_tag_start=&Apache::loncommon::bodytag();   if ($target eq 'web' || $target eq 'edit') {
  $body_tag_start.=&Apache::lonxml::message_location();      $body_tag_start=&Apache::loncommon::bodytag();
       $body_tag_start.=&Apache::lonxml::message_location();
    }
     } elsif (!defined($found{'body'})) {      } elsif (!defined($found{'body'})) {
  my $background=&Apache::lonxml::get_param('background',$parstack,   my $background=&Apache::lonxml::get_param('background',$parstack,
   $safeeval);    $safeeval);
  my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,   my $bgcolor=&Apache::lonxml::get_param('bgcolor',$parstack,
        $safeeval);         $safeeval);
  $body_tag_start=&body_tag_start($background,$bgcolor);   $body_tag_start=&body_tag_start($target,$background,$bgcolor);
  if ( ($target eq 'web' || $target eq 'webgrade')   if ( ($target eq 'web' || $target eq 'webgrade')
      && $env{'request.state'} ne 'construct') {       && $env{'request.state'} ne 'construct') {
     my ($symb,undef,undef,undef,$publicuser)=      my ($symb,undef,undef,undef,$publicuser)=
Line 510  sub start_problem { Line 511  sub start_problem {
     defined($env{'form.problemtype'})) {      defined($env{'form.problemtype'})) {
     $Apache::lonhomework::type=$env{'form.problemtype'};      $Apache::lonhomework::type=$env{'form.problemtype'};
  }   }
  $Apache::lonhomework::default_type = $Apache::lonhomework::type;  
  &Apache::lonxml::debug("Found this to be of type :$Apache::ltonhomework::type:");   &Apache::lonxml::debug("Found this to be of type :$Apache::ltonhomework::type:");
     }      }
     if ($Apache::lonhomework::type eq '' ) {      if ($Apache::lonhomework::type eq '' ) {
Line 523  sub start_problem { Line 523  sub start_problem {
     &Apache::lonxml::debug("Using default type, problem, :$uri:");      &Apache::lonxml::debug("Using default type, problem, :$uri:");
  }   }
     }      }
       $Apache::lonhomework::default_type = $Apache::lonhomework::type;
   
     #added vars to the scripting enviroment      #added vars to the scripting enviroment
     my $expression='$external::part=\''.$Apache::inputtags::part.'\';';      my $expression='$external::part=\''.$Apache::inputtags::part.'\';';
Line 565  sub start_problem { Line 566  sub start_problem {
                              value="'.$env{'form.username'}.'" />';                               value="'.$env{'form.username'}.'" />';
     if ($env{'user.adv'}) {      if ($env{'user.adv'}) {
  $form_tag_start.=   $form_tag_start.=
     ' <input type="checkbox" name="showallfoils" ';      ' <label><input type="checkbox" name="showallfoils" ';
  if (defined($env{'form.showallfoils'})) {   if (defined($env{'form.showallfoils'})) {
     $form_tag_start.='checked="on"';      $form_tag_start.='checked="on"';
  }   }
  $form_tag_start.= ' />'.&mt('&nbsp;Show&nbsp;All&nbsp;Foils');   $form_tag_start.= ' />'.&mt('&nbsp;Show&nbsp;All&nbsp;Foils').
       '</label>';
     }      }
     $form_tag_start.='<hr />';      $form_tag_start.='<hr />';
  }   }
Line 1135  sub start_part { Line 1137  sub start_part {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     my $result='';      my $result='';
     my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);      my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval);
     if ($id eq '') { $id = $Apache::lonxml::curdepth; }      if ($id =~ /^\s*$/) { $id = $Apache::lonxml::curdepth; }
     $Apache::inputtags::part=$id;      $Apache::inputtags::part=$id;
     push(@Apache::inputtags::partlist,$id);      push(@Apache::inputtags::partlist,$id);
     @Apache::inputtags::response=();      @Apache::inputtags::response=();
Line 1270  sub start_preduedate { Line 1272  sub start_preduedate {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {      if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' || $target eq 'tex') {
  &Apache::lonxml::debug("State in preduedate is ". $Apache::inputtags::status['-1']);   &Apache::lonxml::debug("State in preduedate is ". $Apache::inputtags::status['-1']);
  if ($Apache::inputtags::status['-1'] ne 'CAN_ANSWER' &&   if (!$Apache::lonhomework::scantronmode &&
       $Apache::inputtags::status['-1'] ne 'CAN_ANSWER' &&
     $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') {      $Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') {
     &Apache::lonxml::debug("Wha? ". ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER'));      &Apache::lonxml::debug("Wha? ". ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER'));
     &Apache::lonxml::get_all_text("/preduedate",$parser);      &Apache::lonxml::get_all_text("/preduedate",$parser);
Line 1286  sub end_preduedate { Line 1289  sub end_preduedate {
 sub start_postanswerdate {  sub start_postanswerdate {
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;      my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_;
     if ($target eq 'web' || $target eq 'grade') {      if ($target eq 'web' || $target eq 'grade') {
  if ($Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {   if ($Apache::lonhomework::scantronmode ||
       $Apache::inputtags::status['-1'] ne 'SHOW_ANSWER') {
     &Apache::lonxml::get_all_text("/postanswerdate",$parser);      &Apache::lonxml::get_all_text("/postanswerdate",$parser);
  }   }
     } elsif ($target eq 'tex') {      } elsif ($target eq 'tex') {

Removed from v.1.295  
changed lines
  Added in v.1.301


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