version 1.15, 2000/11/28 20:11:25
|
version 1.16, 2000/11/28 21:44:47
|
Line 30 sub end_tex {
|
Line 30 sub end_tex {
|
sub start_problem { |
sub start_problem { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
unless ($target eq 'meta') { |
unless ($target eq 'meta') { |
my $args =''; |
my $args =''; |
if ( $#$parstack > -1 ) { |
if ( $#$parstack > -1 ) { |
$args=$$parstack[$#$parstack]; |
$args=$$parstack[$#$parstack]; |
} |
} |
my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); |
my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); |
$Apache::inputtags::part='0'; |
$Apache::inputtags::part='0'; |
my $expression='$external::part='.$Apache::inputtags::part.';'; |
my $expression='$external::part='.$Apache::inputtags::part.';'; |
$safeeval->share_from('Apache::inputtags',['@part']); |
$safeeval->share_from('Apache::inputtags',['@part']); |
&Apache::run::run($expression); |
&Apache::run::run($expression); |
return "<title>$name</title>\n<body bgcolor=#FFFFFF>\n<form name=\"lonhomework\" method=\"POST\" action=\"".$ENV{'request.uri'}."\">"; |
return "<title>$name</title>\n<body bgcolor=#FFFFFF>\n<form name=\"lonhomework\" method=\"POST\" action=\"".$ENV{'request.uri'}."\">"; |
} else { |
} |
return &Apache::response::mandatory_part_meta; |
|
} |
|
} |
} |
|
|
sub end_problem { |
sub end_problem { |
return "</form></body>\n"; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
|
my $result=''; |
|
unless ($target eq 'meta') { |
|
$result="</form></body>\n"; |
|
} else { |
|
if ($Apache::inputtags::part ne '0') { |
|
$result=&Apache::response::mandatory_part_meta; |
|
} |
|
} |
|
return $result; |
} |
} |
|
|
sub start_block { |
sub start_block { |
Line 159 sub start_part {
|
Line 166 sub start_part {
|
my $id = &Apache::run::run("{$args;".'return $id}',$safeeval); |
my $id = &Apache::run::run("{$args;".'return $id}',$safeeval); |
$Apache::inputtags::part=$id; |
$Apache::inputtags::part=$id; |
if ($target eq 'meta') { |
if ($target eq 'meta') { |
return &Apache::response::mandatory_part_meta; |
return &Apache::response::mandatory_part_meta; |
} |
} |
} |
} |
|
|
sub end_part { |
sub end_part { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
$Apache::inputtags::part='0'; |
|
} |
} |
|
|
1; |
1; |