version 1.444.2.6, 2011/10/07 15:10:12
|
version 1.444.2.7.2.1, 2012/02/17 19:42:10
|
Line 509 my %statusIconMap =
|
Line 509 my %statusIconMap =
|
my %iconAltTags = #texthash does not work here |
my %iconAltTags = #texthash does not work here |
( 'navmap.correct.gif' => 'Correct', |
( 'navmap.correct.gif' => 'Correct', |
'navmap.wrong.gif' => 'Incorrect', |
'navmap.wrong.gif' => 'Incorrect', |
'navmap.open.gif' => 'Open', |
'navmap.open.gif' => 'Is Open', |
'navmap.partial.gif' => 'Partially Correct', |
'navmap.partial.gif' => 'Partially Correct', |
'navmap.ellipsis.gif' => 'Attempted', |
'navmap.ellipsis.gif' => 'Attempted', |
); |
); |
Line 641 sub getDescription {
|
Line 641 sub getDescription {
|
return &mt("Not currently assigned."); |
return &mt("Not currently assigned."); |
} |
} |
if ($status == $res->OPEN_LATER) { |
if ($status == $res->OPEN_LATER) { |
return &mt("Open ") .timeToHumanString($open,'start'); |
return &mt("Open [_1]",&timeToHumanString($open,'start')); |
} |
} |
if ($res->simpleStatus($part) == $res->OPEN) { |
if ($res->simpleStatus($part) == $res->OPEN) { |
unless (&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) { |
unless (&Apache::lonnet::allowed('mgr',$env{'request.course.id'})) { |
Line 675 sub getDescription {
|
Line 675 sub getDescription {
|
if ($status == $res->OPEN) { |
if ($status == $res->OPEN) { |
if ($due) { |
if ($due) { |
if ($res->is_practice()) { |
if ($res->is_practice()) { |
return &mt("Closes ")." " .timeToHumanString($due,'start'); |
return &mt("Closes [_1]",&timeToHumanString($due,'start')); |
} else { |
} else { |
return &mt("Due")." " .timeToHumanString($due,'end'); |
return &mt("Due [_1]",&timeToHumanString($due,'end')); |
} |
} |
} else { |
} else { |
return &mt("Open, no due date"); |
return &mt("Open, no due date"); |
} |
} |
} |
} |
if ($status == $res->PAST_DUE_ANSWER_LATER) { |
if ($status == $res->PAST_DUE_ANSWER_LATER) { |
return &mt("Answer open")." " .timeToHumanString($answer,'start'); |
return &mt("Answer open [_1]",&timeToHumanString($answer,'start')); |
} |
} |
if ($status == $res->PAST_DUE_NO_ANSWER) { |
if ($status == $res->PAST_DUE_NO_ANSWER) { |
if ($res->is_practice()) { |
if ($res->is_practice()) { |
return &mt("Closed")." " . timeToHumanString($due,'start'); |
return &mt("Closed [_1]",&timeToHumanString($due,'start')); |
} else { |
} else { |
return &mt("Was due")." " . timeToHumanString($due,'end'); |
return &mt("Was due [_1]",&timeToHumanString($due,'end')); |
} |
} |
} |
} |
if (($status == $res->ANSWER_OPEN || $status == $res->PARTIALLY_CORRECT) |
if (($status == $res->ANSWER_OPEN || $status == $res->PARTIALLY_CORRECT) |
Line 723 sub getDescription {
|
Line 723 sub getDescription {
|
} |
} |
} |
} |
if ($due) { |
if ($due) { |
return &mt("Due")." " . timeToHumanString($due,'end') . |
return &mt("Due [_1]",&timeToHumanString($due,'end')) . |
" $triesString"; |
" $triesString"; |
} else { |
} else { |
return &mt("No due date")." $triesString"; |
return &mt("No due date")." $triesString"; |
Line 1006 sub render_resource {
|
Line 1006 sub render_resource {
|
} |
} |
|
|
if ($resource->randomout()) { |
if ($resource->randomout()) { |
$nonLinkedText .= ' <i>('.&mt('hidden').')</i> '; |
$nonLinkedText .= ' <span class="LC_warning">('.&mt('hidden').')</span> '; |
} |
} |
if (!$resource->condval()) { |
if (!$resource->condval()) { |
$nonLinkedText .= ' <i>('.&mt('conditionally hidden').')</i> '; |
$nonLinkedText .= ' <span class="LC_info">('.&mt('conditionally hidden').')</span> '; |
} |
} |
if (($resource->is_practice()) && ($resource->is_raw_problem())) { |
if (($resource->is_practice()) && ($resource->is_raw_problem())) { |
$nonLinkedText .=' <font color="green"><b>'.&mt('not graded').'</b></font>'; |
$nonLinkedText .=' <font color="green"><b>'.&mt('not graded').'</b></font>'; |
Line 3526 sub new {
|
Line 3526 sub new {
|
$self->{NAV_MAP}->{RESOURCE_CACHE}->{$self->{ID}} = $self; |
$self->{NAV_MAP}->{RESOURCE_CACHE}->{$self->{ID}} = $self; |
$self->{RESOURCE_ERROR} = 0; |
$self->{RESOURCE_ERROR} = 0; |
|
|
|
$self->{DUEDATE_CACHE} = undef; |
|
|
# A hash that can be used by two-pass algorithms to store data |
# A hash that can be used by two-pass algorithms to store data |
# about this resource in. Not used by the resource object |
# about this resource in. Not used by the resource object |
# directly. |
# directly. |
Line 4103 sub checkedin {
|
Line 4105 sub checkedin {
|
# this should work exactly like the copy in lonhomework.pm |
# this should work exactly like the copy in lonhomework.pm |
sub duedate { |
sub duedate { |
(my $self, my $part) = @_; |
(my $self, my $part) = @_; |
|
if (defined ($self->{DUEDATE_CACHE}->{$part})) { |
|
return $self->{DUEDATE_CACHE}->{$part}; |
|
} |
my $date; |
my $date; |
my @interval=$self->parmval("interval", $part); |
my @interval=$self->parmval("interval", $part); |
my $due_date=$self->parmval("duedate", $part); |
my $due_date=$self->parmval("duedate", $part); |
Line 4119 sub duedate {
|
Line 4124 sub duedate {
|
} else { |
} else { |
$date = $due_date; |
$date = $due_date; |
} |
} |
|
$self->{DUEDATE_CACHE}->{$part} = $date; |
return $date; |
return $date; |
} |
} |
sub handgrade { |
sub handgrade { |