Diff for /loncom/interface/spreadsheet/studentcalc.pm between versions 1.43 and 1.45

version 1.43, 2007/07/06 19:50:00 version 1.45, 2010/06/14 01:30:54
Line 100  sub initialize_sequence_cache { Line 100  sub initialize_sequence_cache {
     }      }
     my @all_sequences = $navmap->retrieveResources(undef,      my @all_sequences = $navmap->retrieveResources(undef,
                                                sub { shift->is_map(); },1,0,1);                                                 sub { shift->is_map(); },1,0,1);
     for my $sequence ($navmap->getById('0.0'), @all_sequences) {      my $toplevelseq = $navmap->getById('0.0');
  if ($navmap->hasResource($sequence,sub { shift->is_problem(); }, 0,1)){      if (!grep(/^\Q$toplevelseq\E$/,@all_sequences)) {
             push(@Sequences,$sequence);           unshift(@all_sequences,$toplevelseq);
     &get_resources($sequence);      }
         }      foreach my $sequence (@all_sequences) {
          if ($navmap->hasResource($sequence,sub { shift->is_problem(); }, 0,1)){
              push(@Sequences,$sequence);
              &get_resources($sequence);
          }
     }      }
 }  }
   
Line 223  END Line 227  END
     }      }
     $tableheader .="</tr>\n";      $tableheader .="</tr>\n";
     if ($self->blackout()) {      if ($self->blackout()) {
         $r->print('<font color="red" size="+2"><p>'.          $r->print('<p class="LC_warning">'.
                   &mt('Some computations are not available at this time.').'<br />'.                    &mt('Some computations are not available at this time.').'<br />'.
                   &mt('There are problems whose status you are not allowed to view.').                    &mt('There are problems whose status you are not allowed to view.').
                   '</font></p>'."\n");                    '</p>'."\n");
     } else {      } else {
         $r->print($tableheader);          $r->print($tableheader);
         #          #
         # Print out template row          # Print out template row
         if (exists($env{'request.role.adv'}) && $env{'request.role.adv'}) {          if (exists($env{'request.role.adv'}) && $env{'request.role.adv'}) {
             $r->print('<tr><td>Template</td><td>&nbsp;</td>'.              $r->print('<tr><td>'.&mt('Template').'</td><td>&nbsp;</td>'.
                       $self->html_template_row($num_uneditable,                        $self->html_template_row($num_uneditable,
                                                $importcolor)."</tr>\n");                                                 $importcolor)."</tr>\n");
         }          }

Removed from v.1.43  
changed lines
  Added in v.1.45


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