--- loncom/interface/lonwhatsnew.pm 2006/10/13 22:03:26 1.63 +++ loncom/interface/lonwhatsnew.pm 2006/11/23 00:02:38 1.64 @@ -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 @@ sub display_actions_box { $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 @@ sub display_threshold_config { 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 check_thresholds { 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;