Index: lams_build/lib/lams/lams.jar
===================================================================
diff -u -rf90c5a15f6b670a53486046e56d07380c1ec2016 -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
Binary files differ
Index: lams_central/src/java/org/lamsfoundation/lams/web/tag/HtmlTag.java
===================================================================
diff -u
--- lams_central/src/java/org/lamsfoundation/lams/web/tag/HtmlTag.java (revision 0)
+++ lams_central/src/java/org/lamsfoundation/lams/web/tag/HtmlTag.java (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -0,0 +1,172 @@
+/****************************************************************
+ * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+ * =============================================================
+ * License Information: http://lamsfoundation.org/licensing/lams/2.0/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2.0
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ *
+ * http://www.gnu.org/licenses/gpl.txt
+ * ****************************************************************
+ */
+
+/* $Id$ */
+package org.lamsfoundation.lams.web.tag;
+
+import java.io.IOException;
+import java.util.Locale;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.PageContext;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.apache.log4j.Logger;
+import org.apache.struts.Globals;
+import org.lamsfoundation.lams.web.filter.LocaleFilter;
+
+/**
+ * Replaces the tradition HTML tag with one that sets the appropriate page direction,
+ * based on the page_direction session attribute. It also sets the lang attribute.
+ *
+ * There is a single parameter xhtml, which is used to append the http://www.w3.org/1999/xhtml
+ * string and to set the flag to make Struts tags xhtml compliant.
+ *
+ * It has been done as a class rather than a .tag file as so that the body of the
+ * page can contain scriptlets. The code is based on the Struts HTML tag.
+ *
+ * @jsp.tag name="html"
+ * body-content="JSP"
+ * display-name="Render html tag with direction and language"
+ * description="Render html tag with direction and language"
+ */
+public class HtmlTag extends TagSupport {
+
+ private static final Logger log = Logger.getLogger(HtmlTag.class);
+
+ protected boolean xhtml = false;
+
+ /**
+ * @jsp.attribute required="false" rtexprvalue="true"
+ * description="Is this an xhtml file?"
+ */
+ public boolean getXhtml() {
+ return this.xhtml;
+ }
+
+ public void setXhtml(boolean xhtml) {
+ this.xhtml = xhtml;
+ }
+
+ /**
+ * Render the HTML tag
+ *
+ * @exception JspException if a JSP exception has occurred
+ */
+ public int doStartTag() throws JspException {
+
+ StringBuffer sb = new StringBuffer("");
+
+ writeString(sb.toString());
+
+ return EVAL_BODY_INCLUDE;
+
+ }
+
+ private void writeString(String output) {
+ try {
+ JspWriter writer = pageContext.getOut();
+ writer.println(output);
+ } catch ( IOException e ) {
+ log.error("HTML tag unable to write out HTML details due to IOException.", e);
+ // don't throw a JSPException as we want the system to still function, well, best
+ // the page can without the html tag!
+ }
+ }
+
+
+ /**
+ * Process the end of this tag.
+ *
+ * @exception JspException if a JSP exception has occurred
+ */
+ public int doEndTag() throws JspException {
+
+ writeString("");
+
+ // Evaluate the remainder of this page
+ return (EVAL_PAGE);
+
+ }
+
+ /**
+ * Release any acquired resources.
+ */
+ public void release() {
+ this.xhtml = false;
+ }
+
+}
Index: lams_central/web/WEB-INF/lams.tld
===================================================================
diff -u -r79c7faa88fbefa4426891dfad800110356887d3b -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/WEB-INF/lams.tld (.../lams.tld) (revision 79c7faa88fbefa4426891dfad800110356887d3b)
+++ lams_central/web/WEB-INF/lams.tld (.../lams.tld) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -24,6 +24,26 @@
+ Render html tag with direction and language
+ Render html tag with direction and language
+
+
+ html
+ org.lamsfoundation.lams.web.tag.HtmlTag
+ JSP
+
+
+ Render html tag with direction and language
+ xhtml
+ false
+
+ true
+
+
+
+
+
+
Output a random number for the learner and passon flash movies to communicate directly.
generate unique ID
@@ -306,8 +326,13 @@
ExportPortOutput
/WEB-INF/tags/ExportPortOutput.tag
-
+
Date
/WEB-INF/tags/Date.tag
+
+ DefineLater
+ /WEB-INF/tags/DefineLater.tag
+
+
Index: lams_central/web/addLesson.jsp
===================================================================
diff -u -rc3f536335bb5f49bfdbf9ce6ba18843ace92ad82 -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/addLesson.jsp (.../addLesson.jsp) (revision c3f536335bb5f49bfdbf9ce6ba18843ace92ad82)
+++ lams_central/web/addLesson.jsp (.../addLesson.jsp) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -3,7 +3,7 @@
<%@ taglib uri="tags-fmt" prefix="fmt" %>
<%@ taglib uri="tags-core" prefix="c" %>
-
+
&classID="/>
@@ -20,4 +20,4 @@
-
+
Index: lams_central/web/admin.jsp
===================================================================
diff -u -re86dbe041f3f00144c4bde4943e17145eca786e2 -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/admin.jsp (.../admin.jsp) (revision e86dbe041f3f00144c4bde4943e17145eca786e2)
+++ lams_central/web/admin.jsp (.../admin.jsp) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -2,7 +2,7 @@
<%@ taglib uri="tags-lams" prefix="lams" %>
<%@ taglib uri="tags-fmt" prefix="fmt" %>
-
+
@@ -26,5 +26,5 @@
-
+
Index: lams_central/web/author.jsp
===================================================================
diff -u -r756febcdf4a18e4608d64a39e778bb01b41067fe -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/author.jsp (.../author.jsp) (revision 756febcdf4a18e4608d64a39e778bb01b41067fe)
+++ lams_central/web/author.jsp (.../author.jsp) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -4,7 +4,7 @@
<%@ taglib uri="tags-core" prefix="c" %>
<%@ page import="org.lamsfoundation.lams.util.Configuration" import="org.lamsfoundation.lams.util.ConfigurationKeys" %>
<%@ page import="org.lamsfoundation.lams.themes.dto.CSSThemeBriefDTO" %>
-
+
<%
@@ -269,4 +269,4 @@
-
+
Index: lams_central/web/authoringConfirm.jsp
===================================================================
diff -u -r7a1f51f64555f4cd94274847196373c7f9f549f0 -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/authoringConfirm.jsp (.../authoringConfirm.jsp) (revision 7a1f51f64555f4cd94274847196373c7f9f549f0)
+++ lams_central/web/authoringConfirm.jsp (.../authoringConfirm.jsp) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -2,7 +2,7 @@
<%@ taglib uri="tags-fmt" prefix="fmt"%>
<%@ taglib uri="tags-lams" prefix="lams"%>
<%@ taglib uri="tags-html" prefix="html"%>
-
+
@@ -37,4 +37,4 @@
-
+
Index: lams_central/web/copyright.jsp
===================================================================
diff -u -r87c27a6762468b64caae883a0112a9d430c28e8a -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/copyright.jsp (.../copyright.jsp) (revision 87c27a6762468b64caae883a0112a9d430c28e8a)
+++ lams_central/web/copyright.jsp (.../copyright.jsp) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -5,7 +5,7 @@
<%@ taglib uri="tags-fmt" prefix="fmt" %>
-
+
@@ -30,5 +30,5 @@
-
+
Index: lams_central/web/error.jsp
===================================================================
diff -u -r88acb04987abd12bc87754fbbe1f835dcd99a5cc -r5e3a1e5f73e433076f00eb9b0a489c54430b5672
--- lams_central/web/error.jsp (.../error.jsp) (revision 88acb04987abd12bc87754fbbe1f835dcd99a5cc)
+++ lams_central/web/error.jsp (.../error.jsp) (revision 5e3a1e5f73e433076f00eb9b0a489c54430b5672)
@@ -1,6 +1,6 @@
-
+
<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="tags-lams" prefix="lams"%>
<%@ taglib uri="tags-core" prefix="c"%>
@@ -66,4 +66,4 @@
-