Index: lams_tool_dimdim/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/.classpath,v
diff -u -r1.5 -r1.6
--- lams_tool_dimdim/.classpath 17 Aug 2012 14:12:36 -0000 1.5
+++ lams_tool_dimdim/.classpath 7 Dec 2016 13:47:24 -0000 1.6
@@ -3,15 +3,13 @@
-
+
-
+
-
-
-
-
+
+
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/.myumldata'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/.project
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/.project,v
diff -u -r1.1 -r1.2
--- lams_tool_dimdim/.project 15 Aug 2008 08:42:42 -0000 1.1
+++ lams_tool_dimdim/.project 7 Dec 2016 13:47:24 -0000 1.2
@@ -6,43 +6,12 @@
- com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder
-
-
-
-
org.eclipse.jdt.core.javabuilder
-
- com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator
-
-
-
-
- com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator
-
-
-
-
- com.ibm.etools.validation.validationbuilder
-
-
-
-
- com.ibm.sse.model.structuredbuilder
-
-
-
-
- com.genuitec.eclipse.hibernate.HibernateBuilder
-
-
-
- com.genuitec.eclipse.hibernate.hibernatenature
com.genuitec.eclipse.j2eedt.core.webnature
org.eclipse.jdt.core.javanature
Index: lams_tool_dimdim/build.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/build.properties,v
diff -u -r1.3 -r1.4
--- lams_tool_dimdim/build.properties 30 Jul 2012 18:51:21 -0000 1.3
+++ lams_tool_dimdim/build.properties 7 Dec 2016 13:47:23 -0000 1.4
@@ -3,5 +3,5 @@
signature=laddim10
tool.version=20080811
-tool.hide=false
+tool.hide=true
tool.short.name=dimdim
\ No newline at end of file
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/.settings/com.genuitec.eclipse.j2eedt.core.prefs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/.settings/org.eclipse.core.resources.prefs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/.settings/org.eclipse.jdt.core.prefs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/.settings/org.eclipse.jdt.ui.prefs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/hibernate/mappings/hibernate.cfg.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/language/ApplicationResources.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/conf/language/lams/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/conf/language/lams/ApplicationResources.properties,v
diff -u -r1.15 -r1.16
--- lams_tool_dimdim/conf/language/lams/ApplicationResources.properties 9 Apr 2013 12:46:07 -0000 1.15
+++ lams_tool_dimdim/conf/language/lams/ApplicationResources.properties 7 Dec 2016 13:47:22 -0000 1.16
@@ -1,99 +1,3 @@
appName = dimdim
-#language code: en
-#locale code: AU
-
- # CVS ID: $Id$
- # Exported from the LAMS Community by Ernie Ghiglione on Wed May 21 09:49:20 BST 2008
-
-#=================== labels for Dimdim =================#
-
tool.display.name = Dimdim
-tool.description = Dimdim Tool
-activity.title = Dimdim
-activity.description = Dimdim Tool
-activity.helptext = Dimdim
-
-pageTitle.authoring =Dimdim Authoring
-pageTitle.monitoring =Dimdim Monitoring
-
-button.basic =Basic
-button.advanced =Advanced
-button.upload =Upload
-button.cancel =Cancel
-button.save =Save
-button.finish =Next Activity
-button.submit =Finish
-button.instructions =Instructions
-button.continue = Continue
-button.edit = Edit
-button.try.again =Try Again
-button.summary =Summary
-button.editActivity =Edit Activity
-button.statistics =Statistics
-button.close = Close
-
-
-label.authoring.basic.title =Title
-label.attachments =Attachments
-label.view =View
-label.notAvailable =Not Available
-label.save =Save
-label.created =Created
-label.lastModified =Last modified
-label.notebookEntry =Notebook entry
-label.authoring.basic.instructions =Instructions
-label.authoring.basic.dimdimSettings = Dimdim Settings
-label.authoring.basic.maxAttendeeMikes = Number of microphones allowed
-label.on =On
-label.off =Off
-label.monitoring.startConference = Start Conference
-label.learning.joinConference = Join Conference
-label.learning.conferenceNotAvailable = The Dim Dim conference is not available. Please see your instructor for further details.
-label.refresh = Refresh
-label.download =Download
-label.delete =Delete
-
-message.unsavedChanges =Page contains unsaved changes
-message.defineLaterSet =Please wait for the teacher to complete the contents of this activity
-message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details.
-message.learner.blank.input =You have not written anything. Are you sure this is correct?
-message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information.
-message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes.
-message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more.
-message.no.reflection.available = Notebook not available
-message.endMeeting = The meeting room is now closed. You can continue with your sequence.
-
-heading.totalLearners =Number of Learners
-heading.totalLearnersInGroup =Total Number of Learners in Group
-heading.totalFinishedLearnersInGroup =Number of Finished Learners
-heading.learner =Learner
-heading.notebookEntry =Notebook Entry
-
-error.mandatoryField ={0} field is mandatory.
-
-advanced.lockOnFinished =Lock when finished
-advanced.reflectOnActivity = Add Notebook at end of Dimdim with the following instructions
-
-instructions.uploadOfflineInstr =Offline Instructions File
-instructions.uploadOnlineInstr =Online Instructions File
-instructions.offlineInstructions =Offline Instructions
-instructions.onlineInstructions =Online Instructions
-
-authoring.msg.cancel.save =Do you want to close this window without saving?
-
-monitor.summary.th.advancedSettings =Advanced Settings
-monitor.summary.dimdimSettings = Dim Dim Settings
-
-admin.title = Dim Dim Administration
-config.serverURL = Dimdim Server URL
-config.version = Dimdim Version
-
-label.version.standard=Standard
-label.version.enterprise=Enterprise
-label.version.pleaseSelect = Please Select
-
-export.toolExportNotSupported = This tool does not support export portfolio.
-
-message.unableToStartLesson = Unable to join meeting. Please see your instructor.
-
-#======= End labels: Exported 78 labels for en AU =====
+activity.title = Dimdim
\ No newline at end of file
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/language/lams/ApplicationResources_en_AU.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/language/rams/ApplicationResources.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/language/rams/ApplicationResources_en_AU.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/middlegen/lams_tool_ladimdim11-prefs.properties'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/error-pages.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/filter-mappings.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/filters.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/global-forwards.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/listeners.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/servlet-mappings.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/servlets.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/struts-actions.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/struts-forms.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/struts-message-resources.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/struts-plugins.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/taglibs.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/web-security.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/conf/xdoclet/web-settings.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/db/model/dimdim_tool.clay'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/db/sql/activity_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/db/sql/activity_insert.sql,v
diff -u -r1.2 -r1.3
--- lams_tool_dimdim/db/sql/activity_insert.sql 8 Oct 2008 03:36:17 -0000 1.2
+++ lams_tool_dimdim/db/sql/activity_insert.sql 7 Dec 2016 13:47:22 -0000 1.3
@@ -1,5 +1,3 @@
--- CVS ID: $Id$
-
INSERT INTO lams_learning_activity
(
activity_ui_id
@@ -31,8 +29,6 @@
, gate_open_flag
, gate_start_time_offset
, gate_end_time_offset
-, gate_start_date_time
-, gate_end_date_time
, library_activity_ui_image
, create_grouping_id
, create_grouping_ui_id
@@ -70,8 +66,6 @@
, NULL
, NULL
, NULL
-, NULL
-, NULL
, 'tool/laddim10/images/icon_dimdim.swf'
, NULL
, NULL
Index: lams_tool_dimdim/db/sql/create_lams_tool_dimdim.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/db/sql/create_lams_tool_dimdim.sql,v
diff -u -r1.10 -r1.11
--- lams_tool_dimdim/db/sql/create_lams_tool_dimdim.sql 28 Nov 2008 04:45:14 -0000 1.10
+++ lams_tool_dimdim/db/sql/create_lams_tool_dimdim.sql 7 Dec 2016 13:47:22 -0000 1.11
@@ -1,62 +1,3 @@
--- CVS ID: $Id$
-
+-- file must not be empty and it must contain update statements (not select)
SET FOREIGN_KEY_CHECKS=0;
--- generated sql
-drop table if exists tl_laddim10_attachment;
-drop table if exists tl_laddim10_config;
-drop table if exists tl_laddim10_dimdim;
-drop table if exists tl_laddim10_session;
-drop table if exists tl_laddim10_user;
-create table tl_laddim10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, dimdim_uid bigint, primary key (uid));
-create table tl_laddim10_config (uid bigint not null auto_increment, config_key varchar(255), config_value varchar(255), primary key (uid));
-create table tl_laddim10_dimdim (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, reflect_on_activity bit, reflect_instructions text, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, max_attendee_mikes integer, primary key (uid));
-create table tl_laddim10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), dimdim_uid bigint, meeting_created bit, meeting_key varchar(255), max_attendee_mikes integer, primary key (uid));
-create table tl_laddim10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, dimdim_session_uid bigint, notebook_entry_uid bigint, primary key (uid));
--- end generated sql
-
--- set engine to innodb for all tables
-alter table tl_laddim10_attachment engine=innodb;
-alter table tl_laddim10_dimdim engine=innodb;
-alter table tl_laddim10_config engine=innodb;
-alter table tl_laddim10_session engine=innodb;
-alter table tl_laddim10_user engine=innodb;
-
--- generated sql
-alter table tl_laddim10_attachment add index fk_laddim10_dimdim_attachment_to_dimdim (dimdim_uid), add constraint fk_laddim10_dimdim_attachment_to_dimdim foreign key (dimdim_uid) references tl_laddim10_dimdim (uid);
-alter table tl_laddim10_session add index fk_laddim10_dimdim_session_to_dimdim (dimdim_uid), add constraint fk_laddim10_dimdim_session_to_dimdim foreign key (dimdim_uid) references tl_laddim10_dimdim (uid);
-alter table tl_laddim10_user add index fk_laddim10_dimdim_user_to_dimdim_session (dimdim_session_uid), add constraint fk_laddim10_dimdim_user_to_dimdim_session foreign key (dimdim_session_uid) references tl_laddim10_session (uid);
--- end generated sql
-
-INSERT INTO tl_laddim10_dimdim (
- title,
- instructions,
- online_instructions,
- offline_instructions,
- tool_content_id,
- run_offline,
- lock_on_finished,
- content_in_use,
- define_later,
- reflect_on_activity,
- max_attendee_mikes
- )
-VALUES(
- "Dimdim",
- "Instructions",
- "",
- "",
- ${default_content_id},
- 0,
- 0,
- 0,
- 0,
- 0,
- 1
-);
-
--- default configuration values
-INSERT INTO tl_laddim10_config (config_key, config_value) VALUES ("server_url", "http://172.20.100.253/");
--- INSERT INTO tl_laddim10_config (config_key, config_value) VALUES ("version", "enterprise");
-
-
-SET FOREIGN_KEY_CHECKS=1;
+SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
Index: lams_tool_dimdim/db/sql/db_version_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/db/sql/db_version_insert.sql,v
diff -u -r1.1 -r1.2
--- lams_tool_dimdim/db/sql/db_version_insert.sql 23 Sep 2008 04:21:19 -0000 1.1
+++ lams_tool_dimdim/db/sql/db_version_insert.sql 7 Dec 2016 13:47:22 -0000 1.2
@@ -1,2 +1 @@
--- $Id$
INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F');
\ No newline at end of file
Index: lams_tool_dimdim/db/sql/library_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/db/sql/library_insert.sql,v
diff -u -r1.1 -r1.2
--- lams_tool_dimdim/db/sql/library_insert.sql 15 Aug 2008 08:42:42 -0000 1.1
+++ lams_tool_dimdim/db/sql/library_insert.sql 7 Dec 2016 13:47:22 -0000 1.2
@@ -1,5 +1,3 @@
--- CVS ID: $Id$
-
INSERT INTO lams_learning_library
(
description,
Fisheye: Tag 1.10 refers to a dead (removed) revision in file `lams_tool_dimdim/db/sql/table-schema.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/db/sql/tool_insert.sql
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/db/sql/tool_insert.sql,v
diff -u -r1.4 -r1.5
--- lams_tool_dimdim/db/sql/tool_insert.sql 26 Mar 2009 10:00:37 -0000 1.4
+++ lams_tool_dimdim/db/sql/tool_insert.sql 7 Dec 2016 13:47:22 -0000 1.5
@@ -1,5 +1,3 @@
--- CVS ID: $Id$
-
INSERT INTO lams_tool
(
tool_signature,
@@ -19,15 +17,12 @@
author_url,
monitor_url,
define_later_url,
-export_pfolio_learner_url,
-export_pfolio_class_url,
-contribute_url,
-moderation_url,
+pedagogical_planner_url,
help_url,
-admin_url,
language_file,
create_date_time,
-modified_date_time
+modified_date_time,
+supports_outputs
)
VALUES
(
@@ -47,14 +42,11 @@
'tool/laddim10/learning.do?mode=teacher',
'tool/laddim10/authoring.do',
'tool/laddim10/monitoring.do',
-'tool/laddim10/authoring.do?mode=teacher',
-'tool/laddim10/exportPortfolio?mode=learner',
-'tool/laddim10/exportPortfolio?mode=teacher',
-'tool/laddim10/contribute.do',
-'tool/laddim10/moderate.do',
-'http://wiki.lamsfoundation.org/display/lamsdocs/laddim10',
-'tool/laddim10/admin/view.do',
+NULL,
+'tool/laddim10/authoring.do',
+NULL,
'org.lamsfoundation.lams.tool.dimdim.ApplicationResources',
NOW(),
-NOW()
+NOW(),
+0
)
Index: lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dimdimApplicationContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dimdimApplicationContext.xml,v
diff -u -r1.4 -r1.5
--- lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dimdimApplicationContext.xml 26 Mar 2009 10:00:37 -0000 1.4
+++ lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dimdimApplicationContext.xml 7 Dec 2016 13:47:23 -0000 1.5
@@ -1,81 +1,9 @@
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
-
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
- PROPAGATION_REQUIRED
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/IDimdimAttachmentDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/IDimdimConfigDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/IDimdimDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/IDimdimSessionDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.6 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/IDimdimUserDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/hibernate/DimdimAttachmentDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/hibernate/DimdimConfigDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/hibernate/DimdimDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/hibernate/DimdimSessionDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dao/hibernate/DimdimUserDAO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dbupdates/autopatchContext.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dto/AttachmentDTO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dto/ConfigDTO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.11 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dto/ContentDTO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dto/NotebookEntryDTO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.6 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dto/SessionDTO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.6 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/dto/UserDTO.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.10 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/model/Dimdim.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/model/DimdimAttachment.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/model/DimdimConfig.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.10 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/model/DimdimSession.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.8 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/model/DimdimUser.java'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/service/DimdimService.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/service/DimdimService.java,v
diff -u -r1.20 -r1.21
--- lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/service/DimdimService.java 29 Jul 2013 23:11:09 -0000 1.20
+++ lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/service/DimdimService.java 7 Dec 2016 13:47:23 -0000 1.21
@@ -2,769 +2,135 @@
* 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
* ****************************************************************
*/
/* $Id$ */
package org.lamsfoundation.lams.tool.dimdim.service;
-import java.io.BufferedReader;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Hashtable;
+import java.util.ArrayList;
import java.util.List;
-import java.util.Map;
-import java.util.Set;
import java.util.SortedMap;
-import java.util.TreeMap;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.apache.struts.upload.FormFile;
-import org.lamsfoundation.lams.contentrepository.AccessDeniedException;
-import org.lamsfoundation.lams.contentrepository.ICredentials;
-import org.lamsfoundation.lams.contentrepository.ITicket;
-import org.lamsfoundation.lams.contentrepository.InvalidParameterException;
-import org.lamsfoundation.lams.contentrepository.LoginException;
-import org.lamsfoundation.lams.contentrepository.NodeKey;
-import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
-import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException;
-import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
-import org.lamsfoundation.lams.contentrepository.service.IRepositoryService;
-import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials;
-import org.lamsfoundation.lams.learning.service.ILearnerService;
-import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException;
-import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService;
-import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException;
-import org.lamsfoundation.lams.notebook.model.NotebookEntry;
-import org.lamsfoundation.lams.notebook.service.ICoreNotebookService;
-import org.lamsfoundation.lams.tool.ToolContentImport102Manager;
import org.lamsfoundation.lams.tool.ToolContentManager;
import org.lamsfoundation.lams.tool.ToolOutput;
import org.lamsfoundation.lams.tool.ToolOutputDefinition;
import org.lamsfoundation.lams.tool.ToolSessionExportOutputData;
import org.lamsfoundation.lams.tool.ToolSessionManager;
-import org.lamsfoundation.lams.tool.dimdim.dao.IDimdimAttachmentDAO;
-import org.lamsfoundation.lams.tool.dimdim.dao.IDimdimConfigDAO;
-import org.lamsfoundation.lams.tool.dimdim.dao.IDimdimDAO;
-import org.lamsfoundation.lams.tool.dimdim.dao.IDimdimSessionDAO;
-import org.lamsfoundation.lams.tool.dimdim.dao.IDimdimUserDAO;
-import org.lamsfoundation.lams.tool.dimdim.model.Dimdim;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimAttachment;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimConfig;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimSession;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimUser;
-import org.lamsfoundation.lams.tool.dimdim.util.Constants;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimException;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimToolContentHandler;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimUtil;
import org.lamsfoundation.lams.tool.exception.DataMissingException;
-import org.lamsfoundation.lams.tool.exception.SessionDataExistsException;
import org.lamsfoundation.lams.tool.exception.ToolException;
-import org.lamsfoundation.lams.tool.service.ILamsToolService;
-import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
-import org.lamsfoundation.lams.util.WebUtil;
-import org.lamsfoundation.lams.util.audit.IAuditService;
+import org.lamsfoundation.lams.usermanagement.User;
-/**
- * An implementation of the IDimdimService interface.
- *
- * As a requirement, all LAMS tool's service bean must implement ToolContentManager and ToolSessionManager.
- */
+public class DimdimService implements ToolSessionManager, ToolContentManager {
-public class DimdimService implements ToolSessionManager, ToolContentManager, IDimdimService,
- ToolContentImport102Manager {
-
- private static final Logger logger = Logger.getLogger(DimdimService.class);
-
- private IDimdimDAO dimdimDAO = null;
-
- private IDimdimSessionDAO dimdimSessionDAO = null;
-
- private IDimdimUserDAO dimdimUserDAO = null;
-
- private IDimdimAttachmentDAO dimdimAttachmentDAO = null;
-
- private IDimdimConfigDAO dimdimConfigDAO = null;
-
- private ILearnerService learnerService;
-
- private ILamsToolService toolService;
-
- private IToolContentHandler dimdimToolContentHandler = null;
-
- private IRepositoryService repositoryService = null;
-
- private IAuditService auditService = null;
-
- private IExportToolContentService exportContentService;
-
- private ICoreNotebookService coreNotebookService;
-
- public DimdimService() {
- super();
- // TODO Auto-generated constructor stub
- }
-
- /* Methods from ToolSessionManager */
+ @Override
public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException {
- if (DimdimService.logger.isDebugEnabled()) {
- DimdimService.logger.debug("entering method createToolSession:" + " toolSessionId = " + toolSessionId
- + " toolSessionName = " + toolSessionName + " toolContentId = " + toolContentId);
- }
-
- DimdimSession session = new DimdimSession();
- session.setSessionId(toolSessionId);
- session.setSessionName(toolSessionName);
- // learner starts
- Dimdim dimdim = getDimdimByContentId(toolContentId);
- session.setDimdim(dimdim);
- dimdimSessionDAO.insertOrUpdate(session);
}
+ @Override
public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException {
- return learnerService.completeToolSession(toolSessionId, learnerId);
+ return null;
}
- public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException {
- // TODO Auto-generated method stub
+ @Override
+ public ToolSessionExportOutputData exportToolSession(Long toolSessionId)
+ throws DataMissingException, ToolException {
return null;
}
- @SuppressWarnings("unchecked")
- public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException,
- ToolException {
- // TODO Auto-generated method stub
+ @Override
+ public ToolSessionExportOutputData exportToolSession(List toolSessionIds)
+ throws DataMissingException, ToolException {
return null;
}
+ @Override
public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException {
- dimdimSessionDAO.deleteByProperty(DimdimSession.class, "sessionId", toolSessionId);
- // TODO check if cascade worked
}
- /**
- * Get the tool output for the given tool output names.
- *
- * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.util .List, java.lang.Long,
- * java.lang.Long)
- */
+ @Override
public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) {
- return new TreeMap();
+ return null;
}
- /**
- * Get the tool output for the given tool output name.
- *
- * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.lang.String, java.lang.Long,
- * java.lang.Long)
- */
+ @Override
public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) {
return null;
}
- /* Methods from ToolContentManager */
+ @Override
+ public List getToolOutputs(String name, Long toolContentId) {
+ return new ArrayList();
+ }
- public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException {
+ @Override
+ public void forceCompleteUser(Long toolSessionId, User user) {
+ }
- if (DimdimService.logger.isDebugEnabled()) {
- DimdimService.logger.debug("entering method copyToolContent:" + " fromContentId=" + fromContentId
- + " toContentId=" + toContentId);
- }
-
- if (toContentId == null) {
- String error = "Failed to copy tool content: toContentID is null";
- throw new ToolException(error);
- }
-
- Dimdim fromContent = null;
- if (fromContentId != null) {
- fromContent = getDimdimByContentId(fromContentId);
- }
- if (fromContent == null) {
- // create the fromContent using the default tool content
- fromContent = getDefaultContent();
- }
- Dimdim toContent = Dimdim.newInstance(fromContent, toContentId, dimdimToolContentHandler);
- saveOrUpdateDimdim(toContent);
+ @Override
+ public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException {
}
- public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException {
- Dimdim dimdim = getDimdimByContentId(toolContentId);
- if (dimdim == null) {
- throw new ToolException("Could not find tool with toolContentID: " + toolContentId);
- }
- dimdim.setDefineLater(value);
- saveOrUpdateDimdim(dimdim);
+ @Override
+ public void resetDefineLater(Long toolContentId) throws DataMissingException, ToolException {
}
- public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException {
- Dimdim dimdim = getDimdimByContentId(toolContentId);
- if (dimdim == null) {
- throw new ToolException("Could not find tool with toolContentID: " + toolContentId);
- }
- dimdim.setRunOffline(value);
- saveOrUpdateDimdim(dimdim);
+ @Override
+ public void removeToolContent(Long toolContentId) throws ToolException {
}
- public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException,
- ToolException {
- // TODO Auto-generated method stub
+ @Override
+ public void removeLearnerContent(Long toolContentId, Integer userId) throws ToolException {
}
- /**
- * Export the XML fragment for the tool's content, along with any files needed for the content.
- *
- * @throws DataMissingException
- * if no tool content matches the toolSessionId
- * @throws ToolException
- * if any other error occurs
- */
-
- public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException {
- Dimdim dimdim = getDimdimByContentId(toolContentId);
- if (dimdim == null) {
- dimdim = getDefaultContent();
- }
- if (dimdim == null) {
- throw new DataMissingException("Unable to find default content for the dimdim tool");
- }
-
- // set ResourceToolContentHandler as null to avoid copy file node in
- // repository again.
- dimdim = Dimdim.newInstance(dimdim, toolContentId, null);
- dimdim.setToolContentHandler(null);
- dimdim.setDimdimSessions(null);
- Set atts = dimdim.getDimdimAttachments();
- for (DimdimAttachment att : atts) {
- att.setDimdim(null);
- }
- try {
- exportContentService.registerFileClassForExport(DimdimAttachment.class.getName(), "fileUuid",
- "fileVersionId");
- exportContentService.exportToolContent(toolContentId, dimdim, dimdimToolContentHandler, rootPath);
- } catch (ExportToolContentException e) {
- throw new ToolException(e);
- }
+ @Override
+ public void exportToolContent(Long toolContentId, String toPath) throws DataMissingException, ToolException {
}
- /**
- * Import the XML fragment for the tool's content, along with any files needed for the content.
- *
- * @throws ToolException
- * if any other error occurs
- */
+ @Override
public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion,
String toVersion) throws ToolException {
- try {
- exportContentService.registerFileClassForImport(DimdimAttachment.class.getName(), "fileUuid",
- "fileVersionId", "fileName", "fileType", null, null);
-
- Object toolPOJO = exportContentService.importToolContent(toolContentPath, dimdimToolContentHandler,
- fromVersion, toVersion);
- if (!(toolPOJO instanceof Dimdim)) {
- throw new ImportToolContentException("Import Dimdim tool content failed. Deserialized object is "
- + toolPOJO);
- }
- Dimdim dimdim = (Dimdim) toolPOJO;
-
- // reset it to new toolContentId
- dimdim.setToolContentId(toolContentId);
- dimdim.setCreateBy(new Long(newUserUid.longValue()));
-
- saveOrUpdateDimdim(dimdim);
- } catch (ImportToolContentException e) {
- throw new ToolException(e);
- }
}
- /**
- * Get the definitions for possible output for an activity, based on the toolContentId. These may be definitions
- * that are always available for the tool (e.g. number of marks for Multiple Choice) or a custom definition created
- * for a particular activity such as the answer to the third question contains the word Koala and hence the need for
- * the toolContentId
- *
- * @return SortedMap of ToolOutputDefinitions with the key being the name of each definition
- */
+ @Override
public SortedMap getToolOutputDefinitions(Long toolContentId, int definitionType)
throws ToolException {
- return new TreeMap();
+ return null;
}
- public String getToolContentTitle(Long toolContentId) {
- return getDimdimByContentId(toolContentId).getTitle();
+ @Override
+ public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) {
+ return null;
}
-
- /* IDimdimService Methods */
- public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry) {
- return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry);
- }
-
- public NotebookEntry getEntry(Long id, Integer idType, String signature, Integer userID) {
-
- List list = coreNotebookService.getEntry(id, idType, signature, userID);
- if (list == null || list.isEmpty()) {
- return null;
- } else {
- return list.get(0);
- }
- }
-
- public NotebookEntry getNotebookEntry(Long uid) {
- return coreNotebookService.getEntry(uid);
- }
-
- public void updateNotebookEntry(Long uid, String entry) {
- coreNotebookService.updateEntry(uid, "", entry);
- }
-
- public void updateNotebookEntry(NotebookEntry notebookEntry) {
- coreNotebookService.updateEntry(notebookEntry);
- }
-
- public Long getDefaultContentIdBySignature(String toolSignature) {
- Long toolContentId = null;
- toolContentId = new Long(toolService.getToolDefaultContentIdBySignature(toolSignature));
- if (toolContentId == null) {
- String error = "Could not retrieve default content id for this tool";
- DimdimService.logger.error(error);
- throw new DimdimException(error);
- }
- return toolContentId;
- }
-
- public Dimdim getDefaultContent() {
- Long defaultContentID = getDefaultContentIdBySignature(Constants.TOOL_SIGNATURE);
- Dimdim defaultContent = getDimdimByContentId(defaultContentID);
- if (defaultContent == null) {
- String error = "Could not retrieve default content record for this tool";
- DimdimService.logger.error(error);
- throw new DimdimException(error);
- }
- return defaultContent;
- }
-
- public Dimdim copyDefaultContent(Long newContentID) {
-
- if (newContentID == null) {
- String error = "Cannot copy the Dimdim tools default content: + " + "newContentID is null";
- DimdimService.logger.error(error);
- throw new DimdimException(error);
- }
-
- Dimdim defaultContent = getDefaultContent();
- // create new dimdim using the newContentID
- Dimdim newContent = new Dimdim();
- newContent = Dimdim.newInstance(defaultContent, newContentID, dimdimToolContentHandler);
- saveOrUpdateDimdim(newContent);
- return newContent;
- }
-
- @SuppressWarnings("unchecked")
- public Dimdim getDimdimByContentId(Long toolContentID) {
- List list = dimdimDAO.findByProperty(Dimdim.class, "toolContentId", toolContentID);
- if (list.isEmpty()) {
- return null;
- } else {
- return list.get(0);
- }
- }
-
- @SuppressWarnings("unchecked")
- public DimdimSession getSessionBySessionId(Long toolSessionId) {
- List list = dimdimSessionDAO.findByProperty(DimdimSession.class, "sessionId", toolSessionId);
- if (list.isEmpty()) {
- return null;
- } else {
- return list.get(0);
- }
- }
-
- @SuppressWarnings("unchecked")
- public DimdimUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId) {
- Map map = new HashMap();
- map.put("userId", userId);
- map.put("dimdimSession.sessionId", toolSessionId);
- List list = dimdimUserDAO.findByProperties(DimdimUser.class, map);
- if (list.isEmpty()) {
- return null;
- } else {
- return list.get(0);
- }
- }
-
- @SuppressWarnings("unchecked")
- public DimdimUser getUserByUID(Long uid) {
- List list = dimdimUserDAO.findByProperty(DimdimUser.class, "uid", uid);
- if (list.isEmpty()) {
- return null;
- } else {
- return list.get(0);
- }
- }
-
- public DimdimAttachment uploadFileToContent(Long toolContentId, FormFile file, String type) {
- if (file == null || StringUtils.isEmpty(file.getFileName())) {
- throw new DimdimException("Could not find upload file: " + file);
- }
-
- NodeKey nodeKey = processFile(file, type);
-
- DimdimAttachment attachment = new DimdimAttachment(nodeKey.getVersion(), type, file.getFileName(), nodeKey
- .getUuid(), new Date());
- return attachment;
- }
-
- public void deleteFromRepository(Long uuid, Long versionID) throws DimdimException {
- ITicket ticket = getRepositoryLoginTicket();
- try {
- repositoryService.deleteVersion(ticket, uuid, versionID);
- } catch (Exception e) {
- throw new DimdimException("Exception occured while deleting files from" + " the repository "
- + e.getMessage());
- }
- }
-
- public String getDimdimJoinConferenceURL(UserDTO userDTO, String meetingKey) throws Exception {
-
- // Get Dimdim server url
- String serverURL = getServerUrl().getValue();
- if (serverURL == null) {
- DimdimService.logger.error("Config item : '" + Constants.CFG_SERVER_URL + "' not defined");
- throw new DimdimException("Standard server url not defined");
- }
-
- URL url = new URL(serverURL + "/dimdim/JoinConferenceCheck.action?" + "email="
- + URLEncoder.encode(userDTO.getEmail(), "UTF8") + "&displayName="
- + URLEncoder.encode(userDTO.getFirstName() + " " + userDTO.getLastName(), "UTF8") + "&confKey="
- + URLEncoder.encode(meetingKey, "UTF8"));
-
- String response = sendRequest(url);
-
- String result = DimdimUtil.getResult(response);
-
- if (result.equals("success")) {
- String path = DimdimUtil.getURL(response);
-
- return serverURL + path;
- } else {
- DimdimService.logger.error("getDimdimJoinConferenceURL: result: " + result);
- }
+ @Override
+ public String getToolContentTitle(Long toolContentId) {
return null;
}
- public String getDimdimStartConferenceURL(UserDTO userDTO, String meetingKey, String returnURL, int maxAttendeeMikes)
- throws Exception {
-
- String serverURL = getServerUrl().getValue();
- if (serverURL == null) {
- DimdimService.logger.error("Config item : '" + Constants.CFG_SERVER_URL + "' not defined");
- throw new DimdimException("Standard server url not defined");
- }
-
- URL url = new URL(serverURL + "/dimdim/StartNewConferenceCheck.action?" + "email="
- + URLEncoder.encode(userDTO.getEmail(), "UTF8") + "&displayName="
- + URLEncoder.encode(userDTO.getFirstName() + " " + userDTO.getLastName(), "UTF8") + "&confKey="
- + URLEncoder.encode(meetingKey, "UTF8") + "&lobby=false" + "&networkProfile=3" + "&meetingHours=99"
- + "&maxAttendeeMikes=" + maxAttendeeMikes + "&returnUrl=" + URLEncoder.encode(returnURL, "UTF8")
- + "&presenterAV=av" + "&privateChatEnabled=true" + "&publicChatEnabled=true"
- + "&screenShareEnabled=true" + "&whiteboardEnabled=true");
- //TODO remove this commented part if this tool works Ok
-// url = new URL(serverURL + "/dimdim/StartNewConferenceCheck.action?" + "email="
-// + URLEncoder.encode(userDTO.getEmail(), "UTF8") + "&meetingRoomName="
-// + URLEncoder.encode(meetingKey, "UTF8") + "&displayName="
-// + URLEncoder.encode(userDTO.getFirstName() + " " + userDTO.getLastName(), "UTF8") + "&confName="
-// + "QandA" + "&lobby=" + "false" + "&networkProfile=" + "3" + "&meetingHours" + "=2"
-// + "&meetingMinutes=" + "0" + "&presenterAV=" + "av" + "&maxAttendeeMikes=" + maxAttendeeMikes
-// + "&returnUrl=" + URLEncoder.encode(returnURL, "UTF8") + "&whiteboardEnabled=" + "true"
-// + "&screenShareEnabled=" + "true" + "&participantListEnabled=true" + "&dialInfoVisible=true");
-
- String response = sendRequest(url);
- String path = DimdimUtil.getURL(response);
-
- return serverURL + path;
+ @Override
+ public boolean isContentEdited(Long toolContentId) {
+ return false;
}
- public void saveOrUpdateDimdim(Dimdim dimdim) {
- dimdimDAO.insertOrUpdate(dimdim);
+ @Override
+ public boolean isReadOnly(Long toolContentId) {
+ return false;
}
-
- public void saveOrUpdateDimdimSession(DimdimSession dimdimSession) {
- dimdimSessionDAO.insertOrUpdate(dimdimSession);
- }
-
- public void saveOrUpdateDimdimUser(DimdimUser dimdimUser) {
- dimdimUserDAO.insertOrUpdate(dimdimUser);
- }
-
- public DimdimUser createDimdimUser(UserDTO user, DimdimSession dimdimSession) {
- DimdimUser dimdimUser = new DimdimUser(user, dimdimSession);
- saveOrUpdateDimdimUser(dimdimUser);
- return dimdimUser;
- }
-
- @SuppressWarnings("unchecked")
- public DimdimConfig getServerUrl() {
- List list = dimdimConfigDAO.findByProperty(DimdimConfig.class, "key", Constants.CFG_SERVER_URL);
- if (list.isEmpty()) {
- return null;
- } else {
- return list.get(0);
- }
- }
-
- public void saveOrUpdateConfigEntry(DimdimConfig dimdimConfig) {
- dimdimConfigDAO.insertOrUpdate(dimdimConfig);
- }
-
- public IAuditService getAuditService() {
- return auditService;
- }
-
- public void setAuditService(IAuditService auditService) {
- this.auditService = auditService;
- }
-
- private String sendRequest(URL url) throws IOException {
-
- if (DimdimService.logger.isDebugEnabled()) {
- DimdimService.logger.debug("request = " + url);
- }
-
- URLConnection connection = url.openConnection();
-
- BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
- String response = "";
- String line = "";
-
- while ((line = in.readLine()) != null) {
- response += line;
- }
- in.close();
-
- if (DimdimService.logger.isDebugEnabled()) {
- DimdimService.logger.debug("response = " + response);
- }
-
- return response;
- }
-
- private NodeKey processFile(FormFile file, String type) {
- NodeKey node = null;
- if (file != null && !StringUtils.isEmpty(file.getFileName())) {
- String fileName = file.getFileName();
- try {
- node = getDimdimToolContentHandler().uploadFile(file.getInputStream(), fileName, file.getContentType(),
- type);
- } catch (InvalidParameterException e) {
- throw new DimdimException("InvalidParameterException occured while trying to upload File"
- + e.getMessage());
- } catch (FileNotFoundException e) {
- throw new DimdimException("FileNotFoundException occured while trying to upload File" + e.getMessage());
- } catch (RepositoryCheckedException e) {
- throw new DimdimException("RepositoryCheckedException occured while trying to upload File"
- + e.getMessage());
- } catch (IOException e) {
- throw new DimdimException("IOException occured while trying to upload File" + e.getMessage());
- }
- }
- return node;
- }
-
- /**
- * This method verifies the credentials of the SubmitFiles Tool and gives it the Ticket
to login and
- * access the Content Repository.
- *
- * A valid ticket is needed in order to access the content from the repository. This method would be called evertime
- * the tool needs to upload/download files from the content repository.
- *
- * @return ITicket The ticket for repostory access
- * @throws SubmitFilesException
- */
- private ITicket getRepositoryLoginTicket() throws DimdimException {
- ICredentials credentials = new SimpleCredentials(DimdimToolContentHandler.repositoryUser,
- DimdimToolContentHandler.repositoryId);
- try {
- ITicket ticket = repositoryService.login(credentials, DimdimToolContentHandler.repositoryWorkspaceName);
- return ticket;
- } catch (AccessDeniedException ae) {
- throw new DimdimException("Access Denied to repository." + ae.getMessage());
- } catch (WorkspaceNotFoundException we) {
- throw new DimdimException("Workspace not found." + we.getMessage());
- } catch (LoginException e) {
- throw new DimdimException("Login failed." + e.getMessage());
- }
- }
-
- public boolean isGroupedActivity(long toolContentID) {
- return toolService.isGroupedActivity(toolContentID);
- }
-
- /*
- * ===============Methods implemented from ToolContentImport102Manager ===============
- */
-
- /**
- * Import the data for a 1.0.2 Dimdim
- */
- @SuppressWarnings("unchecked")
- public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) {
- Date now = new Date();
- Dimdim dimdim = new Dimdim();
- dimdim.setContentInUse(Boolean.FALSE);
- dimdim.setCreateBy(new Long(user.getUserID().longValue()));
- dimdim.setCreateDate(now);
- dimdim.setDefineLater(Boolean.FALSE);
- dimdim.setInstructions(WebUtil.convertNewlines((String) importValues
- .get(ToolContentImport102Manager.CONTENT_BODY)));
- dimdim.setLockOnFinished(Boolean.TRUE);
- dimdim.setOfflineInstructions(null);
- dimdim.setOnlineInstructions(null);
- dimdim.setReflectInstructions(null);
- dimdim.setReflectOnActivity(Boolean.FALSE);
- dimdim.setRunOffline(Boolean.FALSE);
- dimdim.setTitle((String) importValues.get(ToolContentImport102Manager.CONTENT_TITLE));
- dimdim.setToolContentId(toolContentId);
- dimdim.setUpdateDate(now);
- // leave as empty, no need to set them to anything.
- // setDimdimAttachments(Set dimdimAttachments);
- // setDimdimSessions(Set dimdimSessions);
- saveOrUpdateDimdim(dimdim);
- }
-
- /**
- * Set the description, throws away the title value as this is not supported in 2.0
- */
- public void setReflectiveData(Long toolContentId, String title, String description) throws ToolException,
- DataMissingException {
-
- DimdimService.logger
- .warn("Setting the reflective field on a dimdim. This doesn't make sense as the dimdim is for reflection and we don't reflect on reflection!");
- Dimdim dimdim = getDimdimByContentId(toolContentId);
- if (dimdim == null) {
- throw new DataMissingException("Unable to set reflective data titled " + title
- + " on activity toolContentId " + toolContentId + " as the tool content does not exist.");
- }
-
- dimdim.setReflectOnActivity(Boolean.TRUE);
- dimdim.setReflectInstructions(description);
- }
-
- // =========================================================================================
- /* Used by Spring to "inject" the linked objects */
-
- public IDimdimAttachmentDAO getDimdimAttachmentDAO() {
- return dimdimAttachmentDAO;
- }
-
- public void setDimdimAttachmentDAO(IDimdimAttachmentDAO attachmentDAO) {
- dimdimAttachmentDAO = attachmentDAO;
- }
-
- public IDimdimDAO getDimdimDAO() {
- return dimdimDAO;
- }
-
- public void setDimdimDAO(IDimdimDAO dimdimDAO) {
- this.dimdimDAO = dimdimDAO;
- }
-
- public IToolContentHandler getDimdimToolContentHandler() {
- return dimdimToolContentHandler;
- }
-
- public void setDimdimToolContentHandler(IToolContentHandler dimdimToolContentHandler) {
- this.dimdimToolContentHandler = dimdimToolContentHandler;
- }
-
- public IDimdimSessionDAO getDimdimSessionDAO() {
- return dimdimSessionDAO;
- }
-
- public void setDimdimSessionDAO(IDimdimSessionDAO sessionDAO) {
- dimdimSessionDAO = sessionDAO;
- }
-
- public IDimdimConfigDAO getDimdimConfigDAO() {
- return dimdimConfigDAO;
- }
-
- public void setDimdimConfigDAO(IDimdimConfigDAO dimdimConfigDAO) {
- this.dimdimConfigDAO = dimdimConfigDAO;
- }
-
- public ILamsToolService getToolService() {
- return toolService;
- }
-
- public void setToolService(ILamsToolService toolService) {
- this.toolService = toolService;
- }
-
- public IDimdimUserDAO getDimdimUserDAO() {
- return dimdimUserDAO;
- }
-
- public void setDimdimUserDAO(IDimdimUserDAO userDAO) {
- dimdimUserDAO = userDAO;
- }
-
- public ILearnerService getLearnerService() {
- return learnerService;
- }
-
- public void setLearnerService(ILearnerService learnerService) {
- this.learnerService = learnerService;
- }
-
- public IExportToolContentService getExportContentService() {
- return exportContentService;
- }
-
- public void setExportContentService(IExportToolContentService exportContentService) {
- this.exportContentService = exportContentService;
- }
-
- public ICoreNotebookService getCoreNotebookService() {
- return coreNotebookService;
- }
-
- public void setCoreNotebookService(ICoreNotebookService coreNotebookService) {
- this.coreNotebookService = coreNotebookService;
- }
-
- public IRepositoryService getRepositoryService() {
- return repositoryService;
- }
-
- public void setRepositoryService(IRepositoryService repositoryService) {
- this.repositoryService = repositoryService;
- }
-
- public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) {
- return null;
- }
-}
+}
\ No newline at end of file
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/service/DimdimServiceProxy.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.14 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/service/IDimdimService.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.12 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/util/Constants.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/util/DimdimException.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/util/DimdimToolContentHandler.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.8 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/util/DimdimUtil.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.10 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/AdminAction.java'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/AuthoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/AuthoringAction.java,v
diff -u -r1.11 -r1.12
--- lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/AuthoringAction.java 21 Nov 2008 06:32:54 -0000 1.11
+++ lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/AuthoringAction.java 7 Dec 2016 13:47:24 -0000 1.12
@@ -2,446 +2,41 @@
* 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
* ****************************************************************
*/
/* $Id$ */
package org.lamsfoundation.lams.tool.dimdim.web.actions;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-
-import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.beanutils.BeanUtils;
-import org.apache.commons.lang.StringUtils;
+import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionMessages;
-import org.apache.struts.actions.DispatchAction;
-import org.apache.struts.upload.FormFile;
-import org.lamsfoundation.lams.authoring.web.AuthoringConstants;
-import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-import org.lamsfoundation.lams.tool.dimdim.model.Dimdim;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimAttachment;
-import org.lamsfoundation.lams.tool.dimdim.service.DimdimServiceProxy;
-import org.lamsfoundation.lams.tool.dimdim.service.IDimdimService;
-import org.lamsfoundation.lams.tool.dimdim.util.Constants;
-import org.lamsfoundation.lams.tool.dimdim.web.forms.AuthoringForm;
-import org.lamsfoundation.lams.util.FileValidatorUtil;
-import org.lamsfoundation.lams.util.WebUtil;
-import org.lamsfoundation.lams.web.util.AttributeNames;
-import org.lamsfoundation.lams.web.util.SessionMap;
+import org.apache.struts.action.RedirectingActionForward;
-/**
- * @author
- * @version
- *
- * @struts.action path="/authoring" name="authoringForm" parameter="dispatch" scope="request" validate="false"
- *
- * @struts.action-forward name="success" path="tiles:/authoring/main"
- */
-public class AuthoringAction extends DispatchAction {
-
- // private static final Logger logger =
- // Logger.getLogger(AuthoringAction.class);
-
- private IDimdimService dimdimService;
-
+public class AuthoringAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
-
- // set up dimdimService
- dimdimService = DimdimServiceProxy.getDimdimService(this.getServlet().getServletContext());
-
- return super.execute(mapping, form, request, response);
+ return new RedirectingActionForward("/index.html");
}
-
- /**
- * Default method when no dispatch parameter is specified. It is expected that the parameter
- * toolContentID
will be passed in. This will be used to retrieve content for this tool.
- *
- * @throws ServletException
- *
- */
- protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws ServletException {
-
- // Extract toolContentID from parameters.
- Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID));
-
- String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
-
- ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, true);
-
- // retrieving Dimdim with given toolContentID
- Dimdim dimdim = dimdimService.getDimdimByContentId(toolContentID);
- if (dimdim == null) {
- dimdim = dimdimService.copyDefaultContent(toolContentID);
- dimdim.setCreateDate(new Date());
- dimdimService.saveOrUpdateDimdim(dimdim);
- // TODO NOTE: this causes DB orphans when LD not saved.
- }
-
- if (mode != null && mode.isTeacher()) {
- // Set the defineLater flag so that learners cannot use content
- // while we are editing. This flag is released when updateContent is
- // called.
- dimdim.setDefineLater(true);
- dimdimService.saveOrUpdateDimdim(dimdim);
- }
-
- // Set up the authForm.
- AuthoringForm authForm = (AuthoringForm) form;
- copyProperties(authForm, dimdim);
-
- // Set up sessionMap
- SessionMap map = createSessionMap(dimdim, getAccessMode(request), contentFolderID,
- toolContentID);
- authForm.setSessionMapID(map.getSessionID());
-
- // add the sessionMap to HTTPSession.
- request.getSession().setAttribute(map.getSessionID(), map);
- request.setAttribute(Constants.ATTR_SESSION_MAP, map);
-
- return mapping.findForward("success");
- }
-
- public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
-
- // get authForm and session map.
- AuthoringForm authForm = (AuthoringForm) form;
- SessionMap map = getSessionMap(request, authForm);
-
- // get dimdim content.
- Dimdim dimdim = dimdimService.getDimdimByContentId((Long) map.get(Constants.KEY_TOOL_CONTENT_ID));
-
- // update dimdim content using form inputs.
- ToolAccessMode mode = (ToolAccessMode) map.get(Constants.KEY_MODE);
- copyProperties(dimdim, authForm, mode);
-
- // remove attachments marked for deletion.
- Set attachments = dimdim.getDimdimAttachments();
- if (attachments == null) {
- attachments = new HashSet();
- }
-
- for (DimdimAttachment att : getAttList(Constants.KEY_DELETED_FILES, map)) {
- // remove from db, leave in repository
- attachments.remove(att);
- }
-
- // add unsaved attachments
- attachments.addAll(getAttList(Constants.KEY_UNSAVED_ONLINE_FILES, map));
- attachments.addAll(getAttList(Constants.KEY_UNSAVED_OFFLINE_FILES, map));
-
- // set attachments in case it didn't exist
- dimdim.setDimdimAttachments(attachments);
-
- // set the update date
- dimdim.setUpdateDate(new Date());
-
- // releasing defineLater flag so that learner can start using the tool.
- dimdim.setDefineLater(false);
-
- dimdimService.saveOrUpdateDimdim(dimdim);
-
- request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE);
-
- // add the sessionMapID to form
- authForm.setSessionMapID(map.getSessionID());
-
- request.setAttribute(Constants.ATTR_SESSION_MAP, map);
-
- return mapping.findForward("success");
- }
-
- public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request);
- }
-
- public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request);
- }
-
- public ActionForward deleteOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request);
- }
-
- public ActionForward deleteOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request);
- }
-
- public ActionForward removeUnsavedOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request);
- }
-
- public ActionForward removeUnsavedOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request);
- }
-
- /* ========== Private Methods */
-
- private ActionForward uploadFile(ActionMapping mapping, AuthoringForm authForm, String type,
- HttpServletRequest request) {
- SessionMap map = getSessionMap(request, authForm);
-
- FormFile file;
- List unsavedFiles;
- List savedFiles;
- if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) {
- file = (FormFile) authForm.getOfflineFile();
- unsavedFiles = getAttList(Constants.KEY_UNSAVED_OFFLINE_FILES, map);
-
- savedFiles = getAttList(Constants.KEY_OFFLINE_FILES, map);
- } else {
- file = (FormFile) authForm.getOnlineFile();
- unsavedFiles = getAttList(Constants.KEY_UNSAVED_ONLINE_FILES, map);
-
- savedFiles = getAttList(Constants.KEY_ONLINE_FILES, map);
- }
-
- // validate file max size
- ActionMessages errors = new ActionMessages();
- FileValidatorUtil.validateFileSize(file, true, errors);
- if (!errors.isEmpty()) {
- request.setAttribute(Constants.ATTR_SESSION_MAP, map);
- this.saveErrors(request, errors);
- return mapping.findForward("success");
- }
-
- if (file.getFileName().length() != 0) {
-
- // upload file to repository
- DimdimAttachment newAtt = dimdimService.uploadFileToContent((Long) map.get(Constants.KEY_TOOL_CONTENT_ID),
- file, type);
-
- // Add attachment to unsavedFiles
- // check to see if file with same name exists
- DimdimAttachment currAtt;
- Iterator iter = savedFiles.iterator();
- while (iter.hasNext()) {
- currAtt = (DimdimAttachment) iter.next();
- if (StringUtils.equals(currAtt.getFileName(), newAtt.getFileName())
- && StringUtils.equals(currAtt.getFileType(), newAtt.getFileType())) {
- // move from this this list to deleted list.
- getAttList(Constants.KEY_DELETED_FILES, map).add(currAtt);
- iter.remove();
- break;
- }
- }
- unsavedFiles.add(newAtt);
-
- request.setAttribute(Constants.ATTR_SESSION_MAP, map);
- }
- return mapping.findForward("success");
- }
-
- private ActionForward deleteFile(ActionMapping mapping, AuthoringForm authForm, String type,
- HttpServletRequest request) {
- SessionMap map = getSessionMap(request, authForm);
-
- List fileList;
- if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) {
- fileList = getAttList(Constants.KEY_OFFLINE_FILES, map);
- } else {
- fileList = getAttList(Constants.KEY_ONLINE_FILES, map);
- }
-
- Iterator iter = fileList.iterator();
-
- while (iter.hasNext()) {
- DimdimAttachment att = (DimdimAttachment) iter.next();
-
- if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) {
- // move to delete file list, deleted at next updateContent
- getAttList(Constants.KEY_DELETED_FILES, map).add(att);
-
- // remove from this list
- iter.remove();
- break;
- }
- }
-
- request.setAttribute(Constants.ATTR_SESSION_MAP, map);
-
- return mapping.findForward("success");
- }
-
- private ActionForward removeUnsaved(ActionMapping mapping, AuthoringForm authForm, String type,
- HttpServletRequest request) {
- SessionMap map = getSessionMap(request, authForm);
-
- List unsavedFiles;
-
- if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) {
- unsavedFiles = getAttList(Constants.KEY_UNSAVED_OFFLINE_FILES, map);
- } else {
- unsavedFiles = getAttList(Constants.KEY_UNSAVED_ONLINE_FILES, map);
- }
-
- Iterator iter = unsavedFiles.iterator();
- while (iter.hasNext()) {
- DimdimAttachment att = (DimdimAttachment) iter.next();
-
- if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) {
- // delete from repository and list
- dimdimService.deleteFromRepository(att.getFileUuid(), att.getFileVersionId());
- iter.remove();
- break;
- }
- }
-
- request.setAttribute(Constants.ATTR_SESSION_MAP, map);
-
- return mapping.findForward("success");
- }
-
- /**
- * Updates Dimdim content using AuthoringForm inputs.
- *
- * @param authForm
- * @param mode
- * @return
- */
- private void copyProperties(Dimdim dimdim, AuthoringForm authForm, ToolAccessMode mode) {
- dimdim.setTitle(authForm.getTitle());
- dimdim.setInstructions(authForm.getInstructions());
- if (mode.isAuthor()) { // Teacher cannot modify following
- dimdim.setOfflineInstructions(authForm.getOfflineInstructions());
- dimdim.setOnlineInstructions(authForm.getOnlineInstructions());
- dimdim.setReflectOnActivity(authForm.isReflectOnActivity());
- dimdim.setReflectInstructions(authForm.getReflectInstructions());
- dimdim.setLockOnFinished(authForm.isLockOnFinished());
-
- // dimdim fields
- dimdim.setMaxAttendeeMikes(authForm.getMaxAttendeeMikes());
- }
- }
-
- /**
- * Updates AuthoringForm using Dimdim content.
- *
- * @param dimdim
- * @param authForm
- * @return
- * @throws ServletException
- */
- private void copyProperties(AuthoringForm authForm, Dimdim dimdim) throws ServletException {
- try {
- BeanUtils.copyProperties(authForm, dimdim);
- } catch (IllegalAccessException e) {
- throw new ServletException(e);
- } catch (InvocationTargetException e) {
- throw new ServletException(e);
- }
- }
-
- /**
- * Updates SessionMap using Dimdim content.
- *
- * @param dimdim
- * @param mode
- */
- private SessionMap createSessionMap(Dimdim dimdim, ToolAccessMode mode, String contentFolderID,
- Long toolContentID) {
-
- SessionMap map = new SessionMap();
-
- map.put(Constants.KEY_MODE, mode);
- map.put(Constants.KEY_CONTENT_FOLDER_ID, contentFolderID);
- map.put(Constants.KEY_TOOL_CONTENT_ID, toolContentID);
- map.put(Constants.KEY_ONLINE_FILES, new LinkedList());
- map.put(Constants.KEY_OFFLINE_FILES, new LinkedList());
- map.put(Constants.KEY_UNSAVED_ONLINE_FILES, new LinkedList());
- map.put(Constants.KEY_UNSAVED_OFFLINE_FILES, new LinkedList());
- map.put(Constants.KEY_DELETED_FILES, new LinkedList());
-
- for (DimdimAttachment attachment : dimdim.getDimdimAttachments()) {
- String type = attachment.getFileType();
- if (type.equals(IToolContentHandler.TYPE_OFFLINE)) {
- getAttList(Constants.KEY_OFFLINE_FILES, map).add(attachment);
- }
- if (type.equals(IToolContentHandler.TYPE_ONLINE)) {
- getAttList(Constants.KEY_ONLINE_FILES, map).add(attachment);
- }
- }
-
- return map;
- }
-
- /**
- * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode.
- *
- * @param request
- * @return
- */
- private ToolAccessMode getAccessMode(HttpServletRequest request) {
- ToolAccessMode mode;
- String modeStr = request.getParameter(AttributeNames.ATTR_MODE);
- if (StringUtils.equalsIgnoreCase(modeStr, ToolAccessMode.TEACHER.toString())) {
- mode = ToolAccessMode.TEACHER;
- } else {
- mode = ToolAccessMode.AUTHOR;
- }
- return mode;
- }
-
- /**
- * Retrieves a List of attachments from the map using the key.
- *
- * @param key
- * @param map
- * @return
- */
- @SuppressWarnings("unchecked")
- private List getAttList(String key, SessionMap map) {
- List list = (List) map.get(key);
- return list;
- }
-
- /**
- * Retrieve the SessionMap from the HttpSession.
- *
- * @param request
- * @param authForm
- * @return
- */
- @SuppressWarnings("unchecked")
- private SessionMap getSessionMap(HttpServletRequest request, AuthoringForm authForm) {
- return (SessionMap) request.getSession().getAttribute(authForm.getSessionMapID());
- }
-}
+}
\ No newline at end of file
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/ClearSessionAction.java'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/LearningAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/LearningAction.java,v
diff -u -r1.17 -r1.18
--- lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/LearningAction.java 9 Apr 2013 12:46:07 -0000 1.17
+++ lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/LearningAction.java 7 Dec 2016 13:47:24 -0000 1.18
@@ -2,343 +2,57 @@
* 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
* ****************************************************************
*/
/* $Id$ */
package org.lamsfoundation.lams.tool.dimdim.web.actions;
-import java.io.IOException;
-import java.util.Date;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
-import org.apache.log4j.Logger;
+import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.actions.DispatchAction;
-import org.lamsfoundation.lams.learning.web.util.LearningWebUtil;
-import org.lamsfoundation.lams.notebook.model.NotebookEntry;
-import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants;
-import org.lamsfoundation.lams.tool.ToolAccessMode;
-import org.lamsfoundation.lams.tool.ToolSessionManager;
-import org.lamsfoundation.lams.tool.dimdim.dto.ContentDTO;
-import org.lamsfoundation.lams.tool.dimdim.dto.NotebookEntryDTO;
-import org.lamsfoundation.lams.tool.dimdim.dto.UserDTO;
-import org.lamsfoundation.lams.tool.dimdim.model.Dimdim;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimSession;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimUser;
-import org.lamsfoundation.lams.tool.dimdim.service.DimdimServiceProxy;
-import org.lamsfoundation.lams.tool.dimdim.service.IDimdimService;
-import org.lamsfoundation.lams.tool.dimdim.util.Constants;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimException;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimUtil;
-import org.lamsfoundation.lams.tool.dimdim.web.forms.LearningForm;
-import org.lamsfoundation.lams.tool.exception.DataMissingException;
-import org.lamsfoundation.lams.tool.exception.ToolException;
-import org.lamsfoundation.lams.util.Configuration;
-import org.lamsfoundation.lams.util.ConfigurationKeys;
+import org.apache.struts.action.RedirectingActionForward;
+import org.lamsfoundation.lams.learning.service.ILearnerService;
+import org.lamsfoundation.lams.usermanagement.dto.UserDTO;
import org.lamsfoundation.lams.util.WebUtil;
import org.lamsfoundation.lams.web.session.SessionManager;
import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
-/**
- * @author Anthony Sukkar
- *
- * @struts.action path="/learning" parameter="dispatch" scope="request" name="learningForm"
- * @struts.action-forward name="dimdim" path="tiles:/learning/main"
- * @struts.action-forward name="notebook" path="tiles:/learning/notebook"
- * @struts.action-forward name="runOffline" path="tiles:/learning/runOffline"
- * @struts.action-forward name="defineLater" path="tiles:/learning/defineLater"
- * @struts.action-forward name="generalMessage" path="tiles:/general/message"
- */
-public class LearningAction extends DispatchAction {
-
- private static final Logger logger = Logger.getLogger(LearningAction.class);
-
- private IDimdimService dimdimService;
-
+public class LearningAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- // set up dimdimService
- dimdimService = DimdimServiceProxy.getDimdimService(this.getServlet().getServletContext());
-
- return super.execute(mapping, form, request, response);
- }
-
- public ActionForward finishActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request,
HttpServletResponse response) {
+ HttpSession ss = SessionManager.getSession();
+ UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER);
+ long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID);
- Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID);
-
- DimdimUser user = getCurrentUser(toolSessionID);
-
- if (user != null) {
-
- LearningForm learningForm = (LearningForm) form;
-
- if (user.getNotebookEntryUID() == null) {
- user.setNotebookEntryUID(dimdimService.createNotebookEntry(toolSessionID,
- CoreNotebookConstants.NOTEBOOK_TOOL, Constants.TOOL_SIGNATURE, user.getUserId().intValue(),
- learningForm.getEntryText()));
- } else {
- // update existing entry.
- dimdimService.updateNotebookEntry(user.getNotebookEntryUID(), learningForm.getEntryText());
- }
-
- user.setFinishedActivity(true);
- dimdimService.saveOrUpdateDimdimUser(user);
- } else {
- logger.error("finishActivity(): couldn't find/create DimdimUser in toolSessionID: " + toolSessionID);
- }
-
- ToolSessionManager sessionMgrService = DimdimServiceProxy.getDimdimSessionManager(getServlet()
- .getServletContext());
-
- String nextActivityUrl;
- try {
- nextActivityUrl = sessionMgrService.leaveToolSession(toolSessionID, user.getUserId());
- response.sendRedirect(nextActivityUrl);
- } catch (DataMissingException e) {
- throw new DimdimException(e);
- } catch (ToolException e) {
- throw new DimdimException(e);
- } catch (IOException e) {
- throw new DimdimException(e);
- }
-
- return null;
+ WebApplicationContext wac = WebApplicationContextUtils
+ .getRequiredWebApplicationContext(getServlet().getServletContext());
+ ILearnerService learnerService = (ILearnerService) wac.getBean("learnerService");
+ String finishURL = learnerService.completeToolSession(toolSessionId, user.getUserID().longValue());
+ return new RedirectingActionForward(finishURL);
}
-
- private DimdimUser getCurrentUser(Long toolSessionId) {
- org.lamsfoundation.lams.usermanagement.dto.UserDTO lamsUserDTO = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) SessionManager
- .getSession().getAttribute(AttributeNames.USER);
-
- // attempt to retrieve user using userId and toolSessionId
- DimdimUser user = dimdimService.getUserByUserIdAndSessionId(new Long(lamsUserDTO.getUserID().intValue()),
- toolSessionId);
-
- if (user == null) {
- DimdimSession dimdimSession = dimdimService.getSessionBySessionId(toolSessionId);
- user = dimdimService.createDimdimUser(lamsUserDTO, dimdimSession);
- }
-
- return user;
- }
-
- public ActionForward openLearnerMeeting(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- // get user uid parameter
- Long uid = WebUtil.readLongParam(request, Constants.PARAM_USER_UID);
- DimdimUser user = dimdimService.getUserByUID(uid);
-
- String meetingKey = DimdimUtil.getMeetingKey(user.getDimdimSession().getSessionId());
- org.lamsfoundation.lams.usermanagement.dto.UserDTO lamsUserDTO = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) SessionManager
- .getSession().getAttribute(AttributeNames.USER);
- String meetingURL = dimdimService.getDimdimJoinConferenceURL(lamsUserDTO, meetingKey);
-
- if (meetingURL != null) {
- response.sendRedirect(meetingURL);
- } else {
- logger.error("startAction did not return a url to start the meeting");
- request.setAttribute(Constants.ATTR_MESSAGE_KEY, "message.unableToStartLesson");
- return mapping.findForward("generalMessage");
- }
-
- return null;
- }
-
- public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- LearningForm lrnForm = (LearningForm) form;
-
- // set the finished flag
- DimdimUser user = getCurrentUser(lrnForm.getToolSessionID());
- ContentDTO contentDTO = new ContentDTO(user.getDimdimSession().getDimdim());
-
- request.setAttribute(Constants.ATTR_CONTENT_DTO, contentDTO);
-
- NotebookEntry notebookEntry = dimdimService.getNotebookEntry(user.getNotebookEntryUID());
-
- if (notebookEntry != null) {
- lrnForm.setEntryText(notebookEntry.getEntry());
- }
-
- LearningWebUtil.putActivityPositionInRequestByToolSessionId(lrnForm.getToolSessionID(), request, getServlet()
- .getServletContext());
-
- return mapping.findForward("notebook");
- }
-
- public ActionForward openPreviewMeeting(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- // get user uid parameter
- Long uid = WebUtil.readLongParam(request, Constants.PARAM_USER_UID);
- DimdimUser user = dimdimService.getUserByUID(uid);
- DimdimSession session = user.getDimdimSession();
-
- // Get LAMS userDTO
- org.lamsfoundation.lams.usermanagement.dto.UserDTO lamsUserDTO = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) SessionManager
- .getSession().getAttribute(AttributeNames.USER);
-
- // Start a new dimdim web meeting
- String meetingKey = DimdimUtil.getMeetingKey(session.getSessionId());
- String returnURL = DimdimUtil.getReturnURL(request);
- Integer maxAttendeeMikes = session.getDimdim().getMaxAttendeeMikes();
-
- String meetingURL = dimdimService.getDimdimStartConferenceURL(lamsUserDTO, meetingKey, returnURL,
- maxAttendeeMikes);
-
- if (meetingURL != null) {
- response.sendRedirect(meetingURL);
- } else {
- logger.error("startAction did not return a url to start the meeting");
- throw new DimdimException("Unable to start meeting");
- }
-
- return null;
- }
-
- public ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
-
- // save the reflection entry and call the notebook.
-
- LearningForm lrnForm = (LearningForm) form;
-
- DimdimUser user = getCurrentUser(lrnForm.getToolSessionID());
- Long toolSessionID = user.getDimdimSession().getSessionId();
- Integer userID = user.getUserId().intValue();
-
- // check for existing notebook entry
- NotebookEntry entry = dimdimService.getNotebookEntry(user.getNotebookEntryUID());
-
- if (entry == null) {
- // create new entry
- Long entryUID = dimdimService.createNotebookEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL,
- Constants.TOOL_SIGNATURE, userID, lrnForm.getEntryText());
- user.setNotebookEntryUID(entryUID);
- dimdimService.saveOrUpdateDimdimUser(user);
- } else {
- // update existing entry
- entry.setEntry(lrnForm.getEntryText());
- entry.setLastModified(new Date());
- dimdimService.updateNotebookEntry(entry);
- }
-
- return finishActivity(mapping, form, request, response);
- }
-
- public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- LearningForm learningForm = (LearningForm) form;
-
- // 'toolSessionID' and 'mode' parameters are expected to be present.
- ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, false);
-
- Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID);
-
- // Retrieve the session and content.
- DimdimSession session = dimdimService.getSessionBySessionId(toolSessionID);
- if (session == null) {
- throw new DimdimException("Cannot retrieve session with toolSessionID" + toolSessionID);
- }
-
- Dimdim dimdim = session.getDimdim();
-
- // check defineLater
- if (dimdim.isDefineLater()) {
- return mapping.findForward("defineLater");
- }
-
- // set mode, toolSessionID and DimdimDTO
- request.setAttribute(AttributeNames.ATTR_MODE, mode.toString());
- learningForm.setToolSessionID(toolSessionID);
-
- ContentDTO contentDTO = new ContentDTO();
- contentDTO.setTitle(dimdim.getTitle());
- contentDTO.setInstructions(dimdim.getInstructions());
- contentDTO.setLockOnFinish(dimdim.isLockOnFinished());
- contentDTO.setReflectOnActivity(dimdim.isReflectOnActivity());
- contentDTO.setReflectInstructions(dimdim.getReflectInstructions());
-
- request.setAttribute(Constants.ATTR_CONTENT_DTO, contentDTO);
-
- LearningWebUtil.putActivityPositionInRequestByToolSessionId(toolSessionID, request, getServlet()
- .getServletContext());
-
- // Set the content in use flag.
- if (!dimdim.isContentInUse()) {
- dimdim.setContentInUse(true);
- dimdimService.saveOrUpdateDimdim(dimdim);
- }
-
- // check runOffline
- if (dimdim.isRunOffline()) {
- return mapping.findForward("runOffline");
- }
-
- DimdimUser user;
- if (mode.equals(ToolAccessMode.TEACHER)) {
- Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false);
- user = dimdimService.getUserByUserIdAndSessionId(userID, toolSessionID);
- } else {
- user = getCurrentUser(toolSessionID);
- }
-
- // get any existing notebook entries and create userDTO
- NotebookEntry entry = dimdimService.getNotebookEntry(user.getNotebookEntryUID());
- UserDTO userDTO = new UserDTO(user);
- if (entry != null) {
- userDTO.setNotebookEntryDTO(new NotebookEntryDTO(entry));
- }
- request.setAttribute(Constants.ATTR_USER_DTO, userDTO);
-
- String dispatchValue = new String();
- boolean meetingOpen = false;
- if (mode.isAuthor()) {
- dispatchValue = "openPreviewMeeting";
- meetingOpen = true;
- } else {
- if (session.isMeetingCreated()) {
- dispatchValue = "openLearnerMeeting";
- meetingOpen = true;
- } // otherwise, meeting has not been started in monitoring
- }
-
- String meetingURL = Configuration.get(ConfigurationKeys.SERVER_URL) + "/tool/" + Constants.TOOL_SIGNATURE
- + "/learning.do?dispatch=" + dispatchValue + "&" + Constants.PARAM_USER_UID + "=" + user.getUid();
-
- request.setAttribute(Constants.ATTR_MEETING_OPEN, meetingOpen);
- request.setAttribute(Constants.ATTR_MEETING_URL, meetingURL);
-
- // set toolSessionID in request
- request.setAttribute(Constants.ATTR_TOOL_SESSION_ID, session.getSessionId());
-
- return mapping.findForward("dimdim");
- }
-}
+}
\ No newline at end of file
Index: lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/MonitoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/MonitoringAction.java,v
diff -u -r1.15 -r1.16
--- lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/MonitoringAction.java 10 Feb 2011 22:35:12 -0000 1.15
+++ lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/actions/MonitoringAction.java 7 Dec 2016 13:47:24 -0000 1.16
@@ -2,152 +2,44 @@
* 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
* ****************************************************************
*/
/* $Id$ */
package org.lamsfoundation.lams.tool.dimdim.web.actions;
+import java.io.IOException;
+
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.log4j.Logger;
+import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.actions.DispatchAction;
-import org.lamsfoundation.lams.notebook.model.NotebookEntry;
-import org.lamsfoundation.lams.tool.dimdim.dto.ContentDTO;
-import org.lamsfoundation.lams.tool.dimdim.dto.NotebookEntryDTO;
-import org.lamsfoundation.lams.tool.dimdim.dto.UserDTO;
-import org.lamsfoundation.lams.tool.dimdim.model.Dimdim;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimSession;
-import org.lamsfoundation.lams.tool.dimdim.model.DimdimUser;
-import org.lamsfoundation.lams.tool.dimdim.service.DimdimServiceProxy;
-import org.lamsfoundation.lams.tool.dimdim.service.IDimdimService;
-import org.lamsfoundation.lams.tool.dimdim.util.Constants;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimException;
-import org.lamsfoundation.lams.tool.dimdim.util.DimdimUtil;
-import org.lamsfoundation.lams.tool.dimdim.web.forms.MonitoringForm;
-import org.lamsfoundation.lams.util.WebUtil;
-import org.lamsfoundation.lams.web.session.SessionManager;
-import org.lamsfoundation.lams.web.util.AttributeNames;
+import org.apache.struts.action.RedirectingActionForward;
-/**
- * @author
- * @version
- *
- * @struts.action path="/monitoring" parameter="dispatch" scope="request" name="monitoringForm" validate="false"
- *
- * @struts.action-forward name="success" path="tiles:/monitoring/main"
- * @struts.action-forward name="dimdim_display" path="tiles:/monitoring/dimdim_display"
- */
-public class MonitoringAction extends DispatchAction {
-
- private static final Logger logger = Logger.getLogger(MonitoringAction.class);
-
- private IDimdimService dimdimService;
-
+public class MonitoringAction extends Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- // set up dimdimService
- dimdimService = DimdimServiceProxy.getDimdimService(this.getServlet().getServletContext());
-
- return super.execute(mapping, form, request, response);
+ HttpServletResponse response) throws IOException, ServletException {
+ return new RedirectingActionForward("/index.html");
}
-
- public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
-
- Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID));
-
- String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID);
-
- Dimdim dimdim = dimdimService.getDimdimByContentId(toolContentID);
-
- if (dimdim == null) {
- logger.error("Unable to find tool content with id :" + toolContentID);
- throw new DimdimException("Invalid value for " + AttributeNames.PARAM_TOOL_CONTENT_ID);
- }
-
- ContentDTO contentDT0 = new ContentDTO(dimdim);
-
- MonitoringForm monitoringForm = (MonitoringForm) form;
- // populate using authoring values
- monitoringForm.setMaxAttendeeMikes((contentDT0.getMaxAttendeeMikes()));
-
- Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true);
- contentDT0.setCurrentTab(currentTab);
-
- boolean isGroupedActivity = dimdimService.isGroupedActivity(toolContentID);
- request.setAttribute(Constants.ATTR_IS_GROUPED_ACTIVITY, isGroupedActivity);
- request.setAttribute(Constants.ATTR_CONTENT_DTO, contentDT0);
- request.setAttribute(Constants.ATTR_CONTENT_FOLDER_ID, contentFolderID);
- return mapping.findForward("success");
- }
-
- public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) {
- Long uid = new Long(WebUtil.readLongParam(request, Constants.PARAM_USER_UID));
-
- DimdimUser user = dimdimService.getUserByUID(uid);
- NotebookEntry entry = dimdimService.getNotebookEntry(user.getNotebookEntryUID());
-
- UserDTO userDTO = new UserDTO(user);
- userDTO.setNotebookEntryDTO(new NotebookEntryDTO(entry));
-
- request.setAttribute(Constants.ATTR_USER_DTO, userDTO);
-
- return mapping.findForward("dimdim_display");
- }
-
- public ActionForward startMeeting(ActionMapping mapping, ActionForm form, HttpServletRequest request,
- HttpServletResponse response) throws Exception {
-
- MonitoringForm monitoringForm = (MonitoringForm) form;
-
- // get dimdim session
- DimdimSession session = dimdimService.getSessionBySessionId(monitoringForm.getToolSessionID());
-
- // update dimdim meeting settings
- session.setMaxAttendeeMikes(monitoringForm.getMaxAttendeeMikes());
-
- // Get LAMS userDTO
- org.lamsfoundation.lams.usermanagement.dto.UserDTO lamsUserDTO = (org.lamsfoundation.lams.usermanagement.dto.UserDTO) SessionManager
- .getSession().getAttribute(AttributeNames.USER);
-
- String meetingStartURL = dimdimService
- .getDimdimStartConferenceURL(lamsUserDTO, DimdimUtil.getMeetingKey(session.getSessionId()), DimdimUtil
- .getReturnURL(request), session.getMaxAttendeeMikes());
-
- if (meetingStartURL != null) {
- session.setMeetingCreated(true);
- response.sendRedirect(meetingStartURL);
- } else {
- logger.error("startAction did not return a url to start the meeting");
- throw new DimdimException("Unable to start meeting");
- }
-
- dimdimService.saveOrUpdateDimdimSession(session);
-
- return null;
- }
-}
+}
\ No newline at end of file
Fisheye: Tag 1.9 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/forms/AdminForm.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.10 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/forms/AuthoringForm.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/forms/LearningForm.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/forms/MonitoringForm.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7 refers to a dead (removed) revision in file `lams_tool_dimdim/src/java/org/lamsfoundation/lams/tool/dimdim/web/servlets/ExportServlet.java'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/403.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/404.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/error.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Index: lams_tool_dimdim/web/index.html
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/web/index.html,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_dimdim/web/index.html 7 Dec 2016 13:47:23 -0000 1.1
@@ -0,0 +1,5 @@
+
+
+ This tool is not supported anymore.
+
+
\ No newline at end of file
Index: lams_tool_dimdim/web/WEB-INF/applicationContext.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/web/WEB-INF/applicationContext.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_dimdim/web/WEB-INF/applicationContext.xml 7 Dec 2016 13:47:23 -0000 1.1
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
Index: lams_tool_dimdim/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_dimdim/web/WEB-INF/struts-config.xml,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_dimdim/web/WEB-INF/struts-config.xml 7 Dec 2016 13:47:23 -0000 1.1
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tiles-defs.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/validator-rules.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.6 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/web.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.11 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/AuthoringButton.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.14 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/CKEditor.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/Date.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/DefineLater.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/Head.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/ImgButtonWrapper.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/Tab.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/TabBody.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/TabName.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/Tabs.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/TextSearch.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tags/headItems.tag'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/jstl/c.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/jstl/fmt.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/jstl/fn.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/jstl/x.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/lams/lams.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-bean-el.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-bean.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-html-el.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-html.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-logic-el.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-logic.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-nested.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-tiles-el.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/WEB-INF/tlds/struts/struts-tiles.tld'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/common/empty.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/common/footer.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/common/message.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/common/simpleHeader.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/common/tabbedHeader.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/common/taglibs.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/includes/javascript/authoring.js'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/includes/javascript/monitoring.js'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/layouts/simpleLayout.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/layouts/tabbedLayout.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/admin/edit.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/admin/view.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/authoring/advanced.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/authoring/authoring.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.9 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/authoring/basic.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/authoring/headItems.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/authoring/instructions.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/dimdim/end_meeting.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.5 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/export/exportPortfolio.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/learning/defineLater.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/learning/headItems.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.8 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/learning/learning.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/learning/notebook.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/learning/runOffline.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/learning/parts/finishButton.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/editActivity.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.2 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/headItems.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/instructions.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/monitoring.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/notebook.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/statistics.jsp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.14 refers to a dead (removed) revision in file `lams_tool_dimdim/web/pages/monitoring/summary.jsp'.
Fisheye: No comparison available. Pass `N' to diff?