version 1.197, 2005/06/01 21:44:00
|
version 1.198, 2005/06/02 13:15:05
|
Line 64 use Apache::lonxml;
|
Line 64 use Apache::lonxml;
|
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnavmaps; |
use Apache::lonnavmaps; |
|
|
my %courseopt; |
# --- Caches local to lonparmset |
my %useropt; |
|
my %parmhash; |
|
|
|
|
my $courseoptid=''; |
|
my %courseopt=(); |
|
my $useroptid=''; |
|
my %useropt=(); |
|
my $parmhashid=''; |
|
my %parmhash=(); |
|
|
|
# --- end local caches |
|
|
|
# |
|
# FIXME: get rid of items below |
|
# |
my @ids; |
my @ids; |
my %symbp; |
my %symbp; |
my %mapp; |
my %mapp; |
Line 109 Returns: A list, the first item is the
|
Line 119 Returns: A list, the first item is the
|
################################################## |
################################################## |
sub parmval { |
sub parmval { |
my ($what,$id,$def,$uname,$udom,$csec)=@_; |
my ($what,$id,$def,$uname,$udom,$csec)=@_; |
|
# load caches |
|
&cacheparmhash(); |
|
|
my $result=''; |
my $result=''; |
my @outpar=(); |
my @outpar=(); |
# ----------------------------------------------------- Cascading lookup scheme |
# ----------------------------------------------------- Cascading lookup scheme |
Line 190 sub parmval {
|
Line 203 sub parmval {
|
return ($result,@outpar); |
return ($result,@outpar); |
} |
} |
|
|
|
sub resetparmhash { |
|
$parmhashid=''; |
|
} |
|
|
|
sub cacheparmhash { |
|
if ($parmhashid eq $env{'request.course.fn'}) { return; } |
|
my %parmhashfile; |
|
if (tie(%parmhashfile,'GDBM_File', |
|
$env{'request.course.fn'}.'_parms.db',&GDBM_READER(),0640)) { |
|
%parmhash=%parmhashfile; |
|
untie %parmhashfile; |
|
$parmhashid=$env{'request.course.fn'}; |
|
} |
|
} |
|
|
|
sub cacheuseropt { |
|
my ($uname,$udom)=@_; |
|
} |
|
|
|
sub cachecourseopt { |
|
} |
|
|
################################################## |
################################################## |
################################################## |
################################################## |
Line 928 sub assessparms {
|
Line 962 sub assessparms {
|
my $fcat=$env{'form.fcat'}; |
my $fcat=$env{'form.fcat'}; |
unless ($fcat) { $fcat=''; } |
unless ($fcat) { $fcat=''; } |
|
|
# ------------------------------------------------------------------- Tie hashs |
|
|
|
if (!(tie(%parmhash,'GDBM_File', |
|
$env{'request.course.fn'}.'_parms.db',&GDBM_READER(),0640))) { |
|
$r->print("Unable to access parameter data. (File $env{'request.course.fn'}_parms.db not tieable)"); |
|
return ; |
|
} |
|
|
|
# --------------------------------------------------------- Get all assessments |
# --------------------------------------------------------- Get all assessments |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allkeys, \%allmaps, $fcat, \%defp, \%mapp, \%symbp,\%maptitles,\%uris); |
&extractResourceInformation(\@ids, \%typep,\%keyp, \%allparms, \%allparts, \%allkeys, \%allmaps, $fcat, \%defp, \%mapp, \%symbp,\%maptitles,\%uris); |
|
|
Line 990 sub assessparms {
|
Line 1016 sub assessparms {
|
$trimheader = 'yes'; |
$trimheader = 'yes'; |
&startpage($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader); |
&startpage($r,$id,$udom,$csec,$uname,$have_assesments,$trimheader); |
|
|
if (!$have_assesments) { |
|
untie(%parmhash); |
|
return ''; |
|
} |
|
# if ($env{'form.url'}) { |
# if ($env{'form.url'}) { |
# $r->print('<input type="hidden" value="'.$env{'form.url'}. |
# $r->print('<input type="hidden" value="'.$env{'form.url'}. |
# '" name="url"><input type="hidden" name="command" value="set">'); |
# '" name="url"><input type="hidden" name="command" value="set">'); |
Line 1503 ENDMAPONE
|
Line 1525 ENDMAPONE
|
} # end of $parmlev eq general |
} # end of $parmlev eq general |
} |
} |
$r->print('</form></body></html>'); |
$r->print('</form></body></html>'); |
untie(%parmhash); |
|
} # end sub assessparms |
} # end sub assessparms |
|
|
|
|