version 1.149.2.1, 2004/11/06 01:15:59
|
version 1.150, 2004/09/09 09:52:58
|
Line 347 sub decideoutput {
|
Line 347 sub decideoutput {
|
$message = '\textbf{'.&mt('You are correct.').'}'; |
$message = '\textbf{'.&mt('You are correct.').'}'; |
} else { |
} else { |
$message = "<b>".&mt('You are correct.')."</b>"; |
$message = "<b>".&mt('You are correct.')."</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; |
unless ($ENV{'course.'. |
unless ($ENV{'course.'. |
$ENV{'request.course.id'}. |
$ENV{'request.course.id'}. |
Line 380 sub decideoutput {
|
Line 380 sub decideoutput {
|
$message = '\textbf{'.&mt('You are correct.').'}'; |
$message = '\textbf{'.&mt('You are correct.').'}'; |
} else { |
} else { |
$message = "<b>".&mt('You are correct.')."</b>"; |
$message = "<b>".&mt('You are correct.')."</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; |
unless ($ENV{'course.'. |
unless ($ENV{'course.'. |
$ENV{'request.course.id'}. |
$ENV{'request.course.id'}. |
Line 491 sub decideoutput {
|
Line 491 sub decideoutput {
|
$button=1; |
$button=1; |
} |
} |
if ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER' && |
if ($Apache::inputtags::status[-1] eq 'SHOW_ANSWER' && |
!$added_computer_text) { |
!$added_computer_text && $target ne 'tex') { |
$message.=" ".&mt("Computer's answer now shown above."); |
$message.=" ".&mt("Computer's answer now shown above."); |
$added_computer_text=1; |
$added_computer_text=1; |
} |
} |
Line 524 sub hidealldata {
|
Line 524 sub hidealldata {
|
|
|
sub setgradedata { |
sub setgradedata { |
my ($award,$msg,$id,$previously_used) = @_; |
my ($award,$msg,$id,$previously_used) = @_; |
if ($Apache::lonhomework::scantronmode && |
# if the student already has it correct, don't modify the status |
&Apache::lonnet::validCODE($ENV{'form.CODE'})) { |
if ($Apache::lonhomework::scantronmode && defined($ENV{'form.CODE'})) { |
$Apache::lonhomework::results{"resource.CODE"}=$ENV{'form.CODE'}; |
$Apache::lonhomework::results{"resource.CODE"}=$ENV{'form.CODE'}; |
} elsif ($Apache::lonhomework::scantronmode && |
|
$ENV{'form.CODE'} eq '' && |
|
$Apache::lonhomework::history{"resource.CODE"} ne '') { |
|
$Apache::lonhomework::results{"resource.CODE"}=''; |
|
} |
} |
|
|
if (!$Apache::lonhomework::scantronmode && |
if (!$Apache::lonhomework::scantronmode && |
$Apache::inputtags::status['-1'] ne 'CAN_ANSWER' && |
$Apache::inputtags::status['-1'] ne 'CAN_ANSWER' && |
$Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') { |
$Apache::inputtags::status['-1'] ne 'CANNOT_ANSWER') { |
Line 541 sub setgradedata {
|
Line 536 sub setgradedata {
|
} elsif ( $Apache::lonhomework::history{"resource.$id.solved"} !~ |
} elsif ( $Apache::lonhomework::history{"resource.$id.solved"} !~ |
/^correct/ || $Apache::lonhomework::scantronmode || |
/^correct/ || $Apache::lonhomework::scantronmode || |
lc($Apache::lonhomework::problemstatus) eq 'no') { |
lc($Apache::lonhomework::problemstatus) eq 'no') { |
# the student doesn't already have it correct, |
#handle assignment of tries and solved status |
# or we are in a mode (scantron orno problem status) where a correct |
|
# can become incorrect |
|
# handle assignment of tries and solved status |
|
my $solvemsg; |
my $solvemsg; |
if ($Apache::lonhomework::scantronmode) { |
if ($Apache::lonhomework::scantronmode) { |
$solvemsg='correct_by_scantron'; |
$solvemsg='correct_by_scantron'; |