[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 12 Dec 2003 15:03:26 -0000
www Fri Dec 12 10:03:26 2003 EDT
Modified files:
/loncom/interface lonparmset.pm
Log:
Bug #2469: Re-assuring feedback after setting parameters in Overview,
looks like 1.1 ready.
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.143 loncom/interface/lonparmset.pm:1.144
--- loncom/interface/lonparmset.pm:1.143 Mon Dec 8 18:17:52 2003
+++ loncom/interface/lonparmset.pm Fri Dec 12 10:03:26 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set parameters for assessments
#
-# $Id: lonparmset.pm,v 1.143 2003/12/08 23:17:52 albertel Exp $
+# $Id: lonparmset.pm,v 1.144 2003/12/12 15:03:26 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1764,8 +1764,25 @@
}
}
# 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('<h2>'.&mt('Deleted [_1] parameter(s)</h2>',$delentries));
+ } else {
+ $r->print('<h2><font color="red">'.
+ &mt('Error deleting parameters').'</font></h2>');
+ }
+ }
+ if ($putentries) {
+ if (&Apache::lonnet::put('resourcedata',\%newdata,$dom,$crs) eq 'ok') {
+ $r->print('<h2>'.&mt('Stored [_1] parameter(s)</h2>',$putentries));
+ } else {
+ $r->print('<h2><font color="red">'.
+ &mt('Error storing parameters').'</font></h2>');
+ }
+ }
# Read and display
my %resourcedata=&Apache::lonnet::dump('resourcedata',$dom,$crs);
my $oldsection='';