version 1.401, 2007/09/01 00:41:42
|
version 1.402, 2007/10/05 18:48:20
|
Line 198 sub getDescription {
|
Line 198 sub getDescription {
|
} |
} |
if ($status == $res->OPEN) { |
if ($status == $res->OPEN) { |
if ($res->duedate($part)) { |
if ($res->duedate($part)) { |
return &mt("Due")." " .timeToHumanString($res->duedate($part),'end'); |
if ($res->is_practice()) { |
|
return &mt("Closes ")." " .timeToHumanString($res->duedate($part),'start'); |
|
} else { |
|
return &mt("Due")." " .timeToHumanString($res->duedate($part),'end'); |
|
} |
} else { |
} else { |
return &mt("Open, no due date"); |
return &mt("Open, no due date"); |
} |
} |
Line 207 sub getDescription {
|
Line 211 sub getDescription {
|
return &mt("Answer open")." " . timeToHumanString($res->answerdate($part),'start'); |
return &mt("Answer open")." " . timeToHumanString($res->answerdate($part),'start'); |
} |
} |
if ($status == $res->PAST_DUE_NO_ANSWER) { |
if ($status == $res->PAST_DUE_NO_ANSWER) { |
return &mt("Was due")." " . timeToHumanString($res->duedate($part),'end'); |
if ($res->is_practice()) { |
|
return &mt("Closed")." " . timeToHumanString($res->duedate($part),'start'); |
|
} else { |
|
return &mt("Was due")." " . timeToHumanString($res->duedate($part),'end'); |
|
} |
} |
} |
if (($status == $res->ANSWER_OPEN || $status == $res->PARTIALLY_CORRECT) |
if (($status == $res->ANSWER_OPEN || $status == $res->PARTIALLY_CORRECT) |
&& $res->handgrade($part) ne 'yes') { |
&& $res->handgrade($part) ne 'yes') { |
Line 982 sub render_long_status {
|
Line 990 sub render_long_status {
|
$params->{'multipart'} && $part eq "0"; |
$params->{'multipart'} && $part eq "0"; |
|
|
my $color; |
my $color; |
if ($resource->is_problem()) { |
if ($resource->is_problem() || $resource->is_practice()) { |
$color = $colormap{$resource->status}; |
$color = $colormap{$resource->status}; |
|
|
if (dueInLessThan24Hours($resource, $part) || |
if (dueInLessThan24Hours($resource, $part) || |
Line 992 sub render_long_status {
|
Line 1000 sub render_long_status {
|
} |
} |
|
|
if ($resource->kind() eq "res" && |
if ($resource->kind() eq "res" && |
$resource->is_problem() && |
($resource->is_problem() || $resource->is_practice()) && |
!$firstDisplayed) { |
!$firstDisplayed) { |
if ($color) {$result .= "<font color=\"$color\"><b>"; } |
if ($color) {$result .= "<font color=\"$color\"><b>"; } |
$result .= getDescription($resource, $part); |
$result .= getDescription($resource, $part); |
if ($color) {$result .= "</b></font>"; } |
if ($color) {$result .= "</b></font>"; } |
} |
} |
if ($resource->is_map() && advancedUser() && $resource->randompick()) { |
if ($resource->is_map() && &advancedUser() && $resource->randompick()) { |
$result .= &mt('(randomly select [_1])', $resource->randompick()); |
$result .= &mt('(randomly select [_1])', $resource->randompick()); |
} |
} |
if ($resource->is_map() && &advancedUser() && $resource->randomorder()) { |
if ($resource->is_map() && &advancedUser() && $resource->randomorder()) { |