version 1.160, 2003/01/06 19:43:01
|
version 1.160.2.2, 2003/03/14 21:36:42
|
Line 1882 sub makenewsheet {
|
Line 1882 sub makenewsheet {
|
$sheet->{'mapid'} = $ENV{'form.mapid'}; |
$sheet->{'mapid'} = $ENV{'form.mapid'}; |
$sheet->{'resid'} = $ENV{'form.resid'}; |
$sheet->{'resid'} = $ENV{'form.resid'}; |
$sheet->{'cid'} = $ENV{'request.course.id'}; |
$sheet->{'cid'} = $ENV{'request.course.id'}; |
|
if (! exists($Section{$uname.':'.$udom})) { |
|
my $classlist = &Apache::loncoursedata::get_classlist(); |
|
foreach my $student (keys(%$classlist)) { |
|
my ($studentDomain,$studentName,undef,undef,undef,$studentSection, |
|
undef,undef) = @{$classlist->{$student}}; |
|
$Section{$studentName.':'.$studentDomain} = $studentSection; |
|
} |
|
} |
$sheet->{'csec'} = $Section{$uname.':'.$udom}; |
$sheet->{'csec'} = $Section{$uname.':'.$udom}; |
$sheet->{'coursefilename'} = $ENV{'request.course.fn'}; |
$sheet->{'coursefilename'} = $ENV{'request.course.fn'}; |
$sheet->{'cnum'} = $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
$sheet->{'cnum'} = $ENV{'course.'.$ENV{'request.course.id'}.'.num'}; |
Line 2094 sub parmval {
|
Line 2102 sub parmval {
|
# second, check map parms |
# second, check map parms |
my $thisparm = $parmhash{$symbparm}; |
my $thisparm = $parmhash{$symbparm}; |
return $thisparm if (defined($thisparm)); |
return $thisparm if (defined($thisparm)); |
|
|
# first, check default |
# first, check default |
return &Apache::lonnet::metadata($fn,$rwhat.'.default'); |
$thisparm = &Apache::lonnet::metadata($fn,$rwhat.'.default'); |
|
return $thisparm if (defined($thisparm)); |
|
|
|
#Cascade Up |
|
my $space=$what; |
|
$space=~s/\.\w+$//; |
|
if ($space ne '0') { |
|
my @parts=split(/_/,$space); |
|
my $id=pop(@parts); |
|
my $part=join('_',@parts); |
|
if ($part eq '') { $part='0'; } |
|
my $newwhat=$rwhat; |
|
$newwhat=~s/\Q$space\E/$part/; |
|
my $partgeneral=&parmval($newwhat,$symb,$uname,$udom,$csec); |
|
if (defined($partgeneral)) { return $partgeneral; } |
|
} |
|
|
|
#nothing defined |
|
return ''; |
} |
} |
|
|
|
|
Line 3212 ENDSCRIPT
|
Line 3239 ENDSCRIPT
|
$oldsheets{'course'} ne $sheet->{'cid'}) { |
$oldsheets{'course'} ne $sheet->{'cid'}) { |
undef %oldsheets; |
undef %oldsheets; |
undef %loadedcaches; |
undef %loadedcaches; |
|
undef %Section; |
} |
} |
$oldsheets{'course'} = $sheet->{'cid'}; |
$oldsheets{'course'} = $sheet->{'cid'}; |
# |
# |