--- loncom/homework/structuretags.pm 2000/11/28 20:11:25 1.15
+++ loncom/homework/structuretags.pm 2000/11/28 21:44:47 1.16
@@ -30,23 +30,30 @@ sub end_tex {
sub start_problem {
my ($target,$token,$parstack,$parser,$safeeval)=@_;
unless ($target eq 'meta') {
- my $args ='';
- if ( $#$parstack > -1 ) {
- $args=$$parstack[$#$parstack];
- }
- my $name = &Apache::run::run("{$args;".'return $name}',$safeeval);
- $Apache::inputtags::part='0';
- my $expression='$external::part='.$Apache::inputtags::part.';';
- $safeeval->share_from('Apache::inputtags',['@part']);
- &Apache::run::run($expression);
- return "
$name\n\n\n";
+ my ($target,$token,$parstack,$parser,$safeeval)=@_;
+ my $result='';
+ unless ($target eq 'meta') {
+ $result="\n";
+ } else {
+ if ($Apache::inputtags::part ne '0') {
+ $result=&Apache::response::mandatory_part_meta;
+ }
+ }
+ return $result;
}
sub start_block {
@@ -159,13 +166,12 @@ sub start_part {
my $id = &Apache::run::run("{$args;".'return $id}',$safeeval);
$Apache::inputtags::part=$id;
if ($target eq 'meta') {
- return &Apache::response::mandatory_part_meta;
+ return &Apache::response::mandatory_part_meta;
}
}
sub end_part {
my ($target,$token,$parstack,$parser,$safeeval)=@_;
- $Apache::inputtags::part='0';
}
1;