--- loncom/interface/lonwhatsnew.pm 2010/01/28 22:37:18 1.99.2.2
+++ loncom/interface/lonwhatsnew.pm 2012/05/10 19:01:40 1.105.2.1
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.99.2.2 2010/01/28 22:37:18 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.105.2.1 2012/05/10 19:01:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -88,7 +88,7 @@ sub handler {
if ( ! $env{'request.course.fn'} || ! $checkallowed{'whatsnew'}) {
# Not in a course, or no whn priv in course
- $env{'user.error.msg'}="/adm/whatsnew::whn:0:0:Cannot display what's new page";
+ $env{'user.error.msg'}="/adm/whatsnew:whn:0:0:Cannot display what's new page";
return HTTP_NOT_ACCEPTABLE;
}
@@ -348,11 +348,11 @@ sub display_actions_box {
&GDBM_READER(),0640)) {
my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&');
untie(%bighash);
- $r->print(''.$lt{'gtfr'}.
- '
');
+ $header .= ''.$lt{'gtfr'}.
+ '
';
}
}
- $r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype).'.'
+ $header .= &mt('Page set to be displayed after you have selected a role in this '.$lctype).'.'
.' '
.&mt('Currently: [_1].',''.$currinit.'')
.' '
@@ -363,9 +363,9 @@ sub display_actions_box {
,''
,''
,'')
- .'
');
+ .' ';
- $r->print($header);
+ $r->print(&Apache::loncommon::head_subbox($header));
if ($command eq 'reset') {
$result = &process_reset($cdom,$crs);
@@ -974,6 +974,9 @@ sub check_thresholds {
if ($resource->handgrade($part) eq 'yes') {
next;
}
+ if ($resource->is_anonsurvey($part)) {
+ next;
+ }
if ($resource->is_survey($part)) {
next;
}
@@ -996,6 +999,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;
@@ -1166,7 +1170,6 @@ sub getnormalmail {
&Apache::lonmsg::unpackmsgid($msgid);
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
if (defined($sendtime) && $sendtime!~/error/) {
- my $numsendtime = $sendtime;
if ($status eq 'new') {
$sendtime = &Apache::lonlocal::locallocaltime($sendtime);
$msgcount ++;
@@ -1198,7 +1201,6 @@ sub getcritmail {
&Apache::lonmsg::unpackmsgid($msgid);
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
if (defined($sendtime) && $sendtime!~/error/) {
- my $numsendtime = $sendtime;
$sendtime = &Apache::lonlocal::locallocaltime($sendtime);
$critmsgcount ++;
if ($shortsubj eq '') {
@@ -1433,7 +1435,7 @@ sub checkversions {
'lastrevisiondate');
$revdate = &Apache::lonlocal::locallocaltime($revdate);
my $linkurl=&Apache::lonnet::clutter($key);
- my $usedversion=$navmap->usedVersion('version_'.$linkurl);
+ my $usedversion=$navmap->usedVersion($linkurl);
my @resources = $navmap->getResourceByUrl($linkurl,1);
if (($usedversion) && ($usedversion ne 'mostrecent')) {
$version = $usedversion;
@@ -1476,9 +1478,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) {