version 1.35, 2002/10/14 19:06:21
|
version 1.40, 2002/12/11 21:41:02
|
Line 310 sub ProcessTopResourceMap {
|
Line 310 sub ProcessTopResourceMap {
|
} |
} |
|
|
my $oldkeys; |
my $oldkeys; |
|
delete $cache->{'OptionResponses'}; |
if(defined($cache->{'ResourceKeys'})) { |
if(defined($cache->{'ResourceKeys'})) { |
$oldkeys = $cache->{'ResourceKeys'}; |
$oldkeys = $cache->{'ResourceKeys'}; |
foreach (split(':::', $cache->{'ResourceKeys'})) { |
foreach (split(':::', $cache->{'ResourceKeys'})) { |
Line 487 sub ProcessTopResourceMap {
|
Line 488 sub ProcessTopResourceMap {
|
} |
} |
my @titleLength=split(//,$cache->{$currentSequence. |
my @titleLength=split(//,$cache->{$currentSequence. |
':title'}); |
':title'}); |
# $extra is 3 for problems correct and 3 for space |
# $extra is 5 for problems correct and 3 for space |
# between problems correct and problem output |
# between problems correct and problem output |
my $extra = 6; |
my $extra = 8; |
if(($totalProblems + $extra) > (scalar @titleLength)) { |
if(($totalProblems + $extra) > (scalar @titleLength)) { |
$cache->{$currentSequence.':columnWidth'}= |
$cache->{$currentSequence.':columnWidth'}= |
$totalProblems + $extra; |
$totalProblems + $extra; |
Line 1429 sub get_classlist {
|
Line 1430 sub get_classlist {
|
($end,$start,$id,$section,$fullname) = @Values; |
($end,$start,$id,$section,$fullname) = @Values; |
} else { # We have to get the data ourselves |
} else { # We have to get the data ourselves |
($end,$start) = @Values; |
($end,$start) = @Values; |
$section = &Apache::lonnet::usection($sdom,$sname,$cid); |
$section = &Apache::lonnet::getsection($sdom,$sname,$cid); |
my %info=&Apache::lonnet::get('environment', |
my %info=&Apache::lonnet::get('environment', |
['firstname','middlename', |
['firstname','middlename', |
'lastname','generation','id'], |
'lastname','generation','id'], |
Line 1438 sub get_classlist {
|
Line 1439 sub get_classlist {
|
if ($tmp =~/^(con_lost|error|no_such_host)/i) { |
if ($tmp =~/^(con_lost|error|no_such_host)/i) { |
$fullname = 'not available'; |
$fullname = 'not available'; |
$id = 'not available'; |
$id = 'not available'; |
|
&Apache::lonnet::logthis('unable to retrieve environment '. |
|
'for '.$sname.':'.$sdom); |
} else { |
} else { |
$fullname = &ProcessFullName(@info{qw/lastname generation |
$fullname = &ProcessFullName(@info{qw/lastname generation |
firstname middlename/}); |
firstname middlename/}); |
$id = $info{'id'}; |
$id = $info{'id'}; |
} |
} |
# At this point, if we have the data (check for 'not available's |
# Update the classlist with this students information |
# we could put it back into the classlist.db file. |
if ($fullname ne 'not available') { |
# We have not decided to do that yet. |
my $enrolldata = join(':',$end,$start,$id,$section,$fullname); |
|
my $reply=&Apache::lonnet::cput('classlist', |
|
{$student => $enrolldata}, |
|
$cdom,$cnum); |
|
if ($reply !~ /^(ok|delayed)/) { |
|
&Apache::lonnet::logthis('Unable to update classlist for '. |
|
'student '.$sname.':'.$sdom. |
|
' error:'.$reply); |
|
} |
|
} |
} |
} |
my $status='Expired'; |
my $status='Expired'; |
if(((!$end) || $now < $end) && ((!$start) || ($now > $start))) { |
if(((!$end) || $now < $end) && ((!$start) || ($now > $start))) { |
Line 1467 sub get_classlist {
|
Line 1479 sub get_classlist {
|
1; |
1; |
__END__ |
__END__ |
|
|
|
|