version 1.68, 2002/10/07 21:07:47
|
version 1.69, 2002/10/08 18:54:39
|
Line 892 sub new_handle {
|
Line 892 sub new_handle {
|
$res->OPEN_LATER => '', |
$res->OPEN_LATER => '', |
$res->TRIES_LEFT => 'navmap.open.gif', |
$res->TRIES_LEFT => 'navmap.open.gif', |
$res->INCORRECT => 'navmap.wrong.gif', |
$res->INCORRECT => 'navmap.wrong.gif', |
$res->OPEN => 'navmap.open.gif' ); |
$res->OPEN => 'navmap.open.gif', |
|
$res->ATTEMPTED => '' ); |
|
|
|
my %iconAltTags = |
|
( 'navmap.correct.gif' => 'Correct', |
|
'navmap.wrong.gif' => 'Incorrect', |
|
'navmap.open.gif' => 'Open' ); |
|
|
my %condenseStatuses = |
my %condenseStatuses = |
( $res->NETWORK_FAILURE => 1, |
( $res->NETWORK_FAILURE => 1, |
Line 1108 sub new_handle {
|
Line 1114 sub new_handle {
|
|
|
$r->print(" ${newBranchText}${linkopen}$icon${linkclose}\n"); |
$r->print(" ${newBranchText}${linkopen}$icon${linkclose}\n"); |
|
|
if ($curRes->is_problem() && $part != "0" && !$condensed) { |
if ($curRes->is_problem() && $part ne "0" && !$condensed) { |
$partLabel = " (Part $part)"; |
$partLabel = " (Part $part)"; |
$title = ""; |
$title = ""; |
} |
} |
Line 1151 sub new_handle {
|
Line 1157 sub new_handle {
|
# columns? |
# columns? |
my $firstDisplayed = !$condensed && $multipart && $part eq "0"; |
my $firstDisplayed = !$condensed && $multipart && $part eq "0"; |
|
|
# THIRD ROW: Problem status icon |
# THIRD COL: Problem status icon |
if ($curRes->is_problem() && |
if ($curRes->is_problem() && |
!$firstDisplayed) { |
!$firstDisplayed) { |
my $icon = $statusIconMap{$curRes->status($part)}; |
my $icon = $statusIconMap{$curRes->status($part)}; |
|
my $alt = $iconAltTags{$icon}; |
if ($icon) { |
if ($icon) { |
$r->print("<td valign=\"bottom\" width=\"50\" align=\"right\">$linkopen<img src=\"/adm/lonIcons/$icon\" border=\"0\" />$linkclose</td>\n"); |
$r->print("<td valign=\"bottom\" width=\"50\" align=\"right\">$linkopen<img src=\"/adm/lonIcons/$icon\" border=\"0\" alt=\"$alt\" />$linkclose</td>\n"); |
} else { |
} else { |
$r->print("<td></td>\n"); |
$r->print("<td></td>\n"); |
} |
} |
Line 1164 sub new_handle {
|
Line 1171 sub new_handle {
|
$r->print("<td></td>\n"); |
$r->print("<td></td>\n"); |
} |
} |
|
|
# FOURTH ROW: Text description |
# FOURTH COL: Text description |
$r->print("<td $colorizer align=\"right\" valign=\"bottom\">\n"); |
$r->print("<td $colorizer align=\"right\" valign=\"bottom\">\n"); |
|
|
if ($curRes->kind() eq "res" && |
if ($curRes->kind() eq "res" && |
Line 1244 sub getLinkForResource {
|
Line 1251 sub getLinkForResource {
|
sub getDescription { |
sub getDescription { |
my $res = shift; |
my $res = shift; |
my $part = shift; |
my $part = shift; |
my $status = $res->getDateStatus(); |
my $status = $res->status($part); |
|
|
if ($status == $res->NETWORK_FAILURE) { return ""; } |
if ($status == $res->NETWORK_FAILURE) { return ""; } |
if ($status == $res->NOTHING_SET) { |
if ($status == $res->NOTHING_SET) { |
Line 1272 sub getDescription {
|
Line 1279 sub getDescription {
|
if ($status == $res->EXCUSED) { |
if ($status == $res->EXCUSED) { |
return "Excused by instructor"; |
return "Excused by instructor"; |
} |
} |
|
if ($status == $res->ATTEMPTED) { |
|
return "Not yet graded."; |
|
} |
if ($status == $res->TRIES_LEFT) { |
if ($status == $res->TRIES_LEFT) { |
my $tries = $res->tries(); |
my $tries = $res->tries(); |
my $maxtries = $res->maxtries(); |
my $maxtries = $res->maxtries(); |
Line 2489 B<Completion Codes>
|
Line 2499 B<Completion Codes>
|
|
|
=item * B<NETWORK_FAILURE>: Information not available due to network failure. |
=item * B<NETWORK_FAILURE>: Information not available due to network failure. |
|
|
|
=item * B<ATTEMPTED>: Attempted, and not yet graded. |
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 2499 sub INCORRECT_BY_OVERRIDE { return 12; }
|
Line 2511 sub INCORRECT_BY_OVERRIDE { return 12; }
|
sub CORRECT { return 13; } |
sub CORRECT { return 13; } |
sub CORRECT_BY_OVERRIDE { return 14; } |
sub CORRECT_BY_OVERRIDE { return 14; } |
sub EXCUSED { return 15; } |
sub EXCUSED { return 15; } |
|
sub ATTEMPTED { return 16; } |
|
|
sub getCompletionStatus { |
sub getCompletionStatus { |
my $self = shift; |
my $self = shift; |
Line 2517 sub getCompletionStatus {
|
Line 2530 sub getCompletionStatus {
|
if ($status eq 'incorrect_attempted') {return $self->INCORRECT; } |
if ($status eq 'incorrect_attempted') {return $self->INCORRECT; } |
if ($status eq 'incorrect_by_override') {return $self->INCORRECT_BY_OVERRIDE; } |
if ($status eq 'incorrect_by_override') {return $self->INCORRECT_BY_OVERRIDE; } |
if ($status eq 'excused') {return $self->EXCUSED; } |
if ($status eq 'excused') {return $self->EXCUSED; } |
|
if ($status eq 'ungraded_attempted') {return $self->ATTEMPTED; } |
return $self->NOT_ATTEMPTED; |
return $self->NOT_ATTEMPTED; |
} |
} |
|
|
Line 2550 Along with directly returning the date o
|
Line 2564 Along with directly returning the date o
|
|
|
=item * OPEN: The item is open and not yet tried. |
=item * OPEN: The item is open and not yet tried. |
|
|
|
=item * ATTEMPTED: The problem has been attempted. |
|
|
=back |
=back |
|
|
=cut |
=cut |
Line 2572 sub status {
|
Line 2588 sub status {
|
# There are a few whole rows we can dispose of: |
# There are a few whole rows we can dispose of: |
if ($completionStatus == CORRECT || |
if ($completionStatus == CORRECT || |
$completionStatus == CORRECT_BY_OVERRIDE ) { |
$completionStatus == CORRECT_BY_OVERRIDE ) { |
return CORRECT(); |
return CORRECT; |
|
} |
|
|
|
if ($completionStatus == ATTEMPTED) { |
|
return ATTEMPTED; |
} |
} |
|
|
# If it's EXCUSED, then return that no matter what |
# If it's EXCUSED, then return that no matter what |
Line 2584 sub status {
|
Line 2604 sub status {
|
return NOTHING_SET; |
return NOTHING_SET; |
} |
} |
|
|
# Now we're down to a 3 (incorrect, incorrect_override, not_attempted) |
# Now we're down to a 4 (incorrect, incorrect_override, not_attempted) |
# by 4 matrix (date status). |
# by 4 matrix (date statuses). |
|
|
if ($dateStatus == PAST_DUE_ANSWER_LATER || |
if ($dateStatus == PAST_DUE_ANSWER_LATER || |
$dateStatus == PAST_DUE_NO_ANSWER ) { |
$dateStatus == PAST_DUE_NO_ANSWER ) { |