Diff for /loncom/interface/lonparmset.pm between versions 1.239 and 1.239.2.1

version 1.239, 2005/07/19 16:42:02 version 1.239.2.1, 2005/09/02 22:40:07
Line 2189  sub listdata { Line 2189  sub listdata {
     my $pointer=0;      my $pointer=0;
     $tableopen=0;      $tableopen=0;
     my $foundkeys=0;      my $foundkeys=0;
       my %keyorder=&standardkeyorder();
     foreach my $thiskey (sort {      foreach my $thiskey (sort {
  if ($sortorder eq 'realmstudent') {   if ($sortorder eq 'realmstudent') {
     my ($astudent,$arealm)=($a=~/^$env{'request.course.id'}\.([^\.]+)\.(.+)\.[^\.]+$/);      my ($astudent,$arealm)=($a=~/^\Q$env{'request.course.id'}\E\.\[([^\.]+)\]\.(.+)\.[^\.]+$/);
     my ($bstudent,$brealm)=($b=~/^$env{'request.course.id'}\.([^\.]+)\.(.+)\.[^\.]+$/);      my ($bstudent,$brealm)=($b=~/^\Q$env{'request.course.id'}\E\.\[([^\.]+)\]\.(.+)\.[^\.]+$/);
     if (!defined($astudent) && !defined($bstudent) &&      if (!defined($astudent)) {
  !defined($arealm) && !defined($brealm)) {   ($arealm)=($a=~/^\Q$env{'request.course.id'}\E\.(.+)$/);
  ($arealm)=($a=~/^$env{'request.course.id'}\.(.+)\.[^\.]+$/);      }
  ($brealm)=($b=~/^$env{'request.course.id'}\.(.+)\.[^\.]+$/);      if (!defined($bstudent)) {
    ($brealm)=($b=~/^\Q$env{'request.course.id'}\E\.(.+)$/);
       }
       $arealm=~s/\.type//;
       my ($ares, $aparm) = ($arealm=~/^(.*)\.(.*)$/);
       $aparm=$keyorder{'parameter_0_'.$aparm};
       $brealm=~s/\.type//;
       my ($bres, $bparm) = ($brealm=~/^(.*)\.(.*)$/);
       $bparm=$keyorder{'parameter_0_'.$bparm};   
       if ($ares eq $bres) {
    if (defined($aparm) && defined($bparm)) {
       ($aparm <=> $bparm);
    } elsif (defined($aparm)) {
       -1;
    } elsif (defined($bparm)) {
       1;
    } else {
       ($arealm cmp $brealm) || ($astudent cmp $bstudent);
    }
       } else {
    ($arealm cmp $brealm) || ($astudent cmp $bstudent);
     }      }
             ($arealm cmp $brealm) || ($astudent cmp $bstudent);  
  } else {   } else {
     $a cmp $b;      $a cmp $b;
  }   }
     } keys %{$listdata}) {      } keys %{$listdata}) {
     
  if ($$listdata{$thiskey.'.type'}) {   if ($$listdata{$thiskey.'.type'}) {
             my $thistype=$$listdata{$thiskey.'.type'};              my $thistype=$$listdata{$thiskey.'.type'};
             if ($$resourcedata{$thiskey.'.type'}) {              if ($$resourcedata{$thiskey.'.type'}) {

Removed from v.1.239  
changed lines
  Added in v.1.239.2.1


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