--- loncom/interface/lonwhatsnew.pm 2012/02/11 17:58:17 1.101.2.1.2.2 +++ loncom/interface/lonwhatsnew.pm 2012/12/13 22:09:33 1.105.2.4 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.101.2.1.2.2 2012/02/11 17:58:17 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.105.2.4 2012/12/13 22:09:33 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -285,6 +285,11 @@ END $scripttag.='document.visible.submit(); } +function thresholdreset() { + document.visible.command.value="reset"; + document.visible.submit(); +} + function togglelogins() { var total = document.visible.logincount.value; var sumrow = document.visible.loginrow.value; @@ -917,7 +922,6 @@ sub display_launcher { } elsif ($action eq 'crslogin') { #LAST LOGIN &display_crslogins($r,$logincount,$loggedin,$interval->{'crslogin'}, $crstype); - } } &end_box($r); @@ -1097,6 +1101,7 @@ sub check_thresholds { $av_attempts = $attempts/$users; $av_attempts = sprintf("%.2f",$av_attempts); } + &Apache::lonnet::statslog($symb,$part,$users,$av_attempts,$degdiff); if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) { $stats{$part}{degdiff} = $degdiff; $stats{$part}{attempts} = $av_attempts; @@ -1608,9 +1613,9 @@ sub display_handgrade { my $linkurl=&Apache::lonnet::clutter($url); $linkurl .= '?symb='.&escape($res); if ($$ungraded{$res}{'enclink'}) { - $linkurl = + $linkurl = $$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; - } + } $r->print(''.$$ungraded{$res}{title}.''.$$ungraded{$res}{count}.''); } } elsif ($itemserror) { @@ -1663,12 +1668,9 @@ sub display_abovethreshold { ); if (@{$warnings} > 0) { @{$warnings} = sort { &cmp_title($a,$b,$res_title) } @{$warnings}; - $r->print('
'. - ' '."\n". - ' '. - "\n"); $r->print(''. - ''.$lt{'reso'}.''. + ''.$lt{'reso'}. + ''. ''.$lt{'part'}.''.$lt{'nust'}.''. ''.$lt{'avat'}.''.$lt{'dedi'}.''. ''.$lt{'lare'}.''. @@ -1698,13 +1700,13 @@ sub display_abovethreshold { if (ref($$triggered{$res}{text}) eq 'ARRAY') { if (@{$$triggered{$res}{text}} > 1) { for (my $i=1; $i<@{$$triggered{$res}{text}}; $i++) { - $r->print(''. + $r->print(''. $$triggered{$res}{text}[$i].''); } } } } - $r->print('
'); + $r->print('
'); } elsif ($itemserror) { $r->print(''.$itemserror.''); } else { @@ -1921,7 +1923,7 @@ sub display_coursediscussion { my $forum_title = $$unread{$ressymb}{'title'}; my $type = 'Resource'; my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); - my $disclink = $feedurl.'?symb='.$$unread{$ressymb}{symb}; + my $disclink = $feedurl.'?symb='.&escape($$unread{$ressymb}{symb}); if ($feedurl =~ /bulletinboard/) { $type = 'Discussion Board'; }