Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/dbupdates/patch20180810.sql =================================================================== diff -u --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/dbupdates/patch20180810.sql (revision 0) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/dbupdates/patch20180810.sql (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -0,0 +1,23 @@ +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; +SET FOREIGN_KEY_CHECKS=0; +----------------------Put all sql statements below here------------------------- + +-- LDEV-4440 Change tool access URLs after migration to Spring MVC +UPDATE lams_tool SET + author_url = 'tool/lawiki10/authoring/authoring.do', + learner_url = 'tool/lawiki10/learning/learning.do?mode=learner', + learner_preview_url = 'tool/lawiki10/learning/learning.do?mode=author', + learner_progress_url = 'tool/lawiki10/learning/learning.do?mode=teacher', + monitor_url = 'tool/lawiki10/monitoring/monitoring.do', + pedagogical_planner_url = 'tool/lawiki10/authoring/initPedagogicalPlannerForm.do' +WHERE tool_signature = 'lawiki10'; + +UPDATE lams_tool SET tool_version='20180810' WHERE tool_signature='lawiki10'; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/AuthoringController.java =================================================================== diff -u -rada9f9222f66994c94c2989aea922429377f06ed -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/AuthoringController.java (.../AuthoringController.java) (revision ada9f9222f66994c94c2989aea922429377f06ed) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/AuthoringController.java (.../AuthoringController.java) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -84,9 +84,10 @@ * */ @RequestMapping("/authoring") - public String unspecified(@ModelAttribute AuthoringForm authoringForm, HttpServletRequest request, - HttpServletResponse response) throws Exception { + public String unspecified(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) + throws Exception { + AuthoringForm authoringForm = new AuthoringForm(); // Extract toolContentID from parameters. Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); @@ -165,18 +166,20 @@ // add the sessionMap to HTTPSession. request.getSession().setAttribute(map.getSessionID(), map); request.setAttribute(WikiConstants.ATTR_SESSION_MAP, map); + request.setAttribute("authoringForm", authoringForm); return "pages/authoring/authoring"; } @Override - public String removePage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String removePage(HttpServletRequest request) throws Exception { + WikiPageForm wikiForm = new WikiPageForm(); Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); Wiki wiki = wikiService.getWikiByContentId(toolContentID); if (wiki.isDefineLater()) { // Only mark as removed if editing a live version (monitor/live edit) - return super.removePage(wikiForm, request); + return super.removePage(request); } // Completely delete the page Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); @@ -192,10 +195,10 @@ * Wrapper method to make sure that the correct wiki is returned to from the WikiPageAction class */ @Override - protected String returnToWiki(AuthoringForm authoringForm, HttpServletRequest request, HttpServletResponse response, - Long currentWikiPageId) throws Exception { - authoringForm.setCurrentWikiPageId(currentWikiPageId); - return unspecified(authoringForm, request, response); + protected String returnToWiki(WikiPageForm wikiForm, HttpServletRequest request, Long currentWikiPageId) + throws Exception { + wikiForm.setCurrentWikiPageId(currentWikiPageId); + return unspecified((AuthoringForm) wikiForm, request); } /** @@ -304,4 +307,5 @@ private SessionMap getSessionMap(HttpServletRequest request, AuthoringForm authForm) { return (SessionMap) request.getSession().getAttribute(authForm.getSessionMapID()); } -} + +} \ No newline at end of file Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/LearningController.java =================================================================== diff -u -rada9f9222f66994c94c2989aea922429377f06ed -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/LearningController.java (.../LearningController.java) (revision ada9f9222f66994c94c2989aea922429377f06ed) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/LearningController.java (.../LearningController.java) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -55,6 +55,7 @@ import org.lamsfoundation.lams.tool.wiki.util.WikiConstants; import org.lamsfoundation.lams.tool.wiki.util.WikiException; import org.lamsfoundation.lams.tool.wiki.web.forms.LearningForm; +import org.lamsfoundation.lams.tool.wiki.web.forms.WikiPageForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.DateUtil; import org.lamsfoundation.lams.util.WebUtil; @@ -106,9 +107,9 @@ * as setting all the advanced options and user-specifice info */ @RequestMapping("/learning") - public String unspecified(@ModelAttribute LearningForm learningForm, HttpServletRequest request, - HttpServletResponse response) throws Exception { + public String unspecified(WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + LearningForm learningForm = new LearningForm(); // 'toolSessionID' and 'mode' parameters are expected to be present. // TODO need to catch exceptions and handle errors. ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, MODE_OPTIONAL); @@ -232,6 +233,7 @@ Date submissionDeadline = wikiDTO.getSubmissionDeadline(); request.setAttribute("wikiDTO", wikiDTO); + request.setAttribute("learningForm", learningForm); if (submissionDeadline != null) { HttpSession ss = SessionManager.getSession(); @@ -256,12 +258,13 @@ * WikiPageAction class */ @Override - public String returnToWiki(LearningForm learnForm, HttpServletRequest request, HttpServletResponse response, - Long currentWikiPageId) throws Exception { - learnForm.setCurrentWikiPageId(currentWikiPageId); + public String returnToWiki(WikiPageForm wikiForm, HttpServletRequest request, Long currentWikiPageId) + throws Exception { + wikiForm.setCurrentWikiPageId(currentWikiPageId); // put the tool session id in the attributes so that the progress bar can pick it up. - request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID, learnForm.getToolSessionID()); - return unspecified(learnForm, request, response); + LearningForm learnerForm = new LearningForm(); + request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID, learnerForm.getToolSessionID()); + return unspecified((LearningForm) wikiForm, request); } /** @@ -377,4 +380,5 @@ return finishActivity(learningForm, request, response); } + } Fisheye: Tag 169ce779d0f88147f00cffb353f45f595b8c1a7c refers to a dead (removed) revision in file `lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringController.java =================================================================== diff -u --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringController.java (revision 0) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/MonitoringController.java (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -0,0 +1,261 @@ +/**************************************************************** + * 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 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +package org.lamsfoundation.lams.tool.wiki.web.controller; + +import java.io.IOException; +import java.util.Date; +import java.util.SortedSet; +import java.util.TimeZone; +import java.util.TreeSet; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.wiki.dto.WikiDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiPageContentDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiPageDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiSessionDTO; +import org.lamsfoundation.lams.tool.wiki.dto.WikiUserDTO; +import org.lamsfoundation.lams.tool.wiki.model.Wiki; +import org.lamsfoundation.lams.tool.wiki.model.WikiPage; +import org.lamsfoundation.lams.tool.wiki.model.WikiPageContent; +import org.lamsfoundation.lams.tool.wiki.model.WikiSession; +import org.lamsfoundation.lams.tool.wiki.model.WikiUser; +import org.lamsfoundation.lams.tool.wiki.service.IWikiService; +import org.lamsfoundation.lams.tool.wiki.util.WikiConstants; +import org.lamsfoundation.lams.tool.wiki.util.WikiException; +import org.lamsfoundation.lams.tool.wiki.web.forms.MonitoringForm; +import org.lamsfoundation.lams.tool.wiki.web.forms.WikiPageForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.DateUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * This action handles all the monitoring actions, which include opening + * monitor, and all the wikipage actions + * + * It inherits from the WikiPageAction which inherits from the + * LamsDispatchAction so that common actions can be used in learner, monitor and + * author + * + * @author lfoxton + */ +@Controller +@RequestMapping("/monitoring") +public class MonitoringController extends WikiPageController { + + private static Logger log = Logger.getLogger(MonitoringController.class); + + @Autowired + @Qualifier("wikiService") + private IWikiService wikiService; + + /** + * Sets up the main authoring page which lists the tool sessions and allows + * you to view their respective WikiPages + */ + @RequestMapping("/monitoring") + public String unspecified(WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + Long toolContentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID, true); + Wiki wiki; + //toolContentID is null in case request comes from WikiPageAction.revertPage() + if (toolContentID == null) { + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + WikiSession session = wikiService.getSessionBySessionId(toolSessionID); + wiki = session.getWiki(); + toolContentID = wiki.getToolContentId(); + + } else { + wiki = wikiService.getWikiByContentId(toolContentID); + } + + if (wiki == null) { + throw new WikiException("Could not find wiki with content id: " + toolContentID); + } + + WikiDTO wikiDT0 = new WikiDTO(wiki); + + Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true); + wikiDT0.setCurrentTab(currentTab); + + /* Check if submission deadline is null */ + + Date submissionDeadline = wikiDT0.getSubmissionDeadline(); + + if (submissionDeadline != null) { + + HttpSession ss = SessionManager.getSession(); + UserDTO learnerDto = (UserDTO) ss.getAttribute(AttributeNames.USER); + TimeZone learnerTimeZone = learnerDto.getTimeZone(); + Date tzSubmissionDeadline = DateUtil.convertToTimeZoneFromDefault(learnerTimeZone, submissionDeadline); + request.setAttribute("submissionDeadline", tzSubmissionDeadline.getTime()); + // use the unconverted time, as convertToStringForJSON() does the timezone conversion if needed + request.setAttribute("submissionDateString", + DateUtil.convertToStringForJSON(submissionDeadline, request.getLocale())); + + } + + request.setAttribute(WikiConstants.ATTR_WIKI_DTO, wikiDT0); + request.setAttribute(WikiConstants.ATTR_CONTENT_FOLDER_ID, contentFolderID); + request.setAttribute(WikiConstants.ATTR_IS_GROUPED_ACTIVITY, wikiService.isGroupedActivity(toolContentID)); + return "pages/monitoring/monitoring"; + } + + /** + * Wrapper method to make sure that the correct wiki is returned to from the + * WikiPageAction class + */ + @Override + public String returnToWiki(WikiPageForm wikiForm, HttpServletRequest request, Long currentWikiPageId) + throws Exception { + wikiForm.setCurrentWikiPageId(currentWikiPageId); + return showWiki((MonitoringForm) wikiForm, request); + } + + /** + * Gets the current user by toolSessionId + */ + @Override + protected WikiUser getCurrentUser(Long toolSessionId) { + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + // attempt to retrieve user using userId and toolSessionId + WikiUser wikiUser = wikiService.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), + toolSessionId); + + if (wikiUser == null) { + WikiSession wikiSession = wikiService.getSessionBySessionId(toolSessionId); + wikiUser = wikiService.createWikiUser(user, wikiSession); + } + + return wikiUser; + } + + /** + * Set Submission Deadline + */ + @RequestMapping(path = "/setSubmissionDeadline", produces = MediaType.TEXT_PLAIN_VALUE) + @ResponseBody + public String setSubmissionDeadline(HttpServletRequest request, HttpServletResponse response) throws IOException { + + Long contentID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + Wiki wiki = wikiService.getWikiByContentId(contentID); + + Long dateParameter = WebUtil.readLongParam(request, WikiConstants.ATTR_SUBMISSION_DEADLINE, true); + Date tzSubmissionDeadline = null; + String formattedDate = ""; + if (dateParameter != null) { + Date submissionDeadline = new Date(dateParameter); + HttpSession ss = SessionManager.getSession(); + UserDTO teacher = (UserDTO) ss.getAttribute(AttributeNames.USER); + TimeZone teacherTimeZone = teacher.getTimeZone(); + tzSubmissionDeadline = DateUtil.convertFromTimeZoneToDefault(teacherTimeZone, submissionDeadline); + formattedDate = DateUtil.convertToStringForJSON(tzSubmissionDeadline, request.getLocale()); + } + wiki.setSubmissionDeadline(tzSubmissionDeadline); + wikiService.saveOrUpdateWiki(wiki); + response.setContentType("text/plain;charset=utf-8"); + return formattedDate; + } + + /** + * Shows a specific wiki based on the session id + */ + @RequestMapping("/showWiki") + public String showWiki(@ModelAttribute MonitoringForm monitoringForm, HttpServletRequest request) { + + Long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + WikiSession wikiSession = wikiService.getSessionBySessionId(toolSessionId); + WikiSessionDTO sessionDTO = new WikiSessionDTO(wikiSession); + Long toolContentId = wikiSession.getWiki().getToolContentId(); + + // Add all the user notebook entries to the session dto + for (WikiUserDTO userDTO : sessionDTO.getUserDTOs()) { + NotebookEntry notebookEntry = wikiService.getEntry(toolSessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + WikiConstants.TOOL_SIGNATURE, userDTO.getUserId().intValue()); + if (notebookEntry != null) { + userDTO.setNotebookEntry(notebookEntry.getEntry()); + } + sessionDTO.getUserDTOs().add(userDTO); + } + request.setAttribute(WikiConstants.ATTR_SESSION_DTO, sessionDTO); + + // Set up the authForm. + + Long currentPageUid = monitoringForm.getCurrentWikiPageId(); + + // Get the wikipages from the session and the main page + SortedSet wikiPageDTOs = new TreeSet<>(); + for (WikiPage wikiPage : wikiSession.getWikiPages()) { + WikiPageDTO pageDTO = new WikiPageDTO(wikiPage); + + wikiPageDTOs.add(pageDTO); + } + + request.setAttribute(WikiConstants.ATTR_WIKI_PAGES, wikiPageDTOs); + request.setAttribute(WikiConstants.ATTR_MAIN_WIKI_PAGE, new WikiPageDTO(wikiSession.getMainPage())); + + // Set the current wiki page, if there is none, set to the main page + WikiPage currentWikiPage = null; + if (currentPageUid != null) { + currentWikiPage = wikiService.getWikiPageByUid(currentPageUid); + } else { + currentWikiPage = wikiSession.getMainPage(); + } + request.setAttribute(WikiConstants.ATTR_CURRENT_WIKI, new WikiPageDTO(currentWikiPage)); + + // Reset the isEditable and newPageIdEditable field for the form + monitoringForm.setIsEditable(currentWikiPage.getEditable()); + monitoringForm.setNewPageIsEditable(true); + + // Set the current wiki history + SortedSet currentWikiPageHistoryDTOs = new TreeSet<>(); + for (WikiPageContent wikiPageContentHistoryItem : currentWikiPage.getWikiContentVersions()) { + currentWikiPageHistoryDTOs.add(new WikiPageContentDTO(wikiPageContentHistoryItem)); + } + request.setAttribute(WikiConstants.ATTR_WIKI_PAGE_CONTENT_HISTORY, currentWikiPageHistoryDTOs); + request.setAttribute(WikiConstants.ATTR_CONTENT_FOLDER_ID, contentFolderID); + request.setAttribute(WikiConstants.ATTR_IS_GROUPED_ACTIVITY, wikiService.isGroupedActivity(toolContentId)); + + return "pages/monitoring/wikiDisplay"; + } +} Index: lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/WikiPageController.java =================================================================== diff -u -rada9f9222f66994c94c2989aea922429377f06ed -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/WikiPageController.java (.../WikiPageController.java) (revision ada9f9222f66994c94c2989aea922429377f06ed) +++ lams_tool_wiki/src/java/org/lamsfoundation/lams/tool/wiki/web/controller/WikiPageController.java (.../WikiPageController.java) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -52,8 +52,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Controller; +import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.context.WebApplicationContext; /** @@ -90,10 +90,14 @@ /** * Edit a page and make a new page content entry */ - public String editPage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String editPage(HttpServletRequest request) throws Exception { Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + // Set up the wiki form revertJavascriptTokenReplacement(wikiForm); @@ -147,7 +151,12 @@ /** * Revert to a previous page content in the page history */ - public String revertPage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String revertPage(HttpServletRequest request) throws Exception { + + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + Long revertPageContentVersion = new Long( WebUtil.readLongParam(request, WikiConstants.ATTR_HISTORY_PAGE_CONTENT_ID)); Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); @@ -214,6 +223,7 @@ * View a page content from a wiki page's history */ public String viewPage(HttpServletRequest request) throws Exception { + Long revertPageContentVersion = new Long( WebUtil.readLongParam(request, WikiConstants.ATTR_HISTORY_PAGE_CONTENT_ID)); Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); @@ -237,8 +247,12 @@ /** * Change the active page of the wiki form */ - public String changePage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String changePage(HttpServletRequest request) throws Exception { + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + Wiki wiki = null; WikiSession session = null; WikiPage wikiPage = null; @@ -274,8 +288,12 @@ /** * Add a new wiki page to this wiki instance */ - public String addPage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String addPage(HttpServletRequest request) throws Exception { + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + Wiki wiki = null; WikiSession session = null; WikiUser user = null; @@ -332,7 +350,12 @@ /** * Remove a wiki page from the wiki instance */ - public String removePage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String removePage(HttpServletRequest request) throws Exception { + + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + // The page to be removed Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); @@ -359,7 +382,12 @@ /** * Restore a page previously marked as removed. */ - public String restorePage(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) throws Exception { + public String restorePage(HttpServletRequest request) throws Exception { + + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + // The page to be restored Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); @@ -385,9 +413,13 @@ /** * Toggles whether a learner wants to receive notifications for wiki changes */ - public String toggleLearnerSubsciption(@ModelAttribute WikiPageForm wikiForm, HttpServletRequest request) + public String toggleLearnerSubsciption(HttpServletRequest request) throws Exception { + WikiPageForm wikiForm = new WikiPageForm(); + ServletRequestDataBinder binder = new ServletRequestDataBinder(wikiForm); + binder.bind(request); + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID, true); Long currentPageUid = WebUtil.readLongParam(request, WikiConstants.ATTR_CURRENT_WIKI); @@ -438,7 +470,7 @@ String contentFolderId = wikiService.getLearnerContentFolder(toolSessionID, monitorUserId.longValue()); String relativePath = "/tool/" + WikiConstants.TOOL_SIGNATURE - + "/monitoring.do?dispatch=showWiki&toolSessionID=" + toolSessionID.toString() + + "/monitoring/showWiki.do?toolSessionID=" + toolSessionID.toString() + "&contentFolderID=" + contentFolderId; String hash = relativePath + "," + toolSessionID.toString() + ",t"; Index: lams_tool_wiki/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/AuthoringButton.tag (.../AuthoringButton.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -32,7 +32,6 @@ <%@ tag body-content="scriptless" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="tags-html" prefix="html" %> <%@ taglib uri="tags-lams" prefix="lams"%> <%@ attribute name="formID" required="true" rtexprvalue="true" %> @@ -123,11 +122,11 @@ } \ No newline at end of file Index: lams_tool_wiki/web/WEB-INF/tags/AuthoringRatingAllStyleCriteria.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/AuthoringRatingAllStyleCriteria.tag (.../AuthoringRatingAllStyleCriteria.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/AuthoringRatingAllStyleCriteria.tag (.../AuthoringRatingAllStyleCriteria.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -8,7 +8,6 @@ <%@ tag body-content="scriptless" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="tags-html" prefix="html" %> <%@ taglib uri="tags-lams" prefix="lams"%> <%@ taglib uri="tags-function" prefix="fn" %> Index: lams_tool_wiki/web/WEB-INF/tags/AuthoringRatingCriteria.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/AuthoringRatingCriteria.tag (.../AuthoringRatingCriteria.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/AuthoringRatingCriteria.tag (.../AuthoringRatingCriteria.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -8,9 +8,9 @@ <%@ tag body-content="scriptless" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="tags-html" prefix="html" %> <%@ taglib uri="tags-lams" prefix="lams"%> <%@ taglib uri="tags-function" prefix="fn" %> +<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> <%@ attribute name="criterias" required="true" rtexprvalue="true" type="java.util.Collection" %> @@ -284,42 +284,38 @@ - - - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - + + + 1 + + + + + + + + + + - - - - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - + + + + + + + + + + + + + Index: lams_tool_wiki/web/WEB-INF/tags/CommentsAuthor.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/CommentsAuthor.tag (.../CommentsAuthor.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/CommentsAuthor.tag (.../CommentsAuthor.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -42,23 +42,21 @@
-     -   +     +  
Index: lams_tool_wiki/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -4,6 +4,7 @@ <%@ taglib uri="tags-lams" prefix="lams"%> <%@ attribute name="type" required="true" rtexprvalue="true"%> +<%@ attribute name="formID" required="false" rtexprvalue="true"%> <%@ attribute name="style" required="false" rtexprvalue="true"%> <%@ attribute name="title" required="false" rtexprvalue="true"%> <%@ attribute name="titleHelpURL" required="false" rtexprvalue="true"%> @@ -88,8 +89,8 @@ - - + + ${toolForm.toolSessionID} @@ -434,4 +435,4 @@
- + \ No newline at end of file Index: lams_tool_wiki/web/WEB-INF/tags/Rating.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/Rating.tag (.../Rating.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -8,7 +8,6 @@ <%@ tag body-content="scriptless" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="tags-html" prefix="html" %> <%@ taglib uri="tags-lams" prefix="lams"%> <%@ taglib uri="tags-function" prefix="fn" %> Index: lams_tool_wiki/web/WEB-INF/tags/StyledRating.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/StyledRating.tag (.../StyledRating.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/StyledRating.tag (.../StyledRating.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -8,7 +8,6 @@ <%@ tag body-content="scriptless" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="tags-html" prefix="html" %> <%@ taglib uri="tags-lams" prefix="lams"%> <%@ taglib uri="tags-function" prefix="fn" %> Index: lams_tool_wiki/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/TabBody.tag (.../TabBody.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/TabBody.tag (.../TabBody.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -34,7 +34,6 @@ <%@ attribute name="titleKey" required="false" rtexprvalue="true"%> <%@ attribute name="page" required="false" rtexprvalue="true"%> <%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-bean" prefix="bean"%> Index: lams_tool_wiki/web/WEB-INF/tags/TabBodyArea.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/TabBodyArea.tag (.../TabBodyArea.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/TabBodyArea.tag (.../TabBodyArea.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -30,7 +30,6 @@ %> <%@ taglib uri="tags-core" prefix="c"%> -<%@ taglib uri="tags-bean" prefix="bean"%>
Index: lams_tool_wiki/web/WEB-INF/tags/TextSearch.tag =================================================================== diff -u -r7475d08afc280b5e2e5ddf04e8bf35e3166aaf80 -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/WEB-INF/tags/TextSearch.tag (.../TextSearch.tag) (revision 7475d08afc280b5e2e5ddf04e8bf35e3166aaf80) +++ lams_tool_wiki/web/WEB-INF/tags/TextSearch.tag (.../TextSearch.tag) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -32,12 +32,11 @@ <%@ tag body-content="scriptless" %> <%@ taglib uri="tags-core" prefix="c" %> <%@ taglib uri="tags-fmt" prefix="fmt" %> -<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %> <%@ taglib uri="tags-lams" prefix="lams" %> <%-- Required attributes --%> <%@ attribute name="sessionMapID" required="true" rtexprvalue="true" %> -<%@ attribute name="wrapInFormTag" required="true" rtexprvalue="true" %> <%-- Optional attributes --%> <%@ attribute name="action" required="false" rtexprvalue="true" %> @@ -53,10 +52,10 @@ <%-- Default value for message key --%> - + - + @@ -85,52 +84,40 @@ - -
- - -

- - - - - - - - - - - - - - - - - -
- - - -
- - - -
- - - -
- - - -
- - - - - - - - - + +

+ + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
\ No newline at end of file Index: lams_tool_wiki/web/pages/authoring/advanced.jsp =================================================================== diff -u -r6c3d39685a1c47ef53b41a1eb29818b6f23f85cc -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/pages/authoring/advanced.jsp (.../advanced.jsp) (revision 6c3d39685a1c47ef53b41a1eb29818b6f23f85cc) +++ lams_tool_wiki/web/pages/authoring/advanced.jsp (.../advanced.jsp) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -26,7 +26,7 @@
  - + @@ -39,7 +39,7 @@    - + Index: lams_tool_wiki/web/pages/authoring/authoring.jsp =================================================================== diff -u -r6c3d39685a1c47ef53b41a1eb29818b6f23f85cc -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 6c3d39685a1c47ef53b41a1eb29818b6f23f85cc) +++ lams_tool_wiki/web/pages/authoring/authoring.jsp (.../authoring.jsp) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -27,16 +27,16 @@ - + - + - + @@ -55,14 +55,15 @@ - - - -
-
-
-
- + + + + + + + + +s <%-- Page tabs --%> Index: lams_tool_wiki/web/pages/authoring/basic.jsp =================================================================== diff -u -r6c3d39685a1c47ef53b41a1eb29818b6f23f85cc -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 6c3d39685a1c47ef53b41a1eb29818b6f23f85cc) +++ lams_tool_wiki/web/pages/authoring/basic.jsp (.../basic.jsp) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -160,7 +160,7 @@
- +
@@ -173,7 +173,7 @@
@@ -193,7 +193,7 @@
- +
@@ -205,7 +205,7 @@
Index: lams_tool_wiki/web/pages/authoring/pedagogicalPlannerForm.jsp =================================================================== diff -u -r6c3d39685a1c47ef53b41a1eb29818b6f23f85cc -r169ce779d0f88147f00cffb353f45f595b8c1a7c --- lams_tool_wiki/web/pages/authoring/pedagogicalPlannerForm.jsp (.../pedagogicalPlannerForm.jsp) (revision 6c3d39685a1c47ef53b41a1eb29818b6f23f85cc) +++ lams_tool_wiki/web/pages/authoring/pedagogicalPlannerForm.jsp (.../pedagogicalPlannerForm.jsp) (revision 169ce779d0f88147f00cffb353f45f595b8c1a7c) @@ -24,13 +24,6 @@ - -

- -
-
-

-