version 1.9, 2005/04/11 15:52:40
|
version 1.10, 2005/04/11 21:51:43
|
Line 432 sub getitems {
|
Line 432 sub getitems {
|
my ($uname,$udom) = split(/:/,$student); |
my ($uname,$udom) = split(/:/,$student); |
my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
my %status=&Apache::grades::student_gradeStatus($url,$symb,$udom,$uname,$partlist); |
my $submitted = 0; |
my $submitted = 0; |
my $graded = 0; |
my $ungraded = 0; |
foreach (keys(%status)) { |
foreach (keys(%status)) { |
$submitted = 1 if ($status{$_} ne 'nothing'); |
$submitted = 1 if ($status{$_} ne 'nothing'); |
$graded = 1 if ($status{$_} !~ /^correct/); |
$ungraded = 1 if ($status{$_} =~ /^ungraded/); |
my ($foo,$partid,$foo1) = split(/\./,$_); |
my ($foo,$partid,$foo1) = split(/\./,$_); |
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
if ($status{'resource.'.$partid.'.submitted_by'} ne '') { |
$submitted = 0; |
$submitted = 0; |
} |
} |
} |
} |
next if (!$submitted || !$graded); |
next if (!$submitted || !$ungraded); |
$ctr ++; |
$ctr ++; |
} |
} |
if ($ctr) { |
if ($ctr) { |
Line 471 sub getmail {
|
Line 471 sub getmail {
|
# Check for unread mail in course |
# Check for unread mail in course |
my $msgcount = 0; |
my $msgcount = 0; |
|
|
my @messages = &Apache::lonnet::getkeys('nohist_email'); |
my @messages = sort(&Apache::lonnet::getkeys('nohist_email')); |
foreach my $message (@messages) { |
foreach my $message (@messages) { |
my $msgid=&Apache::lonnet::escape($message); |
my $msgid=&Apache::lonnet::escape($message); |
my ($sendtime,$shortsubj,$fromname,$fromdom,$fromcid,$status)= |
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)= |
&Apache::lonmsg::unpackmsgid($msgid); |
&Apache::lonmsg::unpackmsgid($msgid); |
if ($fromcid eq $env{'request.course.id'}) { |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
my $numsendtime = $sendtime; |
my $numsendtime = $sendtime; |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
if ($status eq 'new') { |
if ($status eq 'new') { |
$$msgcount ++; |
$msgcount ++; |
|
if ($shortsubj eq '') { |
|
$shortsubj = &mt('No subject'); |
|
} |
|
$shortsubj = &Apache::lonnet::unescape($shortsubj); |
push(@{$newmsgs}, { |
push(@{$newmsgs}, { |
msgid => $msgid, |
msgid => $msgid, |
sendtime => $sendtime, |
sendtime => $sendtime, |
shortsub => &Apache::lonnet::unescape($shortsubj), |
shortsub => $shortsubj, |
from => $fromname, |
from => $fromname, |
fromdom => $fromdom |
fromdom => $fromdom |
}); |
}); |
Line 499 sub getmail {
|
Line 503 sub getmail {
|
my $result = ''; |
my $result = ''; |
my $critmsgcount = 0; |
my $critmsgcount = 0; |
foreach my $msgid (sort(keys(%what))) { |
foreach my $msgid (sort(keys(%what))) { |
my ($sendtime,$shortsubj,$fromname,$fromdom,$fromcid,$status)= |
my ($sendtime,$shortsubj,$fromname,$fromdom,$status,$fromcid)= |
&Apache::lonmsg::unpackmsgid($_); |
&Apache::lonmsg::unpackmsgid($msgid); |
if ($fromcid eq $env{'request.course.id'}) { |
if (($fromcid) && ($fromcid eq $env{'request.course.id'})) { |
if (defined($sendtime) && $sendtime!~/error/) { |
if (defined($sendtime) && $sendtime!~/error/) { |
my $numsendtime = $sendtime; |
my $numsendtime = $sendtime; |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$sendtime = &Apache::lonlocal::locallocaltime($sendtime); |
$critmsgcount ++; |
$critmsgcount ++; |
|
if ($shortsubj eq '') { |
|
$shortsubj = &mt('No subject'); |
|
} |
|
$shortsubj = &Apache::lonnet::unescape($shortsubj); |
push(@{$critmsgs}, { |
push(@{$critmsgs}, { |
msgid => $msgid, |
msgid => $msgid, |
sendtime => $sendtime, |
sendtime => $sendtime, |
shortsub => &Apache::lonnet::unescape($shortsubj), |
shortsub => $shortsubj, |
from => $fromname, |
from => $fromname, |
fromdom => $fromdom |
fromdom => $fromdom |
}); |
}); |