--- loncom/interface/lonparmset.pm 2003/12/09 22:40:46 1.139.2.1
+++ loncom/interface/lonparmset.pm 2003/12/12 19:41:11 1.139.2.2
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.139.2.1 2003/12/09 22:40:46 albertel Exp $
+# $Id: lonparmset.pm,v 1.139.2.2 2003/12/12 19:41:11 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1759,8 +1759,25 @@ ENDOVER
}
}
# Store
- &Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs);
- &Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs);
+ my $delentries=$#deldata+1;
+ my @newdatakeys=keys %newdata;
+ my $putentries=$#newdatakeys+1;
+ if ($delentries) {
+ if (&Apache::lonnet::del('resourcedata',\@deldata,$dom,$crs) eq 'ok') {
+ $r->print('
'.&mt('Deleted [_1] parameter(s)
',$delentries));
+ } else {
+ $r->print('
'.
+ &mt('Error deleting parameters').'
');
+ }
+ }
+ if ($putentries) {
+ if (&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs) eq 'ok') {
+ $r->print('
'.&mt('Stored [_1] parameter(s)
',$putentries));
+ } else {
+ $r->print('
'.
+ &mt('Error storing parameters').'
');
+ }
+ }
# Read and display
my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs);
my $oldsection='';
@@ -1768,6 +1785,7 @@ ENDOVER
my $oldpart='';
my $pointer=0;
$tableopen=0;
+ my $foundkeys=0;
foreach my $thiskey (sort keys %resourcedata) {
if ($resourcedata{$thiskey.'.type'}) {
my ($course,$middle,$part,$name)=
@@ -1805,6 +1823,7 @@ ENDOVER
$r->print(&tablestart().'
'.$name.
':
');
+ $foundkeys++;
if ($resourcedata{$thiskey.'.type'}=~/^date/) {
my $jskey='key_'.$pointer;
$pointer++;
@@ -1823,8 +1842,8 @@ ENDOVER
}
}
- $r->print(&tableend().
- '