Index: lams_tool_scribe/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.5 -r1.6
--- lams_tool_scribe/conf/language/ApplicationResources.properties 4 Oct 2006 06:20:53 -0000 1.5
+++ lams_tool_scribe/conf/language/ApplicationResources.properties 4 Oct 2006 09:44:52 -0000 1.6
@@ -106,6 +106,7 @@
button.agree = Agree
button.submitReport = Submit Report
+button.forceComplete = Force Complete
message.voteStatistics = {0} out of {1} agree
Index: lams_tool_scribe/db/sql/create_lams_tool_scribe.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/db/sql/create_lams_tool_scribe.sql,v
diff -u -r1.4 -r1.5
--- lams_tool_scribe/db/sql/create_lams_tool_scribe.sql 4 Oct 2006 00:46:24 -0000 1.4
+++ lams_tool_scribe/db/sql/create_lams_tool_scribe.sql 4 Oct 2006 09:44:52 -0000 1.5
@@ -11,7 +11,7 @@
create table tl_lascrb11_heading (uid bigint not null auto_increment, heading text, scribe_uid bigint, display_order integer, primary key (uid));
create table tl_lascrb11_report_entry (uid bigint not null auto_increment, entry_text text, scribe_heading_uid bigint, scribe_session_uid bigint, primary key (uid));
create table tl_lascrb11_scribe (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, auto_select_scribe bit, reflect_on_activity bit, reflect_instructions text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, primary key (uid));
-create table tl_lascrb11_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), scribe_uid bigint, appointed_scribe_uid bigint, primary key (uid));
+create table tl_lascrb11_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), scribe_uid bigint, appointed_scribe_uid bigint, force_complete bit, primary key (uid));
create table tl_lascrb11_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, scribe_session_uid bigint, report_approved bit, primary key (uid));
alter table tl_lascrb11_attachment add index FK57953706B3FA1495 (scribe_uid), add constraint FK57953706B3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid);
alter table tl_lascrb11_heading add index FK428A22FFB3FA1495 (scribe_uid), add constraint FK428A22FFB3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid);
Index: lams_tool_scribe/db/sql/table-schema.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/db/sql/table-schema.sql,v
diff -u -r1.3 -r1.4
--- lams_tool_scribe/db/sql/table-schema.sql 30 Sep 2006 10:18:45 -0000 1.3
+++ lams_tool_scribe/db/sql/table-schema.sql 4 Oct 2006 09:44:52 -0000 1.4
@@ -15,7 +15,7 @@
create table tl_lascrb11_heading (uid bigint not null auto_increment, heading text, scribe_uid bigint, display_order integer, primary key (uid));
create table tl_lascrb11_report_entry (uid bigint not null auto_increment, entry_text text, scribe_heading_uid bigint, scribe_session_uid bigint, primary key (uid));
create table tl_lascrb11_scribe (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, auto_select_scribe bit, reflect_on_activity bit, reflect_instructions text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, primary key (uid));
-create table tl_lascrb11_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), scribe_uid bigint, appointed_scribe_uid bigint, primary key (uid));
+create table tl_lascrb11_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), scribe_uid bigint, appointed_scribe_uid bigint, force_complete bit, primary key (uid));
create table tl_lascrb11_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, scribe_session_uid bigint, report_approved bit, primary key (uid));
alter table tl_lascrb11_attachment add index FK57953706B3FA1495 (scribe_uid), add constraint FK57953706B3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid);
alter table tl_lascrb11_heading add index FK428A22FFB3FA1495 (scribe_uid), add constraint FK428A22FFB3FA1495 foreign key (scribe_uid) references tl_lascrb11_scribe (uid);
Index: lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/dto/ScribeSessionDTO.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/dto/ScribeSessionDTO.java,v
diff -u -r1.6 -r1.7
--- lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/dto/ScribeSessionDTO.java 4 Oct 2006 06:06:29 -0000 1.6
+++ lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/dto/ScribeSessionDTO.java 4 Oct 2006 09:44:51 -0000 1.7
@@ -51,9 +51,12 @@
Set reportDTOs;
+ boolean forceComplete;
+
public ScribeSessionDTO(ScribeSession session) {
this.sessionID = session.getSessionId();
this.sessionName = session.getSessionName();
+ this.forceComplete = session.isForceComplete();
ScribeUser appointedScribe = session.getAppointedScribe();
if (appointedScribe == null) {
@@ -149,4 +152,12 @@
public void setVotePercentage(int votePercentage) {
VotePercentage = votePercentage;
}
+
+ public boolean isForceComplete() {
+ return forceComplete;
+ }
+
+ public void setForceComplete(boolean forceComplete) {
+ this.forceComplete = forceComplete;
+ }
}
Index: lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/model/ScribeSession.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/model/ScribeSession.java,v
diff -u -r1.3 -r1.4
--- lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/model/ScribeSession.java 30 Sep 2006 10:18:45 -0000 1.3
+++ lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/model/ScribeSession.java 4 Oct 2006 09:44:53 -0000 1.4
@@ -66,6 +66,8 @@
private ScribeUser appointedScribe;
+ private boolean forceComplete;
+
// Constructors
/** default constructor */
@@ -208,7 +210,18 @@
public void setAppointedScribe(ScribeUser appointedScribe) {
this.appointedScribe = appointedScribe;
}
+
+ /**
+ * @hibernate.property column="force_complete"
+ */
+ public boolean isForceComplete() {
+ return forceComplete;
+ }
+ public void setForceComplete(boolean forceComplete) {
+ this.forceComplete = forceComplete;
+ }
+
/**
* toString
*
Index: lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java,v
diff -u -r1.8 -r1.9
--- lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java 4 Oct 2006 08:52:54 -0000 1.8
+++ lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/service/ScribeService.java 4 Oct 2006 09:44:52 -0000 1.9
@@ -148,6 +148,7 @@
}
session.setScribeReportEntries(reports);
+ session.setForceComplete(false);
scribeSessionDAO.saveOrUpdate(session);
}
Index: lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/LearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/LearningAction.java,v
diff -u -r1.6 -r1.7
--- lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/LearningAction.java 4 Oct 2006 06:06:30 -0000 1.6
+++ lams_tool_scribe/src/java/org/lamsfoundation/lams/tool/scribe/web/actions/LearningAction.java 4 Oct 2006 09:44:53 -0000 1.7
@@ -26,7 +26,6 @@
import java.io.IOException;
import java.util.Iterator;
-import java.util.Set;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -53,15 +52,14 @@
import org.lamsfoundation.lams.tool.scribe.service.ScribeServiceProxy;
import org.lamsfoundation.lams.tool.scribe.util.ScribeConstants;
import org.lamsfoundation.lams.tool.scribe.util.ScribeException;
+import org.lamsfoundation.lams.tool.scribe.util.ScribeUtils;
import org.lamsfoundation.lams.tool.scribe.web.forms.LearningForm;
import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.web.action.LamsDispatchAction;
import org.lamsfoundation.lams.web.session.SessionManager;
import org.lamsfoundation.lams.web.util.AttributeNames;
-import org.lamsfoundation.lams.tool.scribe.util.ScribeUtils;
-
/**
* @author
* @version
@@ -74,6 +72,7 @@
* @struts.action-forward name="defineLater" path="tiles:/learning/defineLater"
* @struts.action-forward name="notebook" path="tiles:/learning/notebook"
* @struts.action-forward name="voteDisplay" path="/pages/parts/voteDisplay.jsp"
+ * @struts.action-forward name="report" path="tiles:/learning/report"
*/
public class LearningAction extends LamsDispatchAction {
@@ -145,11 +144,17 @@
if (scribe.isRunOffline()) {
return mapping.findForward("runOffline");
}
-
+
+ if (scribeSession.isForceComplete()) {
+ // go to report page
+ return mapping.findForward("report");
+ }
+
// check if current user is the scribe.
if (scribeSession.getAppointedScribe().getUid() == scribeUser.getUid()) {
return mapping.findForward("scribe");
}
+
return mapping.findForward("learning");
}
@@ -336,8 +341,30 @@
return mapping.findForward("voteDisplay");
}
-
+ public ActionForward forceCompleteActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
+
+ LearningForm lrnForm = (LearningForm) form;
+
+ ScribeUser scribeUser = scribeService.getUserByUID(lrnForm.getScribeUserUID());
+
+ ScribeSession session = scribeUser.getScribeSession();
+
+ if (session.getAppointedScribe().getUid() == scribeUser.getUid()) {
+ session.setForceComplete(true);
+ } else {
+ // TODO need to implement this.
+ log.error("ScribeUserUID: " + scribeUser.getUid() + " is not allowed to forceComplete this session");
+ }
+
+ request.setAttribute("MODE", lrnForm.getMode());
+ setupDTOs(request, session, scribeUser);
+
+ scribeService.saveOrUpdateScribeUser(scribeUser);
+
+ return mapping.findForward("report");
+ }
+
// Private methods.
private void setupDTOs(HttpServletRequest request, ScribeSession scribeSession, ScribeUser scribeUser) {
Index: lams_tool_scribe/web/WEB-INF/struts/tiles-defs.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/web/WEB-INF/struts/Attic/tiles-defs.xml,v
diff -u -r1.5 -r1.6
--- lams_tool_scribe/web/WEB-INF/struts/tiles-defs.xml 30 Sep 2006 10:18:45 -0000 1.5
+++ lams_tool_scribe/web/WEB-INF/struts/tiles-defs.xml 4 Oct 2006 09:44:52 -0000 1.6
@@ -122,6 +122,10 @@
+
+
+
+
Index: lams_tool_scribe/web/pages/learning/learning.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/web/pages/learning/learning.jsp,v
diff -u -r1.8 -r1.9
--- lams_tool_scribe/web/pages/learning/learning.jsp 4 Oct 2006 06:06:29 -0000 1.8
+++ lams_tool_scribe/web/pages/learning/learning.jsp 4 Oct 2006 09:44:52 -0000 1.9
@@ -52,11 +52,7 @@
-
- <%@ include file="parts/finishButton.jsp"%>
-
-
Index: lams_tool_scribe/web/pages/learning/report.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/web/pages/learning/report.jsp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_scribe/web/pages/learning/report.jsp 4 Oct 2006 09:44:52 -0000 1.1
@@ -0,0 +1,34 @@
+<%@ include file="/common/taglibs.jsp"%>
+
+
+
+
+
+
+
+
+ ${scribeDTO.instructions}
+
+
+ <%@include file="/pages/parts/voteDisplay.jsp"%>
+
+
+
+
+
+
+ ${reportDTO.headingDTO.headingText}
+
+
+
+
+
+
+
+
+
+ <%@ include file="parts/finishButton.jsp"%>
+
+
+
+
Index: lams_tool_scribe/web/pages/learning/scribe.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/web/pages/learning/scribe.jsp,v
diff -u -r1.7 -r1.8
--- lams_tool_scribe/web/pages/learning/scribe.jsp 4 Oct 2006 06:06:29 -0000 1.7
+++ lams_tool_scribe/web/pages/learning/scribe.jsp 4 Oct 2006 09:44:52 -0000 1.8
@@ -98,9 +98,14 @@
-
- <%@ include file="parts/finishButton.jsp"%>
-
+
+
+
+
+
+
+
+