Diff for /loncom/homework/inputtags.pm between versions 1.317 and 1.318

version 1.317, 2013/04/30 03:03:34 version 1.318, 2013/06/07 20:31:50
Line 1658  sub previous_tries { Line 1658  sub previous_tries {
     my $count;      my $count;
     my %count_lookup;      my %count_lookup;
     my $lastrndseed;      my $lastrndseed;
       my $numstamps = 0;
   
     foreach my $i (1..$Apache::lonhomework::history{'version'}) {      foreach my $i (1..$Apache::lonhomework::history{'version'}) {
  my $prefix = $i.":resource.$id";   my $prefix = $i.":resource.$id";
Line 1714  sub previous_tries { Line 1715  sub previous_tries {
  $message =~ s{(<td.*?>)}{<td>};   $message =~ s{(<td.*?>)}{<td>};
   
   
  $output.='<tr class="'.$class.'">';   $output .= '<tr class="'.$class.'">'.
  $output.='<td align="center">'.$count.'</td>';             '<td align="center">'.$count.'</td>'.$message;
  $output.=$message;          if ((!$is_anon) && ($Apache::lonhomework::history{"$prefix.tries"}) &&
               ($Apache::lonhomework::history{"$prefix.award"} ne 'ASSIGNED_SCORE') &&
               ($Apache::lonhomework::history{$i.':timestamp'})) {
               $output .= '<td>'.&Apache::lonlocal::locallocaltime(
                                $Apache::lonhomework::history{$i.':timestamp'}).'</td>';
               $numstamps ++;
           } else {
               $output .= '<td></td>';
           }
  foreach my $resid (@Apache::inputtags::response) {   foreach my $resid (@Apache::inputtags::response) {
     my $prefix = $prefix.".$resid";      my $prefix = $prefix.".$resid";
     if (exists($Apache::lonhomework::history{"$prefix.submission"})) {      if (exists($Apache::lonhomework::history{"$prefix.submission"})) {
Line 1740  sub previous_tries { Line 1748  sub previous_tries {
         $lastrndseed = $curr_rndseed;          $lastrndseed = $curr_rndseed;
     }      }
     return if ($output eq '');      return if ($output eq '');
     my $headers =       my $headers = '<tr>'.
  '<tr>'.'<th>'.&mt('Submission #').'</th><th>'.&mt('Try').                    '<th>'.&mt('Submission #').'</th>'.
  '</th><th colspan="'.scalar(@Apache::inputtags::response).'">'.                    '<th>'.&mt('Try').'</th><th>';
  &mt('Submitted Answer').'</th>';      if ($numstamps) {
           $headers .= &mt('When');
       }
       $headers .= '</th>';
       my $colspan = scalar(@Apache::inputtags::response);
       if ($colspan > 1) {
           $headers .= '<th colspan="'.$colspan.'">';
       } else {
           $headers .= '<th>';
       }
       $headers .= &mt('Submitted Answer').'</th></tr>';
     $output ='<table class="LC_prior_tries">'.$headers.$output.'</table>';      $output ='<table class="LC_prior_tries">'.$headers.$output.'</table>';
   
     my $tries_text = &get_tries_text('link');      my $tries_text = &get_tries_text('link');

Removed from v.1.317  
changed lines
  Added in v.1.318


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