[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Thu, 23 Mar 2006 23:47:15 -0000
albertel Thu Mar 23 18:47:15 2006 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
- enabling wider support for webgrade
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.323 loncom/xml/londefdef.pm:1.324
--- loncom/xml/londefdef.pm:1.323 Thu Mar 23 17:34:53 2006
+++ loncom/xml/londefdef.pm Thu Mar 23 18:47:12 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.323 2006/03/23 22:34:53 foxr Exp $
+# $Id: londefdef.pm,v 1.324 2006/03/23 23:47:12 albertel Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -211,7 +211,7 @@
sub end_html {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = '</html>';
}
return $currentstring;
@@ -221,7 +221,7 @@
sub start_head {
my ($target,$token) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = $token->[4].&Apache::lonxml::fontsettings();
}
return $currentstring;
@@ -230,7 +230,8 @@
sub end_head {
my ($target,$token) = @_;
my $currentstring = '';
- if ($target eq 'web' && $env{'request.state'} eq 'published') {
+ if (($target eq 'web' && $env{'request.state'} eq 'published') ||
+ ($target eq 'webgrade' && $env{'request.state'} eq 'published')) {
$currentstring = &Apache::lonmenu::registerurl(undef,$target).
$token->[2];
}
@@ -366,7 +367,7 @@
sub start_title {
my ($target,$token) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = $token->[4];
} elsif ($target eq 'tex') {
$currentstring .= '\keephidden{Title of the document: '
@@ -381,7 +382,7 @@
sub end_title {
my ($target,$token) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
$currentstring = $token->[2];
} elsif ($target eq 'tex') {
$currentstring .= '}';
@@ -512,7 +513,7 @@
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
if ($Apache::lonhomework::parsing_a_problem) {
&Apache::lonxml::warning("<body> tag found inside of <problem> tag this can cause problems.");
return '';
@@ -596,7 +597,7 @@
sub end_body {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = &end_p(); # Close off unclosed <p>
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
$currentstring .= &Apache::lonxml::xmlend($target,$parser);
} elsif ($target eq 'tex') {
$currentstring .= '\strut\newline\noindent\makebox[\textwidth/$number_of_columns][b]{\hrulefill}\newline\noindent \end{document}';
@@ -3702,7 +3703,7 @@
sub start_link {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $currentstring = '';
- if ($target eq 'web') {
+ if ($target eq 'web' || $target eq 'webgrade') {
my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval,
undef,1);
&Apache::lonxml::extlink($href);