version 1.193, 2006/05/30 18:08:35
|
version 1.195, 2006/06/09 16:27:28
|
Line 284 sub start_textline {
|
Line 284 sub start_textline {
|
my $partid=$Apache::inputtags::part; |
my $partid=$Apache::inputtags::part; |
my $id=$Apache::inputtags::response[-1]; |
my $id=$Apache::inputtags::response[-1]; |
if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' |
if ($Apache::inputtags::status[-1] eq 'CAN_ANSWER' |
|| $Apache::inputtags::status[-1] eq 'CANNOT_ANSWER') { |
|| ($Apache::inputtags::status[-1] eq 'CANNOT_ANSWER' && |
|
$Apache::lonhomework::history{"resource.$partid.solved"} !~ /^correct/ )) { |
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); |
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); |
my $maxlength; |
my $maxlength; |
if ($size eq '') { $size=20; } else { |
if ($size eq '') { $size=20; } else { |
Line 447 sub file_selector {
|
Line 448 sub file_selector {
|
push(@filelist,'<a href="'.$url.'"><img src="'.$icon. |
push(@filelist,'<a href="'.$url.'"><img src="'.$icon. |
'" border="0" />'.$file.'</a>'); |
'" border="0" />'.$file.'</a>'); |
if (! &Apache::lonnet::stat_file($url)) { |
if (! &Apache::lonnet::stat_file($url)) { |
|
&Apache::lonnet::logthis("bad file is $url"); |
push(@bad_file_list,'<a href="'.$url.'"><img src="'.$icon. |
push(@bad_file_list,'<a href="'.$url.'"><img src="'.$icon. |
'" border="0" />'.$file.'</a>'); |
'" border="0" />'.$file.'</a>'); |
} |
} |
Line 548 sub decideoutput {
|
Line 550 sub decideoutput {
|
|
|
if ($previous) { $previousmsg=&mt('You have entered that answer before'); } |
if ($previous) { $previousmsg=&mt('You have entered that answer before'); } |
|
|
if ($solved =~ /^correct/) { |
if ($solved =~ /^correct/) { |
$bgcolor=$possiblecolors{'correct'}; |
$bgcolor=$possiblecolors{'correct'}; |
$message=&mt('You are correct.'); |
$message=&mt('You are correct.'); |
if ($awarded < 1 && $awarded > 0) { |
if ($awarded < 1 && $awarded > 0) { |
$message=&mt('You are partially correct.'); |
$message=&mt('You are partially correct.'); |
Line 716 sub decideoutput {
|
Line 718 sub decideoutput {
|
$message = &mt("Unknown message").": $award"; |
$message = &mt("Unknown message").": $award"; |
$button=1; |
$button=1; |
} |
} |
|
my (undef,undef,$domain,$user)=&Apache::lonxml::whichuser(); |
|
foreach my $resid(@Apache::inputtags::response){ |
|
&Apache::lonnet::logthis("handback is ".$Apache::lonhomework::history{"resource.$part.$resid.handback"}); |
|
if ($Apache::lonhomework::history{"resource.$part.$resid.handback"}) { |
|
$message.= '<br /><a href="/uploaded/'."$domain/$user".'/portfolio/'.$Apache::lonhomework::history{"resource.$part.$resid.handback"}.'">Returned File</a>'; |
|
} |
|
} |
|
|
if (lc($Apache::lonhomework::problemstatus) eq 'no' && |
if (lc($Apache::lonhomework::problemstatus) eq 'no' && |
$Apache::inputtags::status[-1] ne 'SHOW_ANSWER') { |
$Apache::inputtags::status[-1] ne 'SHOW_ANSWER') { |
$message = &mt("Answer Submitted: Your final submission will be graded after the due date."); |
$message = &mt("Answer Submitted: Your final submission will be graded after the due date."); |