version 1.193, 2006/05/30 18:08:35
|
version 1.198, 2006/06/30 00:32:25
|
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>'); |
} |
} |
} |
} |
$result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",join(', ',@filelist)); |
$result.=&mt("Portfolio files previously selected: <strong>[_1]</strong>",join(', ',@filelist)); |
if (@bad_file_list) { |
if (@bad_file_list) { |
$result.='<br />'.&mt('<font color="red">These file(s) don\'t exist:</font> <strong>[_1]</strong>',join(', ',@bad_file_list)); |
$result.='<br />'.&mt('<span class="LC_error">These file(s) don\'t exist:</span> <span class="LC_filename">[_1]</span>',join(', ',@bad_file_list)); |
} |
} |
} |
} |
} |
} |
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){ |
|
if ($Apache::lonhomework::history{"resource.$part.$resid.handback"}) { |
|
$message.='<br />'; |
|
my @files = split(/\s*,\s*/, |
|
$Apache::lonhomework::history{"resource.$part.$resid.handback"}); |
|
my $file_msg; |
|
foreach my $file (@files) { |
|
$file_msg.= '<br /><a href="/uploaded/'."$domain/$user".'/'.$file.'">'.$file.'</a>'; |
|
} |
|
$message .= &mt('Returned file(s): [_1]',$file_msg); |
|
} |
|
} |
|
|
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."); |