version 1.37, 2001/05/13 20:01:34
|
version 1.39, 2001/05/31 22:37:56
|
Line 64 sub start_problem {
|
Line 64 sub start_problem {
|
} |
} |
} |
} |
if ($target eq 'web') { |
if ($target eq 'web') { |
my $args =''; |
my $name= &Apache::lonxml::get_param('name',$parstack,$safeeval); |
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
|
my $name = &Apache::run::run("{$args;".'return $name}',$safeeval); |
|
if ($name eq '') { |
if ($name eq '') { |
$name=&Apache::lonnet::EXT('resource.title'); |
$name=&Apache::lonnet::EXT('resource.title'); |
if ($name eq 'con_lost') { $name = ''; } |
if ($name eq 'con_lost') { $name = ''; } |
Line 95 sub start_problem {
|
Line 93 sub start_problem {
|
<input type="submit" name="problemmode" value="View" /> |
<input type="submit" name="problemmode" value="View" /> |
<input type="submit" name="Undo" value="undo" /> <hr /> |
<input type="submit" name="Undo" value="undo" /> <hr /> |
'; |
'; |
my $temp=&Apache::edit::insertlist($token,$target); |
my $temp=&Apache::edit::insertlist($target,$token); |
$result.=$temp; |
$result.=$temp; |
return $result; |
return $result; |
} |
} |
Line 131 sub end_problem {
|
Line 129 sub end_problem {
|
} |
} |
if ($target eq 'meta') { |
if ($target eq 'meta') { |
if ($Apache::inputtags::part eq '0') { |
if ($Apache::inputtags::part eq '0') { |
|
|
$result=&Apache::response::mandatory_part_meta; |
$result=&Apache::response::mandatory_part_meta; |
} |
} |
} |
} |
Line 145 sub end_problem {
|
Line 142 sub end_problem {
|
sub start_block { |
sub start_block { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
|
|
my $code = @$parstack[$#$parstack]; |
if ($target eq 'web' || $target eq 'grade') { |
$code =~ s/\"//g; |
my $code = @$parstack[$#$parstack]; |
$code .=';return $condition;'; |
$code =~ s/\"//g; |
# print "<br />$code<br />"; |
$code .=';return $condition;'; |
my $result = &Apache::run::run($code,$safeeval); |
# print "<br />$code<br />"; |
&Apache::lonxml::debug("block :$code: returned :$result:"); |
my $result = &Apache::run::run($code,$safeeval); |
if ( ! $result ) { |
&Apache::lonxml::debug("block :$code: returned :$result:"); |
my $skip=&Apache::lonxml::get_all_text("/block",$$parser[$#$parser]); |
if ( ! $result ) { |
&Apache::lonxml::debug("skipping ahead :$skip: $$parser[$#$parser]"); |
my $skip=&Apache::lonxml::get_all_text("/block",$$parser[$#$parser]); |
|
&Apache::lonxml::debug("skipping ahead :$skip: $$parser[$#$parser]"); |
|
} |
} |
} |
return ""; |
return ""; |
} |
} |
|
|
sub end_block { |
sub end_block { |
|
return ''; |
} |
} |
|
|
sub start_while { |
sub start_while { |
Line 247 sub end_randomlist {
|
Line 247 sub end_randomlist {
|
|
|
sub start_part { |
sub start_part { |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my ($target,$token,$parstack,$parser,$safeeval)=@_; |
my $args =''; |
my $id= &Apache::lonxml::get_param('id',$parstack,$safeeval); |
if ( $#$parstack > -1 ) { $args=$$parstack[$#$parstack]; } |
|
my $id = &Apache::run::run("{$args;".'return $id}',$safeeval); |
|
$Apache::inputtags::part=$id; |
$Apache::inputtags::part=$id; |
@Apache::inputtags::responselist = (); |
@Apache::inputtags::responselist = (); |
if ($target eq 'meta') { |
if ($target eq 'meta') { |