version 1.250, 2008/12/06 12:49:12
|
version 1.251, 2008/12/07 23:40:57
|
Line 562 sub valid_award {
|
Line 562 sub valid_award {
|
'UNIT_INVALID_STUDENT', 'UNIT_IRRECONCIBLE', |
'UNIT_INVALID_STUDENT', 'UNIT_IRRECONCIBLE', |
'UNIT_FAIL', 'NO_UNIT', |
'UNIT_FAIL', 'NO_UNIT', |
'UNIT_NOTNEEDED', 'WANTED_NUMERIC', |
'UNIT_NOTNEEDED', 'WANTED_NUMERIC', |
'BAD_FORMULA', 'SIG_FAIL', 'INCORRECT', |
'BAD_FORMULA', 'INTERNAL_ERROR', 'SIG_FAIL', 'INCORRECT', |
'MISORDERED_RANK', 'INVALID_FILETYPE', |
'MISORDERED_RANK', 'INVALID_FILETYPE', |
'EXCESS_FILESIZE', 'DRAFT', |
'EXCESS_FILESIZE', 'DRAFT', |
'SUBMITTED', 'ASSIGNED_SCORE', |
'SUBMITTED', 'ASSIGNED_SCORE', |
Line 577 sub valid_award {
|
Line 577 sub valid_award {
|
'TOO_LONG', |
'TOO_LONG', |
'UNIT_INVALID_INSTRUCTOR', 'UNIT_INVALID_STUDENT', |
'UNIT_INVALID_INSTRUCTOR', 'UNIT_INVALID_STUDENT', |
'UNIT_IRRECONCIBLE', 'UNIT_FAIL', 'NO_UNIT', |
'UNIT_IRRECONCIBLE', 'UNIT_FAIL', 'NO_UNIT', |
'UNIT_NOTNEEDED', 'WANTED_NUMERIC', 'BAD_FORMULA', |
'UNIT_NOTNEEDED', 'WANTED_NUMERIC', 'BAD_FORMULA', 'INTERNAL_ERROR', |
'COMMA_FAIL', 'SIG_FAIL', 'INCORRECT', 'MISORDERED_RANK', |
'COMMA_FAIL', 'SIG_FAIL', 'INCORRECT', 'MISORDERED_RANK', |
'INVALID_FILETYPE', 'EXCESS_FILESIZE', 'DRAFT', 'SUBMITTED', |
'INVALID_FILETYPE', 'EXCESS_FILESIZE', 'DRAFT', 'SUBMITTED', |
'ASSIGNED_SCORE', 'APPROX_ANS', 'EXACT_ANS'); |
'ASSIGNED_SCORE', 'APPROX_ANS', 'EXACT_ANS'); |
Line 625 sub finalizeawards {
|
Line 625 sub finalizeawards {
|
return ('NO_RESPONSE'); |
return ('NO_RESPONSE'); |
} |
} |
} |
} |
|
|
|
if ($Apache::lonxml::internal_error) { $result='INTERNAL_ERROR'; } |
|
|
if (!$final_scantron && defined($result)) { return ($result); } |
if (!$final_scantron && defined($result)) { return ($result); } |
|
|
# if in scantron mode, if the award for any response is |
# if in scantron mode, if the award for any response is |
Line 671 sub finalizeawards {
|
Line 674 sub finalizeawards {
|
|
|
sub decideoutput { |
sub decideoutput { |
my ($award,$awarded,$awardmsg,$solved,$previous,$target)=@_; |
my ($award,$awarded,$awardmsg,$solved,$previous,$target)=@_; |
|
|
my $message=''; |
my $message=''; |
my $button=0; |
my $button=0; |
my $previousmsg; |
my $previousmsg; |
Line 805 sub decideoutput {
|
Line 809 sub decideoutput {
|
$message = &mt('Submission won\'t be graded. The combined size of submitted files exceeded the amount allowed.'); |
$message = &mt('Submission won\'t be graded. The combined size of submitted files exceeded the amount allowed.'); |
$css_class=$possible_class{'not_charged_try'}; |
$css_class=$possible_class{'not_charged_try'}; |
$button=1; |
$button=1; |
|
|
} elsif ($award eq 'INVALID_FILETYPE') { |
} elsif ($award eq 'INVALID_FILETYPE') { |
$message = &mt('Submission won\'t be graded. The type of file submitted is not allowed.'); |
$message = &mt('Submission won\'t be graded. The type of file submitted is not allowed.'); |
$css_class=$possible_class{'not_charged_try'}; |
$css_class=$possible_class{'not_charged_try'}; |
Line 849 sub decideoutput {
|
Line 852 sub decideoutput {
|
if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Formula_Answers')}; |
if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Formula_Answers')}; |
$css_class=$possible_class{'not_charged_try'}; |
$css_class=$possible_class{'not_charged_try'}; |
$button=1; |
$button=1; |
|
} elsif ($award eq 'INTERNAL_ERROR') { |
|
$message = &mt("An internal error occurred while processing your answer. Please try again later."); |
|
$css_class=$possible_class{'not_charged_try'}; |
|
$button=1; |
} elsif ($award eq 'INCORRECT') { |
} elsif ($award eq 'INCORRECT') { |
$message = &mt("Incorrect").'.'; |
$message = &mt("Incorrect").'.'; |
$css_class=$possible_class{'charged_try'}; |
$css_class=$possible_class{'charged_try'}; |