version 1.73, 2002/05/03 22:28:36
|
version 1.75, 2002/07/17 18:03:46
|
Line 43 BEGIN {
|
Line 43 BEGIN {
|
&Apache::lonxml::register('Apache::scripttag', |
&Apache::lonxml::register('Apache::scripttag', |
('script','scriptlib','parserlib','import', |
('script','scriptlib','parserlib','import', |
'window','display','storetc','physnet', |
'window','display','storetc','physnet', |
'standalone')); |
'standalone','comment')); |
} |
} |
|
|
sub start_script { |
sub start_script { |
Line 338 sub end_physnet {
|
Line 338 sub end_physnet {
|
|
|
sub start_standalone { |
sub start_standalone { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
if ($target eq 'web' && $ENV{'request.course.id'} ) { |
my $result=''; |
my $inside = &Apache::lonxml::get_all_text("/standalone",$$parser[-1]); |
if ($target eq 'web' ) { |
|
if ( $ENV{'request.course.id'} ) { |
|
my $inside = &Apache::lonxml::get_all_text("/standalone",$$parser[-1]); |
|
} else { |
|
$result='<table bgcolor="#E1E1E1" border="2"><tr><td>'; |
|
} |
} |
} |
return ''; |
return $result; |
} |
} |
|
|
sub end_standalone { |
sub end_standalone { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result=''; |
|
if ($target eq 'web' ) { |
|
if ( $ENV{'request.course.id'} ) { |
|
} else { |
|
$result='</td></tr></table>'; |
|
} |
|
} |
|
return $result; |
|
} |
|
|
|
sub start_comment { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
|
my $result=''; |
|
if ($target eq 'edit') { |
|
$result=&Apache::edit::tag_start($target,$token); |
|
my $bodytext=&Apache::lonxml::get_all_text("/comment",$$parser[$#$parser]); |
|
$result.=&Apache::edit::editfield($token->[1],$bodytext,'',40,4) |
|
} elsif ( $target eq 'modified') { |
|
$result=$token->[4].&Apache::edit::modifiedfield($token); |
|
} elsif ( $target eq 'web' || $target eq 'tex' || |
|
$target eq 'grade' || $target eq 'answer' || $target eq 'meta') { |
|
#normally throw away comments |
|
my $bodytext=&Apache::lonxml::get_all_text("/comment",$$parser[$#$parser]); |
|
} |
|
return $result; |
|
} |
|
|
|
sub end_comment { |
|
my ($target,$token,$tagstack,$parstack,$parser,$safeeval)=@_; |
|
if ($target eq 'edit' ) { return &Apache::edit::end_table(); } |
return ''; |
return ''; |
} |
} |
|
|