Index: lams_central/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -rc6e5fbc6e7fa15bb24d39aa2cff436e5706cd214 -r56c565f6b6e596ec0de434127769de8986a090be --- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision c6e5fbc6e7fa15bb24d39aa2cff436e5706cd214) +++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 56c565f6b6e596ec0de434127769de8986a090be) @@ -312,4 +312,7 @@ label.planner.editor=Editor msg.planner.preview=Open the template in lesson preview. msg.planner.template.open=Open the template for editing. + +label.planner.export.sequence=Export sequence +error.planner.export.template=There was an error while exporting the template. #======= End labels: Exported 222 labels for en AU ===== Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u -rc6e5fbc6e7fa15bb24d39aa2cff436e5706cd214 -r56c565f6b6e596ec0de434127769de8986a090be --- lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision c6e5fbc6e7fa15bb24d39aa2cff436e5706cd214) +++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 56c565f6b6e596ec0de434127769de8986a090be) @@ -311,4 +311,7 @@ label.planner.editor=Editor msg.planner.preview=Open the template in lesson preview. msg.planner.template.open=Open the template for editing. + +label.planner.export.sequence=Export sequence +error.planner.export.template=There was an error while exporting the template. #======= End labels: Exported 222 labels for en AU ===== Index: lams_central/src/java/org/lamsfoundation/lams/authoring/web/ExportToolContentAction.java =================================================================== diff -u -r70a60f2862830ca6bd07e2b1252af3d79e4939af -r56c565f6b6e596ec0de434127769de8986a090be --- lams_central/src/java/org/lamsfoundation/lams/authoring/web/ExportToolContentAction.java (.../ExportToolContentAction.java) (revision 70a60f2862830ca6bd07e2b1252af3d79e4939af) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/web/ExportToolContentAction.java (.../ExportToolContentAction.java) (revision 56c565f6b6e596ec0de434127769de8986a090be) @@ -45,6 +45,7 @@ import org.apache.struts.action.ActionMapping; import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.util.CentralConstants; import org.lamsfoundation.lams.util.FileUtil; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsAction; @@ -56,8 +57,7 @@ * * @struts.action path = "/authoring/exportToolContent" validate = "false" * @struts.action-forward name = "choice" path = "/toolcontent/exportchoice.jsp" - * @struts.action-forward name = "loading" path = - * "/toolcontent/exportloading.jsp" + * @struts.action-forward name = "loading" path = "/toolcontent/exportloading.jsp" * @struts.action-forward name = "result" path = "/toolcontent/exportresult.jsp" * * Export tool content action. It needs learingDesignID as input parameter. @@ -67,7 +67,6 @@ public class ExportToolContentAction extends LamsAction { private static final long serialVersionUID = 1L; - public static final String EXPORT_TOOLCONTENT_SERVICE_BEAN_NAME = "exportToolContentService"; public static final String PARAM_LEARING_DESIGN_ID = "learningDesignID"; public static final String ATTR_TOOLS_ERROR_MESSAGE = "toolsErrorMessages"; public static final String ATTR_LD_ERROR_MESSAGE = "ldErrorMessages"; @@ -81,35 +80,36 @@ public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String param = request.getParameter("method"); - //-----------------------Resource Author function --------------------------- + // -----------------------Resource Author function --------------------------- if (StringUtils.equals(param, "loading")) { - Long learningDesignId = WebUtil.readLongParam(request, PARAM_LEARING_DESIGN_ID); - request.setAttribute(PARAM_LEARING_DESIGN_ID, learningDesignId); - int format = WebUtil.readIntParam(request, PARAM_EXPORT_FORMAT); - request.setAttribute(PARAM_EXPORT_FORMAT, format); - //display initial page for automatically loading download pgm + Long learningDesignId = WebUtil.readLongParam(request, ExportToolContentAction.PARAM_LEARING_DESIGN_ID); + request.setAttribute(ExportToolContentAction.PARAM_LEARING_DESIGN_ID, learningDesignId); + int format = WebUtil.readIntParam(request, ExportToolContentAction.PARAM_EXPORT_FORMAT); + request.setAttribute(ExportToolContentAction.PARAM_EXPORT_FORMAT, format); + // display initial page for automatically loading download pgm return mapping.findForward("loading"); } else if (StringUtils.equals(param, "export")) { - //the export LD pgm + // the export LD pgm return exportLD(mapping, request, response); - } else { //choice format - Long learningDesignId = WebUtil.readLongParam(request, PARAM_LEARING_DESIGN_ID); - request.setAttribute(PARAM_LEARING_DESIGN_ID, learningDesignId); - //display choose IMS or LAMS format page + } else { // choice format + Long learningDesignId = WebUtil.readLongParam(request, ExportToolContentAction.PARAM_LEARING_DESIGN_ID); + request.setAttribute(ExportToolContentAction.PARAM_LEARING_DESIGN_ID, learningDesignId); + // display choose IMS or LAMS format page return mapping.findForward("choice"); } } private ActionForward exportLD(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) { - Long learningDesignId = WebUtil.readLongParam(request, PARAM_LEARING_DESIGN_ID); - int format = WebUtil.readIntParam(request, PARAM_EXPORT_FORMAT); + Long learningDesignId = WebUtil.readLongParam(request, ExportToolContentAction.PARAM_LEARING_DESIGN_ID); + int format = WebUtil.readIntParam(request, ExportToolContentAction.PARAM_EXPORT_FORMAT); IExportToolContentService service = getExportService(); List ldErrorMsgs = new ArrayList(); List toolsErrorMsgs = new ArrayList(); try { - File xslt = new File(this.getServlet().getServletContext().getRealPath(IMS_XSLT_PATH) + File.separator - + IMS_XSLT_NAME); + File xslt = new File(this.getServlet().getServletContext().getRealPath( + ExportToolContentAction.IMS_XSLT_PATH) + + File.separator + ExportToolContentAction.IMS_XSLT_NAME); String zipFilename = service.exportLearningDesign(learningDesignId, toolsErrorMsgs, format, xslt); // get only filename @@ -119,14 +119,14 @@ zipfile = zipfile.replaceAll(" ", "_"); - //write zip file as response stream. + // write zip file as response stream. // Different browsers handle stream downloads differently LDEV-1243 String filename = FileUtil.encodeFilenameForDownload(request, zipfile); log.debug("Final filename to export: " + filename); response.setContentType("application/x-download"); - // response.setContentType("application/zip"); + // response.setContentType("application/zip"); response.setHeader("Content-Disposition", "attachment;filename=" + filename); InputStream in = null; OutputStream out = null; @@ -148,10 +148,12 @@ throw new ExportToolContentException(e); } finally { try { - if (in != null) + if (in != null) { in.close(); // very important - if (out != null) + } + if (out != null) { out.close(); + } } catch (Exception e) { log.error("Error Closing file. File already written out - no exception being thrown.", e); } @@ -161,10 +163,10 @@ } catch (Exception e1) { log.error("Unable to export tool content: " + e1.toString()); ldErrorMsgs.add(0, e1.getClass().getName()); - request.setAttribute(ATTR_LD_ERROR_MESSAGE, ldErrorMsgs); - request.setAttribute(ATTR_TOOLS_ERROR_MESSAGE, toolsErrorMsgs); + request.setAttribute(ExportToolContentAction.ATTR_LD_ERROR_MESSAGE, ldErrorMsgs); + request.setAttribute(ExportToolContentAction.ATTR_TOOLS_ERROR_MESSAGE, toolsErrorMsgs); } - //display initial page for upload + // display initial page for upload return mapping.findForward("result"); } @@ -177,15 +179,16 @@ * @return */ private ActionForward exportLDToLC(ActionMapping mapping, HttpServletRequest request, HttpServletResponse response) { - Long learningDesignId = WebUtil.readLongParam(request, PARAM_LEARING_DESIGN_ID); - int format = WebUtil.readIntParam(request, PARAM_EXPORT_FORMAT); + Long learningDesignId = WebUtil.readLongParam(request, ExportToolContentAction.PARAM_LEARING_DESIGN_ID); + int format = WebUtil.readIntParam(request, ExportToolContentAction.PARAM_EXPORT_FORMAT); IExportToolContentService service = getExportService(); List ldErrorMsgs = new ArrayList(); List toolsErrorMsgs = new ArrayList(); try { - File xslt = new File(this.getServlet().getServletContext().getRealPath(IMS_XSLT_PATH) + File.separator - + IMS_XSLT_NAME); + File xslt = new File(this.getServlet().getServletContext().getRealPath( + ExportToolContentAction.IMS_XSLT_PATH) + + File.separator + ExportToolContentAction.IMS_XSLT_NAME); String zipFilename = service.exportLearningDesign(learningDesignId, toolsErrorMsgs, format, xslt); // get only filename @@ -200,38 +203,37 @@ HashMap authParams = LamsCommunityUtil.getAuthParams(); InputStream is = WebUtil.performMultipartFilePost(uploadFile, LamsCommunityUtil.LAMS_COMMUNITY_EXPORT_URL, zipFilename, authParams); - + BufferedReader isReader = new BufferedReader(new InputStreamReader(is)); String responseStr = isReader.readLine(); - - if (responseStr != null && responseStr.trim().equals("success")){ + + if (responseStr != null && responseStr.trim().equals("success")) { // successful export to lams community // Get the ldID and forward user to the lamscommunity form - } - else if(responseStr!=null){ + } else if (responseStr != null) { // get the failure type and add it to the errors - }else { + } else { // general failure } } - + return null; } catch (Exception e1) { log.error("Unable to export tool content: " + e1.toString()); ldErrorMsgs.add(0, e1.getClass().getName()); - request.setAttribute(ATTR_LD_ERROR_MESSAGE, ldErrorMsgs); - request.setAttribute(ATTR_TOOLS_ERROR_MESSAGE, toolsErrorMsgs); + request.setAttribute(ExportToolContentAction.ATTR_LD_ERROR_MESSAGE, ldErrorMsgs); + request.setAttribute(ExportToolContentAction.ATTR_TOOLS_ERROR_MESSAGE, toolsErrorMsgs); } - //display initial page for upload + // display initial page for upload return mapping.findForward("result"); } - //*************************************************************************************** + // *************************************************************************************** // Private method - //*************************************************************************************** + // *************************************************************************************** private IExportToolContentService getExportService() { WebApplicationContext webContext = WebApplicationContextUtils.getRequiredWebApplicationContext(this .getServlet().getServletContext()); - return (IExportToolContentService) webContext.getBean(EXPORT_TOOLCONTENT_SERVICE_BEAN_NAME); + return (IExportToolContentService) webContext.getBean(CentralConstants.EXPORT_TOOLCONTENT_SERVICE_BEAN_NAME); } } Index: lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java =================================================================== diff -u -r27d7f43ac317e84d604d3442dc896b80adf4a16b -r56c565f6b6e596ec0de434127769de8986a090be --- lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java (.../CentralConstants.java) (revision 27d7f43ac317e84d604d3442dc896b80adf4a16b) +++ lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java (.../CentralConstants.java) (revision 56c565f6b6e596ec0de434127769de8986a090be) @@ -141,8 +141,6 @@ public static final String RESOURCE_KEY_BRANCH_EMPTY = "label.planner.branch.empty"; - public static final String FORWARD_GROUPING = "grouping"; - public static final int PLANNER_MAX_BRANCHES = 4; public static final int PLANNER_MAX_OPTIONS = 4; Index: lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java =================================================================== diff -u -r2d2ba38d19643bb43a4e298f450ed0fd57f60df2 -r56c565f6b6e596ec0de434127769de8986a090be --- lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java (.../PedagogicalPlannerAction.java) (revision 2d2ba38d19643bb43a4e298f450ed0fd57f60df2) +++ lams_central/src/java/org/lamsfoundation/lams/web/planner/PedagogicalPlannerAction.java (.../PedagogicalPlannerAction.java) (revision 56c565f6b6e596ec0de434127769de8986a090be) @@ -87,6 +87,7 @@ import org.lamsfoundation.lams.learningdesign.SequenceActivity; import org.lamsfoundation.lams.learningdesign.ToolActivity; import org.lamsfoundation.lams.learningdesign.Transition; +import org.lamsfoundation.lams.learningdesign.dao.hibernate.ActivityDAO; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; import org.lamsfoundation.lams.lesson.Lesson; @@ -142,6 +143,7 @@ private static final String FORWARD_TEMPLATE = "template"; private static final String FORWARD_PREVIEW = "preview"; private static final String FORWARD_SEQUENCE_CHOOSER = "sequenceChooser"; + public static final String FORWARD_GROUPING = "grouping"; // Several chars and strings used for building HTML requests private static final String CHAR_QUESTION_MARK = "?"; @@ -156,8 +158,10 @@ private static IMonitoringService monitoringService; private static MessageService messageService; private static PedagogicalPlannerDAO pedagogicalPlannerDAO; + private static ActivityDAO activityDAO; private static ToolContentHandler contentHandler; private static final String PEDAGOGICAL_PLANNER_DAO_BEAN_NAME = "pedagogicalPlannerDAO"; + private static final String ACTIVITY_DAO_BEAN_NAME = "activityDAO"; // Keys of error messages used in this class. They are ment to be displayed for user. private static final String ERROR_KEY_TOOL_ERRORS = "error.planner.tools."; @@ -171,6 +175,7 @@ private static final String ERROR_KEY_EXPORT = "error.planner.export"; private static final String ERROR_KEY_IMPORT = "error.planner.import"; private static final String ERROR_KEY_FILTER_PARSE = "error.planner.filter.parse"; + private static final String ERROR_KEY_EXPORT_TEMPLATE = "error.planner.export.template"; // Error messages used in this class. They are ment to be thrown. private static final String ERROR_USER_NOT_FOUND = "User not found."; @@ -249,15 +254,7 @@ /*----------------------- TEMPLATE CHOOSER METHODS --------------------*/ /** - * The main method for opening and parsing template (chosen learning desing). - * - * @param mapping - * @param form - * @param request - * @param fileUuid - * @param fileName - * @return - * @throws ServletException + * Opens template from sequence chooser. */ public ActionForward openTemplate(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { @@ -268,12 +265,29 @@ // Open the learning design stored in the repository. LearningDesign learningDesign = importLearningDesign(node.getFileUuid(), node.getFileName(), errors); + if (errors.isEmpty()) { + errors = openTemplate(request, learningDesign); + } if (!errors.isEmpty()) { saveErrors(request, errors); // If anything goes wrong, errors will be displayed at top. This approach is used widely in this action. return openSequenceNode(mapping, form, request, nodeUid); } + return mapping.findForward(PedagogicalPlannerAction.FORWARD_TEMPLATE); + } + /** + * The main method for opening and parsing template (chosen learning desing). + * + * @param request + * @param learningDesign + * @return + * @throws ServletException + */ + public ActionMessages openTemplate(HttpServletRequest request, LearningDesign learningDesign) + throws ServletException { + ActionMessages errors = new ActionMessages(); + List activities = new ArrayList(); // Create DTOs that hold all the necessary information of the activities @@ -283,19 +297,18 @@ while (activity != null) { // Iterate through all the activities, detecting type of each one addActivityToPlanner(learningDesign, activities, activity); - Transition transitionTo = activity.getTransitionTo(); - if (transitionTo == null) { + Transition transitionFrom = activity.getTransitionFrom(); + if (transitionFrom == null) { activity = null; } else { - activity = transitionTo.getToActivity(); + activity = transitionFrom.getToActivity(); } } } catch (ServletException e) { PedagogicalPlannerAction.log.error(e, e); errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( PedagogicalPlannerAction.ERROR_KEY_LEARNING_DESIGN_COULD_NOT_BE_RETRIEVED)); - saveErrors(request, errors); - return openSequenceNode(mapping, form, request, nodeUid); + return errors; } // Recalculate how many activities actually support the planner @@ -318,7 +331,7 @@ planner.setActivitiesPerPortion(2); request.setAttribute(CentralConstants.ATTR_PLANNER, planner); - return mapping.findForward(PedagogicalPlannerAction.FORWARD_TEMPLATE); + return errors; } /** @@ -343,6 +356,10 @@ && (activity.getParentActivity().isBranchingActivity() || activity.isOptionsActivity()); PedagogicalPlannerActivityDTO addedDTO = null; + + // Load the real object, otherwise we get an error when casting to concrete Activity classes + activity = getActivityDAO().getActivityByActivityId(activity.getActivityId()); + // Simple tool activity if (activity.isToolActivity()) { ToolActivity toolActivity = (ToolActivity) activity; @@ -937,31 +954,7 @@ saveErrors(request, errors); return openSequenceNode(mapping, form, request, nodeUid); } - InputStream in = null; - ServletOutputStream out = null; - try { - in = new BufferedInputStream(new FileInputStream(zipFilePath)); - out = response.getOutputStream(); - int count = 0; - - int ch; - while ((ch = in.read()) != -1) { - out.write((char) ch); - count++; - } - PedagogicalPlannerAction.log.debug("Wrote out " + count + " bytes"); - response.setContentLength(count); - out.flush(); - } finally { - /* - * If anything goes wrong, we can not display it nicely for the user. Once response.getOutputStream() was - * called to write the file data, we can not forward to a JSP page anymore. Maybe there is a way to avoid - * it, but currently we are simply throwing an error. So no "catch" clause. - */ - if (in != null) { - in.close(); // very important - } - } + writeOutFile(response, zipFilePath); return null; } @@ -1376,7 +1369,7 @@ Long groupingId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); Grouping grouping = getAuthoringService().getGroupingById(groupingId); plannerForm.fillForm(grouping); - return mapping.findForward(CentralConstants.FORWARD_GROUPING); + return mapping.findForward(PedagogicalPlannerAction.FORWARD_GROUPING); } /** @@ -1423,7 +1416,7 @@ } else { saveMessages(request, errors); } - return mapping.findForward(CentralConstants.FORWARD_GROUPING); + return mapping.findForward(PedagogicalPlannerAction.FORWARD_GROUPING); } /*-------------------------- TEMPLATE BASE METHODS -----------------*/ @@ -1459,8 +1452,62 @@ return null; } - /*------------------------ SERVICE ACCESS METHODS --------------------*/ + public ActionForward exportTemplate(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + Long learningDesignId = WebUtil.readLongParam(request, CentralConstants.PARAM_LEARNING_DESIGN_ID); + List toolsErrorMsgs = new ArrayList(); + ActionMessages errors = new ActionMessages(); + String zipFilePath = null; + boolean valid = false; + try { + zipFilePath = getExportService().exportLearningDesign(learningDesignId, toolsErrorMsgs, 1, null); + if (toolsErrorMsgs.isEmpty()) { + + // get only filename + String zipfile = FileUtil.getFileName(zipFilePath); + + // replace spaces (" ") with underscores ("_") + + zipfile = zipfile.replaceAll(" ", "_"); + + // write zip file as response stream. + + // Different browsers handle stream downloads differently LDEV-1243 + String filename = FileUtil.encodeFilenameForDownload(request, zipfile); + PedagogicalPlannerAction.log.debug("Final filename to export: " + filename); + + response.setContentType(PedagogicalPlannerAction.RESPONSE_CONTENT_TYPE_DOWNLOAD); + // response.setContentType("application/zip"); + response.setHeader(PedagogicalPlannerAction.HEADER_CONTENT_DISPOSITION, "attachment;filename=" + + filename); + valid = true; + } + + } catch (Exception e) { + PedagogicalPlannerAction.log.error(e, e); + } + if (!valid) { + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( + PedagogicalPlannerAction.ERROR_KEY_EXPORT_TEMPLATE)); + saveErrors(request, errors); + for (String error : toolsErrorMsgs) { + PedagogicalPlannerAction.log.error(error); + } + LearningDesign learningDesign = getAuthoringService().getLearningDesign(learningDesignId); + errors = openTemplate(request, learningDesign); + if (!errors.isEmpty()) { + throw new ServletException(getMessageService().getMessage( + PedagogicalPlannerAction.ERROR_KEY_LEARNING_DESIGN_COULD_NOT_BE_RETRIEVED)); + } + return mapping.findForward(PedagogicalPlannerAction.FORWARD_TEMPLATE); + } + writeOutFile(response, zipFilePath); + return null; + } + + /*------------------------ COMMON METHODS --------------------*/ + private IExportToolContentService getExportService() { if (PedagogicalPlannerAction.exportService == null) { WebApplicationContext ctx = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() @@ -1521,6 +1568,16 @@ return PedagogicalPlannerAction.pedagogicalPlannerDAO; } + private ActivityDAO getActivityDAO() { + if (PedagogicalPlannerAction.activityDAO == null) { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() + .getServletContext()); + PedagogicalPlannerAction.activityDAO = (ActivityDAO) wac + .getBean(PedagogicalPlannerAction.ACTIVITY_DAO_BEAN_NAME); + } + return PedagogicalPlannerAction.activityDAO; + } + private ToolContentHandler getContentHandler() { if (PedagogicalPlannerAction.contentHandler == null) { WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() @@ -1530,4 +1587,32 @@ } return PedagogicalPlannerAction.contentHandler; } + + private void writeOutFile(HttpServletResponse response, String zipFilePath) throws IOException { + InputStream in = null; + ServletOutputStream out = null; + try { + in = new BufferedInputStream(new FileInputStream(zipFilePath)); + out = response.getOutputStream(); + int count = 0; + + int ch; + while ((ch = in.read()) != -1) { + out.write((char) ch); + count++; + } + PedagogicalPlannerAction.log.debug("Wrote out " + count + " bytes"); + response.setContentLength(count); + out.flush(); + } finally { + /* + * If anything goes wrong, we can not display it nicely for the user. Once response.getOutputStream() was + * called to write the file data, we can not forward to a JSP page anymore. Maybe there is a way to avoid + * it, but currently we are simply throwing an error. So no "catch" clause. + */ + if (in != null) { + in.close(); // very important + } + } + } } \ No newline at end of file Index: lams_central/web/includes/javascript/pedagogicalPlanner.js =================================================================== diff -u -r2d2ba38d19643bb43a4e298f450ed0fd57f60df2 -r56c565f6b6e596ec0de434127769de8986a090be --- lams_central/web/includes/javascript/pedagogicalPlanner.js (.../pedagogicalPlanner.js) (revision 2d2ba38d19643bb43a4e298f450ed0fd57f60df2) +++ lams_central/web/includes/javascript/pedagogicalPlanner.js (.../pedagogicalPlanner.js) (revision 56c565f6b6e596ec0de434127769de8986a090be) @@ -11,6 +11,7 @@ var ACTION_DO_NOTHING = 0; //After successful submit do nothing var ACTION_PREVIEW = 1; //After successful submit start preview var ACTION_OPEN_AUTHOR = 2; //After successful submit open full authoring + var ACTION_EXPORT = 3; //After successful submit export the learning design var END_HEAD_REGEX_PATTERN = new RegExp(' <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-function" prefix="fn" %> +<%@ taglib uri="tags-html" prefix="html" %> <fmt:message key="title.lams"/> :: <fmt:message key="planner.title" /> @@ -67,7 +68,9 @@ ); } } - + if (jQuery.trim($('#pedagogicalPlannerErrorArea').html())!=""){ + $('#pedagogicalPlannerErrorArea').show(); + } }); @@ -229,6 +232,9 @@ <%-- DIVs for messages from server, hidden by default --%> + +