version 1.136, 2002/11/12 05:05:27
|
version 1.138, 2002/11/22 19:46:36
|
Line 118 sub page_start {
|
Line 118 sub page_start {
|
return ($result,$head_tag_start,$body_tag_start,$form_tag_start); |
return ($result,$head_tag_start,$body_tag_start,$form_tag_start); |
} |
} |
|
|
|
use Time::HiRes(); |
sub get_resource_name { |
sub get_resource_name { |
my ($parstack,$safeeval)=@_; |
my ($parstack,$safeeval)=@_; |
my $name=&Apache::lonxml::get_param('name',$parstack,$safeeval); |
my $name=&Apache::lonnet::gettitle(); |
if ($name eq '') { |
&Apache::lonnet::logthis("Got $name"); |
|
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 502 sub start_block {
|
Line 504 sub start_block {
|
if ($code) { |
if ($code) { |
$code =~ s/\"//g; |
$code =~ s/\"//g; |
$code .=';return $condition;'; |
$code .=';return $condition;'; |
|
if (!$Apache::lonxml::default_homework_loaded) { |
|
&Apache::lonxml::default_homework_load($safeeval); |
|
} |
$result = &Apache::run::run($code,$safeeval); |
$result = &Apache::run::run($code,$safeeval); |
&Apache::lonxml::debug("block :$code: returned :$result:"); |
&Apache::lonxml::debug("block :$code: returned :$result:"); |
} else { |
} else { |
Line 537 sub start_while {
|
Line 542 sub start_while {
|
$code .=';return $condition;'; |
$code .=';return $condition;'; |
|
|
push( @Apache::structuretags::whileconds, $code); |
push( @Apache::structuretags::whileconds, $code); |
|
if (!$Apache::lonxml::default_homework_loaded) { |
|
&Apache::lonxml::default_homework_load($safeeval); |
|
} |
my $result = &Apache::run::run($code,$safeeval); |
my $result = &Apache::run::run($code,$safeeval); |
my $bodytext=$$parser[$#$parser]->get_text("/while"); |
my $bodytext=$$parser[$#$parser]->get_text("/while"); |
push( @Apache::structuretags::whilebody, $bodytext); |
push( @Apache::structuretags::whilebody, $bodytext); |