Diff for /loncom/interface/lonstatistics.pm between versions 1.77 and 1.78

version 1.77, 2003/06/16 15:54:58 version 1.78, 2003/06/20 18:50:17
Line 805  sub DisplayClasslist { Line 805  sub DisplayClasslist {
     my @Fields = ('fullname','username','domain','id','section');      my @Fields = ('fullname','username','domain','id','section');
     #      #
     my $Str='';      my $Str='';
       if (! @Students) {
           if ($SelectedSections[0] eq 'all') { 
               if (lc($ENV{'form.Status'}) eq 'any') {
                   $Str .= '<h2>There are no students in the course.</h2>';
               } elsif (lc($ENV{'form.Status'}) eq 'active') {
                   $Str .= '<h2>There are no currently enrolled students in '.
                       'the course.</h2>';
               } elsif (lc($ENV{'form.Status'}) eq 'expired') {
                   $Str .= '<h2>There are no previously enrolled '.
                       'students in the course.</h2>';
               }
           } else { 
               my $sections;
               if (@SelectedSections == 1) {
                   $sections = 'section '.$SelectedSections[0];
               } elsif (@SelectedSections > 2) {
                   $sections = 'sections '.join(', ',@SelectedSections);
                   $sections =~ s/, ([^,])*$/, and $1/;
               } else {
                   $sections = 'sections '.join(' and ',@SelectedSections);
               }
               if (lc($ENV{'form.Status'}) eq 'any') {
                   $Str .= '<h2>There are no students in '.$sections.'.</h2>';
               } elsif (lc($ENV{'form.Status'}) eq 'active') {
                   $Str .= '<h2>There are no currently enrolled students '.
                       'in '.$sections.'.</h2>';
               } elsif (lc($ENV{'form.Status'}) eq 'expired') {
                   $Str .= '<h2>There are no previously enrolled students '.
                       'in '.$sections.'.</h2>';
               }
           }
           $Str.= '<a href="/adm/statistics?reportSelected=student_assessment">'.
               'Return to the chart.</a>';
           $r->print($Str);
           $r->rflush();
           return;
       }
   
     # "Click" is asinine but it is probably not my place to change the world.      # "Click" is asinine but it is probably not my place to change the world.
     $Str .= '<h2>Click on a users name to view their chart</h2>';      $Str .= '<h2>Click on a students name or username to view their chart</h2>';
     $Str .= '<table border="0"><tr><td bgcolor="#777777">'."\n";      $Str .= '<table border="0"><tr><td bgcolor="#777777">'."\n";
     $Str .= '<table border="0" cellpadding="3"><tr bgcolor="#e6ffff">'."\n";      $Str .= '<table border="0" cellpadding="3"><tr bgcolor="#e6ffff">'."\n";
     foreach my $field (@Fields) {      foreach my $field (@Fields) {
Line 827  sub DisplayClasslist { Line 865  sub DisplayClasslist {
         #          #
         foreach my $field (@Fields) {          foreach my $field (@Fields) {
             $Str .= '<td>';              $Str .= '<td>';
             if ($field eq 'fullname') {              if ($field eq 'fullname' || $field eq 'username') {
                 $Str .= '<a href="/adm/statistics?reportSelected=';                  $Str .= '<a href="/adm/statistics?reportSelected=';
                 $Str .= &Apache::lonnet::escape('student_assessment');                  $Str .= &Apache::lonnet::escape('student_assessment');
                 $Str .= '&sort='.&Apache::lonnet::escape($ENV{'form.sort'});                  $Str .= '&sort='.&Apache::lonnet::escape($ENV{'form.sort'});

Removed from v.1.77  
changed lines
  Added in v.1.78


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