version 1.7, 2009/05/21 03:09:01
|
version 1.8, 2009/05/21 04:58:40
|
Line 272 sub grade_pdf {
|
Line 272 sub grade_pdf {
|
|
|
$result .= &Apache::loncommon::start_data_table_row(); |
$result .= &Apache::loncommon::start_data_table_row(); |
$result .= "<td>$problemname</td><td class='"; |
$result .= "<td>$problemname</td><td class='"; |
if($grade eq "EXACT_ANS") { |
if($grade eq "EXACT_ANS" || $grade eq "APPROX_ANS") { |
$result .= "LC_answer_correct"; |
$result .= "LC_answer_correct"; |
} else { |
} else { |
$result .= "LC_answer_charged_try"; |
$result .= "LC_answer_charged_try"; |
} |
} |
|
$grade = &parse_grade_answer($grade); |
$result .= "'>$grade</span></td>"; |
$result .= "'>$grade</span></td>"; |
$result .= &Apache::loncommon::end_data_table_row(); |
$result .= &Apache::loncommon::end_data_table_row(); |
} |
} |
Line 306 sub grade_problem {
|
Line 307 sub grade_problem {
|
return ($title, $grade); |
return ($title, $grade); |
} |
} |
|
|
|
sub parse_grade_answer { |
|
my ($shortcut) = @_; |
|
my %answerhash = ('EXACT_ANS' => &mt('You are correct.'), |
|
'APPROX_ANS' => &mt('You are approximated right'), |
|
'INCORRECT' => &mt('You are incorrect'), |
|
); |
|
|
|
foreach my $key (keys %answerhash) { |
|
if($shortcut eq $key) { |
|
return $answerhash{$shortcut}; |
|
} |
|
} |
|
return &mt('See course contents for further information.'); |
|
|
|
} |
|
|
|
|
sub dumpenv { |
sub dumpenv { |
my $r = shift; |
my $r = shift; |
|
|