--- loncom/interface/lonwhatsnew.pm 2017/09/13 23:54:07 1.105.2.15
+++ loncom/interface/lonwhatsnew.pm 2016/11/05 13:37:49 1.121
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.105.2.15 2017/09/13 23:54:07 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.121 2016/11/05 13:37:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -80,14 +80,14 @@ sub handler {
}
unless ($isadhoc) {
%checkallowed = ( coursenormalmail => 1,
- coursecritmail => 1,);
+ coursecritmail => 1,);
}
foreach my $perm_check (['whn','whatsnew',1],
['pch','coursediscussion',1],
['mgr','handgrading',1],
['vgr','abovethreshold',1],
['vgr','haserrors',1],
- ['whn','versionchanges',1],
+ ['whn','versionchanges',0],
['vcl','newroles',1],
['vcl','oldroles',1],
['whn','crslogin',1],
@@ -670,7 +670,7 @@ sub display_actions_box {
# my $halfway = int($totalboxes/2) + $totalboxes%2;
foreach my $actionitem (@actionorder) {
if ($checkallowed->{$actionitem}) {
- if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) {
+ if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) {
$r->print('
| ');
$currcolumn = 'right';
}
@@ -1241,7 +1241,7 @@ sub get_current {
sub process_reset {
my ($dom,$crs,$checkallowed) = @_;
if (!$checkallowed->{'resetcounters'}) {
- return ''.&mt('You do not have the required privileges to reset counters').
+ return ''.&mt('You do not the required privileges to reset counters').
' ';
}
my $result = ''.&mt('Counters reset for following problems (and parts):').
@@ -1325,20 +1325,19 @@ sub getnormalmail {
if ($emailstatus{$msgid} eq 'new') {
$skipstatus = 1;
}
- my $esc_msgid = &escape($msgid);
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=
- &Apache::lonmsg::unpackmsgid($esc_msgid,undef,$skipstatus,undef,
+ &Apache::lonmsg::unpackmsgid($msgid,undef,$skipstatus,undef,
$env{'request.course.id'});
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
if (defined($sendtime) && $sendtime!~/error/) {
if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) {
$sendtime = &Apache::lonlocal::locallocaltime($sendtime);
- $msgcount ++;
+ $msgcount ++;
if ($shortsubj eq '') {
$shortsubj = &mt('No subject');
}
push(@{$newmsgs}, {
- msgid => $esc_msgid,
+ msgid => $msgid,
sendtime => $sendtime,
shortsub => $shortsubj,
from => $fromname,
@@ -1359,9 +1358,8 @@ sub getcritmail {
my $result = '';
my $critmsgcount = 0;
foreach my $msgid (sort(keys(%what))) {
- my $esc_msgid = &escape($msgid);
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)=
- &Apache::lonmsg::unpackmsgid($esc_msgid,undef,1,undef,
+ &Apache::lonmsg::unpackmsgid($msgid,undef,1,undef,
$env{'request.course.id'});
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) {
if (defined($sendtime) && $sendtime!~/error/) {
@@ -1371,7 +1369,7 @@ sub getcritmail {
$shortsubj = &mt('No subject');
}
push(@{$critmsgs}, {
- msgid => $esc_msgid,
+ msgid => $msgid,
sendtime => $sendtime,
shortsub => $shortsubj,
from => $fromname,
@@ -1671,13 +1669,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(''.$$ungraded{$res}{title}.' | '.$$ungraded{$res}{count}.' | ');
}
} elsif ($itemserror) {
@@ -2004,7 +2002,7 @@ sub display_coursediscussion {
my $forum_title = $$unread{$ressymb}{'title'};
my $type = 'Resource';
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
- my $disclink = $feedurl.'?symb='.&escape($$unread{$ressymb}{symb});
+ my $disclink = $feedurl.'?symb='. &escape($$unread{$ressymb}{symb});
if ($feedurl =~ /bulletinboard/) {
$type = 'Discussion Board';
}
|