Index: lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonManagerServlet.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonManagerServlet.java,v diff -u -r1.30 -r1.31 --- lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonManagerServlet.java 13 Oct 2009 02:26:48 -0000 1.30 +++ lams_central/src/java/org/lamsfoundation/lams/webservice/xml/LessonManagerServlet.java 16 Feb 2011 10:33:07 -0000 1.31 @@ -310,6 +310,9 @@ createLessonClass(lesson, orgMap.getOrganisation(), userMap.getUser()); // 3. start lesson LessonManagerServlet.monitoringService.startLesson(lesson.getLessonId(), userMap.getUser().getUserId()); + + //store information which extServer has started the lesson + integrationService.createExtServerLessonMap(lesson.getLessonId(), serverMap); return lesson.getLessonId(); } catch (Exception e) { Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/integration/ExtServerLessonMap.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/integration/ExtServerOrgMap.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/integration/Attic/ExtServerOrgMap.hbm.xml,v diff -u -r1.5 -r1.6 --- lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/integration/ExtServerOrgMap.hbm.xml 1 Jul 2009 02:47:12 -0000 1.5 +++ lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/integration/ExtServerOrgMap.hbm.xml 16 Feb 2011 10:42:02 -0000 1.6 @@ -1,239 +1,188 @@ - + + - - - - - - - @hibernate.class + - - - - @hibernate.id - generator-class="native" - type="java.lang.Integer" + + + + + + - - - true - - - - - true - - @hibernate.property + - - - true - - @hibernate.property + unique="true" + /> + + - - - true - - @hibernate.property + /> + + - - - - @hibernate.property + /> + + - - - - @hibernate.property + /> + + - - - - @hibernate.property + unique="true" + /> + + - - - - @hibernate.property + /> + + - - - - @hibernate.property + /> + + - - - - @hibernate.property + /> + + + + - + /> - - - - - - @hibernate.set + + + + + - @hibernate.collection-key - column="ext_server_org_map_id" + + - @hibernate.collection-one-to-many - class="org.lamsfoundation.lams.integration.ExtCourseClassMap" - - - - - - - - - - @hibernate.set + + + + + - @hibernate.collection-key - column="ext_server_org_map_id" + + - @hibernate.collection-one-to-many - class="org.lamsfoundation.lams.integration.ExtUserUseridMap" - - - - - - - - - - @hibernate.many-to-one - @hibernate.column name="orgid" - - - + - + + + + + + Index: lams_common/db/sql/create_integration_tables.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/create_integration_tables.sql,v diff -u -r1.4 -r1.5 --- lams_common/db/sql/create_integration_tables.sql 1 Jul 2009 02:47:09 -0000 1.4 +++ lams_common/db/sql/create_integration_tables.sql 16 Feb 2011 10:37:42 -0000 1.5 @@ -12,6 +12,7 @@ `userinfo_url` text NOT NULL, `server_url` varchar(255) DEFAULT NULL, `timeout_url` text NOT NULL, + `lesson_finish_url` text DEFAULT NULL, `disabled` bit(1) NOT NULL, `orgid` bigint(20), PRIMARY KEY (`sid`), @@ -67,3 +68,17 @@ CONSTRAINT lams_ext_server_tool_map_fk1 FOREIGN KEY (ext_server_org_map_id) REFERENCES lams_ext_server_org_map (sid) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT lams_ext_server_tool_map_fk2 FOREIGN KEY (tool_id) REFERENCES lams_tool (tool_id) ON DELETE CASCADE ON UPDATE CASCADE ) TYPE=InnoDB; + +-- +-- Table structure for table `lams_ext_server_lesson_map` +-- +DROP TABLE IF EXISTS lams_ext_server_lesson_map; +CREATE TABLE lams_ext_server_lesson_map ( + uid BIGINT(20) NOT NULL auto_increment, + lesson_id BIGINT(20) NOT NULL, + ext_server_org_map_id int(11) NOT NULL, + PRIMARY KEY (uid), + UNIQUE KEY `lesson_id` (`lesson_id`), + CONSTRAINT lams_ext_server_lesson_map_fk1 FOREIGN KEY (ext_server_org_map_id) REFERENCES lams_ext_server_org_map (sid) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT lams_ext_server_lesson_map_fk2 FOREIGN KEY (lesson_id) REFERENCES lams_lesson (lesson_id) ON DELETE CASCADE ON UPDATE CASCADE +) TYPE=InnoDB; Index: lams_common/db/sql/insert_types_data.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/db/sql/insert_types_data.sql,v diff -u -r1.100 -r1.101 --- lams_common/db/sql/insert_types_data.sql 4 Oct 2010 15:32:04 -0000 1.100 +++ lams_common/db/sql/insert_types_data.sql 16 Feb 2011 10:37:41 -0000 1.101 @@ -343,7 +343,7 @@ -- external server mapping to a lams organisation INSERT INTO lams_ext_server_org_map VALUES - (1,'moodle','moodle','moodle','moodle','mdl','http://localhost/moodle/mod/lamstwo/userinfo.php?ts=%timestamp%&un=%username%&hs=%hash%', '', 'http://dummy','\0',7); + (1,'moodle','moodle','moodle','moodle','mdl','http://localhost/moodle/mod/lamstwo/userinfo.php?ts=%timestamp%&un=%username%&hs=%hash%', '', 'http://dummy', '', '\0',7); -- set default configs for SIF openid Index: lams_common/src/java/org/lamsfoundation/lams/commonContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/commonContext.xml,v diff -u -r1.90 -r1.91 --- lams_common/src/java/org/lamsfoundation/lams/commonContext.xml 4 Oct 2010 15:32:04 -0000 1.90 +++ lams_common/src/java/org/lamsfoundation/lams/commonContext.xml 16 Feb 2011 10:37:42 -0000 1.91 @@ -79,6 +79,7 @@ classpath:org/lamsfoundation/lams/integration/ExtCourseClassMap.hbm.xml classpath:org/lamsfoundation/lams/integration/ExtUserUseridMap.hbm.xml classpath:org/lamsfoundation/lams/integration/ExtServerToolAdapterMap.hbm.xml + classpath:org/lamsfoundation/lams/integration/ExtServerLessonMap.hbm.xml classpath:org/lamsfoundation/lams/planner/PedagogicalPlannerSequenceNode.hbm.xml Index: lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch02040006.sql =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch02040006.sql,v diff -u -r1.5 -r1.6 --- lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch02040006.sql 8 Feb 2011 12:08:21 -0000 1.5 +++ lams_common/src/java/org/lamsfoundation/lams/dbupdates/patch02040006.sql 16 Feb 2011 10:37:42 -0000 1.6 @@ -123,5 +123,19 @@ insert into lams_configuration (config_key, config_value, description_key, header_name, format, required) values ('DisplayPrintButton','false', 'config.display.print.button', 'config.header.features', 'BOOLEAN', 1); +-- LDEV-2628 Report instant completion +ALTER TABLE lams_ext_server_org_map ADD COLUMN lesson_finish_url text DEFAULT NULL; + +CREATE TABLE lams_ext_server_lesson_map ( + uid BIGINT(20) NOT NULL auto_increment, + lesson_id BIGINT(20) NOT NULL, + ext_server_org_map_id int(11) NOT NULL, + PRIMARY KEY (uid), + UNIQUE KEY `lesson_id` (`lesson_id`), + CONSTRAINT lams_ext_server_lesson_map_fk1 FOREIGN KEY (ext_server_org_map_id) REFERENCES lams_ext_server_org_map (sid) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT lams_ext_server_lesson_map_fk2 FOREIGN KEY (lesson_id) REFERENCES lams_lesson (lesson_id) ON DELETE CASCADE ON UPDATE CASCADE +) TYPE=InnoDB; + + COMMIT; SET AUTOCOMMIT = 1; \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/integration/ExtServerLessonMap.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/integration/ExtServerOrgMap.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/integration/Attic/ExtServerOrgMap.java,v diff -u -r1.4 -r1.5 --- lams_common/src/java/org/lamsfoundation/lams/integration/ExtServerOrgMap.java 1 Jul 2009 02:47:10 -0000 1.4 +++ lams_common/src/java/org/lamsfoundation/lams/integration/ExtServerOrgMap.java 16 Feb 2011 10:42:02 -0000 1.5 @@ -39,6 +39,9 @@ /** persistent field */ private String timeoutUrl; + + /** persistent field */ + private String lessonFinishUrl; /** persistent field */ private Boolean disabled; @@ -200,7 +203,19 @@ public void setTimeoutUrl(String timeoutUrl) { this.timeoutUrl = timeoutUrl; } + + /** + * @hibernate.property column="lesson_finish_url" length="65535" not-null="false" + * + */ + public String getLessonFinishUrl() { + return this.lessonFinishUrl; + } + public void setLessonFinishUrl(String lessonFinishUrl) { + this.lessonFinishUrl = lessonFinishUrl; + } + /** * @hibernate.property column="disabled" length="1" not-null="true" *