Index: lams_tool_example/.classpath
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/.classpath (.../.classpath) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/.classpath (.../.classpath) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -7,5 +7,8 @@
+
+
+
Index: lams_tool_example/.cvsignore
===================================================================
diff -u
--- lams_tool_example/.cvsignore (revision 0)
+++ lams_tool_example/.cvsignore (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1 @@
+build
Index: lams_tool_example/.project
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/.project (.../.project) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/.project (.../.project) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -35,8 +35,14 @@
+
+ com.genuitec.eclipse.hibernate.HibernateBuilder
+
+
+
+ com.genuitec.eclipse.hibernate.hibernatenature
com.genuitec.eclipse.j2eedt.core.webnature
org.eclipse.jdt.core.javanature
Index: lams_tool_example/.settings/org.eclipse.core.resources.prefs
===================================================================
diff -u
--- lams_tool_example/.settings/org.eclipse.core.resources.prefs (revision 0)
+++ lams_tool_example/.settings/org.eclipse.core.resources.prefs (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,4 @@
+#Wed Mar 22 11:10:51 EST 2006
+eclipse.preferences.version=1
+encoding//conf/xdoclet/web-settings.xml=UTF-8
+encoding//web/WEB-INF/web.xml=UTF-8
Index: lams_tool_example/build.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/build.xml (.../build.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/build.xml (.../build.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -198,68 +198,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Index: lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/Example.hbm.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/Example.hbm.xml (.../Example.hbm.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/Example.hbm.xml (.../Example.hbm.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -1,245 +1,180 @@
-
+
+
-
-
-
-
-
-
- @hibernate.class
+
- true
-
-
-
- @hibernate.id
- generator-class="native"
- type="java.lang.Long"
+
+
+
+
+
+
-
-
- true
-
-
-
-
-
- @hibernate.property
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
+ />
-
-
-
-
-
- @hibernate.set
+
- @hibernate.collection-key
- column="example_uid"
+
+
- @hibernate.collection-one-to-many
- class="org.lamsfoundation.lams.tool.example.ExampleAttachment"
-
-
-
-
-
-
-
-
-
- @hibernate.set
+
+
+
+
+
- @hibernate.collection-key
- column="example_uid"
+
+
- @hibernate.collection-one-to-many
- class="org.lamsfoundation.lams.tool.example.ExampleSession"
-
-
-
-
-
-
+
-
+
+
+
+
+
+
Index: lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleAttachment.hbm.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleAttachment.hbm.xml (.../ExampleAttachment.hbm.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleAttachment.hbm.xml (.../ExampleAttachment.hbm.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -1,122 +1,93 @@
-
+
+
-
-
-
-
-
-
- @hibernate.class
+
- true
-
-
-
- @hibernate.id
- generator-class="native"
- type="java.lang.Long"
+
+
+
+
+
+
-
-
- true
-
-
-
-
- true
-
- @hibernate.property
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
+ />
-
-
-
-
-
- @hibernate.many-to-one
- not-null="true"
- @hibernate.column name="example_uid"
-
-
-
+
+
+
-
+
+
+
+
Index: lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleSession.hbm.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleSession.hbm.xml (.../ExampleSession.hbm.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleSession.hbm.xml (.../ExampleSession.hbm.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -1,150 +1,111 @@
-
+
+
-
-
-
-
-
-
- @hibernate.class
+
- true
-
-
-
- @hibernate.id
- generator-class="native"
- type="java.lang.Long"
+
+
+
+
+
+
-
-
- true
-
-
-
-
- true
-
- @hibernate.property
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
-
- true
-
- @hibernate.property
+ />
+
+
-
+ />
-
-
-
-
-
- @hibernate.many-to-one
- not-null="true"
- @hibernate.column name="example_uid"
-
-
-
-
-
-
- @hibernate.set
+
+
+
+
+
- @hibernate.collection-key
- column="session_id"
+
+
- @hibernate.collection-one-to-many
- class="org.lamsfoundation.lams.tool.example.ExampleUser"
-
-
-
-
-
-
+
-
+
+
+
+
+
+
Index: lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleUser.hbm.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleUser.hbm.xml (.../ExampleUser.hbm.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/ExampleUser.hbm.xml (.../ExampleUser.hbm.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -1,101 +1,76 @@
-
+
+
-
-
-
-
-
-
- @hibernate.class
+
- true
-
-
-
- @hibernate.id
- generator-class="sequence"
- type="java.lang.Long"
+
+
+
+
+
+
-
- @hibernate.generator-param
- name="sequence"
- value=""
-
- true
-
-
-
-
-
-
- true
-
- @hibernate.property
+
-
-
-
- @hibernate.property
+ />
+
+
-
-
-
- @hibernate.property
+ />
+
+
-
+ />
-
-
-
-
-
- @hibernate.many-to-one
- not-null="true"
- @hibernate.column name="session_id"
-
-
-
+
+
+
-
+
+
+
+
Index: lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/hibernate.cfg.xml
===================================================================
diff -u
--- lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/hibernate.cfg.xml (revision 0)
+++ lams_tool_example/conf/hibernate/mappings/org/lamsfoundation/lams/tool/example/hibernate.cfg.xml (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_example/conf/language/ApplicationResources.properties
===================================================================
diff -u
--- lams_tool_example/conf/language/ApplicationResources.properties (revision 0)
+++ lams_tool_example/conf/language/ApplicationResources.properties (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,80 @@
+# $Id$
+
+# Australian English language file for the example tool.
+
+# ========== Values for tool and library activity. Sent to Flash as part of the learning design toolkit. ======
+tool.display.name=Example
+tool.description=Example Tool
+
+activity.display.name=Example
+activity.description=Example Tool
+activity.helptext=This is an example tool to help you start writing your own tool.
+
+# ========== Authoring Page ===========
+
+button.basic=Basic
+button.advanced=Advanced
+button.instructions=Instructions
+button.upload=Upload
+
+# Basic Page
+basic.title=Title:
+basic.content=Content:
+
+#Instructions Page
+instructions.onlineInstructions=Online Instructions:
+instructions.offlineInstructions=Offline Instructions:
+instructions.uploadOnlineInstr=Online Instructions File:
+instructions.uploadOfflineInstr=Offline Instructions File:
+instructions.type.online=Online
+instructions.type.offline=Offline
+
+label.filename=Filename
+label.type=Type
+label.attachments=Attachments
+link.view=View
+link.download=Download
+link.delete=Delete
+
+# ========== Learner Page ==========
+message.defineLaterSet=Please wait for the teacher to complete the contents of this activity
+message.runOfflineSet=This activity is not being done on the computer. Please see your instructor for details
+
+# ========== Monitoring Page ==========
+button.summary=Summary
+button.editActivity=Edit Activity
+button.statistics=Statistics
+button.edit=Edit
+
+titleHeading.summary=Summary
+titleHeading.instructions=Instructions
+titleHeading.statistics=Statistics
+titleHeading.editActivity=Edit Activity
+titleHeading.exportPortfolio=Export Portfolio
+
+heading.group=Group {0}:
+heading.totalLearners=Number of Learners:
+heading.totalLearnersInGroup=Total Number of Learners in Group:
+
+message.contentInUseSet=The modification of content is not allowed since one or more students has attempted the activity.
+message.summary=There is no summary available for this tool.
+
+# ========== Buttons ==========
+button.cancel=Cancel
+button.ok=OK
+button.done=Done
+button.save=Save
+button.finish=Finish
+button.next=Next
+
+
+# ========== Error/Exception Messages ==========
+
+# --- AUTHORING --- #
+
+
+error.mandatoryField={0} field is mandatory.
+error.missingParam=Unable to continue. {0} is missing.
+error.exceedMaxFileSize=File size exceeded
+error.exception.NbApplication=An internal error has occured with the Example Tool. If reporting this error, please report:
{0}
+error.contentrepository=An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly.
Index: lams_tool_example/conf/war/META-INF/MANIFEST.MF
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/conf/war/META-INF/MANIFEST.MF (.../MANIFEST.MF) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/conf/war/META-INF/MANIFEST.MF (.../MANIFEST.MF) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -1 +1 @@
-Class-Path: ./lams.jar ./lams-contentrepository.jar
\ No newline at end of file
+Class-Path: ./lams.jar ./lams-tool-laex11.jar ./lams-contentrepository.jar ./lams-learning.jar
Index: lams_tool_example/conf/xdoclet/web-settings.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/conf/xdoclet/web-settings.xml (.../web-settings.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/conf/xdoclet/web-settings.xml (.../web-settings.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -7,8 +7,10 @@
contextConfigLocation
classpath:/org/lamsfoundation/lams/applicationContext.xml
+ classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml
classpath:/org/lamsfoundation/lams/tool/toolApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml
classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml
- classpath:/org/lamsfoundation/lams/tool/example/applicationContext.xml
+ classpath:/org/lamsfoundation/lams/tool/example/applicationContext.xml
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/Example.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/Example.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/Example.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,319 @@
+package org.lamsfoundation.lams.tool.example;
+
+import java.util.Date;
+import java.util.Set;
+
+
+/**
+ * @hibernate.class
+ * table="tl_laex11_example"
+ *
+ */
+
+public class Example implements java.io.Serializable {
+
+
+ // Fields
+
+ private Long uid;
+ private Date createDate;
+ private Date updateDate;
+ private Long createBy;
+ private String title;
+ private String instructions;
+ private Boolean runOffline;
+ private Boolean lockOnFinished;
+ private String onlineInstructions;
+ private String offlineInstructions;
+ private Boolean contentInUse;
+ private Boolean defineLater;
+ private Long toolContentId;
+ private Set exampleAttachments;
+ private Set exampleSessions;
+
+
+ // Constructors
+
+ /** default constructor */
+ public Example() {
+ }
+
+
+ /** full constructor */
+ public Example(Date createDate, Date updateDate, Long createBy, String title, String instructions, Boolean runOffline, Boolean lockOnFinished, String onlineInstructions, String offlineInstructions, Boolean contentInUse, Boolean defineLater, Long toolContentId, Set exampleAttachments, Set exampleSessions) {
+ this.createDate = createDate;
+ this.updateDate = updateDate;
+ this.createBy = createBy;
+ this.title = title;
+ this.instructions = instructions;
+ this.runOffline = runOffline;
+ this.lockOnFinished = lockOnFinished;
+ this.onlineInstructions = onlineInstructions;
+ this.offlineInstructions = offlineInstructions;
+ this.contentInUse = contentInUse;
+ this.defineLater = defineLater;
+ this.toolContentId = toolContentId;
+ this.exampleAttachments = exampleAttachments;
+ this.exampleSessions = exampleSessions;
+ }
+
+
+ // Property accessors
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * type="java.lang.Long"
+ * column="uid"
+ *
+ */
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+ /**
+ * @hibernate.property
+ * column="create_date"
+ *
+ */
+
+ public Date getCreateDate() {
+ return this.createDate;
+ }
+
+ public void setCreateDate(Date createDate) {
+ this.createDate = createDate;
+ }
+ /**
+ * @hibernate.property
+ * column="update_date"
+ *
+ */
+
+ public Date getUpdateDate() {
+ return this.updateDate;
+ }
+
+ public void setUpdateDate(Date updateDate) {
+ this.updateDate = updateDate;
+ }
+ /**
+ * @hibernate.property
+ * column="create_by"
+ * length="20"
+ *
+ */
+
+ public Long getCreateBy() {
+ return this.createBy;
+ }
+
+ public void setCreateBy(Long createBy) {
+ this.createBy = createBy;
+ }
+ /**
+ * @hibernate.property
+ * column="title"
+ * length="255"
+ *
+ */
+
+ public String getTitle() {
+ return this.title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+ /**
+ * @hibernate.property
+ * column="instructions"
+ * length="65535"
+ *
+ */
+
+ public String getInstructions() {
+ return this.instructions;
+ }
+
+ public void setInstructions(String instructions) {
+ this.instructions = instructions;
+ }
+ /**
+ * @hibernate.property
+ * column="run_offline"
+ * length="1"
+ *
+ */
+
+ public Boolean getRunOffline() {
+ return this.runOffline;
+ }
+
+ public void setRunOffline(Boolean runOffline) {
+ this.runOffline = runOffline;
+ }
+ /**
+ * @hibernate.property
+ * column="lock_on_finished"
+ * length="1"
+ *
+ */
+
+ public Boolean getLockOnFinished() {
+ return this.lockOnFinished;
+ }
+
+ public void setLockOnFinished(Boolean lockOnFinished) {
+ this.lockOnFinished = lockOnFinished;
+ }
+ /**
+ * @hibernate.property
+ * column="online_instructions"
+ * length="65535"
+ *
+ */
+
+ public String getOnlineInstructions() {
+ return this.onlineInstructions;
+ }
+
+ public void setOnlineInstructions(String onlineInstructions) {
+ this.onlineInstructions = onlineInstructions;
+ }
+ /**
+ * @hibernate.property
+ * column="offline_instructions"
+ * length="65535"
+ *
+ */
+
+ public String getOfflineInstructions() {
+ return this.offlineInstructions;
+ }
+
+ public void setOfflineInstructions(String offlineInstructions) {
+ this.offlineInstructions = offlineInstructions;
+ }
+ /**
+ * @hibernate.property
+ * column="content_in_use"
+ * length="1"
+ *
+ */
+
+ public Boolean getContentInUse() {
+ return this.contentInUse;
+ }
+
+ public void setContentInUse(Boolean contentInUse) {
+ this.contentInUse = contentInUse;
+ }
+ /**
+ * @hibernate.property
+ * column="define_later"
+ * length="1"
+ *
+ */
+
+ public Boolean getDefineLater() {
+ return this.defineLater;
+ }
+
+ public void setDefineLater(Boolean defineLater) {
+ this.defineLater = defineLater;
+ }
+ /**
+ * @hibernate.property
+ * column="tool_content_id"
+ * length="20"
+ *
+ */
+
+ public Long getToolContentId() {
+ return this.toolContentId;
+ }
+
+ public void setToolContentId(Long toolContentId) {
+ this.toolContentId = toolContentId;
+ }
+ /**
+ * @hibernate.set
+ * lazy="false"
+ * inverse="true"
+ * cascade="none"
+ * @hibernate.collection-key
+ * column="example_uid"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.tool.example.ExampleAttachment"
+ *
+ */
+
+ public Set getExampleAttachments() {
+ return this.exampleAttachments;
+ }
+
+ public void setExampleAttachments(Set exampleAttachments) {
+ this.exampleAttachments = exampleAttachments;
+ }
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * inverse="true"
+ * cascade="none"
+ * @hibernate.collection-key
+ * column="example_uid"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.tool.example.ExampleSession"
+ *
+ */
+
+ public Set getExampleSessions() {
+ return this.exampleSessions;
+ }
+
+ public void setExampleSessions(Set exampleSessions) {
+ this.exampleSessions = exampleSessions;
+ }
+
+
+ /**
+ * toString
+ * @return String
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
+ buffer.append("title").append("='").append(getTitle()).append("' ");
+ buffer.append("instructions").append("='").append(getInstructions()).append("' ");
+ buffer.append("toolContentId").append("='").append(getToolContentId()).append("' ");
+ buffer.append("]");
+
+ return buffer.toString();
+ }
+
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( (other == null ) ) return false;
+ if ( !(other instanceof Example) ) return false;
+ Example castOther = ( Example ) other;
+
+ return ( (this.getUid()==castOther.getUid()) || ( this.getUid()!=null && castOther.getUid()!=null && this.getUid().equals(castOther.getUid()) ) );
+ }
+
+ public int hashCode() {
+ int result = 17;
+ result = 37 * result + ( getUid() == null ? 0 : this.getUid().hashCode() );
+ return result;
+ }
+
+
+
+
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleAttachment.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleAttachment.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleAttachment.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,183 @@
+package org.lamsfoundation.lams.tool.example;
+
+import java.util.Date;
+
+
+/**
+ *
+ * The details of files attached to the tool. In most cases this
+ * will be the online/offline instruction files.
+ *
+ * @hibernate.class
+ * table="tl_laex11_attachment"
+ *
+ */
+
+public class ExampleAttachment implements java.io.Serializable {
+
+
+ private Long uid;
+ private Long fileVersionId;
+ private String fileType;
+ private String fileName;
+ private Long fileUuid;
+ private Date createDate;
+ private Example example;
+
+
+ // Constructors
+
+ /** default constructor */
+ public ExampleAttachment() {
+ }
+
+
+ /** full constructor */
+ public ExampleAttachment(Long fileVersionId, String fileType, String fileName, Long fileUuid, Date createDate, Example example) {
+ this.fileVersionId = fileVersionId;
+ this.fileType = fileType;
+ this.fileName = fileName;
+ this.fileUuid = fileUuid;
+ this.createDate = createDate;
+ this.example = example;
+ }
+
+
+ // Property accessors
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * type="java.lang.Long"
+ * column="uid"
+ *
+ */
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+ /**
+ * @hibernate.property
+ * column="file_version_id"
+ * length="20"
+ *
+ */
+
+ public Long getFileVersionId() {
+ return this.fileVersionId;
+ }
+
+ public void setFileVersionId(Long fileVersionId) {
+ this.fileVersionId = fileVersionId;
+ }
+ /**
+ * @hibernate.property
+ * column="file_type"
+ * length="255"
+ *
+ */
+
+ public String getFileType() {
+ return this.fileType;
+ }
+
+ public void setFileType(String fileType) {
+ this.fileType = fileType;
+ }
+ /**
+ * @hibernate.property
+ * column="file_name"
+ * length="255"
+ *
+ */
+
+ public String getFileName() {
+ return this.fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+ /**
+ * @hibernate.property
+ * column="file_uuid"
+ * length="20"
+ *
+ */
+
+ public Long getFileUuid() {
+ return this.fileUuid;
+ }
+
+ public void setFileUuid(Long fileUuid) {
+ this.fileUuid = fileUuid;
+ }
+ /**
+ * @hibernate.property
+ * column="create_date"
+ *
+ */
+
+ public Date getCreateDate() {
+ return this.createDate;
+ }
+
+ public void setCreateDate(Date createDate) {
+ this.createDate = createDate;
+ }
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="example_uid"
+ *
+ */
+
+ public Example getExample() {
+ return this.example;
+ }
+
+ public void setExample(Example example) {
+ this.example = example;
+ }
+
+
+ /**
+ * toString
+ * @return String
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
+ buffer.append("fileVersionId").append("='").append(getFileVersionId()).append("' ");
+ buffer.append("fileName").append("='").append(getFileName()).append("' ");
+ buffer.append("fileUuid").append("='").append(getFileUuid()).append("' ");
+ buffer.append("]");
+
+ return buffer.toString();
+ }
+
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( (other == null ) ) return false;
+ if ( !(other instanceof ExampleAttachment) ) return false;
+ ExampleAttachment castOther = ( ExampleAttachment ) other;
+
+ return ( (this.getUid()==castOther.getUid()) || ( this.getUid()!=null && castOther.getUid()!=null && this.getUid().equals(castOther.getUid()) ) );
+ }
+
+ public int hashCode() {
+ int result = 17;
+ result = 37 * result + ( getUid() == null ? 0 : this.getUid().hashCode() );
+ return result;
+ }
+
+
+
+
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleSession.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleSession.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleSession.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,206 @@
+package org.lamsfoundation.lams.tool.example;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+
+
+/**
+ *
+ * Represents the tool session.
+ *
+ * @hibernate.class
+ * table="tl_laex11_session"
+ *
+ */
+
+public class ExampleSession implements java.io.Serializable {
+
+
+ // Fields
+ private Long uid;
+ private Date sessionEndDate;
+ private Date sessionStartDate;
+ private Integer status;
+ private Long sessionId;
+ private String sessionName;
+ private Example example;
+ private Set exampleUsers = new HashSet(0);
+
+ // Constructors
+
+ /** default constructor */
+ public ExampleSession() {
+ }
+
+
+ /** full constructor */
+ public ExampleSession(Date sessionEndDate, Date sessionStartDate, Integer status, Long sessionId, String sessionName, Example example, Set exampleUsers) {
+ this.sessionEndDate = sessionEndDate;
+ this.sessionStartDate = sessionStartDate;
+ this.status = status;
+ this.sessionId = sessionId;
+ this.sessionName = sessionName;
+ this.example = example;
+ this.exampleUsers = exampleUsers;
+ }
+
+
+ // Property accessors
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * type="java.lang.Long"
+ * column="uid"
+ *
+ */
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+ /**
+ * @hibernate.property
+ * column="session_end_date"
+ *
+ */
+
+ public Date getSessionEndDate() {
+ return this.sessionEndDate;
+ }
+
+ public void setSessionEndDate(Date sessionEndDate) {
+ this.sessionEndDate = sessionEndDate;
+ }
+ /**
+ * @hibernate.property
+ * column="session_start_date"
+ *
+ */
+
+ public Date getSessionStartDate() {
+ return this.sessionStartDate;
+ }
+
+ public void setSessionStartDate(Date sessionStartDate) {
+ this.sessionStartDate = sessionStartDate;
+ }
+ /**
+ * @hibernate.property
+ * column="status"
+ * length="11"
+ *
+ */
+
+ public Integer getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(Integer status) {
+ this.status = status;
+ }
+ /**
+ * @hibernate.property
+ * column="session_id"
+ * length="20"
+ *
+ */
+
+ public Long getSessionId() {
+ return this.sessionId;
+ }
+
+ public void setSessionId(Long sessionId) {
+ this.sessionId = sessionId;
+ }
+ /**
+ * @hibernate.property
+ * column="session_name"
+ * length="250"
+ *
+ */
+
+ public String getSessionName() {
+ return this.sessionName;
+ }
+
+ public void setSessionName(String sessionName) {
+ this.sessionName = sessionName;
+ }
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="example_uid"
+ *
+ */
+
+ public Example getExample() {
+ return this.example;
+ }
+
+ public void setExample(Example example) {
+ this.example = example;
+ }
+ /**
+ * @hibernate.set
+ * lazy="true"
+ * inverse="true"
+ * cascade="none"
+ * @hibernate.collection-key
+ * column="session_id"
+ * @hibernate.collection-one-to-many
+ * class="org.lamsfoundation.lams.tool.example.ExampleUser"
+ *
+ */
+
+ public Set getExampleUsers() {
+ return this.exampleUsers;
+ }
+
+ public void setExampleUsers(Set exampleUsers) {
+ this.exampleUsers = exampleUsers;
+ }
+
+
+ /**
+ * toString
+ * @return String
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
+ buffer.append("sessionEndDate").append("='").append(getSessionEndDate()).append("' ");
+ buffer.append("sessionStartDate").append("='").append(getSessionStartDate()).append("' ");
+ buffer.append("status").append("='").append(getStatus()).append("' ");
+ buffer.append("sessionId").append("='").append(getSessionId()).append("' ");
+ buffer.append("sessionName").append("='").append(getSessionName()).append("' ");
+ buffer.append("]");
+
+ return buffer.toString();
+ }
+
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( (other == null ) ) return false;
+ if ( !(other instanceof ExampleSession) ) return false;
+ ExampleSession castOther = ( ExampleSession ) other;
+
+ return ( (this.getUid()==castOther.getUid()) || ( this.getUid()!=null && castOther.getUid()!=null && this.getUid().equals(castOther.getUid()) ) );
+ }
+
+ public int hashCode() {
+ int result = 17;
+ result = 37 * result + ( getUid() == null ? 0 : this.getUid().hashCode() );
+ return result;
+ }
+
+
+
+
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleUser.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleUser.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/ExampleUser.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,150 @@
+package org.lamsfoundation.lams.tool.example;
+
+
+
+/**
+ *
+ * Caches the user details. This allows the tool to be more efficient at
+ * displaying user names but means that when people's names change, they
+ * won't change in the "old" tool data.
+ *
+ * @hibernate.class
+ * table="tl_laex11_user"
+ *
+ */
+
+public class ExampleUser implements java.io.Serializable {
+
+
+ // Fields
+ private Long uid;
+ private Long userId;
+ private String lastName;
+ private String firstName;
+ private ExampleSession exampleSession;
+
+
+ // Constructors
+
+ /** default constructor */
+ public ExampleUser() {
+ }
+
+
+ /** full constructor */
+ public ExampleUser(Long userId, String lastName, String firstName, ExampleSession exampleSession) {
+ this.userId = userId;
+ this.lastName = lastName;
+ this.firstName = firstName;
+ this.exampleSession = exampleSession;
+ }
+
+
+ // Property accessors
+ /**
+ * @hibernate.id
+ * generator-class="native"
+ * type="java.lang.Long"
+ * column="uid"
+ */
+
+ public Long getUid() {
+ return this.uid;
+ }
+
+ public void setUid(Long uid) {
+ this.uid = uid;
+ }
+ /**
+ * @hibernate.property
+ * column="user_id"
+ * length="20"
+ *
+ */
+
+ public Long getUserId() {
+ return this.userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+ /**
+ * @hibernate.property
+ * column="last_name"
+ * length="255"
+ *
+ */
+
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ /**
+ * @hibernate.property
+ * column="first_name"
+ * length="255"
+ *
+ */
+
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ /**
+ * @hibernate.many-to-one
+ * not-null="true"
+ * @hibernate.column name="session_id"
+ *
+ */
+
+ public ExampleSession getExampleSession() {
+ return this.exampleSession;
+ }
+
+ public void setExampleSession(ExampleSession exampleSession) {
+ this.exampleSession = exampleSession;
+ }
+
+
+ /**
+ * toString
+ * @return String
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer();
+
+ buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
+ buffer.append("userId").append("='").append(getUserId()).append("' ");
+ buffer.append("]");
+
+ return buffer.toString();
+ }
+
+
+ public boolean equals(Object other) {
+ if ( (this == other ) ) return true;
+ if ( (other == null ) ) return false;
+ if ( !(other instanceof ExampleUser) ) return false;
+ ExampleUser castOther = ( ExampleUser ) other;
+
+ return ( (this.getUid()==castOther.getUid()) || ( this.getUid()!=null && castOther.getUid()!=null && this.getUid().equals(castOther.getUid()) ) );
+ }
+
+ public int hashCode() {
+ int result = 17;
+ result = 37 * result + ( getUid() == null ? 0 : this.getUid().hashCode() );
+ return result;
+ }
+
+
+
+
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/applicationContext.xml
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/applicationContext.xml (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/applicationContext.xml (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org/lamsfoundation/lams/tool/example/Example.hbm.xml
+ org/lamsfoundation/lams/tool/example/ExampleSession.hbm.xml
+ org/lamsfoundation/lams/tool/example/ExampleUser.hbm.xml
+ org/lamsfoundation/lams/tool/example/ExampleAttachment.hbm.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+ PROPAGATION_REQUIRED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleAttachmentDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleAttachmentDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleAttachmentDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,7 @@
+package org.lamsfoundation.lams.tool.example.dao;
+
+import org.lamsfoundation.lams.dao.IBaseDAO;
+
+public interface IExampleAttachmentDAO extends IBaseDAO {
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,7 @@
+package org.lamsfoundation.lams.tool.example.dao;
+
+import org.lamsfoundation.lams.dao.IBaseDAO;
+
+public interface IExampleDAO extends IBaseDAO{
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleSessionDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleSessionDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleSessionDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,7 @@
+package org.lamsfoundation.lams.tool.example.dao;
+
+import org.lamsfoundation.lams.dao.IBaseDAO;
+
+public interface IExampleSessionDAO extends IBaseDAO{
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleUserDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleUserDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/IExampleUserDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,7 @@
+package org.lamsfoundation.lams.tool.example.dao;
+
+import org.lamsfoundation.lams.dao.IBaseDAO;
+
+public interface IExampleUserDAO extends IBaseDAO{
+
+}
\ No newline at end of file
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleAttachmentDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleAttachmentDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleAttachmentDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,8 @@
+package org.lamsfoundation.lams.tool.example.dao.hibernate;
+
+import org.lamsfoundation.lams.dao.hibernate.BaseDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleAttachmentDAO;
+
+public class ExampleAttachmentDAO extends BaseDAO implements IExampleAttachmentDAO {
+
+}
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,8 @@
+package org.lamsfoundation.lams.tool.example.dao.hibernate;
+
+import org.lamsfoundation.lams.dao.hibernate.BaseDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleDAO;
+
+public class ExampleDAO extends BaseDAO implements IExampleDAO {
+
+}
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleSessionDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleSessionDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleSessionDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,8 @@
+package org.lamsfoundation.lams.tool.example.dao.hibernate;
+
+import org.lamsfoundation.lams.dao.hibernate.BaseDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleSessionDAO;
+
+public class ExampleSessionDAO extends BaseDAO implements IExampleSessionDAO {
+
+}
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleUserDAO.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleUserDAO.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/dao/hibernate/ExampleUserDAO.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,8 @@
+package org.lamsfoundation.lams.tool.example.dao.hibernate;
+
+import org.lamsfoundation.lams.dao.hibernate.BaseDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleUserDAO;
+
+public class ExampleUserDAO extends BaseDAO implements IExampleUserDAO {
+
+}
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/service/ExampleService.java
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/service/ExampleService.java (.../ExampleService.java) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/service/ExampleService.java (.../ExampleService.java) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -22,12 +22,19 @@
import java.util.List;
+import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler;
+import org.lamsfoundation.lams.learning.service.ILearnerService;
import org.lamsfoundation.lams.tool.ToolContentManager;
import org.lamsfoundation.lams.tool.ToolSessionExportOutputData;
import org.lamsfoundation.lams.tool.ToolSessionManager;
+import org.lamsfoundation.lams.tool.example.dao.IExampleAttachmentDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleSessionDAO;
+import org.lamsfoundation.lams.tool.example.dao.IExampleUserDAO;
import org.lamsfoundation.lams.tool.exception.DataMissingException;
import org.lamsfoundation.lams.tool.exception.SessionDataExistsException;
import org.lamsfoundation.lams.tool.exception.ToolException;
+import org.lamsfoundation.lams.tool.service.ILamsToolService;
/**
* An implementation of the NoticeboardService interface.
@@ -38,11 +45,21 @@
public class ExampleService implements ToolSessionManager, ToolContentManager,
IExampleService {
+ private IExampleDAO exampleDAO=null;
+ private IExampleSessionDAO exampleSessionDAO = null;
+ private IExampleUserDAO exampleUserDAO=null;
+ private IExampleAttachmentDAO exampleAttachmentDAO = null;
+
+ private ILearnerService learnerService;
+ private ILamsToolService toolService;
+ private IToolContentHandler exampleToolContentHandler = null;
+
public ExampleService() {
super();
// TODO Auto-generated constructor stub
}
+ /* ************ Methods from ToolSessionManager, ToolContentManager ***********************/
public void createToolSession(Long toolSessionId, String toolSessionName,
Long toolContentId) throws ToolException {
// TODO Auto-generated method stub
@@ -52,7 +69,8 @@
public String leaveToolSession(Long toolSessionId, Long learnerId)
throws DataMissingException, ToolException {
// TODO Auto-generated method stub
- return null;
+ // Do tool status stuff first e.g. set learner to complete within the tool
+ return learnerService.completeToolSession(toolSessionId, learnerId);
}
public ToolSessionExportOutputData exportToolSession(Long toolSessionId)
@@ -97,4 +115,61 @@
}
+ /* ******************* Used by Spring to "inject" the linked objects **************************/
+ public IExampleAttachmentDAO getExampleAttachmentDAO() {
+ return exampleAttachmentDAO;
+ }
+
+ public void setExampleAttachmentDAO(IExampleAttachmentDAO attachmentDAO) {
+ this.exampleAttachmentDAO = attachmentDAO;
+ }
+
+ public IExampleDAO getExampleDAO() {
+ return exampleDAO;
+ }
+
+ public void setExampleDAO(IExampleDAO exampleDAO) {
+ this.exampleDAO = exampleDAO;
+ }
+
+ public IToolContentHandler getExampleToolContentHandler() {
+ return exampleToolContentHandler;
+ }
+
+ public void setExampleToolContentHandler(IToolContentHandler exampleToolContentHandler) {
+ this.exampleToolContentHandler = exampleToolContentHandler;
+ }
+
+ public IExampleSessionDAO getExampleSessionDAO() {
+ return exampleSessionDAO;
+ }
+
+ public void setExampleSessionDAO(IExampleSessionDAO sessionDAO) {
+ this.exampleSessionDAO = sessionDAO;
+ }
+
+ public ILamsToolService getToolService() {
+ return toolService;
+ }
+
+ public void setToolService(ILamsToolService toolService) {
+ this.toolService = toolService;
+ }
+
+ public IExampleUserDAO getExampleUserDAO() {
+ return exampleUserDAO;
+ }
+
+ public void setExampleUserDAO(IExampleUserDAO userDAO) {
+ this.exampleUserDAO = userDAO;
+ }
+
+ public ILearnerService getLearnerService() {
+ return learnerService;
+ }
+
+ public void setLearnerService(ILearnerService learnerService) {
+ this.learnerService = learnerService;
+ }
+
}
Index: lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/util/ExampleToolContentHandler.java
===================================================================
diff -u
--- lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/util/ExampleToolContentHandler.java (revision 0)
+++ lams_tool_example/src/java/org/lamsfoundation/lams/tool/example/util/ExampleToolContentHandler.java (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,62 @@
+/*
+Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
+
+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; either version 2 of the License, or
+(at your option) any later version.
+
+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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+USA
+
+http://www.gnu.org/licenses/gpl.txt
+*/
+package org.lamsfoundation.lams.tool.example.util;
+
+import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler;
+
+/**
+ * Simple client for accessing the content repository.
+ */
+public class ExampleToolContentHandler extends ToolContentHandler {
+
+ private static String repositoryWorkspaceName = "exampleworkspace";
+ private static String repositoryUser = "example";
+ private static char[] repositoryId = {'l','a','m','s','-','e','x'};
+
+ /**
+ *
+ */
+ public ExampleToolContentHandler() {
+ super();
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryWorkspaceName()
+ */
+ public String getRepositoryWorkspaceName() {
+ return repositoryWorkspaceName;
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryUser()
+ */
+ public String getRepositoryUser() {
+ return repositoryUser;
+ }
+
+ /* (non-Javadoc)
+ * @see org.lamsfoundation.lams.contentrepository.client.ToolContentHandler#getRepositoryId()
+ */
+ public char[] getRepositoryId() {
+ return repositoryId;
+ }
+
+}
Index: lams_tool_example/web/WEB-INF/struts-config.xml
===================================================================
diff -u
--- lams_tool_example/web/WEB-INF/struts-config.xml (revision 0)
+++ lams_tool_example/web/WEB-INF/struts-config.xml (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: lams_tool_example/web/WEB-INF/web.xml
===================================================================
diff -u -rbb7c63e87a565c0227aed9eadb9047da764cfde8 -r59a6f58ab28a49b3c56e196050782286efe879ea
--- lams_tool_example/web/WEB-INF/web.xml (.../web.xml) (revision bb7c63e87a565c0227aed9eadb9047da764cfde8)
+++ lams_tool_example/web/WEB-INF/web.xml (.../web.xml) (revision 59a6f58ab28a49b3c56e196050782286efe879ea)
@@ -1,8 +1,298 @@
-
+
+
+ javax.servlet.jsp.jstl.fmt.localizationContext
+ org.lamsfoundation.lams.applicationResources
+
+
+
+ contextConfigLocation
+
+ classpath:/org/lamsfoundation/lams/applicationContext.xml
+ classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/tool/toolApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml
+ classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml
+ classpath:/org/lamsfoundation/lams/tool/example/applicationContext.xml
+
+
+
+
+ SystemSessionFilter
+
+ org.lamsfoundation.lams.web.session.SystemSessionFilter
+
+
+
+ hibernateFilter
+
+ org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter
+
+
+ sessionFactoryBeanName
+ coreSessionFactory
+
+
+
+ LocaleFilter
+
+ org.lamsfoundation.lams.web.filter.LocaleFilter
+
+
+
+
+ SystemSessionFilter
+ /*
+
+
+ hibernateFilter
+ /*
+
+
+ LocaleFilter
+ /*
+
+
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+
+ org.lamsfoundation.lams.web.SessionListener
+
+
+
+
+ context
+ org.springframework.web.context.ContextLoaderServlet
+ 1
+
+
+
+ action
+ org.apache.struts.action.ActionServlet
+
+ config
+ /WEB-INF/struts/struts-config.xml
+
+
+ debug
+ 999
+
+
+ detail
+ 2
+
+
+ validate
+ true
+
+ 1
+
+
+
+
+
+ Connector
+ com.fredck.FCKeditor.connector.ConnectorServlet
+
+ baseDir
+ /UserFiles/
+
+
+ debug
+ false
+
+ 1
+
+
+
+ action
+ *.do
+
+
+
+
+ Connector
+ /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector
+
+
+
+ 120
+
+
+
+
+
+
+
+
+
+
+
+
+ tags-bean
+ /WEB-INF/struts/tlds/struts-bean.tld
+
+
+ tags-html
+ /WEB-INF/struts/tlds/struts-html.tld
+
+
+ tags-logic
+ /WEB-INF/struts/tlds/struts-logic.tld
+
+
+ tags-tiles
+ /WEB-INF/struts/tlds/struts-tiles.tld
+
+
+
+
+
+ tags-fmt
+ /WEB-INF/jstl/tlds/fmt.tld
+
+
+ tags-core
+ /WEB-INF/jstl/tlds/c.tld
+
+
+ tags-function
+ /WEB-INF/jstl/tlds/fn.tld
+
+
+ tags-xml
+ /WEB-INF/jstl/tlds/x.tld
+
+
+
+
+
+ tags-permittedTaglibs
+ /WEB-INF/jstl/tlds/permittedTaglibs.tld
+
+
+ tags-scriptfree
+ /WEB-INF/jstl/tlds/scriptfree.tld
+
+
+
+
+
+ fck-editor
+ /WEB-INF/fckeditor/tlds/FCKeditor.tld
+
+
+ tags-lams
+ /WEB-INF/lams.tld
+
+
+
+
+
+
+
+ Secure Content
+ *.jsp
+ *.html
+ *.do
+
+
+ LEARNER
+ TEACHER
+ STAFF
+ AUTHOR
+ ADMIN
+ SYSADMIN
+
+
+
+
+
+ Authoring Update
+ /authoring.do
+
+
+ AUTHOR
+
+
+
+
+ Staff Content
+ /monitoring.do
+
+
+ STAFF
+
+
+
+
+
+
+ Download Files
+ /download/
+
+
+ AUTHOR
+ STAFF
+ ADMIN
+ SYSADMIN
+
+
+
+
+
+ FORM
+ LAMS
+
+ /login.jsp
+ /login.jsp?failed=y
+
+
+
+
+
+
+ Student
+ LEARNER
+
+
+ Student
+ TEACHER
+
+
+
+ Can create/modify a learning design
+ AUTHOR
+
+
+
+ Can running and monitoring a learning session
+ STAFF
+
+
+
+ Can add/remove users to the system, set up classes of users for sessions
+ ADMIN
+
+
+
+ Can add/remove users to the system, set up classes of users for sessions
+ SYSADMIN
+
+
Index: lams_tool_example/web/images/icon_example.swf
===================================================================
diff -u
Binary files differ