--- loncom/interface/lonwhatsnew.pm 2009/11/24 02:43:45 1.98
+++ loncom/interface/lonwhatsnew.pm 2011/03/31 17:54:10 1.103
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.98 2009/11/24 02:43:45 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.103 2011/03/31 17:54:10 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;
}
@@ -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;
}
@@ -1130,7 +1133,7 @@ sub process_reset {
sub process_update {
my ($uname,$udom,$threshold_titles) = @_;
- my $setoutput = ''.&mt('Changes to threshold(s) for problem tracking:').'
';
+ my $setoutput = ''.&mt('Changes to threshold(s) for problem tracking:').'
';
foreach (keys %env) {
next if ($_!~/^form\.(.+)\_setparmval$/);
my $name = $1;
@@ -1141,17 +1144,17 @@ sub process_update {
my ($shortname) = ($name =~ /^\Q$env{'request.course.id'}\E:threshold_(.+)$/);
if ($put_result eq 'ok') {
- $setoutput.=&mt('Set threshold for [_1] to [_2]',
+ $setoutput.= &Apache::lonhtmlcommon::confirm_success(&mt('Set threshold for [_1] to [_2]',
''.$$threshold_titles{$shortname}.'',
- ''.$value.'').'
';
+ ''.$value.'').'
');
} else {
- $setoutput.=&mt('Unable to set threshold for [_1] to [_2] due to [_3].',
+ $setoutput.= &Apache::lonhtmlcommon::confirm_success(&mt('Unable to set threshold for [_1] to [_2] due to [_3].',
''.$name.'',''.$value.'',
- ''.$put_result.'').'
';
+ ''.$put_result.'').'
',1);
}
}
}
- return $setoutput;
+ return &Apache::loncommon::confirmwrapper($setoutput);
}
sub getnormalmail {
@@ -1166,7 +1169,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 +1200,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 '') {
@@ -1472,13 +1473,13 @@ sub display_handgrade {
foreach my $res (@{$tograde}) {
$rowNum ++;
my $css_class = $rowNum%2?' class="LC_odd_row"':'';
- my ($map,$id,$url)=&Apache::lonnet::decode_symb($res);
- my $linkurl=&Apache::lonnet::clutter($url);
- $linkurl .= '?symb='.&escape($res);
+ my $linkurl='/adm/grades';
if ($$ungraded{$res}{'enclink'}) {
- $linkurl =
- $$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'};
- }
+ $linkurl.='?symb='.$$ungraded{$res}{'encsymb'};
+ } else {
+ $linkurl.='?symb='.&escape($res);
+ }
+ $linkurl.='&command=ungraded';
$r->print('