[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /interface lonhtmlcommon.pm /xml londefdef.pm lontexconvert.pm lonxml.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 12 Oct 2004 22:55:23 -0000
This is a MIME encoded message
--albertel1097621723
Content-Type: text/plain
albertel Tue Oct 12 18:55:23 2004 EDT
Modified files:
/loncom/interface lonhtmlcommon.pm
/loncom/xml londefdef.pm lontexconvert.pm lonxml.pm
/loncom/homework structuretags.pm
Log:
- xhtmlizing cleanup
--albertel1097621723
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20041012185523.txt"
Index: loncom/interface/lonhtmlcommon.pm
diff -u loncom/interface/lonhtmlcommon.pm:1.91 loncom/interface/lonhtmlcommon.pm:1.92
--- loncom/interface/lonhtmlcommon.pm:1.91 Tue Oct 5 16:35:02 2004
+++ loncom/interface/lonhtmlcommon.pm Tue Oct 12 18:55:21 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.91 2004/10/05 20:35:02 albertel Exp $
+# $Id: lonhtmlcommon.pm,v 1.92 2004/10/12 22:55:21 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -904,7 +904,7 @@
my $nothing = &javascript_nothing();
return (<<ENDCHECK);
<script type="text/javascript">
-// BEGIN LON-CAPA Internal
+//<!-- BEGIN LON-CAPA Internal
var checkwin;
function spellcheckerwindow() {
@@ -912,7 +912,7 @@
checkwin.document.writeln('<html><body bgcolor="#DDDDDD"><form name="spellcheckform" action="/adm/spellcheck" method="post"><input type="hidden" name="text" value="" /></form></body></html>');
checkwin.document.close();
}
-// END LON-CAPA Internal
+// END LON-CAPA Internal -->
</script>
ENDCHECK
}
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.241 loncom/xml/londefdef.pm:1.242
--- loncom/xml/londefdef.pm:1.241 Wed Sep 15 02:31:57 2004
+++ loncom/xml/londefdef.pm Tue Oct 12 18:55:22 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.241 2004/09/15 06:31:57 albertel Exp $
+# $Id: londefdef.pm,v 1.242 2004/10/12 22:55:22 albertel Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -151,8 +151,7 @@
my $options=$ENV{'course.'.$ENV{'request.course.id'}.'.tthoptions'};
&Apache::lontexconvert::init_tth();
if ($target eq 'web' || $target eq 'edit') {
- $currentstring = &Apache::lonxml::xmlbegin().
- &Apache::lonxml::fontsettings();
+ $currentstring = &Apache::lonxml::xmlbegin();
} elsif ($target eq 'tex') {
@Apache::londefdef::table = ();
$currentstring .= '\documentclass[letterpaper]{book}';
@@ -190,7 +189,7 @@
my ($target,$token) = @_;
my $currentstring = '';
if ($target eq 'web') {
- $currentstring = $token->[4];
+ $currentstring = $token->[4].&Apache::lonxml::fontsettings();
}
return $currentstring;
}
Index: loncom/xml/lontexconvert.pm
diff -u loncom/xml/lontexconvert.pm:1.39 loncom/xml/lontexconvert.pm:1.40
--- loncom/xml/lontexconvert.pm:1.39 Tue Jul 27 10:17:39 2004
+++ loncom/xml/lontexconvert.pm Tue Oct 12 18:55:22 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.39 2004/07/27 14:17:39 raeburn Exp $
+# $Id: lontexconvert.pm,v 1.40 2004/10/12 22:55:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -76,8 +76,8 @@
my $time=time;
&init_tth();
return &Apache::lonxml::xmlbegin().
- &Apache::lonxml::fontsettings().
"\n<head>\n".
+ &Apache::lonxml::fontsettings().
&Apache::lonmenu::registerurl(undef,'tex').
"\n</head>\n";
}
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.343 loncom/xml/lonxml.pm:1.344
--- loncom/xml/lonxml.pm:1.343 Tue Oct 12 18:25:40 2004
+++ loncom/xml/lonxml.pm Tue Oct 12 18:55:22 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.343 2004/10/12 22:25:40 albertel Exp $
+# $Id: lonxml.pm,v 1.344 2004/10/12 22:55:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -159,7 +159,8 @@
.'<html xmlns:math="http://www.w3.org/1998/Math/MathML" '
.'xmlns="http://www.w3.org/TR/REC-html40">';
} else {
- $output='<html>';
+ $output='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>';
}
return $output;
}
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.269 loncom/homework/structuretags.pm:1.270
--- loncom/homework/structuretags.pm:1.269 Mon Sep 20 11:57:11 2004
+++ loncom/homework/structuretags.pm Tue Oct 12 18:55:22 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.269 2004/09/20 15:57:11 sakharuk Exp $
+# $Id: structuretags.pm,v 1.270 2004/10/12 22:55:22 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -84,12 +84,13 @@
$parstack,$parser,$safeeval);
$head_tag_start='<head>'.&Apache::lonmenu::registerurl(undef,$target).
&Apache::lonhtmlcommon::htmlareaheaders().
- &Apache::lonhtmlcommon::spellheader();
+ &Apache::lonhtmlcommon::spellheader().
+ &Apache::lonxml::fontsettings();
}
my $body_tag_start;
if (!defined($found{'body'})) {
- $body_tag_start='<body onLoad="'.&Apache::lonmenu::loadevents().'" '.
- 'onUnload="'.&Apache::lonmenu::unloadevents().'" ';
+ $body_tag_start='<body onload="'.&Apache::lonmenu::loadevents().'" '.
+ 'onunload="'.&Apache::lonmenu::unloadevents().'" ';
my $background=&Apache::lonxml::get_param('background',$parstack,
$safeeval);
if ($ENV{'browser.imagesuppress'} eq 'on') { $background=''; }
@@ -123,7 +124,7 @@
}
my $form_tag_start;
if (!defined($found{'form'})) {
- $form_tag_start='<form name="lonhomework" method="POST" action="'.
+ $form_tag_start='<form name="lonhomework" method="post" action="'.
$ENV{'request.uri'}.'">';
}
return ($result,$head_tag_start,$body_tag_start,$form_tag_start);
@@ -230,9 +231,9 @@
<input type="submit" name="newrandomization" accesskey="a" value="'.&mt('New Randomization').'" />
<input type="submit" name="resetdata" accesskey="r" value="'.&mt('Reset Submissions').'" />
<nobr><input type="submit" name="changerandseed" value="'.&mt('Change Random Seed To:').'" />
- <input type="text" name="rndseed" width="10" value="'.
+ <input type="text" name="rndseed" size="10" value="'.
$rndseed.'"
- onChange="javascript:document.lonhomework.changerandseed.click()" /></nobr>
+ onchange="javascript:document.lonhomework.changerandseed.click()" /></nobr>
<input type="checkbox" name="showallfoils" ';
if (defined($ENV{'form.showallfoils'})) { $result.='checked="on"'; }
$result.= ' />'.&mt(' Show All Foils').
@@ -242,7 +243,7 @@
<nobr>
Problem Status:
<select name='problemstate'>
- <option name=''></option>
+ <option value=''></option>
".&option('CLOSED' ,'problemstate').&mt("Closed")."</option>
".&option('CAN_ANSWER' ,'problemstate').&mt("Answerable")."</option>
".&option('CANNOT_ANSWER_tries' ,'problemstate').&mt("Open with full tries")."</option>
@@ -253,7 +254,7 @@
<nobr>
Problem Type:
<select name='problemtype'>
- <option name=''></option>
+ <option value=''></option>
".&option('exam' ,'problemtype').&mt("Exam Problem")."</option>
".&option('problem','problemtype').&mt("Homework problem")."</option>
".&option('survey' ,'problemtype').&mt("Survey Question")."</option>
@@ -335,7 +336,7 @@
<font color="red">
<p>$lt{'warning'}</p>
</font>
-<form name="checkout" method="POST" action="$ENV{'request.uri'}">
+<form name="checkout" method="post" action="$ENV{'request.uri'}">
<input type="hidden" name="doescheckout" value="yes" />
<input type="button" name="checkoutbutton" value="$lt{'checkout'}" onClick="javascript:if (confirm('$lt{'checkout?'}')) { document.checkout.submit(); }" />
</form>
@@ -349,7 +350,7 @@
&Apache::lonxml::debug("map is $map title is $foldertitle");
return (<<ENDCHECKOUT);
<h2>The resources in "$foldertitle" are open for a limited time. Once you click the 'Show Resource' button below you have $time to complete all resources "$foldertitle".</h2>
-<form name="markaccess" method="POST" action="$ENV{'request.uri'}">
+<form name="markaccess" method="post" action="$ENV{'request.uri'}">
<input type="hidden" name="markaccess" value="yes" />
<input type="button" name="accessbutton" value="Show Resource" onClick="javascript:if (confirm('Start Timer?')) { document.markaccess.submit(); }" />
</form>
@@ -952,13 +953,13 @@
while ($return) {
if (time-$starttime >
$Apache::lonnet::perlvar{'lonScriptTimeout'}) {
- $return = 0; $error=1; next;
+ #$return = 0; $error=1; next;
}
$result.=&Apache::scripttag::xmlparse($bodytext);
$return = &Apache::run::run($code,$safeeval);
}
if ($error) {
- &Apache::lonxml::error('<pre>'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occured while running <while$gt; on line').' '.$line.'</pre>');
+ &Apache::lonxml::error('<pre>'.&mt('Code ran too long. It ran for more than').' '.$Apache::lonnet::perlvar{'lonScriptTimeout'}.' '.&mt('seconds occured while running <while> on line').' '.$line.'</pre>');
}
} elsif ($target eq "edit") {
$result.= &Apache::edit::tag_end($target,$token,'');
--albertel1097621723--