version 1.73, 2002/11/08 20:34:10
|
version 1.75, 2002/11/27 19:25:56
|
Line 47 sub initialize_inputtags {
|
Line 47 sub initialize_inputtags {
|
@Apache::inputtags::responselist=(); |
@Apache::inputtags::responselist=(); |
# list of whether or not a specific response was previously used |
# list of whether or not a specific response was previously used |
@Apache::inputtags::previous=(); |
@Apache::inputtags::previous=(); |
|
# submission it was used in |
|
@Apache::inputtags::previous_version=(); |
# id of current part, 0 means that no part is current (inside <problem> only |
# id of current part, 0 means that no part is current (inside <problem> only |
$Apache::inputtags::part=''; |
$Apache::inputtags::part=''; |
# list of problem date statuses, the first element is for <problem> |
# list of problem date statuses, the first element is for <problem> |
Line 169 sub start_textline {
|
Line 171 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') { |
|
$result='\framebox[1cm][s]{\hfill}'; |
} |
} |
return $result; |
return $result; |
} |
} |
Line 386 sub grade {
|
Line 390 sub grade {
|
my $finalaward = &finalizeawards(@awards); |
my $finalaward = &finalizeawards(@awards); |
my $previously_used; |
my $previously_used; |
if ( $#Apache::inputtags::previous eq $#awards ) { |
if ( $#Apache::inputtags::previous eq $#awards ) { |
$previously_used = 'PREVIOUSLY_LAST'; |
my $match=0; |
foreach my $value (@Apache::inputtags::previous) { |
my @matches; |
if ($value eq 'PREVIOUSLY_USED' ) { |
foreach my $versionar (@Apache::inputtags::previous_version) { |
$previously_used = $value; |
foreach my $version (@$versionar) { |
last; |
$matches[$version]++; |
|
} |
|
} |
|
foreach my $elem (@matches) {if ($elem eq ($#awards+1)) {$match=1;}} |
|
if ($match) { |
|
$previously_used = 'PREVIOUSLY_LAST'; |
|
foreach my $value (@Apache::inputtags::previous) { |
|
if ($value eq 'PREVIOUSLY_USED' ) { |
|
$previously_used = $value; |
|
last; |
|
} |
|
} |
} |
} |
} |
|
} |
} |
&Apache::lonxml::debug("final award $finalaward, $previously_used"); |
&Apache::lonxml::debug("final award $finalaward, $previously_used"); |
&setgradedata($finalaward,$id,$previously_used); |
&setgradedata($finalaward,$id,$previously_used); |