version 1.224, 2007/05/21 22:57:17
|
version 1.228, 2007/08/03 23:29:57
|
Line 31 use strict;
|
Line 31 use strict;
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Apache::lonnet; |
use Apache::lonnet; |
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA; |
use LONCAPA; |
|
|
|
|
Line 116 sub check_for_duplicate_ids {
|
Line 115 sub check_for_duplicate_ids {
|
|
|
sub start_input { |
sub start_input { |
my ($parstack,$safeeval)=@_; |
my ($parstack,$safeeval)=@_; |
my $id = &Apache::lonxml::get_param('id',$parstack,$safeeval); |
my $id = &Apache::lonxml::get_id($parstack,$safeeval); |
if ($id eq '') { $id = $Apache::lonxml::curdepth; } |
|
push (@Apache::inputtags::input,$id); |
push (@Apache::inputtags::input,$id); |
push (@Apache::inputtags::inputlist,$id); |
push (@Apache::inputtags::inputlist,$id); |
return $id; |
return $id; |
Line 449 sub file_selector {
|
Line 447 sub file_selector {
|
$result.='<br />'.'<strong>'.&mt('OR:').'</strong><br />'; |
$result.='<br />'.'<strong>'.&mt('OR:').'</strong><br />'; |
} |
} |
if ($which eq 'portfolioonly' || $which eq 'both') { |
if ($which eq 'portfolioonly' || $which eq 'both') { |
$result.=$extratext.'<a href='."'".'javascript:void(window.open("/adm/portfolio?mode=selectfile&fieldname=HWPORT'.$jspart.'_'.$id.'","cat","height=600,width=800,scrollbars=1,resizable=1,menubar=2,location=1"))'."'".'>'. |
$result.=$extratext.'<a href='."'".'javascript:void(window.open("/adm/portfolio?mode=selectfile&fieldname='.$env{'form.request.prefix'}.'HWPORT'.$jspart.'_'.$id.'","cat","height=600,width=800,scrollbars=1,resizable=1,menubar=2,location=1"))'."'".'>'. |
&mt('Select Portfolio Files').'</a><br />'. |
&mt('Select Portfolio Files').'</a><br />'. |
'<input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" value="" />'. |
'<input type="text" size="50" name="HWPORT'.$jspart.'_'.$id.'" value="" />'. |
'<br />'; |
'<br />'; |
Line 637 sub decideoutput {
|
Line 635 sub decideoutput {
|
&mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part). |
&mt('Your receipt is').' '.&Apache::lonnet::receipt($Apache::inputtags::part). |
(($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):''); |
(($target eq 'web')?&Apache::loncommon::help_open_topic('Receipt'):''); |
} |
} |
&Apache::lonnet::logthis(" er \n$symb\n$message\n".$env{'course.'. |
|
$env{'request.course.id'}. |
|
'.disable_receipt_display'}); |
|
} |
} |
$button=0; |
$button=0; |
$previousmsg=''; |
$previousmsg=''; |
Line 1183 sub previous_tries {
|
Line 1178 sub previous_tries {
|
my ($match,$which) = &find_which_previous($i); |
my ($match,$which) = &find_which_previous($i); |
$message=$previousmsg; |
$message=$previousmsg; |
my $previous = $count_lookup{$which}; |
my $previous = $count_lookup{$which}; |
$message =~ s{(</td>)}{ as submission # $previous $1}; |
$message =~ s{(</td>)}{ as submission \# $previous $1}; |
} elsif ($Apache::lonhomework::history{"$prefix.tries"}) { |
} elsif ($Apache::lonhomework::history{"$prefix.tries"}) { |
if ( $Apache::lonhomework::history{"$prefix.solved"} =~ |
if (!(lc($Apache::lonhomework::problemstatus) eq 'no' |
/^correct/) { |
&& $Apache::inputtags::status[-1] ne 'SHOW_ANSWER') |
|
&& $Apache::lonhomework::history{"$prefix.solved"} =~/^correct/ |
|
) { |
|
|
$message =~ s{(<td.*?>)(.*?)(</td>)} |
$message =~ s{(<td.*?>)(.*?)(</td>)} |
{$1 <strong>Correct</strong>. $3}; |
{$1 <strong>Correct</strong>. $3}s; |
} |
} |
my $trystr = "(Try ". |
my $trystr = "(Try ". |
$Apache::lonhomework::history{"$prefix.tries"}.')'; |
$Apache::lonhomework::history{"$prefix.tries"}.')'; |
Line 1228 sub previous_tries {
|
Line 1226 sub previous_tries {
|
$output=~s/\\/\\\\/g; |
$output=~s/\\/\\\\/g; |
$output=~s/\'/\\\'/g; |
$output=~s/\'/\\\'/g; |
$output=~s/\s+/ /g; |
$output=~s/\s+/ /g; |
|
$output.='<br /><form action=""><center><input type="button" name="close" value="'.&mt('Close Window').'" onClick="window.close()" /></center></form>'; |
|
|
my $windowopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $windowopen=&Apache::lonhtmlcommon::javascript_docopen(); |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Previous Tries', undef, |
&Apache::loncommon::start_page('Previous Tries', undef, |