Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java
===================================================================
diff -u -r8a3b509ec4fab06d5f29dee76fa6ba2f852a0abe -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java (.../LearningAction.java) (revision 8a3b509ec4fab06d5f29dee76fa6ba2f852a0abe)
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/LearningAction.java (.../LearningAction.java) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -472,13 +472,15 @@
Forum forum = toolSession.getForum();
ForumUser currentUser = getCurrentUser(request);
ForumUser forumCreatedBy = forum.getCreatedBy();
-
- if (currentUser.getUserId().equals(forumCreatedBy.getUserId())) {
+
+ // TODO Skipping permissions for now, currently having issues with default learning designs not having an create_by field
+ // we should be looking at whether a user is a teacher and more specifically staff
+// if (currentUser.getUserId().equals(forumCreatedBy.getUserId())) {
forumService.updateMessageHideFlag(msgId, hideFlag.booleanValue());
- } else {
- log.info(currentUser + "does not have permission to hide/show postings in forum: " + forum.getUid());
- log.info("Forum created by :" + forumCreatedBy.getUid() + ", Current User is: " + currentUser.getUid());
- }
+// } else {
+// log.info(currentUser + "does not have permission to hide/show postings in forum: " + forum.getUid());
+// log.info("Forum created by :" + forumCreatedBy.getUid() + ", Current User is: " + currentUser.getUid());
+// }
// echo back this topic thread into page
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java
===================================================================
diff -u -r8a3b509ec4fab06d5f29dee76fa6ba2f852a0abe -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 8a3b509ec4fab06d5f29dee76fa6ba2f852a0abe)
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -76,8 +76,8 @@
throws Exception {
String param = mapping.getParameter();
- if (param.equals("listContentUsers")) {
- return listContentUsers(mapping, form, request, response);
+ if (param.equals("init")) {
+ return init(mapping, form, request, response);
}
// ***************** Marks Functions ********************
if (param.equals("viewAllMarks")) {
@@ -96,34 +96,49 @@
return updateMark(mapping, form, request, response);
}
- // ***************** Activity and Instructions ********************
- if (param.equals("viewActivity")) {
- return viewActivity(mapping, form, request, response);
- }
- if (param.equals("editActivity")) {
- return editActivity(mapping, form, request, response);
- }
- if (param.equals("updateActivity")) {
- return updateActivity(mapping, form, request, response);
- }
- if (param.equals("viewInstructions")) {
- return viewInstructions(mapping, form, request, response);
- }
- // ***************** Statistic ********************
- if (param.equals("statistic")) {
- return statistic(mapping, form, request, response);
- }
-
// ***************** Miscellaneous ********************
if (param.equals("viewTopic")) {
return viewTopic(mapping, form, request, response);
}
return mapping.findForward("error");
}
-
+
+ /**
+ * Default ActionForward for Monitor
+ * (non-Javadoc)
+ * @see org.apache.struts.actions.DispatchAction#unspecified(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+ */
+
/**
+ * The initial method for monitoring
+ */
+ private ActionForward init(ActionMapping mapping, ActionForm form,
+ HttpServletRequest request, HttpServletResponse response) {
+ // read in parameters and set session attributes.
+ Long toolContentID = new Long(WebUtil.readLongParam(request,
+ AttributeNames.PARAM_TOOL_CONTENT_ID));
+ request.getSession().setAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID,
+ toolContentID);
+ request.getSession().setAttribute(AttributeNames.PARAM_MODE,
+ ToolAccessMode.TEACHER);
+
+ // perform the actions for all the tabs.
+ doTabs(mapping, form, request, response);
+
+ return mapping.findForward("load");
+ }
+
+ private ActionForward doTabs(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
+ this.listContentUsers(mapping, form, request, response);
+ this.viewInstructions(mapping, form, request, response);
+ this.viewActivity(mapping, form, request, response);
+ this.statistic(mapping, form, request, response);
+ return mapping.findForward("load");
+ }
+
+ /**
* The initial method for monitoring. List all users according to given
- * Content ID.
+ * Content ID.
*
* @param mapping
* @param form
@@ -134,14 +149,7 @@
private ActionForward listContentUsers(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
- Long toolContentID = new Long(WebUtil.readLongParam(request,
- AttributeNames.PARAM_TOOL_CONTENT_ID));
- request.getSession().setAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID,
- toolContentID);
-
- request.getSession().setAttribute(AttributeNames.PARAM_MODE, ToolAccessMode.TEACHER);
-
- return userList(mapping, request);
+ return userList(mapping, request);
}
/**
@@ -164,7 +172,7 @@
Map topicsByUser = getTopicsSortedByAuthor(topicList);
request.setAttribute(AttributeNames.PARAM_TOOL_SESSION_ID, sessionID);
request.setAttribute("report", topicsByUser);
-
+
return mapping.findForward("success");
}
@@ -302,7 +310,7 @@
* @param response
* @return
*/
- private ActionForward viewUserMark(ActionMapping mapping, ActionForm form,
+ public ActionForward viewUserMark(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
Long userUid = new Long(WebUtil.readLongParam(request,
ForumConstants.USER_UID));
@@ -429,7 +437,9 @@
}
String title = forum.getTitle();
String instruction = forum.getInstructions();
-
+
+ boolean isForumEditable = ForumWebUtils.isForumEditable(forum);
+ request.setAttribute(ForumConstants.PAGE_EDITABLE, new Boolean(isForumEditable));
request.setAttribute("title", title);
request.setAttribute("instruction", instruction);
return mapping.findForward("success");
@@ -508,8 +518,9 @@
"error.fail.get.forum"));
}
if (StringUtils.isEmpty(title)) {
- errors.add("activity.title", new ActionMessage(
- "error.title.empty"));
+ errors
+ .add("activity.title", new ActionMessage(
+ "error.title.empty"));
}
// echo back to screen
request.setAttribute("title", title);
Index: lams_tool_forum/web/includes/header.jsp
===================================================================
diff -u -rc6374757bf65fa4c6ad568413c42ccb93ee3fd17 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/includes/header.jsp (.../header.jsp) (revision c6374757bf65fa4c6ad568413c42ccb93ee3fd17)
+++ lams_tool_forum/web/includes/header.jsp (.../header.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,17 +1,55 @@
-<%@ include file="/includes/taglibs.jsp" %>
+<%@ include file="/includes/taglibs.jsp"%>
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
-
+ function doSubmit(method, tabId) {
+// if(tabId != null)
+// document.forumMonitoringForm.currentTab.value=tabId;
+// document.forumMonitoringForm.method.value=method;
+ document.forumMonitoringForm.submit();
+ }
+ //]]>
+
+
+
Index: lams_tool_forum/web/includes/layout.jsp
===================================================================
diff -u -r1816fa2641e7b006d95e086cf15800f14112087e -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/includes/layout.jsp (.../layout.jsp) (revision 1816fa2641e7b006d95e086cf15800f14112087e)
+++ lams_tool_forum/web/includes/layout.jsp (.../layout.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,21 +1,21 @@
+
+
<%@ include file="/includes/taglibs.jsp"%>
<%@ taglib uri="tags-tiles" prefix="tiles"%>
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
Index: lams_tool_forum/web/includes/tablayout.jsp
===================================================================
diff -u -r105859ac4eb9ebc45ad6d95d88ea50e6728f89f9 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/includes/tablayout.jsp (.../tablayout.jsp) (revision 105859ac4eb9ebc45ad6d95d88ea50e6728f89f9)
+++ lams_tool_forum/web/includes/tablayout.jsp (.../tablayout.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,23 +1,18 @@
+
+
<%@ include file="/includes/taglibs.jsp"%>
<%@ taglib uri="tags-tiles" prefix="tiles"%>
-
+
-
-
-
+
-
+
+
+
Index: lams_tool_forum/web/includes/taglibs.jsp
===================================================================
diff -u -rc6374757bf65fa4c6ad568413c42ccb93ee3fd17 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/includes/taglibs.jsp (.../taglibs.jsp) (revision c6374757bf65fa4c6ad568413c42ccb93ee3fd17)
+++ lams_tool_forum/web/includes/taglibs.jsp (.../taglibs.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -6,5 +6,5 @@
<%@ taglib uri="tags-core" prefix="c"%>
<%@ taglib uri="tags-fmt" prefix="fmt"%>
<%@ taglib uri="tags-lams" prefix="lams" %>
-<%@ taglib uri="tags-fck-editor" prefix="FCK"%>
+<%@ taglib uri="fck-editor" prefix="FCK"%>
Index: lams_tool_forum/web/jsps/monitoring/contentuserlist.jsp
===================================================================
diff -u -r24c31445bba559194fa3d9b71d57be30464209b3 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/contentuserlist.jsp (.../contentuserlist.jsp) (revision 24c31445bba559194fa3d9b71d57be30464209b3)
+++ lams_tool_forum/web/jsps/monitoring/contentuserlist.jsp (.../contentuserlist.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,36 +1,26 @@
<%@ include file="/includes/taglibs.jsp"%>
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
Index: lams_tool_forum/web/jsps/monitoring/definelater.jsp
===================================================================
diff -u -rde48694e8eae9839c1274a8927d939e83258a50b -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/definelater.jsp (.../definelater.jsp) (revision de48694e8eae9839c1274a8927d939e83258a50b)
+++ lams_tool_forum/web/jsps/monitoring/definelater.jsp (.../definelater.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,5 +1,4 @@
<%@ include file="/includes/taglibs.jsp" %>
-<%@ taglib uri="tags-fck-editor" prefix="FCK"%>
Index: lams_tool_forum/web/jsps/monitoring/editactivity.jsp
===================================================================
diff -u -rca2ab2d25936fa1d7d935bcf5074b5a156c37758 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/editactivity.jsp (.../editactivity.jsp) (revision ca2ab2d25936fa1d7d935bcf5074b5a156c37758)
+++ lams_tool_forum/web/jsps/monitoring/editactivity.jsp (.../editactivity.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,40 +1,45 @@
<%@ include file="/includes/taglibs.jsp"%>
+
-
-
-
-
- :
- |
-
-
- |
-
+
+
+
+
+
+ :
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
Index: lams_tool_forum/web/jsps/monitoring/instructions.jsp
===================================================================
diff -u -ra1bba4a6e2e8937726524cf853f5cb54932c47c2 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/instructions.jsp (.../instructions.jsp) (revision a1bba4a6e2e8937726524cf853f5cb54932c47c2)
+++ lams_tool_forum/web/jsps/monitoring/instructions.jsp (.../instructions.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,91 +1,102 @@
-<%@ include file="/includes/taglibs.jsp" %>
+<%@ include file="/includes/taglibs.jsp"%>
+
+
-
-
\ No newline at end of file
+
+
+
Index: lams_tool_forum/web/jsps/monitoring/monitoring.jsp
===================================================================
diff -u
--- lams_tool_forum/web/jsps/monitoring/monitoring.jsp (revision 0)
+++ lams_tool_forum/web/jsps/monitoring/monitoring.jsp (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -0,0 +1,16 @@
+<%@ include file="/includes/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_forum/web/jsps/monitoring/statistic.jsp
===================================================================
diff -u -r0cfeb3255c7e2a66440d8e49efe6cef75a13f053 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/statistic.jsp (.../statistic.jsp) (revision 0cfeb3255c7e2a66440d8e49efe6cef75a13f053)
+++ lams_tool_forum/web/jsps/monitoring/statistic.jsp (.../statistic.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,65 +1,82 @@
-<%@ include file="/includes/taglibs.jsp" %>
-
+<%@ include file="/includes/taglibs.jsp"%>
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
-
-
-
-
-
-
- :
-
-
-
-
-
-
- |
-
-
-
-
|
-
|
-
-
- |
- |
-
-
-
-
+
Index: lams_tool_forum/web/jsps/monitoring/updatemarks.jsp
===================================================================
diff -u -r0cfeb3255c7e2a66440d8e49efe6cef75a13f053 -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/updatemarks.jsp (.../updatemarks.jsp) (revision 0cfeb3255c7e2a66440d8e49efe6cef75a13f053)
+++ lams_tool_forum/web/jsps/monitoring/updatemarks.jsp (.../updatemarks.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -2,7 +2,7 @@
-" />
+" />
,
Index: lams_tool_forum/web/jsps/monitoring/viewactivity.jsp
===================================================================
diff -u -r780ef55fec1ac811a1188d58dadd83f31e6de82f -r907a7ec20d8251fde30699bc3b52d64ed9071ea4
--- lams_tool_forum/web/jsps/monitoring/viewactivity.jsp (.../viewactivity.jsp) (revision 780ef55fec1ac811a1188d58dadd83f31e6de82f)
+++ lams_tool_forum/web/jsps/monitoring/viewactivity.jsp (.../viewactivity.jsp) (revision 907a7ec20d8251fde30699bc3b52d64ed9071ea4)
@@ -1,37 +1,38 @@
<%@ include file="/includes/taglibs.jsp"%>
-
\ No newline at end of file
+
+
+