version 1.75, 2002/11/27 19:25:56
|
version 1.79, 2003/01/19 08:16:43
|
Line 122 sub start_textfield {
|
Line 122 sub start_textfield {
|
$result=$token->[4]; |
$result=$token->[4]; |
} |
} |
$result.=&Apache::edit::modifiedfield(); |
$result.=&Apache::edit::modifiedfield(); |
|
} elsif ($target eq 'tex') { |
|
if ($$tagstack[-2] eq 'essayresponse' and $Apache::lonhomework::type eq 'exam') { |
|
my $number_of_lines= &Apache::lonxml::get_param('rows',$parstack,$safeeval); |
|
$result = '\fbox{\fbox{\parbox{\textwidth-5mm}{'; |
|
for (my $i=0;$i<int $number_of_lines*2;$i++) {$result.='\strut \\\\ ';} |
|
$result.='\strut \\\\\strut \\\\\strut \\\\\strut \\\\}}}'; |
|
} |
} |
} |
return $result; |
return $result; |
} |
} |
Line 171 sub start_textline {
|
Line 178 sub start_textline {
|
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'size'); |
my $constructtag=&Apache::edit::get_new_args($token,$parstack,$safeeval,'size'); |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
if ($constructtag) { $result = &Apache::edit::rebuild_tag($token); } |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex' and $Apache::lonhomework::type ne 'exam') { |
$result='\framebox[1cm][s]{\hfill}'; |
my $size = &Apache::lonxml::get_param('size',$parstack,$safeeval); |
|
if ($size != 0) {$size=$size*2; $size.=' mm';} else {$size='40 mm';} |
|
$result='\framebox['.$size.'][s]{\tiny\strut}'; |
} |
} |
return $result; |
return $result; |
} |
} |
Line 230 sub finalizeawards {
|
Line 239 sub finalizeawards {
|
foreach $award (@_) { if ($award eq 'INCORRECT') {$result=$award; last;} } |
foreach $award (@_) { if ($award eq 'INCORRECT') {$result=$award; last;} } |
} |
} |
if ($result eq '' ) { |
if ($result eq '' ) { |
|
foreach $award (@_) { if ($award eq 'MISORDERED_RANK') {$result=$award; last;} } |
|
} |
|
if ($result eq '' ) { |
foreach $award (@_) { if ($award eq 'DRAFT') {$result=$award; last;} } |
foreach $award (@_) { if ($award eq 'DRAFT') {$result=$award; last;} } |
} |
} |
if ($result eq '' ) { |
if ($result eq '' ) { |
Line 283 sub decideoutput {
|
Line 295 sub decideoutput {
|
} elsif ($award eq 'WANTED_NUMERIC') { |
} elsif ($award eq 'WANTED_NUMERIC') { |
$message = "This question expects a numeric answer"; |
$message = "This question expects a numeric answer"; |
$button=1; |
$button=1; |
|
} elsif ($award eq 'MISORDERED_RANK') { |
|
$message = 'You have provided an invalid ranking, look '. |
|
'<a href="/adm/pages/misordered_rank.html">here</a> for more information.'; |
|
$button=1; |
} elsif ($award eq 'SIG_FAIL') { |
} elsif ($award eq 'SIG_FAIL') { |
$message = "Please adjust significant figures.";# you provided %s significant figures"; |
$message = "Please adjust significant figures.";# you provided %s significant figures"; |
$button=1; |
$button=1; |
Line 425 sub gradestatus {
|
Line 441 sub gradestatus {
|
|
|
my $status = $Apache::inputtags::status['-1']; |
my $status = $Apache::inputtags::status['-1']; |
&Apache::lonxml::debug("gradestatus has :$status:"); |
&Apache::lonxml::debug("gradestatus has :$status:"); |
if ( $status ne 'CLOSED' ) { |
if ( $status ne 'CLOSED' && $status ne 'UNAVAILABLE') { |
my $award = $Apache::lonhomework::history{"resource.$id.award"}; |
my $award = $Apache::lonhomework::history{"resource.$id.award"}; |
my $solved = $Apache::lonhomework::history{"resource.$id.solved"}; |
my $solved = $Apache::lonhomework::history{"resource.$id.solved"}; |
my $previous = $Apache::lonhomework::history{"resource.$id.previous"}; |
my $previous = $Apache::lonhomework::history{"resource.$id.previous"}; |