version 1.9, 2007/09/11 19:24:14
|
version 1.12, 2007/10/15 09:47:29
|
Line 37 BEGIN {
|
Line 37 BEGIN {
|
} |
} |
|
|
#FIXME |
#FIXME |
# send of response params and there current values |
# send of response params and their current values (form good enough? |
# accept a string to be printed out (Where does it get shown?) (.message) |
# what parameters to send?) |
# need to get a correct answer from somewhere (probably here since randomized) |
# Need to get returned message displayed |
sub start_externalresponse { |
sub start_externalresponse { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my $result; |
my $result; |
my $id = &Apache::response::start_response($parstack,$safeeval); |
my $id = &Apache::response::start_response($parstack,$safeeval); |
|
|
|
if ($target eq 'edit') { |
|
$result .=&Apache::edit::tag_start($target,$token); |
|
$result .=&Apache::edit::text_arg('URL:','url',$token,60).'<br />'; |
|
$result .=&Apache::edit::text_arg('Answer:','answer',$token); |
|
$result .=&Apache::edit::text_arg('Form:','form',$token); |
|
$result .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
|
} elsif ($target eq 'modified') { |
|
my $constructtag = |
|
&Apache::edit::get_new_args($token,$parstack,$safeeval, |
|
'answer','form','url'); |
|
if ($constructtag) { |
|
$result = &Apache::edit::rebuild_tag($token); |
|
} |
|
} elsif ($target eq 'meta') { |
|
$result=&Apache::response::meta_package_write('externalresponse'); |
|
} |
|
|
return $result; |
return $result; |
} |
} |
|
|
Line 104 sub end_externalresponse {
|
Line 122 sub end_externalresponse {
|
|
|
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
if ($target eq 'grade' || $target eq 'web' || $target eq 'answer' || |
$target eq 'tex' || $target eq 'analyze') { |
$target eq 'tex' || $target eq 'analyze') { |
&Apache::lonxml::increment_counter($increment); |
&Apache::lonxml::increment_counter($increment, "$part.$id"); |
|
|
|
if ($target eq 'analyze') { |
|
&Apache::lonhomework::set_bubble_lines(); |
|
} |
} |
} |
&Apache::response::end_response(); |
&Apache::response::end_response(); |
return $result; |
return $result; |