Diff for /loncom/homework/grades.pm between versions 1.290 and 1.291

version 1.290, 2005/09/23 19:45:24 version 1.291, 2005/10/01 03:27:44
Line 334  COMMONJSFUNCTIONS Line 334  COMMONJSFUNCTIONS
 #--- section, ids and fullnames for each user.  #--- section, ids and fullnames for each user.
 sub getclasslist {  sub getclasslist {
     my ($getsec,$filterlist) = @_;      my ($getsec,$filterlist) = @_;
     $getsec = $getsec eq '' ? 'all' : $getsec;      my @getsec;
       if (!ref($getsec)) {
    if ($getsec ne '' && $getsec ne 'all') {
       @getsec=($getsec);
    }
       } else {
    @getsec=@{$getsec};
       }
       if (grep(/^all$/,@getsec)) { undef(@getsec); }
   
     my $classlist=&Apache::loncoursedata::get_classlist();      my $classlist=&Apache::loncoursedata::get_classlist();
     # Bail out if we were unable to get the classlist      # Bail out if we were unable to get the classlist
     return if (! defined($classlist));      return if (! defined($classlist));
Line 363  sub getclasslist { Line 372  sub getclasslist {
  }   }
  $section = ($section ne '' ? $section : 'none');   $section = ($section ne '' ? $section : 'none');
  if (&canview($section)) {   if (&canview($section)) {
     if ($getsec eq 'all' || $getsec eq $section) {      if (!@getsec || grep(/^\Q$section\E$/,@getsec)) {
  $sections{$section}++;   $sections{$section}++;
  $fullnames{$student}=$fullname;   $fullnames{$student}=$fullname;
     } else {      } else {

Removed from v.1.290  
changed lines
  Added in v.1.291


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