Index: lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java =================================================================== diff -u -r871794cc9d282825ee6a99bbeb6ef65b191241e3 -rac7bf84996976633e737878c62b1d9b818a990d5 --- lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java (.../HomeAction.java) (revision 871794cc9d282825ee6a99bbeb6ef65b191241e3) +++ lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java (.../HomeAction.java) (revision ac7bf84996976633e737878c62b1d9b818a990d5) @@ -254,6 +254,62 @@ } /** + * request for old, Flash author environment + */ + public ActionForward authorFlash(ActionMapping mapping, ActionForm form, HttpServletRequest req, + HttpServletResponse res) throws IOException, ServletException { + try { + UserDTO user = getUser(); + if (user == null) { + HomeAction.log.error("admin: User missing from session. "); + return mapping.findForward("error"); + } + + Long learningDesignID = null; + String layout = null; + String serverUrl = Configuration.get(ConfigurationKeys.SERVER_URL); + req.setAttribute("serverUrl", serverUrl); + + String requestSrc = req.getParameter("requestSrc"); + String notifyCloseURL = req.getParameter(AttributeNames.PARAM_NOTIFY_CLOSE_URL); + String isPostMessageToParent = req.getParameter("isPostMessageToParent"); + String customCSV = req.getParameter(AttributeNames.PARAM_CUSTOM_CSV); + String extLmsId = req.getParameter(AttributeNames.PARAM_EXT_LMS_ID); + + if (req.getParameter("learningDesignID") != null) { + learningDesignID = WebUtil.readLongParam(req, "learningDesignID"); + } + + if (req.getParameter("layout") != null) { + layout = WebUtil.readStrParam(req, "layout"); + } + + if (layout != null) { + req.setAttribute("layout", layout); + } + + if (req.getParameter("learningDesignID") != null) { + learningDesignID = WebUtil.readLongParam(req, "learningDesignID"); + } + + if (learningDesignID != null) { + req.setAttribute("learningDesignID", learningDesignID); + } + + req.setAttribute("requestSrc", requestSrc); + req.setAttribute(AttributeNames.PARAM_NOTIFY_CLOSE_URL, notifyCloseURL); + req.setAttribute("isPostMessageToParent", isPostMessageToParent); + req.setAttribute(AttributeNames.PARAM_CUSTOM_CSV, customCSV); + req.setAttribute(AttributeNames.PARAM_EXT_LMS_ID, extLmsId); + + return mapping.findForward("author"); + } catch (Exception e) { + HomeAction.log.error("Failed to load author", e); + return mapping.findForward("error"); + } + } + + /** * Request for Monitor environment. */ public ActionForward monitorLesson(ActionMapping mapping, ActionForm form, HttpServletRequest req, Index: lams_central/web/includes/javascript/openUrls.js =================================================================== diff -u -rd6f06880f2e177ac136b3fb49ac168fbc1a1b59f -rac7bf84996976633e737878c62b1d9b818a990d5 --- lams_central/web/includes/javascript/openUrls.js (.../openUrls.js) (revision d6f06880f2e177ac136b3fb49ac168fbc1a1b59f) +++ lams_central/web/includes/javascript/openUrls.js (.../openUrls.js) (revision ac7bf84996976633e737878c62b1d9b818a990d5) @@ -52,13 +52,13 @@ function openAuthor() { if (isMac) { - authorWin = window.open('home.do?method=author','aWindow','width=' + authoring_width + ',height=' + authoring_height + ',resizable'); + authorWin = window.open('home.do?method=authorFlash','aWindow','width=' + authoring_width + ',height=' + authoring_height + ',resizable'); } else { if(authorWin && !authorWin.closed && authorWin.location.pathname.indexOf('home.do?method=author') > -1) { //authorWin.location = 'home.do?method=author'; authorWin.focus(); } else { - authorWin = window.open('home.do?method=author','aWindow','width=' + authoring_width + ',height=' + authoring_height + ',resizable'); + authorWin = window.open('home.do?method=authorFlash','aWindow','width=' + authoring_width + ',height=' + authoring_height + ',resizable'); authorWin.focus(); } } @@ -76,24 +76,7 @@ } } } - - function openAuthorForEditOnFly( learningDesignID ) { - if (isMac) { - monitorLessonWin = window.open('../home.do?method=author&layout=editonfly&learningDesignID='+learningDesignID,'mWindow','width=' + authoring_width + ',height=' + authoring_height + ',resizable'); - } else { - if(monitorLessonWin && !monitorLessonWin.closed) { - monitorLessonWin.location = '../home.do?method=author&layout=editonfly&learningDesignID='+learningDesignID; - } else { - monitorLessonWin = window.open('../home.do?method=author&layout=editonfly&learningDesignID='+learningDesignID,'mWindow', 'width=' + authoring_width + ',height=' + authoring_height + ',resizable'); - monitorLessonWin.focus(); - } - } - } - function openAuthorForEditOnFlyIntegrated( learningDesignID ) { - window.location = '../home.do?method=author&layout=editonfly&learningDesignID='+learningDesignID; - } - function returnToMonitorLessonIntegrated( lessonID ) { window.location = 'home.do?method=monitorLesson&lessonID='+lessonID; } Index: lams_central/web/includes/javascript/pedagogicalPlanner.js =================================================================== diff -u -ra6d112c21a657bd1bd06e6283b729b52ad943bba -rac7bf84996976633e737878c62b1d9b818a990d5 --- lams_central/web/includes/javascript/pedagogicalPlanner.js (.../pedagogicalPlanner.js) (revision a6d112c21a657bd1bd06e6283b729b52ad943bba) +++ lams_central/web/includes/javascript/pedagogicalPlanner.js (.../pedagogicalPlanner.js) (revision ac7bf84996976633e737878c62b1d9b818a990d5) @@ -181,7 +181,7 @@ startPreview(startPreviewUrl); } else if (actionAfterCompleted==ACTION_OPEN_AUTHOR){ - var openAuthorURL = "home.do?method=author&learningDesignID=" + learningDesignId; + var openAuthorURL = "home.do?method=authorFlash&learningDesignID=" + learningDesignId; if (requestSrc != "") { openAuthorURL += "&requestSrc=" + requestSrc; } Index: lams_monitoring/web/includes/javascript/monitorLesson.js =================================================================== diff -u -rd0c80618e72190497d888fb2d4cea0eea6339a80 -rac7bf84996976633e737878c62b1d9b818a990d5 --- lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision d0c80618e72190497d888fb2d4cea0eea6339a80) +++ lams_monitoring/web/includes/javascript/monitorLesson.js (.../monitorLesson.js) (revision ac7bf84996976633e737878c62b1d9b818a990d5) @@ -1452,7 +1452,7 @@ if (response) { alert(response); } else { - openPopUp(LAMS_URL + 'home.do?method=author&layout=editonfly&learningDesignID=' + ldId, + openPopUp(LAMS_URL + 'home.do?method=authorFlash&layout=editonfly&learningDesignID=' + ldId, 'LiveEdit', 600, 800, false); closeMonitorLessonDialog(); }