Diff for /loncom/homework/hint.pm between versions 1.1 and 1.2

version 1.1, 2000/12/19 23:22:22 version 1.2, 2000/12/21 18:13:33
Line 7  sub BEGIN { Line 7  sub BEGIN {
   &Apache::lonxml::register('Apache::hinttags',('hintgroup','hintpart'));    &Apache::lonxml::register('Apache::hinttags',('hintgroup','hintpart'));
 }  }
   
 #currently hintgroup has no purpose  
 sub start_hintgroup {  sub start_hintgroup {
     my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
     my $id=$Apache::inputtags::part;
     my $numtries=$Apache::lonhomework::history{"resource.$id.tries"};
     if ( $numtries eq '') { $numtries = 0; }
     my $hinttries=&Apache::lonnet::EXT("resource.$id.hinttries");
     if ( $hinttries eq '') { $hinttries = 1; }
     &Apache::lonxml::debug("found :$id:$numtries:$hinttries:");
     if ( $numtries < $hinttries ) {
       &Apache::lonxml::get_all_text("/hintgroup",$$parser[$#$parser]);
     }
     return '';
 }  }
   
 sub end_hintgroup {  sub end_hintgroup {
 }  }
   
   # a part shows if it is on, if no specific parts are on, then default shows
 sub start_hintpart {  sub start_hintpart {
     return '';
   my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;    my ($target,$token,$parstack,$parser,$safeeval,$style)=@_;
   
   my $show ='0';    my $show ='0';
Line 23  sub start_hintpart { Line 36  sub start_hintpart {
     if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }      if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; }
     my $on = &Apache::run::run("{$args;".'return $on}',$safeeval);      my $on = &Apache::run::run("{$args;".'return $on}',$safeeval);
     if ( $on eq 'default') {      if ( $on eq 'default') {
       $show='1';  
     } else {      } else {
       my (%results) = &Apache::run::run("{$args; return ".'\%'.$on,$safeeval);        my (%results) = &Apache::run::run("{$args; return ".'\%'.$on,$safeeval);
       my $key;        my $key;

Removed from v.1.1  
changed lines
  Added in v.1.2


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