Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java,v diff -u -r1.82.2.7 -r1.82.2.8 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 27 Nov 2016 06:51:35 -0000 1.82.2.7 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 20 Feb 2017 01:11:45 -0000 1.82.2.8 @@ -72,6 +72,9 @@ import org.lamsfoundation.lams.tool.forum.web.forms.ForumPedagogicalPlannerForm; import org.lamsfoundation.lams.tool.forum.web.forms.MessageForm; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.FileValidatorUtil; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; @@ -186,6 +189,9 @@ forumForm.setContentFolderID(contentFolderID); sessionMap.put(AttributeNames.PARAM_CONTENT_FOLDER_ID, contentFolderID); + sessionMap.put(ForumConstants.ATTR_UPLOAD_MAX_FILE_SIZE, + FileValidatorUtil.formatSize(Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_LARGE_MAX_SIZE))); + // get back the topic list and display them on page forumService = getForumManager(); Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java,v diff -u -r1.85.2.9 -r1.85.2.10 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java 13 Feb 2017 07:48:01 -0000 1.85.2.9 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java 20 Feb 2017 01:11:45 -0000 1.85.2.10 @@ -233,7 +233,14 @@ sessionMap.put(ForumConstants.ATTR_LOCK_WHEN_FINISHED, forum.getLockWhenFinished()); sessionMap.put(ForumConstants.ATTR_USER_FINISHED, forumUser.isSessionFinished()); sessionMap.put(ForumConstants.ATTR_ALLOW_EDIT, forum.isAllowEdit()); + sessionMap.put(ForumConstants.ATTR_ALLOW_UPLOAD, forum.isAllowUpload()); + int uploadMaxFileSize = Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_MAX_SIZE); + // it defaults to -1 if property was not found + if (uploadMaxFileSize > 0) { + sessionMap.put(ForumConstants.ATTR_UPLOAD_MAX_FILE_SIZE, FileValidatorUtil.formatSize(uploadMaxFileSize)); + } + sessionMap.put(ForumConstants.ATTR_ALLOW_RATE_MESSAGES, forum.isAllowRateMessages()); sessionMap.put(ForumConstants.ATTR_MINIMUM_RATE, forum.getMinimumRate()); sessionMap.put(ForumConstants.ATTR_MAXIMUM_RATE, forum.getMaximumRate()); @@ -765,12 +772,6 @@ boolean hideReflection = WebUtil.readBooleanParam(request, ForumConstants.ATTR_HIDE_REFLECTION, false); sessionMap.put(ForumConstants.ATTR_HIDE_REFLECTION, hideReflection); - int uploadMaxFileSize = Configuration.getAsInt(ConfigurationKeys.UPLOAD_FILE_MAX_SIZE); - // it defaults to -1 if property was not found - if (uploadMaxFileSize > 0) { - sessionMap.put(ForumConstants.ATTR_UPLOAD_MAX_FILE_SIZE, FileValidatorUtil.formatSize(uploadMaxFileSize)); - } - return mapping.findForward("success"); } Index: lams_tool_forum/web/jsps/authoring/message/create.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/message/create.jsp,v diff -u -r1.39.2.7 -r1.39.2.8 --- lams_tool_forum/web/jsps/authoring/message/create.jsp 13 Sep 2016 09:21:58 -0000 1.39.2.7 +++ lams_tool_forum/web/jsps/authoring/message/create.jsp 20 Feb 2017 01:11:45 -0000 1.39.2.8 @@ -38,6 +38,11 @@
+
+
+