version 1.169, 2005/06/20 21:31:07
|
version 1.174, 2005/08/02 18:15:27
|
Line 46 sub initialize_inputtags {
|
Line 46 sub initialize_inputtags {
|
@Apache::inputtags::response=(); |
@Apache::inputtags::response=(); |
# list of all response ids seen in this problem |
# list of all response ids seen in this problem |
@Apache::inputtags::responselist=(); |
@Apache::inputtags::responselist=(); |
|
# list of all current hint ids |
|
@Apache::inputtags::hint=(); |
|
# list of all hint ids seen in this problem |
|
@Apache::inputtags::hintlist=(); |
# list of whether or not a specific response was previously used |
# list of whether or not a specific response was previously used |
@Apache::inputtags::previous=(); |
@Apache::inputtags::previous=(); |
# submission it was used in |
# submission it was used in |
Line 75 sub check_for_duplicate_ids {
|
Line 79 sub check_for_duplicate_ids {
|
my %check; |
my %check; |
foreach my $id (@Apache::inputtags::partlist, |
foreach my $id (@Apache::inputtags::partlist, |
@Apache::inputtags::responselist, |
@Apache::inputtags::responselist, |
|
@Apache::inputtags::hintlist, |
@Apache::inputtags::importlist) { |
@Apache::inputtags::importlist) { |
$check{$id}++; |
$check{$id}++; |
} |
} |
Line 418 sub decideoutput {
|
Line 423 sub decideoutput {
|
|
|
if ($solved =~ /^correct/) { |
if ($solved =~ /^correct/) { |
$bgcolor=$possiblecolors{'correct'}; |
$bgcolor=$possiblecolors{'correct'}; |
if ($award eq 'ASSIGNED_SCORE') { |
$message=&mt('You are correct.'); |
|
if ($awarded < 1 && $awarded > 0) { |
|
$message=&mt('You are partially correct.'); |
|
$bgcolor=$possiblecolors{'not_charged_try'}; |
|
} elsif ($awarded < 1) { |
|
$message=&mt('Incorrect.'); |
|
$bgcolor=$possiblecolors{'charged_try'}; |
|
} |
|
if ($env{'request.filename'} =~ |
|
m|/res/lib/templates/examupload.problem$|) { |
$message = &mt("A score has been assigned."); |
$message = &mt("A score has been assigned."); |
if ($awarded < 1 && $awarded > 0) { |
$added_computer_text=1; |
$bgcolor=$possiblecolors{'not_charged_try'}; |
|
} elsif ($awarded < 1) { |
|
$bgcolor=$possiblecolors{'charged_try'}; |
|
} |
|
} else { |
} else { |
if ($target eq 'tex') { |
if ($target eq 'tex') { |
$message = '\textbf{'.&mt('You are correct.').'}'; |
$message = '\textbf{'.$message.'}'; |
} else { |
} else { |
$message = "<b>".&mt('You are correct.')."</b>"; |
$message = "<b>".$message."</b>"; |
$message.=" ".&mt("Computer's answer now shown above."); |
$message.=" ".&mt("Computer's answer now shown above."); |
} |
} |
$added_computer_text=1; |
$added_computer_text=1; |