Index: lams_tool_nb/conf/language/ApplicationResources.properties
===================================================================
diff -u -r5b9a749229490ab634a8bbf54065c3783b77ea47 -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5b9a749229490ab634a8bbf54065c3783b77ea47)
+++ lams_tool_nb/conf/language/ApplicationResources.properties (.../ApplicationResources.properties) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -58,6 +58,12 @@
error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly.
authoring.msg.cancel.save =Do you want to close this window without saving?
button.try.again =Try again
+advanced.reflectOnActivity = Reflect on noticeboard
+button.continue = Continue
+titleHeading.reflections = Reflections
+titleHeading.reflection = Reflection
+message.no.reflections = No reflections have yet been made.
+message.no.reflection = No reflection has yet been made.
#======= End labels: Exported 52 labels for en AU =====
Index: lams_tool_nb/db/sql/create_lams_tool_nb.sql
===================================================================
diff -u -r0020142e02f5cd9631e5602a538189b8077350ef -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/db/sql/create_lams_tool_nb.sql (.../create_lams_tool_nb.sql) (revision 0020142e02f5cd9631e5602a538189b8077350ef)
+++ lams_tool_nb/db/sql/create_lams_tool_nb.sql (.../create_lams_tool_nb.sql) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -9,6 +9,8 @@
, offline_instructions TEXT
, define_later TINYINT(1)
, force_offline TINYINT(1)
+ , reflect_on_activity TINYINT(1)
+ , reflect_instructions TEXT
, content_in_use TINYINT(1)
, creator_user_id BIGINT(20)
, date_created DATETIME
@@ -66,6 +68,8 @@
offline_instructions,
define_later,
force_offline,
+ reflect_on_activity,
+ reflect_instructions,
content_in_use,
date_created)
VALUES (${default_content_id},
@@ -76,4 +80,6 @@
0,
0,
0,
+ 'Reflect on noticeboard',
+ 0,
now());
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardConstants.java
===================================================================
diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardConstants.java (.../NoticeboardConstants.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf)
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardConstants.java (.../NoticeboardConstants.java) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -58,8 +58,10 @@
public static final String DISPLAY_MESSAGE = "displayMessage";
public static final String DISPLAY_LEARNER_CONTENT = "displayLearnerContent";
+ public static final String REFLECT_ON_ACTIVITY = "reflectOnActivity";
public static final String MONITOR_PAGE = "monitorPage";
+ public static final String MONITOR_REFLECTION_PAGE ="monitorReflectionPage";
// ------------------------------
// Action Names
@@ -114,6 +116,7 @@
public static final String BUTTON_EDIT = "button.edit";
public static final String BUTTON_UPLOAD = "button.upload";
public static final String LINK_DELETE="link.delete";
+ public static final String BUTTON_CONTINUE = "button.continue";
//--------------
@@ -132,4 +135,4 @@
public static final String ERROR_MANDATORY="error.mandatoryField";
public static final String ERR_MISSING_PARAM = "error.missingParam";
public static final String ERROR_FILE_UPLOAD_CONTENT_REPOSITORY = "error.contentrepository";
-}
+}
\ No newline at end of file
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardContent.java
===================================================================
diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardContent.java (.../NoticeboardContent.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf)
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/NoticeboardContent.java (.../NoticeboardContent.java) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -68,6 +68,10 @@
/** nullable persistent field */
private boolean forceOffline;
+ private Boolean reflectOnActivity;
+
+ private String reflectInstructions;
+
/** nullable persistent field */
private boolean contentInUse;
@@ -98,6 +102,8 @@
String offlineInstructions,
boolean defineLater,
boolean forceOffline,
+ boolean reflectOnActivity,
+ String reflectInstructions,
boolean contentInUse,
Long creatorUserId,
Date dateCreated,
@@ -110,6 +116,8 @@
this.offlineInstructions = offlineInstructions;
this.defineLater = defineLater;
this.forceOffline = forceOffline;
+ this.reflectOnActivity = reflectOnActivity;
+ this.reflectInstructions = reflectInstructions;
this.contentInUse = contentInUse;
this.creatorUserId = creatorUserId;
this.dateCreated = dateCreated;
@@ -135,6 +143,7 @@
this.offlineInstructions = offlineInstructions;
this.defineLater = false;
this.forceOffline = false;
+ this.reflectOnActivity = false;
this.contentInUse = false;
this.creatorUserId = null;
this.dateCreated = dateCreated;
@@ -225,6 +234,32 @@
this.forceOffline = forceOffline;
}
+ /**
+ * @hibernate.property
+ * column="reflect_on_activity"
+ * length="1"
+ */
+ public boolean getReflectOnActivity() {
+ return reflectOnActivity;
+ }
+
+ public void setReflectOnActivity(boolean reflectOnActivity) {
+ this.reflectOnActivity = reflectOnActivity;
+ }
+
+ /**
+ * @hibernate.property
+ * column="reflect_instructions"
+ * length="65535"
+ */
+ public String getReflectInstructions() {
+ return reflectInstructions;
+ }
+
+ public void setReflectInstructions(String reflectInstructions) {
+ this.reflectInstructions = reflectInstructions;
+ }
+
/**
* @hibernate.property
* column="content_in_use"
@@ -382,6 +417,8 @@
nb.getOfflineInstructions(),
nb.isDefineLater(),
nb.isForceOffline(),
+ nb.getReflectOnActivity(),
+ nb.getReflectInstructions(),
nb.isContentInUse(),
nb.getCreatorUserId(),
nb.getDateCreated(),
@@ -414,4 +451,4 @@
-}
+}
\ No newline at end of file
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/applicationContext.xml
===================================================================
diff -u -r24ca84b9e61b98c068eaa369cb194a35e5511162 -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/applicationContext.xml (.../applicationContext.xml) (revision 24ca84b9e61b98c068eaa369cb194a35e5511162)
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/applicationContext.xml (.../applicationContext.xml) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -36,6 +36,7 @@
Return the persistent instance of a NoticeboardUser
@@ -96,4 +98,5 @@
*/
public int getNumberOfUsers(NoticeboardSession nbSession);
-}
+ public List getNbUsersBySession(Long sessionId);
+}
\ No newline at end of file
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dao/hibernate/NoticeboardUserDAO.java
===================================================================
diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dao/hibernate/NoticeboardUserDAO.java (.../NoticeboardUserDAO.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf)
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dao/hibernate/NoticeboardUserDAO.java (.../NoticeboardUserDAO.java) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -48,11 +48,13 @@
/** @see org.lamsfoundation.lams.tool.noticeboard.dao.INoticeboardUserDAO#getNbUserByID(java.lang.Long) */
- public NoticeboardUser getNbUserByID(Long userId)
+ public NoticeboardUser getNbUser(Long userId, Long sessionId)
{
- String query = "from NoticeboardUser user where user.userId=?";
- List users = getHibernateTemplate().find(query,userId);
-
+ String query = "from NoticeboardUser user where user.userId=? and user.nbSession.nbSessionId=?";
+ Object[] values = new Object[2];
+ values[0] = userId;
+ values[1] = sessionId;
+ List users = getHibernateTemplate().find(query,values);
if(users!=null && users.size() == 0)
{
return null;
@@ -126,5 +128,8 @@
nbSession)).size();
}
-
-}
+ public List getNbUsersBySession(Long sessionId) {
+ String query = "from NoticeboardUser user where user.nbSession.nbSessionId=?";
+ return getHibernateTemplate().find(query,sessionId);
+ }
+}
\ No newline at end of file
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dto/ReflectionDTO.java
===================================================================
diff -u
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dto/ReflectionDTO.java (revision 0)
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/dto/ReflectionDTO.java (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -0,0 +1,84 @@
+/****************************************************************
+ * 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 version 2.0
+ * 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
+ * ****************************************************************
+ */
+
+/* $Id$ */
+package org.lamsfoundation.lams.tool.noticeboard.dto;
+
+import org.lamsfoundation.lams.notebook.model.NotebookEntry;
+
+/**
+ * @author jliew
+ *
+ */
+public class ReflectionDTO {
+
+ private Long userId;
+ private String username;
+ private String fullName;
+ private String entry;
+ private Long externalId;
+
+ public ReflectionDTO(NotebookEntry nbEntry) {
+ this.entry = nbEntry.getEntry();
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getFullName() {
+ return fullName;
+ }
+
+ public void setFullName(String fullName) {
+ this.fullName = fullName;
+ }
+
+ public String getEntry() {
+ return entry;
+ }
+
+ public void setEntry(String entry) {
+ this.entry = entry;
+ }
+
+ public Long getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(Long externalId) {
+ this.externalId = externalId;
+ }
+
+}
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java
===================================================================
diff -u -r08950e1090443c3423a3d1c587416a2fccd8bbdf -r4aae0391a4892385de3df761a655e0ab8b1c0183
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java (.../INoticeboardService.java) (revision 08950e1090443c3423a3d1c587416a2fccd8bbdf)
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/service/INoticeboardService.java (.../INoticeboardService.java) (revision 4aae0391a4892385de3df761a655e0ab8b1c0183)
@@ -29,6 +29,7 @@
import org.lamsfoundation.lams.contentrepository.NodeKey;
import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
+import org.lamsfoundation.lams.notebook.model.NotebookEntry;
import org.lamsfoundation.lams.tool.noticeboard.NoticeboardAttachment;
import org.lamsfoundation.lams.tool.noticeboard.NoticeboardContent;
import org.lamsfoundation.lams.tool.noticeboard.NoticeboardSession;
@@ -171,7 +172,7 @@
* @param nbUserId The user id of the instance of NoticeboardUser
* @return the persistent instance of a NoticeboardUser or null if not found.
*/
- public NoticeboardUser retrieveNoticeboardUser(Long nbUserId);
+ public NoticeboardUser retrieveNoticeboardUser(Long nbUserId, Long toolSessionId);
/**
* Return the persistent instance of a NoticeboardUser
@@ -204,9 +205,10 @@
* that specified in the argument.
*
* @param nbUserId The id of the requested noticeboard object
+ * @param toolSessionId The id of the nbUser's associated nbSession
*
*/
- public void removeUser(Long nbUserId);
+ public void removeUser(Long nbUserId, Long toolSessionId);
/**
* Delete the given instance of NoticeboardUser
+ |
+ + + | +
+ + | +
+ |
+