Diff for /loncom/homework/outputtags.pm between versions 1.40 and 1.41

version 1.40, 2005/11/02 20:31:55 version 1.41, 2005/11/03 11:12:37
Line 36  use POSIX qw(strftime); Line 36  use POSIX qw(strftime);
 BEGIN {  BEGIN {
     &Apache::lonxml::register('Apache::outputtags',('displayduedate','displaytitle','displayweight','displaystudentphoto'));      &Apache::lonxml::register('Apache::outputtags',('displayduedate','displaytitle','displayweight','displaystudentphoto'));
 }  }
   #  Empties the hash of tags that have already been displayed
   #  that should only be displayed once.
   #
 sub initialize_outputtags {  sub initialize_outputtags {
     %Apache::outputtags::showonce=();      %Apache::outputtags::showonce=();
 }  }
Line 52  sub start_displayduedate { Line 54  sub start_displayduedate {
     if (exists($Apache::outputtags::showonce{'displayduedate'})) {      if (exists($Apache::outputtags::showonce{'displayduedate'})) {
  if (grep(/^\Q$Apache::inputtags::part\E$/,   if (grep(/^\Q$Apache::inputtags::part\E$/,
  @{$Apache::outputtags::showonce{'displayduedate'}})) {   @{$Apache::outputtags::showonce{'displayduedate'}})) {
     return '';      return ''; # Already shown the duedate for this part.
  }   }
     }      }
       # since we will show the duedate for this part, remeber it.
   
     push (@{$Apache::outputtags::showonce{'displayduedate'}},      push (@{$Apache::outputtags::showonce{'displayduedate'}},
   $Apache::inputtags::part);    $Apache::inputtags::part);
   
Line 93  sub start_displayduedate { Line 97  sub start_displayduedate {
  $result=&Apache::edit::tag_start($target,$token);   $result=&Apache::edit::tag_start($target,$token);
  $result.='</td></tr>';   $result.='</td></tr>';
  $result.=&Apache::edit::end_table();   $result.=&Apache::edit::end_table();
       } elsif {$target eq 'tex'} {
    # print target.
    $result =''; # Stubbed off for now.
     }      }
     return $result;      return $result;
 }  }

Removed from v.1.40  
changed lines
  Added in v.1.41


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