[LON-CAPA-cvs] cvs: loncom /interface lonwhatsnew.pm
banghart
lon-capa-cvs@mail.lon-capa.org
Thu, 23 Nov 2006 00:02:38 -0000
banghart Wed Nov 22 19:02:38 2006 EDT
Modified files:
/loncom/interface lonwhatsnew.pm
Log:
Bug 5085. Show default values when updating original threshold
settings.
Index: loncom/interface/lonwhatsnew.pm
diff -u loncom/interface/lonwhatsnew.pm:1.63 loncom/interface/lonwhatsnew.pm:1.64
--- loncom/interface/lonwhatsnew.pm:1.63 Fri Oct 13 18:03:26 2006
+++ loncom/interface/lonwhatsnew.pm Wed Nov 22 19:02:38 2006
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.63 2006/10/13 22:03:26 albertel Exp $
+# $Id: lonwhatsnew.pm,v 1.64 2006/11/23 00:02:38 banghart Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -286,11 +286,7 @@
$result = &store_courseinit_setting($uname,$udom,$cid,$initpage);
}
- my %threshold = (
- av_attempts => 2,
- degdiff => 0.5,
- numstudents => 2,
- );
+ my %threshold = ();
my %pagedesc = &Apache::lonlocal::texthash (
firstres => 'First resource',
whatsnew => "What's New? page",
@@ -468,9 +464,6 @@
my $rowColor;
my @thresholditems = ("av_attempts","degdiff","numstudents");
- foreach my $item (@thresholditems) {
- $threshold{$item} = '';
- }
my %threshold_titles = &Apache::lonlocal::texthash(
av_attempts => 'Average number of attempts',
degdiff => 'Degree of difficulty',
@@ -913,6 +906,11 @@
sub get_curr_thresholds {
my ($threshold,$uname,$udom,$cid,$cdom,$crs) = @_;
+ # set default values
+ %$threshold = (av_attempts => 2,
+ degdiff => 0.5,
+ numstudents => 2
+ );
my %thresholdsettings = &Apache::lonnet::dump('nohist_whatsnew',$udom,
$uname,$cid.':threshold');
my $thresholdcount = 0;