Index: lams_tool_wookie/build.properties =================================================================== diff -u -rdfc0b58933316e2e56513b81463e54d72b43e224 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/build.properties (.../build.properties) (revision dfc0b58933316e2e56513b81463e54d72b43e224) +++ lams_tool_wookie/build.properties (.../build.properties) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -2,6 +2,6 @@ min.server.version.number=2.3 signature=lawook10 -tool.version=20081217 +tool.version=20160602 tool.hide=true tool.short.name=wookie \ No newline at end of file Index: lams_tool_wookie/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r5e63656a12c02f7476564e278b43ff4ce86ac930 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 5e63656a12c02f7476564e278b43ff4ce86ac930) +++ lams_tool_wookie/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,101 +1,3 @@ -appName = wookie -#language code: en -#locale code: AU - - # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Feb 26 12:51:16 CST 2014 - -#=================== labels for Wookie =================# - -button.statistics =Statistics -error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. -activity.helptext =Create activities using Wookie Widgets -message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. -error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +appName =wookie tool.display.name =Wookie -tool.description =Wookie Widget Tool -activity.title =Wookie -activity.description =Wookie Widget Tool -pageTitle.authoring =Wookie Authoring -button.basic =Basic -button.advanced =Advanced -label.authoring.basic.title =Title: -label.authoring.basic.content =Content: -advanced.lockOnFinished =Don't show widget after learner has finished -instructions.type.online =Online -instructions.type.offline =Offline -label.filename =Filename -label.type =Type -message.updateSuccess =Changes saved -pageTitle.learning =Wookie Widget Tool -message.defineLaterSet =Please wait for the teacher to complete the contents of this activity -pageTitle.monitoring =Wookie Monitoring -button.summary =Summary -button.editActivity =Edit Activity -titleHeading.summary =Summary -titleHeading.statistics =Statistics -titleHeading.editActivity =Edit Activity -heading.group =Group {0}: -heading.totalLearners =Number of Learners: -heading.totalLearnersInGroup =Total Number of Learners in Group: -heading.totalFinishedLearnersInGroup =Number of Finished Learners: -message.summary =There is no summary available for this tool. -label.view =View -label.notAvailable =Not Available -heading.learner =Learner -heading.notebookEntry =Notebook Entry -button.cancel =Cancel -button.ok =OK -button.done =Done -button.save =Save -button.next =Next -label.save =Save -label.cancel =Cancel -label.created =Created -label.lastModified =Last modified -label.notebookEntry =Notebook entry -error.missingParam =Unable to continue. {0} is missing. -error.exceedMaxFileSize =File size exceeded -error.exception.NbApplication =An internal error has occurred with the Wookie Tool. If reporting this error, please report: {0} -error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. -errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes -error.mandatoryField ={0} field is mandatory. -button.try.again =Try Again -button.finish =Next Activity -message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. -message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Wookie activity, you won't be able the activity will be hidden and you will not be able to edit it. -message.activityLocked =The instructor has set this activity to be locked after you have finished it. As you are returning to this activity, you cannot edit anymore. -titleHeading.instructions =Instructions -label.authoring.basic.instructions =Instructions: -label.on =On -label.off =Off -monitor.summary.th.advancedSettings =Advanced settings -error.msg.upload.file.not.found =Could not find upload file {0}. -label.authoring.remove =Remove -button.continue =Continue -button.edit =Edit -button.redo =Redo Activity -button.refresh =Refresh -button.close =Close -monitoring.th.learner =Learner -monitoring.th.reflection =Notebook Entry -monitor.summary.td.notebookInstructions =Notebook instructions -advanced.reflectOnActivity =Add a notebook at end of Wookie activity with the following instructions: -title.sessions =Sessions -title.originalImage =Original Image -authoring.msg.cancel.save =Do you want to close this window without saving? -monitor.summary.td.addNotebook =Add a notebook at the end of Wookie activity -admin.wookie.apikey =Wookie API key -admin.wookie.url =Wookie URL -admin.formError =Please enter both a Wookie API key and your Wookie URL. -admin.page.title =Wookie Admin -admin.return =Return to Maintain LAMS -admin.success =Configuration successfully saved. -error.wookie.not.configured =To use this tool, you need to have the Wookie API key and URL configured in the admin pages. Please contact your System Administrator. -error.initiating.widget =There was a problem communicating with the Wookie widget server, please contact your System Administrator. -error.wookie.server =Error communicating with Wookie server, please contact your System Administrator. -monitoring.reflections =Reflections -button.submit =Finish -message.no.reflection.available =No notebook entry was added. - - -#======= End labels: Exported 91 labels for en AU ===== +activity.title =Wookie \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_el_GR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_en_AU.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_es_ES.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_fr_FR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_mi_NZ.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_no_NO.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/language/lams/ApplicationResources_pt_BR.properties'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/xdoclet/global-forwards.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/xdoclet/struts-actions.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/xdoclet/struts-forms.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/xdoclet/struts-message-resources.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/conf/xdoclet/struts-plugins.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/db/sql/activity_insert.sql =================================================================== diff -u -r3dbf966d900adefc34cdad501d3c392118451cd9 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/db/sql/activity_insert.sql (.../activity_insert.sql) (revision 3dbf966d900adefc34cdad501d3c392118451cd9) +++ lams_tool_wookie/db/sql/activity_insert.sql (.../activity_insert.sql) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,5 +1,3 @@ --- CVS ID: $Id$ - INSERT INTO lams_learning_activity ( activity_ui_id Index: lams_tool_wookie/db/sql/create_lams_tool_wookie.sql =================================================================== diff -u -rf6a03ee21a18654d54498cd94d9f68fbea3b996a -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/db/sql/create_lams_tool_wookie.sql (.../create_lams_tool_wookie.sql) (revision f6a03ee21a18654d54498cd94d9f68fbea3b996a) +++ lams_tool_wookie/db/sql/create_lams_tool_wookie.sql (.../create_lams_tool_wookie.sql) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,128 +1,3 @@ --- CVS ID: $Id$ - +-- file must not be empty and it must contain update statements (not select) SET FOREIGN_KEY_CHECKS=0; -drop table if exists tl_lawook10_attachment; -drop table if exists tl_lawook10_wookie; -drop table if exists tl_lawook10_session; -drop table if exists tl_lawook10_user; -drop table if exists tl_lawook10_configuration; -create table tl_lawook10_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, - wookie_uid bigint, - primary key (uid) -)ENGINE=InnoDB; - -create table tl_lawook10_wookie ( - 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, - online_instructions text, - offline_instructions text, - content_in_use bit, - define_later bit, - tool_content_id bigint, - reflect_instructions text, - widget_identifier varchar(511), - widget_author_url varchar(511), - widget_maximise bit, - widget_width integer, - widget_height integer, - primary key (uid) -)ENGINE=InnoDB; - -create table tl_lawook10_session ( - uid bigint not null auto_increment, - session_end_date datetime, - session_start_date datetime, - status integer, - session_id bigint, - session_name varchar(250), - wookie_uid bigint, - widget_shared_data_key varchar(63), - widget_height integer, - widget_width integer, - widget_maximise bit, - widget_identifier varchar(511), - primary key (uid) -)ENGINE=InnoDB; - -create table tl_lawook10_user ( - uid bigint not null auto_increment, - user_id bigint, - last_name varchar(255), - login_name varchar(255), - first_name varchar(255), - finishedActivity bit, - wookie_session_uid bigint, - entry_uid bigint, - user_widget_url varchar(511), - primary key (uid) -)ENGINE=InnoDB; - -create table tl_lawook10_configuration ( - uid bigint not null auto_increment, - config_key varchar(30) unique, - config_value text, primary key (uid) -)ENGINE=InnoDB; - -alter table tl_lawook10_attachment add index IN_WOOKIE_ATTACH (wookie_uid), add constraint FK_WOOKIE_ATTACH foreign key (wookie_uid) references tl_lawook10_wookie (uid); -alter table tl_lawook10_session add index IN_WOOKIE_SESSION (wookie_uid), add constraint FK_WOOKIE_SESSION foreign key (wookie_uid) references tl_lawook10_wookie (uid); -alter table tl_lawook10_user add index IN_WOOKIE_USER (wookie_session_uid), add constraint FK_WOOKIE_USER foreign key (wookie_session_uid) references tl_lawook10_session (uid); - --- Inserting the required config item into the config table --- Currently supported languages for wookie -INSERT INTO tl_lawook10_configuration ( - config_key, - config_value -) -VALUES( - "APIKEY", - "TEST" -); - -INSERT INTO tl_lawook10_configuration ( - config_key, - config_value -) -VALUES( - "WOOKIE_SERVER_URL", - "http://localhost:8180/wookie/" -); - - -INSERT INTO tl_lawook10_wookie ( - title, - instructions, - online_instructions, - offline_instructions, - tool_content_id, - run_offline, - lock_on_finished, - content_in_use, - define_later, - reflect_on_activity -) -VALUES( - "Wookie", - "Instructions", - "", - "", - ${default_content_id}, - 0, - 0, - 0, - 0, - 0 -); - +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_wookie/db/sql/db_version_insert.sql =================================================================== diff -u -r7c52d117dbe910bd67630b5506346429e25b99a9 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/db/sql/db_version_insert.sql (.../db_version_insert.sql) (revision 7c52d117dbe910bd67630b5506346429e25b99a9) +++ lams_tool_wookie/db/sql/db_version_insert.sql (.../db_version_insert.sql) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,2 +1 @@ --- $Id$ INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F'); Index: lams_tool_wookie/db/sql/drop_lams_tool_wookie.sql =================================================================== diff -u -r7c52d117dbe910bd67630b5506346429e25b99a9 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/db/sql/drop_lams_tool_wookie.sql (.../drop_lams_tool_wookie.sql) (revision 7c52d117dbe910bd67630b5506346429e25b99a9) +++ lams_tool_wookie/db/sql/drop_lams_tool_wookie.sql (.../drop_lams_tool_wookie.sql) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,14 +1,7 @@ --- CVS ID: $Id$ - SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS tl_lawook10_user; DROP TABLE IF EXISTS tl_lawook10_attachment; DROP TABLE IF EXISTS tl_lawook10_session; DROP TABLE IF EXISTS tl_lawook10_wookie; DROP TABLE IF EXISTS tl_lawook10_configuration; -SET FOREIGN_KEY_CHECKS=1; - - - - - +SET FOREIGN_KEY_CHECKS=1; \ No newline at end of file Index: lams_tool_wookie/db/sql/library_insert.sql =================================================================== diff -u -r7c52d117dbe910bd67630b5506346429e25b99a9 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/db/sql/library_insert.sql (.../library_insert.sql) (revision 7c52d117dbe910bd67630b5506346429e25b99a9) +++ lams_tool_wookie/db/sql/library_insert.sql (.../library_insert.sql) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,5 +1,3 @@ --- CVS ID: $Id$ - INSERT INTO lams_learning_library ( description, Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/db/sql/table-schema.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/db/sql/tool_insert.sql =================================================================== diff -u -r5e63656a12c02f7476564e278b43ff4ce86ac930 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 5e63656a12c02f7476564e278b43ff4ce86ac930) +++ lams_tool_wookie/db/sql/tool_insert.sql (.../tool_insert.sql) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -1,5 +1,3 @@ --- CVS ID: $Id$ - INSERT INTO lams_tool ( tool_signature, Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/IWookieConfigItemDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/IWookieDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/IWookieSessionDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/IWookieUserDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/hibernate/WookieConfigItemDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/hibernate/WookieDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/hibernate/WookieSessionDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dao/hibernate/WookieUserDAO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dbupdates/autopatchContext.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dbupdates/patch20140102.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dbupdates/patch20150930.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dbupdates/patch20151217.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dto/NotebookEntryDTO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dto/WidgetData.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dto/WidgetDefinition.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dto/WookieDTO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dto/WookieSessionDTO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/dto/WookieUserDTO.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/model/Wookie.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/model/WookieConfigItem.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/model/WookieSession.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/model/WookieUser.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/IWookieService.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieContentVersionFilter.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieOutputFactory.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieService.java =================================================================== diff -u -r8be2bc782a2c7066c8c33f5605962584df7a2f9b -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieService.java (.../WookieService.java) (revision 8be2bc782a2c7066c8c33f5605962584df7a2f9b) +++ lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieService.java (.../WookieService.java) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -2,21 +2,21 @@ * 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 * **************************************************************** */ @@ -27,674 +27,105 @@ import java.util.List; import java.util.SortedMap; -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; -import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; -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.CoreNotebookConstants; -import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; 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.exception.DataMissingException; import org.lamsfoundation.lams.tool.exception.ToolException; -import org.lamsfoundation.lams.tool.service.ILamsToolService; -import org.lamsfoundation.lams.tool.wookie.dao.IWookieConfigItemDAO; -import org.lamsfoundation.lams.tool.wookie.dao.IWookieDAO; -import org.lamsfoundation.lams.tool.wookie.dao.IWookieSessionDAO; -import org.lamsfoundation.lams.tool.wookie.dao.IWookieUserDAO; -import org.lamsfoundation.lams.tool.wookie.dto.WidgetData; -import org.lamsfoundation.lams.tool.wookie.model.Wookie; -import org.lamsfoundation.lams.tool.wookie.model.WookieConfigItem; -import org.lamsfoundation.lams.tool.wookie.model.WookieSession; -import org.lamsfoundation.lams.tool.wookie.model.WookieUser; -import org.lamsfoundation.lams.tool.wookie.util.WookieConstants; -import org.lamsfoundation.lams.tool.wookie.util.WookieException; -import org.lamsfoundation.lams.tool.wookie.util.WookieUtil; import org.lamsfoundation.lams.usermanagement.User; -import org.lamsfoundation.lams.usermanagement.dto.UserDTO; -import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; -import org.lamsfoundation.lams.util.MessageService; -/** - * An implementation of the IWookieService interface. - * - * As a requirement, all LAMS tool's service bean must implement ToolContentManager and ToolSessionManager. - */ +public class WookieService implements ToolSessionManager, ToolContentManager { -public class WookieService implements ToolSessionManager, ToolContentManager, IWookieService { - - private static Logger logger = Logger.getLogger(WookieService.class.getName()); - - private IWookieDAO wookieDAO = null; - - private IWookieSessionDAO wookieSessionDAO = null; - - private IWookieUserDAO wookieUserDAO = null; - - private ILearnerService learnerService; - - private ILamsToolService toolService; - - private IToolContentHandler wookieToolContentHandler = null; - - private IExportToolContentService exportContentService; - - private ICoreNotebookService coreNotebookService; - - private WookieOutputFactory wookieOutputFactory; - - private IWookieConfigItemDAO wookieConfigItemDAO; - - private MessageService messageService; - - private IUserManagementService userManagementService; - - public WookieService() { - super(); - } - - /* ************ Methods from ToolSessionManager ************* */ - @Override - public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { - if (WookieService.logger.isDebugEnabled()) { - WookieService.logger.debug("entering method createToolSession:" + " toolSessionId = " + toolSessionId - + " toolSessionName = " + toolSessionName + " toolContentId = " + toolContentId); - } - - WookieSession session = new WookieSession(); - session.setSessionId(toolSessionId); - session.setSessionName(toolSessionName); - // learner starts - // TODO need to also set other fields. - Wookie wookie = wookieDAO.getByContentId(toolContentId); - session.setWookie(wookie); - - // Create a copy of the widget for the session - // Clone the wookie widget on the external server - String wookieUrl = getWookieURL(); - try { - String newSharedDataKey = toolSessionId.toString() + "_" + toolContentId.toString(); - - if (wookieUrl != null) { - - if ((wookie.getWidgetIdentifier() != null) && (wookie.getWidgetIdentifier() != "")) { - - wookieUrl += WookieConstants.RELATIVE_URL_WIDGET_SERVICE; - - WookieService.logger - .debug("Creating a new clone for session of widget: " + toolContentId.toString()); - boolean success = WookieUtil.cloneWidget(wookieUrl, getWookieAPIKey(), wookie.getWidgetIdentifier(), - toolContentId.toString(), newSharedDataKey, wookie.getCreateBy().toString()); - - if (success) { - session.setWidgetSharedDataKey(newSharedDataKey); - session.setWidgetHeight(wookie.getWidgetHeight()); - session.setWidgetWidth(wookie.getWidgetWidth()); - session.setWidgetMaximise(wookie.getWidgetMaximise()); - session.setWidgetIdentifier(wookie.getWidgetIdentifier()); - } else { - throw new WookieException("Failed to copy widget on wookie server, check log for details."); - } - } - - } else { - throw new WookieException("Wookie url is not set"); - } - } catch (Exception e) { - WookieService.logger.error("Problem calling wookie server to clone instance", e); - throw new WookieException("Problem calling wookie server to clone instance", e); - } - - wookieSessionDAO.saveOrUpdate(session); - } - - @Override - public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { - return learnerService.completeToolSession(toolSessionId, learnerId); - } - - @Override - public ToolSessionExportOutputData exportToolSession(Long toolSessionId) - throws DataMissingException, ToolException { - return null; - } - - @Override - @SuppressWarnings("unchecked") - public ToolSessionExportOutputData exportToolSession(List ToolSessionIds) - throws DataMissingException, ToolException { - return null; - } - - @Override - public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { - wookieSessionDAO.deleteBySessionID(toolSessionId); - // TODO check if cascade worked - } - - @Override - public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { - return getWookieOutputFactory().getToolOutput(names, this, toolSessionId, learnerId); - } - - @Override - public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { - return getWookieOutputFactory().getToolOutput(name, this, toolSessionId, learnerId); - } - - @Override - public void forceCompleteUser(Long toolSessionId, User user) { - // no actions required - } - - /* ************ Methods from ToolContentManager ************************* */ - - @Override public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { - - if (WookieService.logger.isDebugEnabled()) { - WookieService.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); - } - - Wookie fromContent = null; - if (fromContentId != null) { - fromContent = wookieDAO.getByContentId(fromContentId); - } - if (fromContent == null) { - // create the fromContent using the default tool content - fromContent = getDefaultContent(); - } - Wookie toContent = Wookie.newInstance(fromContent, toContentId); - - // Clone the wookie widget on the external server - String wookieUrl = getWookieURL(); - try { - if (wookieUrl != null) { - if ((fromContent.getWidgetIdentifier() != null) && (fromContent.getWidgetIdentifier() != "")) { - wookieUrl += WookieConstants.RELATIVE_URL_WIDGET_SERVICE; - - WookieService.logger - .debug("Creating a new clone for copycontent for widget: " + fromContentId.toString()); - boolean success = WookieUtil.cloneWidget(wookieUrl, getWookieAPIKey(), - fromContent.getWidgetIdentifier(), fromContentId.toString(), toContentId.toString(), - fromContent.getCreateBy().toString()); - - if (success) { - toContent.setWidgetHeight(fromContent.getWidgetHeight()); - toContent.setWidgetWidth(fromContent.getWidgetWidth()); - toContent.setWidgetAuthorUrl(fromContent.getWidgetAuthorUrl()); - toContent.setWidgetMaximise(fromContent.getWidgetMaximise()); - toContent.setWidgetIdentifier(fromContent.getWidgetIdentifier()); - toContent.setCreateBy(fromContent.getCreateBy()); - - // Need to add the author to the widget so authoring - // widget url is different in the copy - User user = (User) userManagementService.findById(User.class, fromContent.getCreateBy()); - String returnXML = WookieUtil.getWidget(wookieUrl, getWookieAPIKey(), - fromContent.getWidgetIdentifier(), user.getUserDTO(), toContentId.toString(), true); - - toContent.setWidgetAuthorUrl(WookieUtil.getWidgetUrlFromXML(returnXML)); - - } else { - throw new WookieException("Failed to copy widget on wookie server, check log for details."); - } - } - } else { - throw new WookieException("Wookie url is not set"); - } - } catch (Exception e) { - WookieService.logger.error("Problem calling wookie server to clone instance", e); - throw new WookieException("Problem calling wookie server to clone instance", e); - } - - wookieDAO.saveOrUpdate(toContent); } @Override public void resetDefineLater(Long toolContentId) throws DataMissingException, ToolException { - Wookie wookie = wookieDAO.getByContentId(toolContentId); - if (wookie == null) { - throw new ToolException("Could not find tool with toolContentID: " + toolContentId); - } - wookie.setDefineLater(false); - wookieDAO.saveOrUpdate(wookie); } @Override public void removeToolContent(Long toolContentId) throws ToolException { - Wookie wookie = wookieDAO.getByContentId(toolContentId); - if (wookie == null) { - WookieService.logger.warn("Can not remove the tool content as it does not exist, ID: " + toolContentId); - return; - } - - for (WookieSession session : wookie.getWookieSessions()) { - List entries = coreNotebookService.getEntry(session.getSessionId(), - CoreNotebookConstants.NOTEBOOK_TOOL, WookieConstants.TOOL_SIGNATURE); - for (NotebookEntry entry : entries) { - coreNotebookService.deleteEntry(entry); - } - } - - wookieDAO.delete(wookie); } @Override public void removeLearnerContent(Long toolContentId, Integer userId) throws ToolException { - if (WookieService.logger.isDebugEnabled()) { - WookieService.logger.debug( - "Resetting Wookie completion flag for user ID " + userId + " and toolContentId " + toolContentId); - } - - Wookie wookie = getWookieByContentId(toolContentId); - if (wookie == null) { - WookieService.logger - .warn("Did not find activity with toolContentId: " + toolContentId + " to remove learner content"); - return; - } - - for (WookieSession session : wookie.getWookieSessions()) { - WookieUser user = wookieUserDAO.getByUserIdAndSessionId(userId.longValue(), session.getSessionId()); - if (user != null) { - NotebookEntry entry = getEntry(session.getSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, - WookieConstants.TOOL_SIGNATURE, userId); - if (entry != null) { - wookieDAO.delete(entry); - } - user.setFinishedActivity(false); - wookieUserDAO.update(user); - } - - } } @Override - public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { - Wookie wookie = wookieDAO.getByContentId(toolContentId); - if (wookie == null) { - wookie = getDefaultContent(); - } - if (wookie == null) { - throw new DataMissingException("Unable to find default content for the wookie tool"); - } - - // set ResourceToolContentHandler as null to avoid copy file node in - // repository again. - wookie = Wookie.newInstance(wookie, toolContentId); - wookie.setWookieSessions(null); - - try { - exportContentService.exportToolContent(toolContentId, wookie, wookieToolContentHandler, rootPath); - } catch (ExportToolContentException e) { - throw new ToolException(e); - } + public void exportToolContent(Long toolContentId, String toPath) throws DataMissingException, ToolException { } @Override public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion, String toVersion) throws ToolException { - try { - // register version filter class - exportContentService.registerImportVersionFilterClass(WookieContentVersionFilter.class); - - Object toolPOJO = exportContentService.importToolContent(toolContentPath, wookieToolContentHandler, - fromVersion, toVersion); - if (!(toolPOJO instanceof Wookie)) { - throw new ImportToolContentException( - "Import Wookie tool content failed. Deserialized object is " + toolPOJO); - } - Wookie wookie = (Wookie) toolPOJO; - - // reset it to new toolContentId - wookie.setToolContentId(toolContentId); - wookie.setCreateBy(newUserUid); - - User user = (User) userManagementService.findById(User.class, newUserUid); - - // If the wookie has an identifier, it has been initiated. Make an - // new instance using the identifier - if (!StringUtils.isEmpty(wookie.getWidgetIdentifier()) && (user != null)) { - String wookieUrl = getWookieURL(); - String wookieKey = getWookieAPIKey(); - wookieUrl += WookieConstants.RELATIVE_URL_WIDGET_SERVICE; - - String returnXML = WookieUtil.getWidget(wookieUrl, wookieKey, wookie.getWidgetIdentifier(), - user.getUserDTO(), toolContentId.toString(), true); - - WidgetData widgetData = WookieUtil.getWidgetDataFromXML(returnXML); - wookie.setWidgetAuthorUrl(widgetData.getUrl()); - wookie.setWidgetIdentifier(wookie.getWidgetIdentifier()); - wookie.setWidgetHeight(widgetData.getHeight()); - wookie.setWidgetMaximise(widgetData.getMaximize()); - wookie.setWidgetWidth(widgetData.getWidth()); - } - - wookieDAO.saveOrUpdate(wookie); - } catch (ImportToolContentException e) { - throw new ToolException(e); - } catch (Exception e) { - WookieService.logger.error("Error during import possibly because of file copy error", e); - throw new ToolException(e); - } } @Override - public String getFileExtension(String fileName) { - String ext = ""; - int i = fileName.lastIndexOf('.'); - if ((i > 0) && (i < (fileName.length() - 1))) { - ext += "." + fileName.substring(i + 1).toLowerCase(); - } - return ext; + public SortedMap getToolOutputDefinitions(Long toolContentId, int definitionType) + throws ToolException { + return null; } @Override - public SortedMap getToolOutputDefinitions(Long toolContentId, int definitionType) - throws ToolException { - Wookie wookie = getWookieDAO().getByContentId(toolContentId); - if (wookie == null) { - wookie = getDefaultContent(); - } - return getWookieOutputFactory().getToolOutputDefinitions(wookie, definitionType); + public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) { + return null; } @Override public String getToolContentTitle(Long toolContentId) { - return getWookieByContentId(toolContentId).getTitle(); + return null; } @Override public boolean isContentEdited(Long toolContentId) { - return getWookieByContentId(toolContentId).isDefineLater(); + return false; } @Override public boolean isReadOnly(Long toolContentId) { - Wookie wookie = getWookieByContentId(toolContentId); - - for (WookieSession session : wookie.getWookieSessions()) { - for (WookieUser user : session.getWookieUsers()) { - if (user.isFinishedActivity()) { - return true; - } - } - } - return false; } @Override - @SuppressWarnings("unchecked") - public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) { - return getWookieOutputFactory().getSupportedDefinitionClasses(definitionType); - } + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { - /* ********** IWookieService Methods ********************************* */ - - @Override - public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry) { - return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry); } @Override - public NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID) { - List list = coreNotebookService.getEntry(sessionId, idType, signature, userID); - if ((list == null) || list.isEmpty()) { - return null; - } else { - return list.get(0); - } + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + return null; } - /** - * @param notebookEntry - */ @Override - public void updateEntry(NotebookEntry notebookEntry) { - coreNotebookService.updateEntry(notebookEntry); + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) + throws DataMissingException, ToolException { + return null; } @Override - 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"; - WookieService.logger.error(error); - throw new WookieException(error); - } - return toolContentId; + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) + throws DataMissingException, ToolException { + return null; } @Override - public Wookie getDefaultContent() { - Long defaultContentID = getDefaultContentIdBySignature(WookieConstants.TOOL_SIGNATURE); - Wookie defaultContent = getWookieByContentId(defaultContentID); - if (defaultContent == null) { - String error = "Could not retrieve default content record for this tool"; - WookieService.logger.error(error); - throw new WookieException(error); - } - return defaultContent; + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { } @Override - public Wookie copyDefaultContent(Long newContentID) { - - if (newContentID == null) { - String error = "Cannot copy the Wookie tools default content: + " + "newContentID is null"; - WookieService.logger.error(error); - throw new WookieException(error); - } - - Wookie defaultContent = getDefaultContent(); - // create new wookie using the newContentID - Wookie newContent = new Wookie(); - newContent = Wookie.newInstance(defaultContent, newContentID); - wookieDAO.saveOrUpdate(newContent); - return newContent; + public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { + return null; } @Override - public Wookie getWookieByContentId(Long toolContentID) { - Wookie wookie = wookieDAO.getByContentId(toolContentID); - if (wookie == null) { - WookieService.logger.debug("Could not find the content with toolContentID:" + toolContentID); - } - return wookie; + public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { + return null; } @Override - public WookieSession getSessionBySessionId(Long toolSessionId) { - WookieSession wookieSession = wookieSessionDAO.getBySessionId(toolSessionId); - if (wookieSession == null) { - WookieService.logger.debug("Could not find the wookie session with toolSessionID:" + toolSessionId); - } - return wookieSession; + public void forceCompleteUser(Long toolSessionId, User user) { } - - @Override - public WookieUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId) { - return wookieUserDAO.getByUserIdAndSessionId(userId, toolSessionId); - } - - public WookieUser getUserByLoginNameAndSessionId(String loginName, Long toolSessionId) { - return wookieUserDAO.getByLoginNameAndSessionId(loginName, toolSessionId); - } - - @Override - public WookieUser getUserByUID(Long uid) { - return wookieUserDAO.getByUID(uid); - } - - @Override - public void saveOrUpdateWookie(Wookie wookie) { - wookieDAO.saveOrUpdate(wookie); - } - - @Override - public void saveOrUpdateWookieSession(WookieSession wookieSession) { - wookieSessionDAO.saveOrUpdate(wookieSession); - } - - @Override - public void saveOrUpdateWookieUser(WookieUser wookieUser) { - wookieUserDAO.saveOrUpdate(wookieUser); - } - - @Override - public WookieUser createWookieUser(UserDTO user, WookieSession wookieSession) { - WookieUser wookieUser = new WookieUser(user, wookieSession); - saveOrUpdateWookieUser(wookieUser); - return wookieUser; - } - - @Override - public WookieConfigItem getConfigItem(String key) { - return wookieConfigItemDAO.getConfigItemByKey(key); - } - - @Override - public void saveOrUpdateWookieConfigItem(WookieConfigItem item) { - wookieConfigItemDAO.saveOrUpdate(item); - } - - @Override - public String getWookieURL() { - String url = null; - WookieConfigItem urlItem = wookieConfigItemDAO.getConfigItemByKey(WookieConfigItem.KEY_WOOKIE_URL); - if (urlItem != null) { - url = urlItem.getConfigValue(); - } - return url; - } - - @Override - public String getWookieAPIKey() { - String url = null; - WookieConfigItem apiItem = wookieConfigItemDAO.getConfigItemByKey(WookieConfigItem.KEY_API); - if (apiItem != null) { - url = apiItem.getConfigValue(); - } - return url; - } - - @Override - public String getMessage(String key) { - return messageService.getMessage(key); - } - - // ========================================================================================= - /* ********** Used by Spring to "inject" the linked objects ************* */ - - public IWookieDAO getWookieDAO() { - return wookieDAO; - } - - public void setWookieDAO(IWookieDAO wookieDAO) { - this.wookieDAO = wookieDAO; - } - - public IToolContentHandler getWookieToolContentHandler() { - return wookieToolContentHandler; - } - - public void setWookieToolContentHandler(IToolContentHandler wookieToolContentHandler) { - this.wookieToolContentHandler = wookieToolContentHandler; - } - - public IWookieSessionDAO getWookieSessionDAO() { - return wookieSessionDAO; - } - - public void setWookieSessionDAO(IWookieSessionDAO sessionDAO) { - wookieSessionDAO = sessionDAO; - } - - public ILamsToolService getToolService() { - return toolService; - } - - public void setToolService(ILamsToolService toolService) { - this.toolService = toolService; - } - - public IWookieUserDAO getWookieUserDAO() { - return wookieUserDAO; - } - - public void setWookieUserDAO(IWookieUserDAO userDAO) { - wookieUserDAO = 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 WookieOutputFactory getWookieOutputFactory() { - return wookieOutputFactory; - } - - public void setWookieOutputFactory(WookieOutputFactory wookieOutputFactory) { - this.wookieOutputFactory = wookieOutputFactory; - } - - public IWookieConfigItemDAO getWookieConfigItemDAO() { - return wookieConfigItemDAO; - } - - public void setWookieConfigItemDAO(IWookieConfigItemDAO wookieConfigItemDAO) { - this.wookieConfigItemDAO = wookieConfigItemDAO; - } - - public MessageService getMessageService() { - return messageService; - } - - public void setMessageService(MessageService messageService) { - this.messageService = messageService; - } - - public IUserManagementService getUserManagementService() { - return userManagementService; - } - - public void setUserManagementService(IUserManagementService userManagementService) { - this.userManagementService = userManagementService; - } - -} +} \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/service/WookieServiceProxy.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/util/WookieConstants.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/util/WookieException.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/util/WookieToolContentHandler.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/util/WookieUtil.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/AdminAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/AuthoringAction.java =================================================================== diff -u -r8b97231e320c0c5b674f07c14da711f232ba9e1c -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 8b97231e320c0c5b674f07c14da711f232ba9e1c) +++ lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -2,410 +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.wookie.web.actions; -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.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; 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.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.wookie.dto.WidgetDefinition; -import org.lamsfoundation.lams.tool.wookie.model.Wookie; -import org.lamsfoundation.lams.tool.wookie.service.IWookieService; -import org.lamsfoundation.lams.tool.wookie.service.WookieServiceProxy; -import org.lamsfoundation.lams.tool.wookie.util.WookieConstants; -import org.lamsfoundation.lams.tool.wookie.util.WookieException; -import org.lamsfoundation.lams.tool.wookie.util.WookieUtil; -import org.lamsfoundation.lams.tool.wookie.web.forms.AuthoringForm; -import org.lamsfoundation.lams.usermanagement.dto.UserDTO; -import org.lamsfoundation.lams.util.FileValidatorUtil; -import org.lamsfoundation.lams.util.WebUtil; +import org.apache.struts.action.RedirectingActionForward; import org.lamsfoundation.lams.web.action.LamsDispatchAction; -import org.lamsfoundation.lams.web.session.SessionManager; -import org.lamsfoundation.lams.web.util.AttributeNames; -import org.lamsfoundation.lams.web.util.SessionMap; -/** - * @author - * @version - * - * @struts.action path="/authoring" name="authoringForm" parameter="dispatch" - * scope="request" validate="false" - * - * @struts.action-forward name="success" path="tiles:/authoring/main" - * @struts.action-forward name="widgetList" - * path="/pages/authoring/widgetList.jsp" - * @struts.action-forward name="message_page" path="tiles:/generic/message" - */ public class AuthoringAction extends LamsDispatchAction { - - private static Logger logger = Logger.getLogger(AuthoringAction.class); - - public IWookieService wookieService; - - // Authoring SessionMap key names - private static final String KEY_TOOL_CONTENT_ID = "toolContentID"; - private static final String KEY_CONTENT_FOLDER_ID = "contentFolderID"; - private static final String KEY_MODE = "mode"; - - /** - * 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. - * - */ - @Override - protected ActionForward unspecified(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) { - - // 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); - - AuthoringForm authForm = (AuthoringForm) form; - - ToolAccessMode mode = null; - String modeStr = WebUtil.readStrParam(request, "mode", true); - if (modeStr != null && !modeStr.trim().equals("")) { - mode = WebUtil.readToolAccessModeParam(request, "mode", true); - } - - // set up wookieService - if (wookieService == null) { - wookieService = WookieServiceProxy.getWookieService(this - .getServlet().getServletContext()); - } - - String wookieUrl = wookieService.getWookieURL(); - if (wookieUrl == null) { - throw new WookieException(wookieService - .getMessage("error.wookie.not.configured")); - } - - // Get the widget count - try { - int widgetCount = WookieUtil.getWidgetCount(wookieUrl); - if (widgetCount > 0) { - int pages = 1; - float pagesFloat = new Float(widgetCount) - / WookieConstants.WIDGETS_PER_PAGE; - if (pagesFloat > 1) { - - pages = (new Float(Math.ceil(pagesFloat))).intValue(); - } - - request.setAttribute(WookieConstants.ATTR_WIDGET_PAGES, pages); - } - } catch (Exception e) { - logger.error("Error initiating widget on wookie server", e); - throw new WookieException(wookieService - .getMessage("error.initiating.widget"), e); - } - - // retrieving Wookie with given toolContentID - Wookie wookie = wookieService.getWookieByContentId(toolContentID); - if (wookie == null) { - wookie = wookieService.copyDefaultContent(toolContentID); - wookie.setCreateDate(new Date()); - wookie.setCreateBy(getUser().getUserID()); - wookieService.saveOrUpdateWookie(wookie); - } - - 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. - wookie.setDefineLater(true); - wookieService.saveOrUpdateWookie(wookie); - } - - // Set up the authForm. - updateAuthForm(authForm, wookie); - authForm.setToolContentID(toolContentID); - if (mode != null) { - authForm.setMode(mode.toString()); - } else { - authForm.setMode(""); - } - authForm.setContentFolderID(contentFolderID); - - // Set up sessionMap - SessionMap map = createSessionMap(wookie, - getAccessMode(request), contentFolderID, toolContentID); - authForm.setSessionMapID(map.getSessionID()); - - // add the sessionMap to HTTPSession. - request.getSession().setAttribute(map.getSessionID(), map); - request.setAttribute(WookieConstants.ATTR_SESSION_MAP, map); - - return mapping.findForward("success"); - } - - public ActionForward getWidgets(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) - throws WookieException { - - // set up wookieService - if (wookieService == null) { - wookieService = WookieServiceProxy.getWookieService(this - .getServlet().getServletContext()); - } - - Integer pageNumber = WebUtil.readIntParam(request, - WookieConstants.PARAM_PAGE_NUMBER); - - // Fetch all the available wookie widgets - try { - String wookieUrl = wookieService.getWookieURL(); - if (wookieUrl == null) { - throw new WookieException(wookieService - .getMessage("error.wookie.not.configured")); - } - - List widgetDefinitions = WookieUtil - .getWidgetDefinitions(wookieUrl); - List cutDownWidgetDefinitions = null; - - int startIndex = WookieConstants.WIDGETS_PER_PAGE - * (pageNumber - 1); - int endIndex = WookieConstants.WIDGETS_PER_PAGE * (pageNumber); - if (widgetDefinitions.size() > startIndex) { - if (widgetDefinitions.size() > endIndex) { - // Use the start and end index - within range - cutDownWidgetDefinitions = widgetDefinitions.subList( - startIndex, endIndex); - } else { - // Use the start index to the end of the list - cutDownWidgetDefinitions = widgetDefinitions.subList( - startIndex, widgetDefinitions.size()); - } - - } - request.setAttribute(WookieConstants.ATTR_WIDGET_LIST, - cutDownWidgetDefinitions); - return mapping.findForward("widgetList"); - - } catch (Exception e) { - logger.error("Problem reading xml from wookie server.", e); - throw new WookieException(e); - } - } - - public ActionForward initiateWidget(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) - throws WookieException { - try { - // set up wookieService - if (wookieService == null) { - wookieService = WookieServiceProxy.getWookieService(this - .getServlet().getServletContext()); - } - - String wookieUrl = wookieService.getWookieURL(); - String wookieKey = wookieService.getWookieAPIKey(); - String wookieIdentifier = WebUtil.readStrParam(request, - WookieConstants.PARAM_KEY_WIDGET_ID); - Long toolContentID = new Long(WebUtil.readLongParam(request, - AttributeNames.PARAM_TOOL_CONTENT_ID)); - - wookieUrl += WookieConstants.RELATIVE_URL_WIDGET_SERVICE; - - String returnXML = WookieUtil - .getWidget(wookieUrl, wookieKey, wookieIdentifier, - getUser(), toolContentID.toString(), true); - - this.writeResponse(response, "text/xml;charset=utf-8", "utf-8", - returnXML); - - } catch (Exception e) { - log.error("Problem intitiation widget" + e); - throw new WookieException(e); - } - return null; - } - - public ActionForward updateContent(ActionMapping mapping, ActionForm form, - HttpServletRequest request, HttpServletResponse response) - throws WookieException { - // TODO need error checking. - - // get authForm and session map. - AuthoringForm authForm = (AuthoringForm) form; - SessionMap map = getSessionMap(request, authForm); - ToolAccessMode mode = (ToolAccessMode) map - .get(AuthoringAction.KEY_MODE); - - // get wookie content. - Wookie wookie = wookieService.getWookieByContentId((Long) map - .get(AuthoringAction.KEY_TOOL_CONTENT_ID)); - - // update wookie content using form inputs. - updateWookie(wookie, authForm, mode); - - // set the update date - wookie.setUpdateDate(new Date()); - - // releasing defineLater flag so that learner can start using the tool. - wookie.setDefineLater(false); - - wookieService.saveOrUpdateWookie(wookie); - - request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, - Boolean.TRUE); - - // add the sessionMapID to form - authForm.setSessionMapID(map.getSessionID()); - - request.setAttribute(WookieConstants.ATTR_SESSION_MAP, map); - - updateAuthForm(authForm, wookie); - if (mode != null) { - authForm.setMode(mode.toString()); - } else { - authForm.setMode(""); - } - - return mapping.findForward("success"); - } - - /* ========== Private Methods ********** */ - - /** - * Updates Wookie content using AuthoringForm inputs. - * - * @param authForm - * @param mode - * @return - */ - private void updateWookie(Wookie wookie, AuthoringForm authForm, - ToolAccessMode mode) { - wookie.setTitle(authForm.getTitle()); - wookie.setInstructions(authForm.getInstructions()); - if (mode.isAuthor()) { // Teacher cannot modify following - wookie.setLockOnFinished(authForm.isLockOnFinished()); - wookie.setReflectOnActivity(authForm.isReflectOnActivity()); - wookie.setReflectInstructions(authForm.getReflectInstructions()); - wookie.setWidgetAuthorUrl(authForm.getWidgetAuthorUrl()); - wookie.setWidgetHeight(authForm.getWidgetHeight()); - wookie.setWidgetWidth(authForm.getWidgetWidth()); - wookie.setWidgetMaximise(authForm.getWidgetMaximise()); - wookie.setWidgetIdentifier(authForm.getWidgetIdentifier()); - } - } - - /** - * Updates AuthoringForm using Wookie content. - * - * @param wookie - * @param authForm - * @return - */ - private void updateAuthForm(AuthoringForm authForm, Wookie wookie) { - authForm.setTitle(wookie.getTitle()); - authForm.setInstructions(wookie.getInstructions()); - authForm.setLockOnFinished(wookie.isLockOnFinished()); - authForm.setReflectOnActivity(wookie.isReflectOnActivity()); - authForm.setReflectInstructions(wookie.getReflectInstructions()); - - // Set the wookie params - authForm.setWidgetAuthorUrl(wookie.getWidgetAuthorUrl()); - authForm.setWidgetHeight(wookie.getWidgetHeight()); - authForm.setWidgetWidth(wookie.getWidgetWidth()); - authForm.setWidgetMaximise(wookie.getWidgetMaximise()); - authForm.setWidgetIdentifier(wookie.getWidgetIdentifier()); - } - - /** - * Updates SessionMap using Wookie content. - * - * @param wookie - * @param mode - */ - private SessionMap createSessionMap(Wookie wookie, - ToolAccessMode mode, String contentFolderID, Long toolContentID) { - - SessionMap map = new SessionMap(); - - map.put(AuthoringAction.KEY_MODE, mode); - map.put(AuthoringAction.KEY_CONTENT_FOLDER_ID, contentFolderID); - map.put(AuthoringAction.KEY_TOOL_CONTENT_ID, toolContentID); - - 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; - } - - /** - * 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()); - } - - private UserDTO getUser() { - return (UserDTO) SessionManager.getSession().getAttribute( - AttributeNames.USER); - } -} + @Override + protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return new RedirectingActionForward("/index.html"); + } +} \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/ClearSessionAction.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/LearningAction.java =================================================================== diff -u -r8b97231e320c0c5b674f07c14da711f232ba9e1c -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/LearningAction.java (.../LearningAction.java) (revision 8b97231e320c0c5b674f07c14da711f232ba9e1c) +++ lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/LearningAction.java (.../LearningAction.java) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -2,348 +2,58 @@ * 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.wookie.web.actions; -import java.io.IOException; -import java.io.InputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.util.Date; -import java.util.HashMap; -import java.util.Map.Entry; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; -import org.apache.axis.utils.StringUtils; -import org.apache.log4j.Logger; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -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.exception.DataMissingException; -import org.lamsfoundation.lams.tool.exception.ToolException; -import org.lamsfoundation.lams.tool.wookie.dto.WookieDTO; -import org.lamsfoundation.lams.tool.wookie.dto.WookieUserDTO; -import org.lamsfoundation.lams.tool.wookie.model.Wookie; -import org.lamsfoundation.lams.tool.wookie.model.WookieSession; -import org.lamsfoundation.lams.tool.wookie.model.WookieUser; -import org.lamsfoundation.lams.tool.wookie.service.IWookieService; -import org.lamsfoundation.lams.tool.wookie.service.WookieServiceProxy; -import org.lamsfoundation.lams.tool.wookie.util.WookieConstants; -import org.lamsfoundation.lams.tool.wookie.util.WookieException; -import org.lamsfoundation.lams.tool.wookie.util.WookieUtil; -import org.lamsfoundation.lams.tool.wookie.web.forms.LearningForm; +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.Configuration; -import org.lamsfoundation.lams.util.ConfigurationKeys; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.action.LamsDispatchAction; import org.lamsfoundation.lams.web.session.SessionManager; import org.lamsfoundation.lams.web.util.AttributeNames; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; -/** - * @author - * @version - * - * @struts.action path="/learning" parameter="dispatch" scope="request" - * name="learningForm" - * @struts.action-forward name="wookie" path="tiles:/learning/main" - * @struts.action-forward name="defineLater" path="tiles:/learning/defineLater" - * @struts.action-forward name="notebook" path="/pages/learning/notebook.jsp" - */ public class LearningAction extends LamsDispatchAction { - private static Logger log = Logger.getLogger(LearningAction.class); - - private static final boolean MODE_OPTIONAL = false; - private static final String PIXLR_UTL = "http://www.wookie.com/editor/"; - - private IWookieService wookieService; - + @Override public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + long toolSessionId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); - LearningForm learningForm = (LearningForm) form; - - // 'toolSessionID' and 'mode' paramters are expected to be present. - // TODO need to catch exceptions and handle errors. - ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, MODE_OPTIONAL); - - Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); - - // set up wookieService - if (wookieService == null) { - wookieService = WookieServiceProxy.getWookieService(this.getServlet().getServletContext()); - } - - // Retrieve the session and content. - WookieSession wookieSession = wookieService.getSessionBySessionId(toolSessionID); - if (wookieSession == null) { - throw new WookieException("Cannot retrieve session with toolSessionID" + toolSessionID); - } - - Wookie wookie = wookieSession.getWookie(); - - // check defineLater - if (wookie.isDefineLater()) { - return mapping.findForward("defineLater"); - } - - // set mode, toolSessionID and WookieDTO - request.setAttribute("mode", mode.toString()); - request.setAttribute("toolSessionID", toolSessionID); - learningForm.setToolSessionID(toolSessionID); - - WookieDTO wookieDTO = new WookieDTO(wookie); - request.setAttribute("wookieDTO", wookieDTO); - - // Set the content in use flag. - if (!wookie.isContentInUse()) { - wookie.setContentInUse(new Boolean(true)); - wookieService.saveOrUpdateWookie(wookie); - } - - LearningWebUtil.putActivityPositionInRequestByToolSessionId(toolSessionID, request, getServlet() - .getServletContext()); - - // get the user - WookieUser wookieUser; - if (mode.equals(ToolAccessMode.TEACHER)) { - Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); - wookieUser = wookieService.getUserByUserIdAndSessionId(userID, toolSessionID); - } else { - wookieUser = getCurrentUser(toolSessionID); - } - - // Create a new widget instance for the user if required. - if (!StringUtils.isEmpty(wookieSession.getWidgetSharedDataKey())) { - if (wookieUser.getUserWidgetURL() == null || wookieUser.getUserWidgetURL().equals("")) { - String userWidgetURL = initiateWidget(wookieSession.getWidgetIdentifier(), wookieSession - .getWidgetSharedDataKey()); - wookieUser.setUserWidgetURL(userWidgetURL); - wookieService.saveOrUpdateWookieUser(wookieUser); - } - } - - // set up the user dto - WookieUserDTO wookieUserDTO = new WookieUserDTO(wookieUser); - if (wookieUser.isFinishedActivity()) { - // get the notebook entry. - NotebookEntry notebookEntry = wookieService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, - WookieConstants.TOOL_SIGNATURE, wookieUser.getUserId().intValue()); - if (notebookEntry != null) { - wookieUserDTO.notebookEntry = notebookEntry.getEntry(); - wookieUserDTO.setFinishedReflection(true); - } - } - request.setAttribute("wookieUserDTO", wookieUserDTO); - - String returnURL = Configuration.get(ConfigurationKeys.SERVER_URL) + "/tool/lawook10/learning.do?"; - returnURL += "dispatch=updateWookieImage"; - returnURL += "&toolSessionID=" + wookieSession.getSessionId(); - - String url = PIXLR_UTL + "?"; - url += "&title=" + URLEncoder.encode(wookie.getTitle(), "UTF8"); - url += "&referrer=LAMS"; - - request.setAttribute("wookieURL", url); - request.setAttribute("returnURL", returnURL); - - // set readOnly flag. - if (mode.equals(ToolAccessMode.TEACHER) || (wookie.isLockOnFinished() && wookieUser.isFinishedActivity())) { - request.setAttribute("contentEditable", false); - } else { - request.setAttribute("contentEditable", true); - } - request.setAttribute("userWidgetURL", wookieUser.getUserWidgetURL()); - request.setAttribute("widgetHeight", wookieSession.getWidgetHeight()); - request.setAttribute("widgetWidth", wookieSession.getWidgetWidth()); - request.setAttribute("widgetMaximise", wookieSession.getWidgetMaximise()); - request.setAttribute("finishedActivity", wookieUser.isFinishedActivity()); - return mapping.findForward("wookie"); + 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 String initiateWidget(String wookieIdentifier, String sharedDataKey) throws WookieException { - try { - - String wookieUrl = wookieService.getWookieURL(); - String wookieKey = wookieService.getWookieAPIKey(); - - wookieUrl += WookieConstants.RELATIVE_URL_WIDGET_SERVICE; - - String returnXML = WookieUtil.getWidget(wookieUrl, wookieKey, wookieIdentifier, getUser(), sharedDataKey, - false); - return WookieUtil.getWidgetUrlFromXML(returnXML); - - } catch (Exception e) { - log.error("Problem intitating widget for learner" + e); - throw new WookieException(e); - } - } - - private WookieUser getCurrentUser(Long toolSessionId) { - UserDTO user = getUser(); - - // attempt to retrieve user using userId and toolSessionId - WookieUser wookieUser = wookieService.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), - toolSessionId); - - if (wookieUser == null) { - WookieSession wookieSession = wookieService.getSessionBySessionId(toolSessionId); - wookieUser = wookieService.createWookieUser(user, wookieSession); - } - - return wookieUser; - } - - private UserDTO getUser() { - return (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); - } - - public ActionForward finishActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - - Long toolSessionID = WebUtil.readLongParam(request, "toolSessionID"); - - WookieUser wookieUser = getCurrentUser(toolSessionID); - - if (wookieUser != null) { - wookieUser.setFinishedActivity(true); - wookieService.saveOrUpdateWookieUser(wookieUser); - } else { - log.error("finishActivity(): couldn't find WookieUser with tool session id: " + toolSessionID); - } - - ToolSessionManager sessionMgrService = WookieServiceProxy.getWookieSessionManager(getServlet() - .getServletContext()); - - String nextActivityUrl; - try { - nextActivityUrl = sessionMgrService.leaveToolSession(toolSessionID, wookieUser.getUserId()); - response.sendRedirect(nextActivityUrl); - } catch (DataMissingException e) { - throw new WookieException(e); - } catch (ToolException e) { - throw new WookieException(e); - } catch (IOException e) { - throw new WookieException(e); - } - - return null; // TODO need to return proper page. - } - - public static InputStream getResponseInputStreamFromExternalServer(String urlStr, HashMap params) - throws ToolException, IOException { - if (!urlStr.endsWith("?")) - urlStr += "?"; - - for (Entry entry : params.entrySet()) { - urlStr += "&" + entry.getKey() + "=" + entry.getValue(); - } - - log.debug("Making request to external servlet: " + urlStr); - - URL url = new URL(urlStr); - URLConnection conn = url.openConnection(); - if (!(conn instanceof HttpURLConnection)) { - log.error("Fail to connect to external server though url: " + urlStr); - throw new ToolException("Fail to connect to external server though url: " + urlStr); - } - - HttpURLConnection httpConn = (HttpURLConnection) conn; - if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) { - log.error("Fail to fetch data from external server, response code: " + httpConn.getResponseCode() - + " Url: " + urlStr); - throw new ToolException("Fail to fetch data from external server, response code: " - + httpConn.getResponseCode() + " Url: " + urlStr); - } - - InputStream is = url.openConnection().getInputStream(); - if (is == null) { - log.error("Fail to fetch data from external server, return InputStream null: " + urlStr); - throw new ToolException("Fail to fetch data from external server, return inputStream null: " + urlStr); - } - - return is; - } - - public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - - LearningForm lrnForm = (LearningForm) form; - - // set the finished flag - WookieUser wookieUser = this.getCurrentUser(lrnForm.getToolSessionID()); - WookieDTO wookieDTO = new WookieDTO(wookieUser.getWookieSession().getWookie()); - - request.setAttribute("wookieDTO", wookieDTO); - - NotebookEntry notebookEntry = wookieService.getEntry(wookieUser.getWookieSession().getSessionId(), - CoreNotebookConstants.NOTEBOOK_TOOL, WookieConstants.TOOL_SIGNATURE, wookieUser.getUserId().intValue()); - - if (notebookEntry != null) { - lrnForm.setEntryText(notebookEntry.getEntry()); - } - - LearningWebUtil.putActivityPositionInRequestByToolSessionId(lrnForm.getToolSessionID(), request, getServlet() - .getServletContext()); - - return mapping.findForward("notebook"); - } - - public ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - - // save the reflection entry and call the notebook. - - LearningForm lrnForm = (LearningForm) form; - - WookieUser wookieUser = this.getCurrentUser(lrnForm.getToolSessionID()); - Long toolSessionID = wookieUser.getWookieSession().getSessionId(); - Integer userID = wookieUser.getUserId().intValue(); - - // check for existing notebook entry - NotebookEntry entry = wookieService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, - WookieConstants.TOOL_SIGNATURE, userID); - - if (entry == null) { - // create new entry - wookieService.createNotebookEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, - WookieConstants.TOOL_SIGNATURE, userID, lrnForm.getEntryText()); - } else { - // update existing entry - entry.setEntry(lrnForm.getEntryText()); - entry.setLastModified(new Date()); - wookieService.updateEntry(entry); - } - - return finishActivity(mapping, form, request, response); - } -} +} \ No newline at end of file Index: lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/MonitoringAction.java =================================================================== diff -u -rc950f1229e26a9532391d9a07356161bf80ed270 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision c950f1229e26a9532391d9a07356161bf80ed270) +++ lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/actions/MonitoringAction.java (.../MonitoringAction.java) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -2,21 +2,21 @@ * 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 * **************************************************************** */ @@ -27,172 +27,17 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.axis.utils.StringUtils; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import org.lamsfoundation.lams.notebook.model.NotebookEntry; -import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; -import org.lamsfoundation.lams.tool.wookie.dto.WookieDTO; -import org.lamsfoundation.lams.tool.wookie.dto.WookieSessionDTO; -import org.lamsfoundation.lams.tool.wookie.dto.WookieUserDTO; -import org.lamsfoundation.lams.tool.wookie.model.Wookie; -import org.lamsfoundation.lams.tool.wookie.model.WookieUser; -import org.lamsfoundation.lams.tool.wookie.service.IWookieService; -import org.lamsfoundation.lams.tool.wookie.service.WookieServiceProxy; -import org.lamsfoundation.lams.tool.wookie.util.WookieConstants; -import org.lamsfoundation.lams.tool.wookie.util.WookieException; -import org.lamsfoundation.lams.tool.wookie.util.WookieUtil; -import org.lamsfoundation.lams.usermanagement.dto.UserDTO; -import org.lamsfoundation.lams.util.WebUtil; +import org.apache.struts.action.RedirectingActionForward; import org.lamsfoundation.lams.web.action.LamsDispatchAction; -import org.lamsfoundation.lams.web.session.SessionManager; -import org.lamsfoundation.lams.web.util.AttributeNames; -/** - * @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="wookie_display" - * path="tiles:/monitoring/wookie_display" - * - */ public class MonitoringAction extends LamsDispatchAction { - public IWookieService wookieService; - + @Override public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { - - setupService(); - - Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); - - String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); - - Wookie wookie = wookieService.getWookieByContentId(toolContentID); - - if (wookie == null) { - // TODO error page. - } - - WookieDTO wookieDT0 = new WookieDTO(wookie); - - for (WookieSessionDTO sessionDTO : wookieDT0.getSessionDTOs()) { - Long toolSessionID = sessionDTO.getSessionID(); - - // Initiate the wookie widget for the monitor - if (!StringUtils.isEmpty(sessionDTO.getWidgetSharedDataKey())) { - String sessionUserWidgetUrl = initiateWidget(sessionDTO.getWidgetIdentifier(), sessionDTO - .getWidgetSharedDataKey()); - sessionDTO.setSessionUserWidgetUrl(sessionUserWidgetUrl); - } - for (WookieUserDTO userDTO : sessionDTO.getUserDTOs()) { - // get the notebook entry. - NotebookEntry notebookEntry = wookieService.getEntry(toolSessionID, - CoreNotebookConstants.NOTEBOOK_TOOL, WookieConstants.TOOL_SIGNATURE, userDTO.getUserId() - .intValue()); - if (notebookEntry != null) { - userDTO.notebookEntry = notebookEntry.getEntry(); - userDTO.setFinishedReflection(true); - } - - } - } - - // Set a flag if there is only one session - boolean multipleSessionFlag = false; - if (wookieDT0.getSessionDTOs() != null && wookieDT0.getSessionDTOs().size() > 1) { - multipleSessionFlag = true; - } - request.setAttribute("multipleSessionFlag", multipleSessionFlag); - - Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true); - wookieDT0.setCurrentTab(currentTab); - - request.setAttribute("wookieDTO", wookieDT0); - request.setAttribute("contentFolderID", contentFolderID); - request.setAttribute("toolContentID", toolContentID); - return mapping.findForward("success"); + return new RedirectingActionForward("/index.html"); } - - private String initiateWidget(String wookieIdentifier, String sharedDataKey) throws WookieException { - try { - - String wookieUrl = wookieService.getWookieURL(); - String wookieKey = wookieService.getWookieAPIKey(); - - wookieUrl += WookieConstants.RELATIVE_URL_WIDGET_SERVICE; - - String returnXML = WookieUtil.getWidget(wookieUrl, wookieKey, wookieIdentifier, getUser(), sharedDataKey, - true); - return WookieUtil.getWidgetUrlFromXML(returnXML); - - } catch (Exception e) { - log.error("Problem intitating widget for learner" + e); - throw new WookieException(e); - } - } - - private UserDTO getUser() { - return (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); - } - - public ActionForward showWookie(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - - setupService(); - - Long uid = new Long(WebUtil.readLongParam(request, "userUID")); - - WookieUser user = wookieService.getUserByUID(uid); - - WookieUserDTO userDTO = new WookieUserDTO(user); - - request.setAttribute("userDTO", userDTO); - - return mapping.findForward("wookie_display"); - } - - /** - * set up wookieService - */ - private void setupService() { - if (wookieService == null) { - wookieService = WookieServiceProxy.getWookieService(this.getServlet().getServletContext()); - } - } - - /** - * Opens a user's reflection - * - * @param mapping - * @param form - * @param request - * @param response - * @return - */ - public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, - HttpServletResponse response) { - - //MonitoringForm monitorForm = (MonitoringForm) form; - Long toolSessionId = WebUtil.readLongParam(request, "toolSessionID", false); - Long userID = WebUtil.readLongParam(request, "userID", false); - - WookieUser wookieUser = wookieService.getUserByUserIdAndSessionId(userID, toolSessionId); - - NotebookEntry notebookEntry = wookieService.getEntry(toolSessionId, CoreNotebookConstants.NOTEBOOK_TOOL, - WookieConstants.TOOL_SIGNATURE, userID.intValue()); - - WookieUserDTO wookieUserDTO = new WookieUserDTO(wookieUser); - wookieUserDTO.setNotebookEntry(notebookEntry.getEntry()); - - request.setAttribute("wookieUserDTO", wookieUserDTO); - - return mapping.findForward("notebook"); - } -} +} \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/forms/AdminForm.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/forms/AuthoringForm.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/forms/LearningForm.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/web/forms/MonitoringForm.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/wookieApplicationContext.xml =================================================================== diff -u -ra6641bf9262a01d07740a517643f8fe187ec5b1f -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/wookieApplicationContext.xml (.../wookieApplicationContext.xml) (revision a6641bf9262a01d07740a517643f8fe187ec5b1f) +++ lams_tool_wookie/src/java/org/lamsfoundation/lams/tool/wookie/wookieApplicationContext.xml (.../wookieApplicationContext.xml) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -4,85 +4,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"> - - - - - - - - org.lamsfoundation.lams.tool.wookie.ApplicationResources - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/403.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/404.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/web/WEB-INF/applicationContext.xml =================================================================== diff -u --- lams_tool_wookie/web/WEB-INF/applicationContext.xml (revision 0) +++ lams_tool_wookie/web/WEB-INF/applicationContext.xml (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -0,0 +1,7 @@ + + + + \ No newline at end of file Index: lams_tool_wookie/web/WEB-INF/struts-config.xml =================================================================== diff -u --- lams_tool_wookie/web/WEB-INF/struts-config.xml (revision 0) +++ lams_tool_wookie/web/WEB-INF/struts-config.xml (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -0,0 +1,17 @@ + + + + + + + + + + + \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/AuthoringButton.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/CKEditor.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/Date.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/DefineLater.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/Head.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/ImgButtonWrapper.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/Tab.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/TabBody.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/TabName.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/Tabs.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/TextSearch.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tags/headItems.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tiles-defs.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/jstl/c.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/jstl/fmt.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/jstl/fn.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/jstl/permittedTaglibs.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/jstl/scriptfree.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/jstl/x.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/lams/lams.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-bean-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-bean.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-html-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-html.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-logic-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-logic.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-nested.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-tiles-el.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/tlds/struts/struts-tiles.tld'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/WEB-INF/validator-rules.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/web/WEB-INF/web.xml =================================================================== diff -u -r5e63656a12c02f7476564e278b43ff4ce86ac930 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f --- lams_tool_wookie/web/WEB-INF/web.xml (.../web.xml) (revision 5e63656a12c02f7476564e278b43ff4ce86ac930) +++ lams_tool_wookie/web/WEB-INF/web.xml (.../web.xml) (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -3,16 +3,13 @@ + + Wookie + + Wookie tool + + - javax.servlet.jsp.jstl.fmt.localizationContext - org.lamsfoundation.lams.tool.wookie.ApplicationResources - - - - contextConfigLocation - classpath:/org/lamsfoundation/lams/tool/wookie/dbupdates/autopatchContext.xml - - locatorFactorySelector classpath:/org/lamsfoundation/lams/beanRefContext.xml @@ -27,35 +24,11 @@ org.lamsfoundation.lams.web.session.SystemSessionFilter - - hibernateFilter - - org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter - - - sessionFactoryBeanName - coreSessionFactory - - - - LocaleFilter - - org.lamsfoundation.lams.web.filter.LocaleFilter - - SystemSessionFilter /* - - hibernateFilter - /* - - - LocaleFilter - /* - @@ -76,238 +49,19 @@ detail - 2 + 1 - - validate - true - - 1 - - - - Connector - net.fckeditor.connector.ConnectorServlet - - baseDir - /UserFiles/ - - - debug - false - - 1 - - - - - Attachment Download - Attachment Download - download - org.lamsfoundation.lams.contentrepository.client.ToolDownload - - toolContentHandlerBeanName - wookieToolContentHandler - - 3 - - - action *.do - - - - Connector - /ckeditor/filemanager/browser/default/connectors/jsp/connector - - - - download - /download/* - - - - - 500 - /error.jsp - - - 403 - /403.jsp - - - 404 - /404.jsp - - - - - - - - - tags-bean - /WEB-INF/tlds/struts/struts-bean.tld - - - tags-html - /WEB-INF/tlds/struts/struts-html.tld - - - tags-logic - /WEB-INF/tlds/struts/struts-logic.tld - - - tags-tiles - /WEB-INF/tlds/struts/struts-tiles.tld - - - tags-bean-el - /WEB-INF/tlds/struts/struts-bean-el.tld - - - tags-html-el - /WEB-INF/tlds/struts/struts-html-el.tld - - - tags-logic-el - /WEB-INF/tlds/struts/struts-logic-el.tld - - - tags-tiles-el - /WEB-INF/tlds/struts/struts-tiles-el.tld - - - - - - tags-fmt - /WEB-INF/tlds/jstl/fmt.tld - - - tags-core - /WEB-INF/tlds/jstl/c.tld - - - tags-function - /WEB-INF/tlds/jstl/fn.tld - - - tags-xml - /WEB-INF/tlds/jstl/x.tld - - - - - - tags-permittedTaglibs - /WEB-INF/tlds/jstl/permittedTaglibs.tld - - - tags-scriptfree - /WEB-INF/tlds/jstl/scriptfree.tld - - - - - - tags-lams - /WEB-INF/tlds/lams/lams.tld - - - - - + - Secure Content + Public Content /* - - LEARNER - MONITOR - AUTHOR - SYSADMIN - - - - - Authoring content - /authoring/* - /pages/authoring/* - /authoring.do - - - AUTHOR - MONITOR - SYSADMIN - - - - - Staff content - /pages/monitoring/* - /monitoring.do - - - MONITOR - SYSADMIN - - - - - - Admin content - /admin/* - /pages/admin/* - - - SYSADMIN - - - - - - FORM - LAMS - - /login.jsp - /login.jsp?failed=y - - - - - - Student - LEARNER - - - - Authors Learning Designs - AUTHOR - - - - Member of Staff - MONITOR - - - - Group Manager - GROUP MANAGER - - - Group Administrator - GROUP ADMIN - - - LAMS System Adminstrator - SYSADMIN - \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/empty.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/footer.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/header.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/learnerheader.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/message.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/messages.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/common/taglibs.jsp'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/web/css/images/widget-bg.png =================================================================== diff -u -r7c52d117dbe910bd67630b5506346429e25b99a9 -r0110ae0b586fbdc8a3c3f7046007a712660f2f4f Binary files differ Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/css/wookie.css'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/error.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/includes/javascript/authoring.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/includes/javascript/common.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/includes/javascript/jquery.pager.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/includes/javascript/learning.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/includes/javascript/monitoring.js'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_wookie/web/index.html =================================================================== diff -u --- lams_tool_wookie/web/index.html (revision 0) +++ lams_tool_wookie/web/index.html (revision 0110ae0b586fbdc8a3c3f7046007a712660f2f4f) @@ -0,0 +1,5 @@ + + + This tool is not supported anymore. + + \ No newline at end of file Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/layouts/defaultLayout.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/layouts/learningLayout.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/layouts/tabLayout.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/admin/config.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/authoring/advanced.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/authoring/authoring.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/authoring/basic.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/authoring/headItems.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/authoring/widgetList.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/learning/defineLater.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/learning/headItems.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/learning/notebook.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/learning/parts/finishButton.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/learning/wookie.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/editActivity.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/headItems.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/monitoring.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/notebook.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/statistics.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/summary.jsp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 0110ae0b586fbdc8a3c3f7046007a712660f2f4f refers to a dead (removed) revision in file `lams_tool_wookie/web/pages/monitoring/wookieDisplay.jsp'. Fisheye: No comparison available. Pass `N' to diff?