version 1.22, 2002/05/29 17:58:45
|
version 1.24, 2002/05/30 13:36:18
|
Line 523 sub StudentReport {
|
Line 523 sub StudentReport {
|
"\n".'<th> Tries </th>'. |
"\n".'<th> Tries </th>'. |
"\n".'</tr>'; |
"\n".'</tr>'; |
my ($temp)=keys(%result); |
my ($temp)=keys(%result); |
unless ($temp=~/^error\:/) { |
unless ($temp=~/^(con_lost|error|no_such_host)/i) { |
foreach my $CurCol (@cols) { |
foreach my $CurCol (@cols) { |
if (!$CurCol){ |
if (!$CurCol){ |
my $Set=&Apache::lonnet::declutter($hash{'map_id_'.$1}); |
my $Set=&Apache::lonnet::declutter($hash{'map_id_'.$1}); |
Line 751 sub usection {
|
Line 751 sub usection {
|
$courseid=~s/^(\w)/\/$1/; |
$courseid=~s/^(\w)/\/$1/; |
|
|
my %result=&Apache::lonnet::dump('roles',$udom,$unam); |
my %result=&Apache::lonnet::dump('roles',$udom,$unam); |
|
my ($checkForResult)=keys(%result); |
|
if ($checkForResult=~/^(con_lost|error|no_such_host)/i) { |
|
return -1; |
|
} |
foreach my $key (keys (%result)) { |
foreach my $key (keys (%result)) { |
my $value=$result{$key}; |
my $value=$result{$key}; |
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
Line 803 sub ExtractStudentData {
|
Line 807 sub ExtractStudentData {
|
my $SecLimit; |
my $SecLimit; |
my $MapLimit; |
my $MapLimit; |
my ($temp)=keys(%result); |
my ($temp)=keys(%result); |
unless ($temp=~/^error\:/) { |
unless ($temp=~/^(con_lost|error|no_such_host)/i) { |
foreach my $CurCol(@cols) { |
foreach my $CurCol(@cols) { |
($PrOrd,$ResId)=split(/\:/,$CurCol); |
($PrOrd,$ResId)=split(/\:/,$CurCol); |
if ( !$CurCol ) { next; } |
if ( !$CurCol ) { next; } |
Line 1416 sub ClassList {
|
Line 1420 sub ClassList {
|
# foreach my $KeyPoint(sort keys(%students)) { |
# foreach my $KeyPoint(sort keys(%students)) { |
|
|
|
|
my %classlist=&Apache::lonnet::dump('classlist',$cdom,$cnum); |
|
|
|
my $StudNo = 0; |
my $StudNo = 0; |
my $now=time; |
my $now=time; |
foreach my $name (keys (%classlist)) { |
|
my $value=$classlist{$name}; |
my %classlist=&Apache::lonnet::dump('classlist',$cdom,$cnum); |
my ($end,$start)=split(/\:/,$value); |
|
my $active=1; |
my ($checkForError)=keys(%classlist); |
my $Status=$ENV{'form.status'}; |
if($checkForError=~/^(con_lost|error|no_such_host)/i) { |
$Status = ($Status) ? $Status : 'Active'; |
$r->print('<h1>Could not access course data</h1>'); |
if ( ( ($end) && $now > $end ) && |
} else { |
( ($Status eq 'Active') ) ) { $active=0; } |
foreach my $name (keys (%classlist)) { |
if ( ($Status eq 'Expired') && |
my $value=$classlist{$name}; |
($end == 0 || $now < $end) ) { $active=0; } |
my ($end,$start)=split(/\:/,$value); |
if ($active) { |
my $active=1; |
my $thisindex=$#students+1; |
my $Status=$ENV{'form.status'}; |
$students[$thisindex]=$name; |
$Status = ($Status) ? $Status : 'Active'; |
my ($sname,$sdom)=split(/\:/,$name); |
if ( ( ($end) && $now > $end ) && |
my $ssec=&usection($sdom,$sname,$cid,$Status); |
( ($Status eq 'Active') ) ) { $active=0; } |
if ($ssec==-1 || $ssec eq 'adm' ) {next;} |
if ( ($Status eq 'Expired') && |
$ssec=($ssec) ? $ssec : '(none)'; |
($end == 0 || $now < $end) ) { $active=0; } |
#$ssec=(int($ssec)) ? int($ssec) : $ssec; |
if ($active) { |
$section{$ssec}=$ssec; |
my $thisindex=$#students+1; |
if ($CurSec eq 'All Sections' || $ssec eq $CurSec) { |
$students[$thisindex]=$name; |
$students[$StudNo]=$name; |
my ($sname,$sdom)=split(/\:/,$name); |
$StuBox{$sname}=$sdom; |
my $ssec=&usection($sdom,$sname,$cid,$Status); |
|
if ($ssec==-1 || $ssec eq 'adm' ) {next;} |
|
$ssec=($ssec) ? $ssec : '(none)'; |
|
#$ssec=(int($ssec)) ? int($ssec) : $ssec; |
|
$section{$ssec}=$ssec; |
|
if ($CurSec eq 'All Sections' || $ssec eq $CurSec) { |
|
$students[$StudNo]=$name; |
|
$StuBox{$sname}=$sdom; |
|
} |
|
$StudNo++; |
} |
} |
$StudNo++; |
|
} |
} |
} |
} |
|
|