--- loncom/interface/lonparmset.pm 2005/06/03 15:47:29 1.204
+++ loncom/interface/lonparmset.pm 2005/06/03 19:16:25 1.205
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.204 2005/06/03 15:47:29 www Exp $
+# $Id: lonparmset.pm,v 1.205 2005/06/03 19:16:25 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -635,11 +635,6 @@ sub print_row {
if ($parmlev eq 'full') {
my $sessionval=&Apache::lonnet::EXT('resource.'.$$part{$which}.
'.'.$$name{$which},$$symbp{$rid});
-
-# this doesn't seem to work, and I don't think is correct
-# my $sessionvaltype=&Apache::lonnet::EXT('resource.'.$$part{$which}.
-# '.'.$$name{$which}.'.type',$symbp{$rid});
-# this seems to work
my $sessionvaltype=$typeoutpar[$result];
if (!defined($sessionvaltype)) { $sessionvaltype=$$defaulttype{$which}; }
$r->print('
'.
@@ -939,10 +934,15 @@ sub assessparms {
# ---------------------------------------------------------- Anything to store?
if ($env{'form.pres_marker'}) {
- $message.=&storeparm(split(/\&/,$env{'form.pres_marker'}),
- $env{'form.pres_value'},
- $env{'form.pres_type'},
- $uname,$udom,$csec);
+ my @markers=split(/\&\&\&/,$env{'form.pres_marker'});
+ my @values=split(/\&\&\&/,$env{'form.pres_value'});
+ my @types=split(/\&\&\&/,$env{'form.pres_type'});
+ for (my $i=0;$i<=$#markers;$i++) {
+ $message.=&storeparm(split(/\&/,$markers[$i]),
+ $values[$i],
+ $types[$i],
+ $uname,$udom,$csec);
+ }
# ---------------------------------------------------------------- Done storing
$message.=''.&mt('Changes can take up to 10 minutes before being active for all students.').&Apache::loncommon::help_open_topic('Caching').'';
}
@@ -1877,6 +1877,7 @@ ENDOVER
$r->print(''.
&mt('Error deleting parameters').'');
}
+ &Apache::lonnet::devalidatecourseresdata($crs,$dom);
}
if ($putentries) {
if (&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs) eq 'ok') {
@@ -1885,6 +1886,7 @@ ENDOVER
$r->print(''.
&mt('Error storing parameters').'');
}
+ &Apache::lonnet::devalidatecourseresdata($crs,$dom);
}
# Read and display
my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs);
@@ -2149,7 +2151,10 @@ sub handler {
return OK;
}
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
- ['action','state']);
+ ['action','state',
+ 'pres_marker',
+ 'pres_value',
+ 'pres_type']);
&Apache::lonhtmlcommon::clear_breadcrumbs();
|