version 1.217, 2010/02/28 23:44:36
|
version 1.220, 2010/11/24 00:10:06
|
Line 30
|
Line 30
|
|
|
=head1 NAME |
=head1 NAME |
|
|
Apache::resonse.pm |
Apache::response.pm |
|
|
=head1 SYNOPSIS |
=head1 SYNOPSIS |
|
|
Line 280 sub meta_response_order {
|
Line 280 sub meta_response_order {
|
} |
} |
|
|
sub check_for_previous { |
sub check_for_previous { |
my ($curresponse,$partid,$id,$last) = @_; |
my ($curresponse,$partid,$id,$last,$type) = @_; |
my %previous; |
my %previous; |
$previous{'used'} = 0; |
$previous{'used'} = 0; |
foreach my $key (sort(keys(%Apache::lonhomework::history))) { |
foreach my $key (sort(keys(%Apache::lonhomework::history))) { |
Line 305 sub check_for_previous {
|
Line 305 sub check_for_previous {
|
if (! $previous{'award'} ) { $previous{'award'} = 'UNKNOWN'; } |
if (! $previous{'award'} ) { $previous{'award'} = 'UNKNOWN'; } |
if ($previous{'award'} eq 'INTERNAL_ERROR') { $previous{'used'}=0; } |
if ($previous{'award'} eq 'INTERNAL_ERROR') { $previous{'used'}=0; } |
&Apache::lonxml::debug("got a match :$previous{'award'}:$previous{'used'}:"); |
&Apache::lonxml::debug("got a match :$previous{'award'}:$previous{'used'}:"); |
} |
} elsif ($type eq 'ci') { |
|
if (lc($pastresponse) eq lc($curresponse)) { |
|
if ($key =~ /^(\d+):/) { |
|
push (@{$previous{'versionci'}},$1); |
|
$previous{'awardci'} = $Apache::lonhomework::history{"resource.$partid.$id.awarddetail"}; |
|
$previous{'usedci'} = 1; |
|
} |
|
} |
|
} |
} |
} |
} |
} |
&Apache::lonhomework::showhash(%previous); |
&Apache::lonhomework::showhash(%previous); |
Line 402 sub start_customresponse {
|
Line 410 sub start_customresponse {
|
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::text_arg('String to display for answer:', |
$result.=&Apache::edit::text_arg('String to display for answer:', |
'answerdisplay',$token); |
'answerdisplay',$token,'50'); |
$result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
$result.=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
} elsif ($target eq 'modified') { |
} elsif ($target eq 'modified') { |
my $constructtag; |
my $constructtag; |
Line 512 sub start_mathresponse {
|
Line 520 sub start_mathresponse {
|
} elsif ($target eq 'edit') { |
} elsif ($target eq 'edit') { |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::tag_start($target,$token); |
$result.=&Apache::edit::text_arg('String to display for answer:', |
$result.=&Apache::edit::text_arg('String to display for answer:', |
'answerdisplay',$token); |
'answerdisplay',$token,'50'); |
$result.=&Apache::edit::select_arg('Algebra System:', |
$result.=&Apache::edit::select_arg('Algebra System:', |
'cas', |
'cas', |
['maxima','R'], |
['maxima','R'], |