version 1.105.2.15, 2017/09/13 23:54:07
|
version 1.123, 2017/05/19 18:23:19
|
Line 80 sub handler {
|
Line 80 sub handler {
|
} |
} |
unless ($isadhoc) { |
unless ($isadhoc) { |
%checkallowed = ( coursenormalmail => 1, |
%checkallowed = ( coursenormalmail => 1, |
coursecritmail => 1,); |
coursecritmail => 1,); |
} |
} |
foreach my $perm_check (['whn','whatsnew',1], |
foreach my $perm_check (['whn','whatsnew',1], |
['pch','coursediscussion',1], |
['pch','coursediscussion',1], |
Line 670 sub display_actions_box {
|
Line 670 sub display_actions_box {
|
# my $halfway = int($totalboxes/2) + $totalboxes%2; |
# my $halfway = int($totalboxes/2) + $totalboxes%2; |
foreach my $actionitem (@actionorder) { |
foreach my $actionitem (@actionorder) { |
if ($checkallowed->{$actionitem}) { |
if ($checkallowed->{$actionitem}) { |
if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) { |
if (($actioncolumn{$actionitem} eq 'right') && ($currcolumn eq 'left')) { |
$r->print('</td><td> </td><td class="LC_right_col" >'); |
$r->print('</td><td> </td><td class="LC_right_col" >'); |
$currcolumn = 'right'; |
$currcolumn = 'right'; |
} |
} |
Line 1325 sub getnormalmail {
|
Line 1325 sub getnormalmail {
|
if ($emailstatus{$msgid} eq 'new') { |
if ($emailstatus{$msgid} eq 'new') { |
$skipstatus = 1; |
$skipstatus = 1; |
} |
} |
my $esc_msgid = &escape($msgid); |
|
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)= |
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'}); |
$env{'request.course.id'}); |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) { |
if (($emailstatus{$msgid} eq 'new') || ($status eq 'new')) { |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$msgcount ++; |
$msgcount ++; |
if ($shortsubj eq '') { |
if ($shortsubj eq '') { |
$shortsubj = &mt('No subject'); |
$shortsubj = &mt('No subject'); |
} |
} |
push(@{$newmsgs}, { |
push(@{$newmsgs}, { |
msgid => $esc_msgid, |
msgid => $msgid, |
sendtime => $sendtime, |
sendtime => $sendtime, |
shortsub => $shortsubj, |
shortsub => $shortsubj, |
from => $fromname, |
from => $fromname, |
Line 1359 sub getcritmail {
|
Line 1358 sub getcritmail {
|
my $result = ''; |
my $result = ''; |
my $critmsgcount = 0; |
my $critmsgcount = 0; |
foreach my $msgid (sort(keys(%what))) { |
foreach my $msgid (sort(keys(%what))) { |
my $esc_msgid = &escape($msgid); |
|
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)= |
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'}); |
$env{'request.course.id'}); |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
Line 1371 sub getcritmail {
|
Line 1369 sub getcritmail {
|
$shortsubj = &mt('No subject'); |
$shortsubj = &mt('No subject'); |
} |
} |
push(@{$critmsgs}, { |
push(@{$critmsgs}, { |
msgid => $esc_msgid, |
msgid => $msgid, |
sendtime => $sendtime, |
sendtime => $sendtime, |
shortsub => $shortsubj, |
shortsub => $shortsubj, |
from => $fromname, |
from => $fromname, |
Line 1671 sub display_handgrade {
|
Line 1669 sub display_handgrade {
|
foreach my $res (@{$tograde}) { |
foreach my $res (@{$tograde}) { |
$rowNum ++; |
$rowNum ++; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my $css_class = $rowNum%2?' class="LC_odd_row"':''; |
my ($map,$id,$url)=&Apache::lonnet::decode_symb($res); |
my $linkurl='/adm/grades'; |
my $linkurl=&Apache::lonnet::clutter($url); |
|
$linkurl .= '?symb='.&escape($res); |
|
if ($$ungraded{$res}{'enclink'}) { |
if ($$ungraded{$res}{'enclink'}) { |
$linkurl = |
$linkurl.='?symb='.$$ungraded{$res}{'encsymb'}; |
$$ungraded{$res}{'enclink'}.'?symb='.$$ungraded{$res}{'encsymb'}; |
} else { |
|
$linkurl.='?symb='.&escape($res); |
} |
} |
|
$linkurl.='&command=ungraded'; |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
$r->print('<tr'.$css_class.'><td><a href="'.$linkurl.'">'.$$ungraded{$res}{title}.'</a></td><td class="LC_right_item">'.$$ungraded{$res}{count}.'</td></tr>'); |
} |
} |
} elsif ($itemserror) { |
} elsif ($itemserror) { |
Line 2004 sub display_coursediscussion {
|
Line 2002 sub display_coursediscussion {
|
my $forum_title = $$unread{$ressymb}{'title'}; |
my $forum_title = $$unread{$ressymb}{'title'}; |
my $type = 'Resource'; |
my $type = 'Resource'; |
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb); |
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/) { |
if ($feedurl =~ /bulletinboard/) { |
$type = 'Discussion Board'; |
$type = 'Discussion Board'; |
} |
} |