Index: lams_tool_videorecorder/.classpath =================================================================== diff -u --- lams_tool_videorecorder/.classpath (revision 0) +++ lams_tool_videorecorder/.classpath (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/.cvsignore =================================================================== diff -u --- lams_tool_videorecorder/.cvsignore (revision 0) +++ lams_tool_videorecorder/.cvsignore (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,3 @@ +build +.myeclipse +.mymetadata Index: lams_tool_videorecorder/build.properties =================================================================== diff -u --- lams_tool_videorecorder/build.properties (revision 0) +++ lams_tool_videorecorder/build.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,20 @@ + +# project-wide properties +signature=lavidr10 + +#project version +tool.version=20081208 + +package=org/lamsfoundation/lams/tool/videoRecorder +package.name=org.lamsfoundation.lams.tool.videoRecorder +weblib=lib + +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.2 + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.videoRecorder + Index: lams_tool_videorecorder/build.xml =================================================================== diff -u --- lams_tool_videorecorder/build.xml (revision 0) +++ lams_tool_videorecorder/build.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,529 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploying the VideoRecorder Tool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/hibernate/mappings/hibernate.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/hibernate.properties (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/hibernate.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,7 @@ +hibernate.connection.username=lams +hibernate.connection.password=lamsdemo +hibernate.connection.url=jdbc:mysql://localhost/lams +hibernate.connection.driver_class=com.mysql.jdbc.Driver +hibernate.dialect=org.hibernate.dialect.MySQLDialect + + Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.hbm.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.hbm.xml (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.hbm.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.hbm.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.hbm.xml (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.hbm.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,14 @@ + + + + + + + + Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.hbm.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.hbm.xml (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.hbm.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.hbm.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.hbm.xml (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.hbm.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.hbm.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.hbm.xml (revision 0) +++ lams_tool_videorecorder/conf/hibernate/mappings/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.hbm.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/jar/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_videorecorder/conf/jar/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_videorecorder/conf/jar/META-INF/MANIFEST.MF (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,3 @@ +Implementation-Title: LAMS - Notebok Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) Index: lams_tool_videorecorder/conf/language/ApplicationResources.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/language/ApplicationResources.properties (revision 0) +++ lams_tool_videorecorder/conf/language/ApplicationResources.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,85 @@ +appName = notebook +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Fri Aug 11 07:11:53 GMT 2006 + +#=================== labels for Notebook =================# + +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =Notebook +activity.description =Notebook Tool +activity.helptext =Notebook for notes and reflections +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +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 +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +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 +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +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: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +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. +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.finish =Finish +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 occured with the Notebook 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. +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. +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. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again + + +#======= End labels: Exported 74 labels for en AU ===== Index: lams_tool_videorecorder/conf/language/lams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/language/lams/ApplicationResources.properties (revision 0) +++ lams_tool_videorecorder/conf/language/lams/ApplicationResources.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,114 @@ +appName = notebook +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Nov 19 18:37:12 GMT 2008 + +#=================== labels for Notebook =================# + +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Notebook for notes and reflections +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. +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =Video Recorder +activity.description =Notebook Tool +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +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 +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +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. +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +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: +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 occured with the Notebook 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. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +button.finish =Next Activity +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes. +message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +button.conditions =Conditions +textsearch.excluded.words =has none of these unwanted words: +label.authoring.heading.instructions.desc =Please enter conditions +label.authoring.heading.conditions =Conditions +label.authoring.conditions.add.condition =Add condition +label.authoring.conditions.list.title =Conditions +label.authoring.conditions.order =Order +label.authoring.conditions.empty.condition.list =There are no conditions +label.authoring.conditions.condition.name =Name +label.authoring.edit.conditions.button =Edit conditions +label.authoring.up =Up +label.authoring.down =Down +label.authoring.edit =Edit +error.condition.name.blank =Condition name can not be blank. +error.condition.duplicated.name =Duplicated name. Please choose unique one. +error.condition =Error creating condition. +output.desc.text.search.output.definition.notebook =Entry contains certain words +text.search.output.definition.notebook.default.condition =Entry contains word "LAMS" +textsearch.heading =Entry that... +textsearch.all.words =has all these words: +textsearch.phrase =has this exact wording or phrase: +textsearch.any.words =has one or more of these words: +message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. + + +#======= End labels: Exported 103 labels for en AU ===== Index: lams_tool_videorecorder/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/language/lams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_videorecorder/conf/language/lams/ApplicationResources_en_AU.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,114 @@ +appName = notebook +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Nov 19 18:37:12 GMT 2008 + +#=================== labels for Notebook =================# + +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Notebook for notes and reflections +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. +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =Video Recorder +activity.description =Notebook Tool +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +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 +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +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. +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +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: +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 occured with the Notebook 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. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +button.finish =Next Activity +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes. +message.activityLocked =The instructor has set this activity not to allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +button.conditions =Conditions +textsearch.excluded.words =has none of these unwanted words: +label.authoring.heading.instructions.desc =Please enter conditions +label.authoring.heading.conditions =Conditions +label.authoring.conditions.add.condition =Add condition +label.authoring.conditions.list.title =Conditions +label.authoring.conditions.order =Order +label.authoring.conditions.empty.condition.list =There are no conditions +label.authoring.conditions.condition.name =Name +label.authoring.edit.conditions.button =Edit conditions +label.authoring.up =Up +label.authoring.down =Down +label.authoring.edit =Edit +error.condition.name.blank =Condition name can not be blank. +error.condition.duplicated.name =Duplicated name. Please choose unique one. +error.condition =Error creating condition. +output.desc.text.search.output.definition.notebook =Entry contains certain words +text.search.output.definition.notebook.default.condition =Entry contains word "LAMS" +textsearch.heading =Entry that... +textsearch.all.words =has all these words: +textsearch.phrase =has this exact wording or phrase: +textsearch.any.words =has one or more of these words: +message.contentInUseSet =Modification of content is not allowed since one or more learners has attempted the activity. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. + + +#======= End labels: Exported 103 labels for en AU ===== Index: lams_tool_videorecorder/conf/language/rams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/language/rams/ApplicationResources.properties (revision 0) +++ lams_tool_videorecorder/conf/language/rams/ApplicationResources.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,90 @@ +appName = notebook +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the RAMS Community by Ernie Ghiglione on Tue Aug 12 12:13:23 EST 2008 + +#=================== labels for Notebook =================# + +appName =notebook +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =Video Recorder +activity.description =Notebook Tool +activity.helptext =Notebook for notes and reflections +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +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 +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +message.defineLaterSet =Please wait for the researcher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +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 Participants: +heading.totalLearnersInGroup =Total Number of Participants in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Participants: +message.contentInUseSet =The modification of content is not allowed since one or more participants has attempted the activity. +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Participant +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.finish =Finish +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 occured with the Notebook 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. +error.content.locked =The content has been locked since it is being used by one or more participants. The modification of the content is not allowed. +error.defineLater =Sorry, the activity is not ready yet. Please wait for the researcher 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. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes. +message.activityLocked =This activity has been set up to not allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. + + +#======= End labels: Exported 79 labels for en AU ===== Index: lams_tool_videorecorder/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/language/rams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_videorecorder/conf/language/rams/ApplicationResources_en_AU.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,90 @@ +appName = notebook +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the RAMS Community by Ernie Ghiglione on Tue Aug 12 12:13:23 EST 2008 + +#=================== labels for Notebook =================# + +appName =notebook +tool.display.name =Notebook +tool.description =Notebook Tool +activity.title =Video Recorder +activity.description =Notebook Tool +activity.helptext =Notebook for notes and reflections +pageTitle.authoring =Notebook Authoring +button.basic =Basic +button.advanced =Advanced +button.instructions =Instructions +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +label.authoring.basic.instructions =Instructions: +advanced.lockOnFinished =Lock when finished +advanced.allowRichEditor =Allow rich text editor +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 +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning =Online Notebook +message.defineLaterSet =Please wait for the researcher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Notebook Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +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 Participants: +heading.totalLearnersInGroup =Total Number of Participants in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Participants: +message.contentInUseSet =The modification of content is not allowed since one or more participants has attempted the activity. +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Participant +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.finish =Finish +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 occured with the Notebook 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. +error.content.locked =The content has been locked since it is being used by one or more participants. The modification of the content is not allowed. +error.defineLater =Sorry, the activity is not ready yet. Please wait for the researcher 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. +error.mark.invalid.number ={0} field must be a valid number. Decimal points are not allowed. +error.mark.invalid.decimal.number ={0} field must be a valid decimal number. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try Again +message.learner.blank.input =You have not written anything. Are you sure this is correct? +message.alertContentEdit =Warning: One of more participants have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Notebook, you won't be able to continue adding notes. +message.activityLocked =This activity has been set up to not allow notes after you have finished it. As you are returning to this Notebook, you are able to see your notes but not allowed to add more. + + +#======= End labels: Exported 79 labels for en AU ===== Index: lams_tool_videorecorder/conf/middlegen/lams_tool_lavideoRecorder11-prefs.properties =================================================================== diff -u --- lams_tool_videorecorder/conf/middlegen/lams_tool_lavideoRecorder11-prefs.properties (revision 0) +++ lams_tool_videorecorder/conf/middlegen/lams_tool_lavideoRecorder11-prefs.properties (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,128 @@ +# Middlegen Preferences +hibernate.tables.tl_lavidr10_attachment.base-class-name=VideoRecorderAttachment +hibernate.tables.tl_lavidr10_attachment.columns.create_date.columnspecialty=property +hibernate.tables.tl_lavidr10_attachment.columns.create_date.java-name=createDate +hibernate.tables.tl_lavidr10_attachment.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lavidr10_attachment.columns.videoRecorder_uid.columnspecialty=foreign key +hibernate.tables.tl_lavidr10_attachment.columns.videoRecorder_uid.java-name=videoRecorderUid +hibernate.tables.tl_lavidr10_attachment.columns.videoRecorder_uid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_attachment.columns.file_name.inctostring=true +hibernate.tables.tl_lavidr10_attachment.columns.file_name.java-name=fileName +hibernate.tables.tl_lavidr10_attachment.columns.file_name.java-type=java.lang.String +hibernate.tables.tl_lavidr10_attachment.columns.file_type.java-name=fileType +hibernate.tables.tl_lavidr10_attachment.columns.file_type.java-type=java.lang.String +hibernate.tables.tl_lavidr10_attachment.columns.file_uuid.columnspecialty=property +hibernate.tables.tl_lavidr10_attachment.columns.file_uuid.incequals=false +hibernate.tables.tl_lavidr10_attachment.columns.file_uuid.inctostring=true +hibernate.tables.tl_lavidr10_attachment.columns.file_uuid.java-name=fileUuid +hibernate.tables.tl_lavidr10_attachment.columns.file_uuid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_attachment.columns.file_version_id.inctostring=true +hibernate.tables.tl_lavidr10_attachment.columns.file_version_id.java-name=fileVersionId +hibernate.tables.tl_lavidr10_attachment.columns.file_version_id.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_attachment.columns.uid.columnspecialty=key +hibernate.tables.tl_lavidr10_attachment.columns.uid.incequals=true +hibernate.tables.tl_lavidr10_attachment.columns.uid.inctostring=true +hibernate.tables.tl_lavidr10_attachment.columns.uid.java-name=uid +hibernate.tables.tl_lavidr10_attachment.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_attachment.equalshashcode=true +hibernate.tables.tl_lavidr10_attachment.keygenerator=native +hibernate.tables.tl_lavidr10_videoRecorder.base-class-name=VideoRecorder +hibernate.tables.tl_lavidr10_videoRecorder.columns.content_in_use.java-name=contentInUse +hibernate.tables.tl_lavidr10_videoRecorder.columns.content_in_use.java-type=java.lang.Boolean +hibernate.tables.tl_lavidr10_videoRecorder.columns.create_by.java-name=createBy +hibernate.tables.tl_lavidr10_videoRecorder.columns.create_by.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_videoRecorder.columns.create_date.java-name=createDate +hibernate.tables.tl_lavidr10_videoRecorder.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lavidr10_videoRecorder.columns.define_later.java-name=defineLater +hibernate.tables.tl_lavidr10_videoRecorder.columns.define_later.java-type=java.lang.Boolean +hibernate.tables.tl_lavidr10_videoRecorder.columns.instructions.inctostring=true +hibernate.tables.tl_lavidr10_videoRecorder.columns.instructions.java-name=instructions +hibernate.tables.tl_lavidr10_videoRecorder.columns.instructions.java-type=java.lang.String +hibernate.tables.tl_lavidr10_videoRecorder.columns.lock_on_finished.java-name=lockOnFinished +hibernate.tables.tl_lavidr10_videoRecorder.columns.lock_on_finished.java-type=java.lang.Boolean +hibernate.tables.tl_lavidr10_videoRecorder.columns.offline_instructions.java-name=offlineInstructions +hibernate.tables.tl_lavidr10_videoRecorder.columns.offline_instructions.java-type=java.lang.String +hibernate.tables.tl_lavidr10_videoRecorder.columns.online_instructions.java-name=onlineInstructions +hibernate.tables.tl_lavidr10_videoRecorder.columns.online_instructions.java-type=java.lang.String +hibernate.tables.tl_lavidr10_videoRecorder.columns.run_offline.java-name=runOffline +hibernate.tables.tl_lavidr10_videoRecorder.columns.run_offline.java-type=java.lang.Boolean +hibernate.tables.tl_lavidr10_videoRecorder.columns.title.inctostring=true +hibernate.tables.tl_lavidr10_videoRecorder.columns.title.java-name=title +hibernate.tables.tl_lavidr10_videoRecorder.columns.title.java-type=java.lang.String +hibernate.tables.tl_lavidr10_videoRecorder.columns.tool_content_id.inctostring=true +hibernate.tables.tl_lavidr10_videoRecorder.columns.tool_content_id.java-name=toolContentId +hibernate.tables.tl_lavidr10_videoRecorder.columns.tool_content_id.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_videoRecorder.columns.uid.columnspecialty=key +hibernate.tables.tl_lavidr10_videoRecorder.columns.uid.incequals=true +hibernate.tables.tl_lavidr10_videoRecorder.columns.uid.inctostring=true +hibernate.tables.tl_lavidr10_videoRecorder.columns.uid.java-name=uid +hibernate.tables.tl_lavidr10_videoRecorder.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_videoRecorder.columns.update_date.java-name=updateDate +hibernate.tables.tl_lavidr10_videoRecorder.columns.update_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lavidr10_videoRecorder.dynamicInsert=false +hibernate.tables.tl_lavidr10_videoRecorder.equalshashcode=true +hibernate.tables.tl_lavidr10_videoRecorder.keygenerator=native +hibernate.tables.tl_lavidr10_session.base-class-name=VideoRecorderSession +hibernate.tables.tl_lavidr10_session.columns.videoRecorder_uid.java-name=videoRecorderUid +hibernate.tables.tl_lavidr10_session.columns.videoRecorder_uid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_session.columns.session_end_date.inctostring=true +hibernate.tables.tl_lavidr10_session.columns.session_end_date.java-name=sessionEndDate +hibernate.tables.tl_lavidr10_session.columns.session_end_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lavidr10_session.columns.session_id.inctostring=true +hibernate.tables.tl_lavidr10_session.columns.session_id.java-name=sessionId +hibernate.tables.tl_lavidr10_session.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_session.columns.session_name.inctostring=true +hibernate.tables.tl_lavidr10_session.columns.session_name.java-name=sessionName +hibernate.tables.tl_lavidr10_session.columns.session_name.java-type=java.lang.String +hibernate.tables.tl_lavidr10_session.columns.session_start_date.inctostring=true +hibernate.tables.tl_lavidr10_session.columns.session_start_date.java-name=sessionStartDate +hibernate.tables.tl_lavidr10_session.columns.session_start_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lavidr10_session.columns.status.inctostring=true +hibernate.tables.tl_lavidr10_session.columns.status.java-name=status +hibernate.tables.tl_lavidr10_session.columns.status.java-type=java.lang.Integer +hibernate.tables.tl_lavidr10_session.columns.uid.columnspecialty=key +hibernate.tables.tl_lavidr10_session.columns.uid.incequals=true +hibernate.tables.tl_lavidr10_session.columns.uid.inctostring=true +hibernate.tables.tl_lavidr10_session.columns.uid.java-name=uid +hibernate.tables.tl_lavidr10_session.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_session.equalshashcode=true +hibernate.tables.tl_lavidr10_session.keygenerator=native +hibernate.tables.tl_lavidr10_user.base-class-name=VideoRecorderUser +hibernate.tables.tl_lavidr10_user.columns.first_name.java-name=firstName +hibernate.tables.tl_lavidr10_user.columns.first_name.java-type=java.lang.String +hibernate.tables.tl_lavidr10_user.columns.last_name.columnspecialty=property +hibernate.tables.tl_lavidr10_user.columns.last_name.java-name=lastName +hibernate.tables.tl_lavidr10_user.columns.last_name.java-type=java.lang.String +hibernate.tables.tl_lavidr10_user.columns.session_id.inctostring=true +hibernate.tables.tl_lavidr10_user.columns.session_id.java-name=sessionId +hibernate.tables.tl_lavidr10_user.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_user.columns.uid.columnspecialty=key +hibernate.tables.tl_lavidr10_user.columns.uid.incequals=true +hibernate.tables.tl_lavidr10_user.columns.uid.inctostring=true +hibernate.tables.tl_lavidr10_user.columns.uid.java-name=uid +hibernate.tables.tl_lavidr10_user.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_user.columns.user_id.inctostring=true +hibernate.tables.tl_lavidr10_user.columns.user_id.java-name=userId +hibernate.tables.tl_lavidr10_user.columns.user_id.java-type=java.lang.Long +hibernate.tables.tl_lavidr10_user.equalshashcode=true +hibernate.tables.tl_lavidr10_user.keygenerator=sequence +relations.tl_lavidr10_videoRecorder-tl_lavidr10_attachment.tl_lavidr10_attachment-has-tl_lavidr10_videoRecorder.enabled=true +relations.tl_lavidr10_videoRecorder-tl_lavidr10_attachment.tl_lavidr10_attachment-has-tl_lavidr10_videoRecorder.target-many=false +relations.tl_lavidr10_videoRecorder-tl_lavidr10_attachment.tl_lavidr10_videoRecorder-has-tl_lavidr10_attachment.enabled=true +relations.tl_lavidr10_videoRecorder-tl_lavidr10_attachment.tl_lavidr10_videoRecorder-has-tl_lavidr10_attachment.target-many=true +relations.tl_lavidr10_videoRecorder-tl_lavidr10_session.tl_lavidr10_videoRecorder-has-tl_lavidr10_session.enabled=true +relations.tl_lavidr10_videoRecorder-tl_lavidr10_session.tl_lavidr10_videoRecorder-has-tl_lavidr10_session.target-many=true +relations.tl_lavidr10_videoRecorder-tl_lavidr10_session.tl_lavidr10_session-has-tl_lavidr10_videoRecorder.enabled=true +relations.tl_lavidr10_videoRecorder-tl_lavidr10_session.tl_lavidr10_session-has-tl_lavidr10_videoRecorder.target-many=false +relations.tl_lavidr10_session-tl_lavidr10_user.tl_lavidr10_session-has-tl_lavidr10_user.enabled=true +relations.tl_lavidr10_session-tl_lavidr10_user.tl_lavidr10_session-has-tl_lavidr10_user.target-many=true +relations.tl_lavidr10_session-tl_lavidr10_user.tl_lavidr10_user-has-tl_lavidr10_session.enabled=true +relations.tl_lavidr10_session-tl_lavidr10_user.tl_lavidr10_user-has-tl_lavidr10_session.target-many=false +tables.tl_lavidr10_attachment.x=566 +tables.tl_lavidr10_attachment.y=173 +tables.tl_lavidr10_videoRecorder.x=308 +tables.tl_lavidr10_videoRecorder.y=176 +tables.tl_lavidr10_session.x=70 +tables.tl_lavidr10_session.y=70 +tables.tl_lavidr10_user.x=460 +tables.tl_lavidr10_user.y=28 Index: lams_tool_videorecorder/conf/war/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_videorecorder/conf/war/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_videorecorder/conf/war/META-INF/MANIFEST.MF (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,4 @@ +Implementation-Title: LAMS - VideoRecorder Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: ./lams.jar ./lams-tool-lavidr10.jar ./lams-contentrepository.jar ./lams-learning.jar Index: lams_tool_videorecorder/conf/xdoclet/error-pages.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/error-pages.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/error-pages.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,13 @@ + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + Index: lams_tool_videorecorder/conf/xdoclet/filter-mappings.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/filter-mappings.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/filter-mappings.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,14 @@ + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + Index: lams_tool_videorecorder/conf/xdoclet/filters.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/filters.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/filters.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,24 @@ + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + videoRecorderSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + Index: lams_tool_videorecorder/conf/xdoclet/global-forwards.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/global-forwards.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/global-forwards.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,3 @@ + + + Index: lams_tool_videorecorder/conf/xdoclet/listeners.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/listeners.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/listeners.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,11 @@ + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + Index: lams_tool_videorecorder/conf/xdoclet/servlet-mappings.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/servlet-mappings.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/servlet-mappings.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,20 @@ + + action + *.do + + + + + Connector + /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + Index: lams_tool_videorecorder/conf/xdoclet/servlets.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/servlets.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/servlets.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,56 @@ + + 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 + + + + + Attachment Download + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + videoRecorderToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.videoRecorder.web.servlets.ExportServlet + + Index: lams_tool_videorecorder/conf/xdoclet/struts-actions.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/struts-actions.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/struts-actions.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/conf/xdoclet/struts-forms.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/struts-forms.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/struts-forms.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_videorecorder/conf/xdoclet/struts-message-resources.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/struts-message-resources.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/struts-message-resources.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1 @@ + Index: lams_tool_videorecorder/conf/xdoclet/struts-plugins.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/struts-plugins.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/struts-plugins.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,9 @@ + + + + Index: lams_tool_videorecorder/conf/xdoclet/taglibs.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/taglibs.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/taglibs.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,77 @@ + + + + + + + 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 + + + + Index: lams_tool_videorecorder/conf/xdoclet/web-security.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/web-security.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/web-security.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,103 @@ + + + + Secure Content + *.jsp + *.html + *.do + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + 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 + MONITOR + + + + 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 + + + + Can create/modify a learning design and edit default tool content + AUTHOR ADMIN + Index: lams_tool_videorecorder/conf/xdoclet/web-settings.xml =================================================================== diff -u --- lams_tool_videorecorder/conf/xdoclet/web-settings.xml (revision 0) +++ lams_tool_videorecorder/conf/xdoclet/web-settings.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,20 @@ + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.videoRecorder.ApplicationResources + + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml + classpath:/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/autopatchContext.xml + + + Index: lams_tool_videorecorder/db/model/videoRecorder_tool.clay =================================================================== diff -u --- lams_tool_videorecorder/db/model/videoRecorder_tool.clay (revision 0) +++ lams_tool_videorecorder/db/model/videoRecorder_tool.clay (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,628 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
Index: lams_tool_videorecorder/db/sql/activity_insert.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/activity_insert.sql (revision 0) +++ lams_tool_videorecorder/db/sql/activity_insert.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,80 @@ +-- CVS ID: $Id$ + +INSERT INTO lams_learning_activity +( +activity_ui_id +, description +, title +, help_text +, xcoord +, ycoord +, parent_activity_id +, parent_ui_id +, learning_activity_type_id +, grouping_support_type_id +, apply_grouping_flag +, grouping_id +, grouping_ui_id +, order_id +, define_later_flag +, learning_design_id +, learning_library_id +, create_date_time +, run_offline_flag +, max_number_of_options +, min_number_of_options +, options_instructions +, tool_id +, tool_content_id +, activity_category_id +, gate_activity_level_id +, gate_open_flag +, gate_start_time_offset +, gate_end_time_offset +, gate_start_date_time +, gate_end_date_time +, library_activity_ui_image +, create_grouping_id +, create_grouping_ui_id +, library_activity_id +, language_file +) +VALUES +( +NULL +, 'VideoRecorder Tool' +, 'VideoRecorder Tool' +, 'Put some help text here.' +, NULL +, NULL +, NULL +, NULL +, 1 +, 2 +, 0 +, NULL +, NULL +, NULL +, 0 +, NULL +, ${learning_library_id} +, NOW() +, 0 +, NULL +, NULL +, NULL +, ${tool_id} +, NULL +, 6 +, NULL +, NULL +, NULL +, NULL +, NULL +, NULL +, 'tool/lavidr10/images/icon_videoRecorder.swf' +, NULL +, NULL +, NULL +, 'org.lamsfoundation.lams.tool.videoRecorder.ApplicationResources' +) Index: lams_tool_videorecorder/db/sql/create_lams_tool_videoRecorder.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/create_lams_tool_videoRecorder.sql (revision 0) +++ lams_tool_videorecorder/db/sql/create_lams_tool_videoRecorder.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,59 @@ +-- CVS ID: $Id$ + +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS tl_lavidr10_conditions; +drop table if exists tl_lavidr10_attachment; +drop table if exists tl_lavidr10_videoRecorder; +drop table if exists tl_lavidr10_recording; +drop table if exists tl_lavidr10_session; +drop table if exists tl_lavidr10_user; +create table tl_lavidr10_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, videoRecorder_uid bigint, primary key (uid))type=innodb; +create table tl_lavidr10_videoRecorder (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, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, allow_use_voice bit, allow_use_camera bit, allow_learner_video_visibility bit, allow_learner_video_export bit, primary key (uid))type=innodb; +create table tl_lavidr10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), videoRecorder_uid bigint, primary key (uid))type=innodb; +create table tl_lavidr10_recording (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), description varchar(1027), notes varchar(1027), rating float, filename varchar(255), videoRecorder_session_uid bigint, primary key (uid))type=innodb; +create table tl_lavidr10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, videoRecorder_session_uid bigint, entry_uid bigint, primary key (uid))type=innodb; +alter table tl_lavidr10_attachment add index FK_NEW_75587508_12090F57FC940906 (videoRecorder_uid), add constraint FK_NEW_75587508_12090F57FC940906 foreign key (videoRecorder_uid) references tl_lavidr10_videoRecorder (uid); +alter table tl_lavidr10_session add index FK_NEW_75587508_B7C198E2FC940906 (videoRecorder_uid), add constraint FK_NEW_75587508_B7C198E2FC940906 foreign key (videoRecorder_uid) references tl_lavidr10_videoRecorder (uid); +alter table tl_lavidr10_user add index FK_NEW_75587508_CB8A58FFA3B0FADF (videoRecorder_session_uid), add constraint FK_NEW_75587508_CB8A58FFA3B0FADF foreign key (videoRecorder_session_uid) references tl_lavidr10_session (uid); + +INSERT INTO tl_lavidr10_videoRecorder ( + title, + instructions, + online_instructions, + offline_instructions, + tool_content_id, + run_offline, + lock_on_finished, + content_in_use, + define_later, + allow_use_voice, + allow_use_camera, + allow_learner_video_visibility, + allow_learner_video_export) +VALUES( + "VideoRecorder", + "Instructions", + "", + "", + ${default_content_id}, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0 +); + +CREATE TABLE tl_lavidr10_conditions ( + condition_id BIGINT(20) NOT NULL + , content_uid BIGINT(20) + , PRIMARY KEY (condition_id) + , CONSTRAINT VideoRecorderConditionInheritance FOREIGN KEY (condition_id) + REFERENCES lams_branch_condition(condition_id) ON DELETE CASCADE ON UPDATE CASCADE + , CONSTRAINT VideoRecorderConditionToVideoRecorder FOREIGN KEY (content_uid) + REFERENCES tl_lavidr10_videoRecorder(uid) ON DELETE CASCADE ON UPDATE CASCADE +)TYPE=InnoDB; + +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_videorecorder/db/sql/db_version_insert.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/db_version_insert.sql (revision 0) +++ lams_tool_videorecorder/db/sql/db_version_insert.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,2 @@ +-- $Id$ +INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F'); Index: lams_tool_videorecorder/db/sql/drop_lams_tool_videoRecorder.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/drop_lams_tool_videoRecorder.sql (revision 0) +++ lams_tool_videorecorder/db/sql/drop_lams_tool_videoRecorder.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,14 @@ +-- CVS ID: $Id$ + +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS tl_lavidr10_conditions; +DROP TABLE IF EXISTS tl_lavidr10_user; +DROP TABLE IF EXISTS tl_lavidr10_attachment; +DROP TABLE IF EXISTS tl_lavidr10_session; +DROP TABLE IF EXISTS tl_lavidr10_videoRecorder; +SET FOREIGN_KEY_CHECKS=1; + + + + + Index: lams_tool_videorecorder/db/sql/library_insert.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/library_insert.sql (revision 0) +++ lams_tool_videorecorder/db/sql/library_insert.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,16 @@ +-- CVS ID: $Id$ + +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'VideoRecorder Tool', +'VideoRecorder', +0, +NOW() +) Index: lams_tool_videorecorder/db/sql/table-schema.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/table-schema.sql (revision 0) +++ lams_tool_videorecorder/db/sql/table-schema.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,14 @@ +alter table tl_lavidr10_attachment drop foreign key FK_NEW_75587508_12090F57FC940906; +alter table tl_lavidr10_session drop foreign key FK_NEW_75587508_B7C198E2FC940906; +alter table tl_lavidr10_user drop foreign key FK_NEW_75587508_CB8A58FFA3B0FADF; +drop table if exists tl_lavidr10_attachment; +drop table if exists tl_lavidr10_videoRecorder; +drop table if exists tl_lavidr10_session; +drop table if exists tl_lavidr10_user; +create table tl_lavidr10_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, videoRecorder_uid bigint, primary key (uid)); +create table tl_lavidr10_videoRecorder (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, allow_rich_editor bit, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, primary key (uid)); +create table tl_lavidr10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), videoRecorder_uid bigint, primary key (uid)); +create table tl_lavidr10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, videoRecorder_session_uid bigint, entry_uid bigint, primary key (uid)); +alter table tl_lavidr10_attachment add index FK_NEW_75587508_12090F57FC940906 (videoRecorder_uid), add constraint FK_NEW_75587508_12090F57FC940906 foreign key (videoRecorder_uid) references tl_lavidr10_videoRecorder (uid); +alter table tl_lavidr10_session add index FK_NEW_75587508_B7C198E2FC940906 (videoRecorder_uid), add constraint FK_NEW_75587508_B7C198E2FC940906 foreign key (videoRecorder_uid) references tl_lavidr10_videoRecorder (uid); +alter table tl_lavidr10_user add index FK_NEW_75587508_CB8A58FFA3B0FADF (videoRecorder_session_uid), add constraint FK_NEW_75587508_CB8A58FFA3B0FADF foreign key (videoRecorder_session_uid) references tl_lavidr10_session (uid); Index: lams_tool_videorecorder/db/sql/tool_insert.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/tool_insert.sql (revision 0) +++ lams_tool_videorecorder/db/sql/tool_insert.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,64 @@ +-- CVS ID: $Id$ + +INSERT INTO lams_tool +( +tool_signature, +service_name, +tool_display_name, +description, +tool_identifier, +tool_version, +learning_library_id, +default_tool_content_id, +valid_flag, +grouping_support_type_id, +supports_run_offline_flag, +learner_url, +learner_preview_url, +learner_progress_url, +author_url, +monitor_url, +define_later_url, +export_pfolio_learner_url, +export_pfolio_class_url, +contribute_url, +moderation_url, +help_url, +language_file, +classpath_addition, +context_file, +create_date_time, +modified_date_time, +supports_outputs +) +VALUES +( +'lavidr10', +'videoRecorderService', +'VideoRecorder', +'VideoRecorder', +'videoRecorder', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/lavidr10/learning.do?mode=learner', +'tool/lavidr10/learning.do?mode=author', +'tool/lavidr10/learning.do?mode=teacher', +'tool/lavidr10/authoring.do', +'tool/lavidr10/monitoring.do', +'tool/lavidr10/authoring.do?mode=teacher', +'tool/lavidr10/exportPortfolio?mode=learner', +'tool/lavidr10/exportPortfolio?mode=teacher', +'tool/lavidr10/contribute.do', +'tool/lavidr10/moderate.do', +'http://wiki.lamsfoundation.org/display/lamsdocs/lavidr10', +'org.lamsfoundation.lams.tool.videoRecorder.ApplicationResources', +'lams-tool-lavidr10.jar', +'/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml', +NOW(), +NOW(), +1 +) Index: lams_tool_videorecorder/db/sql/updatescripts/updateTo20070227.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/updatescripts/updateTo20070227.sql (revision 0) +++ lams_tool_videorecorder/db/sql/updatescripts/updateTo20070227.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,4 @@ +-- Update the VideoRecorder tables to 20070227 +-- This is for the LAMS 2.0.1 release. + +UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lavidr10.jar', context_file = '/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml' where tool_signature = 'lavidr10'; Index: lams_tool_videorecorder/db/sql/updatescripts/updateTo20080229.sql =================================================================== diff -u --- lams_tool_videorecorder/db/sql/updatescripts/updateTo20080229.sql (revision 0) +++ lams_tool_videorecorder/db/sql/updatescripts/updateTo20080229.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,2 @@ +UPDATE lams_tool SET modified_date_time = NOW() WHERE tool_signature = "lavidr10"; +UPDATE lams_tool SET tool_version = "20080229" WHERE tool_signature = "lavidr10"; Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderAttachmentDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderAttachmentDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderAttachmentDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,35 @@ +/**************************************************************** + * 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.videoRecorder.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; + +/** + * DAO for accessing the VideoRecorderAttachment objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IVideoRecorderAttachmentDAO extends IBaseDAO { + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,44 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.videoRecorder.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; + +/** + * DAO for accessing the VideoRecorder objects - interface defining methods to be implemented by the Hibernate or other + * implementation. + */ +public interface IVideoRecorderDAO extends IBaseDAO { + + VideoRecorder getByContentId(Long toolContentId); + + void saveOrUpdate(VideoRecorder toContent); + + void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type); + + void releaseFromCache(Object o); + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderRecordingDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,48 @@ +/**************************************************************** + * 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.videoRecorder.dao; + +import java.util.List; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderRecording; + +/** + * DAO for accessing the VideoRecorderRecording objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IVideoRecorderRecordingDAO extends IBaseDAO{ + /** + * @param recordingId + * @return + */ + VideoRecorderRecording getRecordingById(Long recordingId); + + List getByToolSessionId(Long toolSessionId); + + List getBySessionAndUserIds(Long toolSessionId, Long userId); + + void saveOrUpdate(VideoRecorderRecording videoRecorderRecording); +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderSessionDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderSessionDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderSessionDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,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.videoRecorder.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; + +/** + * DAO for accessing the VideoRecorderSession objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IVideoRecorderSessionDAO extends IBaseDAO{ + + void saveOrUpdate(VideoRecorderSession session); + + VideoRecorderSession getBySessionId(Long toolSessionId); + + void deleteBySessionID(Long toolSessionID); +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderUserDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderUserDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/IVideoRecorderUserDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,60 @@ +/**************************************************************** + * 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.videoRecorder.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; + +/** + * DAO for accessing the VideoRecorderUser objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IVideoRecorderUserDAO extends IBaseDAO{ + /** + * + * @param userId + * @param toolSessionId + * @return + */ + VideoRecorderUser getByUserIdAndSessionId(Long userId, Long toolSessionId); + + void saveOrUpdate(VideoRecorderUser videoRecorderUser); + + /** + * + * @param loginName + * @param sessionID + * @return + */ + VideoRecorderUser getByLoginNameAndSessionId(String loginName, Long toolSessionId); + + + /** + * + * @param uid + * @return + */ + VideoRecorderUser getByUID(Long uid); +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderAttachmentDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderAttachmentDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderAttachmentDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,35 @@ +/**************************************************************** + * 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.videoRecorder.dao.hibernate; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderAttachmentDAO; + +/** + * DAO for accessing the VideoRecorderAttachment objects - Hibernate specific code. + */ +public class VideoRecorderAttachmentDAO extends BaseDAO implements IVideoRecorderAttachmentDAO { + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,80 @@ +/**************************************************************** + * 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.videoRecorder.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; +import org.springframework.orm.hibernate3.HibernateTemplate; + +/** + * DAO for accessing the VideoRecorder objects - Hibernate specific code. + */ +public class VideoRecorderDAO extends BaseDAO implements IVideoRecorderDAO { + + private static final String FIND_FORUM_BY_CONTENTID = "from VideoRecorder videoRecorder where videoRecorder.toolContentId=?"; + + private static final String FIND_INSTRUCTION_FILE = "from " + VideoRecorderAttachment.class.getName() + + " as i where tool_content_id=? and i.file_uuid=? and i.file_version_id=? and i.file_type=?"; + + public VideoRecorder getByContentId(Long toolContentId) { + List list = getHibernateTemplate().find(VideoRecorderDAO.FIND_FORUM_BY_CONTENTID, toolContentId); + if (list != null && list.size() > 0) { + return (VideoRecorder) list.get(0); + } else { + return null; + } + } + + public void saveOrUpdate(VideoRecorder videoRecorder) { + this.getHibernateTemplate().saveOrUpdate(videoRecorder); + this.getHibernateTemplate().flush(); + } + + public void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type) { + HibernateTemplate templ = this.getHibernateTemplate(); + if (toolContentId != null && uuid != null && versionId != null) { + List list = getSession().createQuery(VideoRecorderDAO.FIND_INSTRUCTION_FILE).setLong(0, + toolContentId.longValue()).setLong(1, uuid.longValue()).setLong(2, versionId.longValue()) + .setString(3, type).list(); + if (list != null && list.size() > 0) { + VideoRecorderAttachment file = (VideoRecorderAttachment) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + templ.delete(file); + templ.flush(); + } + } + + } + + public void releaseFromCache(Object o) { + getSession().evict(o); + + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderRecordingDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,72 @@ +/**************************************************************** + * 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.videoRecorder.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderRecordingDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderRecording; +import org.springframework.orm.hibernate3.HibernateTemplate; + +/** + * DAO for accessing the VideoRecorderRecording objects - Hibernate specific code. + */ +public class VideoRecorderRecordingDAO extends BaseDAO implements IVideoRecorderRecordingDAO { + + private static final String SQL_QUERY_FIND_BY_RECORDING_ID = "from " + + VideoRecorderRecording.class.getName() + " as f" + + " where uid=?"; + + private static final String SQL_QUERY_BY_SESSION_ID = "from " + VideoRecorderRecording.class.getName() + " as vrr " + + "where vrr.videoRecorderSession.sessionId=?"; + + private static final String SQL_QUERY_BY_SESSION_ID_AND_USER_ID = "from " + VideoRecorderRecording.class.getName() + " as vrr " + + "where vrr.videoRecorderSession.sessionId=? and vrr.createBy=?"; + + public VideoRecorderRecording getRecordingById(Long recordingId) { + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_RECORDING_ID, + recordingId); + + if (list == null || list.isEmpty()) + return null; + + return (VideoRecorderRecording) list.get(0); + } + + public List getByToolSessionId(Long toolSessionId){ + return (List)(this.getHibernateTemplate().find(SQL_QUERY_BY_SESSION_ID, toolSessionId)); + } + + public List getBySessionAndUserIds(Long toolSessionId, Long userId){ + return (List)(this.getHibernateTemplate().find(SQL_QUERY_BY_SESSION_ID_AND_USER_ID, new Object[] {toolSessionId, userId})); + } + + public void saveOrUpdate(VideoRecorderRecording videoRecorderRecording) { + this.getHibernateTemplate().saveOrUpdate(videoRecorderRecording); + this.getHibernateTemplate().flush(); + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderSessionDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderSessionDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderSessionDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,61 @@ +/**************************************************************** + * 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.videoRecorder.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderSessionDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; + +/** + * DAO for accessing the VideoRecorderSession objects - Hibernate specific code. + */ +public class VideoRecorderSessionDAO extends BaseDAO implements IVideoRecorderSessionDAO { + + public static final String SQL_QUERY_FIND_BY_SESSION_ID = "from " + + VideoRecorderSession.class.getName() + " where session_id=?"; + + public void saveOrUpdate(VideoRecorderSession session) { + this.getHibernateTemplate().saveOrUpdate(session); + this.getHibernateTemplate().flush(); + } + + public VideoRecorderSession getBySessionId(Long toolSessionId) { + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_SESSION_ID, toolSessionId); + if (list == null || list.isEmpty()) + return null; + return (VideoRecorderSession) list.get(0); + } + + public void deleteBySessionID(Long toolSessionID) { + VideoRecorderSession session = getBySessionId(toolSessionID); + if(session != null){ + this.getHibernateTemplate().delete(session); + this.getHibernateTemplate().flush(); + } + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderUserDAO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderUserDAO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dao/hibernate/VideoRecorderUserDAO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,88 @@ +/**************************************************************** + * 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.videoRecorder.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderUserDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; + +/** + * DAO for accessing the VideoRecorderUser objects - Hibernate specific code. + */ +public class VideoRecorderUserDAO extends BaseDAO implements IVideoRecorderUserDAO { + + public static final String SQL_QUERY_FIND_BY_USER_ID_SESSION_ID = "from " + + VideoRecorderUser.class.getName() + " as f" + + " where user_id=? and f.videoRecorderSession.sessionId=?"; + + public static final String SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID = "from " + + VideoRecorderUser.class.getName() + + " as f where login_name=? and f.videoRecorderSession.sessionId=?"; + + private static final String SQL_QUERY_FIND_BY_UID = "from " + + VideoRecorderUser.class.getName() + " where uid=?"; + + public VideoRecorderUser getByUserIdAndSessionId(Long userId, Long toolSessionId) { + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_USER_ID_SESSION_ID, + new Object[] { userId, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (VideoRecorderUser) list.get(0); + } + + public VideoRecorderUser getByLoginNameAndSessionId(String loginName, + Long toolSessionId) { + + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID, + new Object[] { loginName, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (VideoRecorderUser) list.get(0); + + } + + public void saveOrUpdate(VideoRecorderUser videoRecorderUser) { + this.getHibernateTemplate().saveOrUpdate(videoRecorderUser); + this.getHibernateTemplate().flush(); + } + + public VideoRecorderUser getByUID(Long uid) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_UID, + new Object[] { uid }); + + if (list == null || list.isEmpty()) + return null; + + return (VideoRecorderUser) list.get(0); + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/autopatchContext.xml =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/autopatchContext.xml (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/autopatchContext.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,11 @@ + + + + + + + + + + + Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/patch20080929_updateFrom21.sql =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/patch20080929_updateFrom21.sql (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/patch20080929_updateFrom21.sql (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,24 @@ +-- SQL statements to update from LAMS 2.1/2.1.1 + +-- Turn off autocommit, so nothing is committed if there is an error +SET AUTOCOMMIT = 0; + +----------------------Put all sql statements below here------------------------- + +CREATE TABLE tl_lavidr10_conditions ( + condition_id BIGINT(20) NOT NULL + , content_uid BIGINT(20) + , PRIMARY KEY (condition_id) + , CONSTRAINT VideoRecorderConditionInheritance FOREIGN KEY (condition_id) + REFERENCES lams_branch_condition(condition_id) ON DELETE CASCADE ON UPDATE CASCADE + , CONSTRAINT VideoRecorderConditionToVideoRecorder FOREIGN KEY (content_uid) + REFERENCES tl_lavidr10_videoRecorder(uid) ON DELETE CASCADE ON UPDATE CASCADE +)TYPE=InnoDB; + +UPDATE lams_tool SET supports_outputs=1 WHERE tool_signature='lavidr10'; + +----------------------Put all sql statements above here------------------------- + +-- If there were no errors, commit and restore autocommit to on +COMMIT; +SET AUTOCOMMIT = 1; Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderAttachmentDTO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderAttachmentDTO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderAttachmentDTO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,102 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; + +public class VideoRecorderAttachmentDTO implements Comparable { + + public VideoRecorderAttachmentDTO(VideoRecorderAttachment att) { + this.fileUuid = att.getFileUuid(); + this.fileName = att.getFileName(); + this.fileVersionId = att.getFileVersionId(); + this.createDate = att.getCreateDate(); + this.uid = att.getUid(); + } + + Long uid; + + Long fileUuid; + + Long fileVersionId; + + String fileName; + + Date createDate; + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public Long getFileUuid() { + return fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + public Long getFileVersionId() { + return fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public int compareTo(Object o) { + VideoRecorderAttachmentDTO toAttachment = (VideoRecorderAttachmentDTO) o; + int returnValue = this.createDate.compareTo(((VideoRecorderAttachmentDTO) o) + .getCreateDate()); + + if (returnValue == 0) { + returnValue = this.uid.compareTo(toAttachment.getUid()); + } + return returnValue; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderConditionDTO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderConditionDTO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderConditionDTO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,39 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.dto; + +import org.lamsfoundation.lams.learningdesign.TextSearchCondition; +import org.lamsfoundation.lams.learningdesign.dto.TextSearchConditionDTO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; + +public class VideoRecorderConditionDTO extends TextSearchConditionDTO { + public VideoRecorderConditionDTO(TextSearchCondition condition, Integer toolActivityUIID) { + super(condition, toolActivityUIID); + } + + @Override + public VideoRecorderCondition getCondition() { + return new VideoRecorderCondition(this); + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderDTO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,239 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; + +public class VideoRecorderDTO { + + private static Logger logger = Logger.getLogger(VideoRecorderDTO.class); + + public Long toolContentId; + + public String title; + + public String instructions; + + public String onlineInstructions; + + public String offlineInstructions; + + public boolean defineLater; + + public boolean contentInUse; + + public boolean lockOnFinish; + + public boolean allowUseVoice; + + public boolean allowUseCamera; + + public boolean allowLearnerVideoExport; + + public boolean allowLearnerVideoVisibility; + + public Set onlineInstructionsFiles; + + public Set offlineInstructionsFiles; + + public Set sessionDTOs = new TreeSet(); + + public Long currentTab; + + /* Constructors */ + public VideoRecorderDTO(){} + + public VideoRecorderDTO(VideoRecorder videoRecorder) { + toolContentId = videoRecorder.getToolContentId(); + title = videoRecorder.getTitle(); + instructions = videoRecorder.getInstructions(); + onlineInstructions = videoRecorder.getOnlineInstructions(); + offlineInstructions = videoRecorder.getOfflineInstructions(); + contentInUse = videoRecorder.isContentInUse(); + lockOnFinish = videoRecorder.isLockOnFinished(); + allowUseVoice = videoRecorder.isAllowUseVoice(); + allowUseCamera = videoRecorder.isAllowUseCamera(); + allowLearnerVideoExport = videoRecorder.isAllowLearnerVideoExport(); + allowLearnerVideoVisibility = videoRecorder.isAllowLearnerVideoVisibility(); + + onlineInstructionsFiles = new TreeSet(); + offlineInstructionsFiles = new TreeSet(); + + for (Iterator i = videoRecorder.getVideoRecorderAttachments().iterator(); i.hasNext();) { + VideoRecorderAttachment att = (VideoRecorderAttachment) i.next(); + if (att.getFileType().equals(IToolContentHandler.TYPE_OFFLINE)) { + VideoRecorderAttachmentDTO attDTO = new VideoRecorderAttachmentDTO(att); + offlineInstructionsFiles.add(attDTO); + } else if (att.getFileType() + .equals(IToolContentHandler.TYPE_ONLINE)) { + VideoRecorderAttachmentDTO attDTO = new VideoRecorderAttachmentDTO(att); + onlineInstructionsFiles.add(attDTO); + } else { + // something is wrong. Ignore file, log error + logger.error("File with uid " + att.getFileUuid() + + " contains invalid fileType: " + att.getFileType()); + } + } + + for (Iterator iter = videoRecorder.getVideoRecorderSessions().iterator(); iter.hasNext();) { + VideoRecorderSession session = (VideoRecorderSession) iter.next(); + VideoRecorderSessionDTO sessionDTO = new VideoRecorderSessionDTO(session); + + sessionDTOs.add(sessionDTO); + } + } + + /* Getters / Setters */ + public Set getSessionDTOs() { + return sessionDTOs; + } + + public void setSessionDTOs(Set sessionDTOs) { + this.sessionDTOs = sessionDTOs; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + public Set getOfflineInstructionsFiles() { + return offlineInstructionsFiles; + } + + public void setOfflineInstructionsFiles( + Set offlineInstructionsFiles) { + this.offlineInstructionsFiles = offlineInstructionsFiles; + } + + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + public Set getOnlineInstructionsFiles() { + return onlineInstructionsFiles; + } + + public void setOnlineInstructionsFiles( + Set onlineInstructionsFiles) { + this.onlineInstructionsFiles = onlineInstructionsFiles; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentID) { + this.toolContentId = toolContentID; + } + + public Boolean getContentInUse() { + return contentInUse; + } + + public void setContentInUse(Boolean contentInUse) { + this.contentInUse = contentInUse; + } + + public boolean isAllowUseVoice() { + return allowUseVoice; + } + + public void setAllowUseVoice(boolean allowUseVoice) { + this.allowUseVoice = allowUseVoice; + } + + public boolean isAllowUseCamera() { + return allowUseCamera; + } + + public void setAllowUseCamera(boolean allowUseCamera) { + this.allowUseCamera = allowUseCamera; + } + + public boolean isAllowLearnerVideoVisibility() { + return allowLearnerVideoVisibility; + } + + public void setLearnerVideoVisibility(boolean allowLearnerVideoVisibility) { + this.allowLearnerVideoVisibility = allowLearnerVideoVisibility; + } + + public boolean isAllowLearnerVideoExport() { + return allowLearnerVideoExport; + } + + public void setAllowLearnerVideoExport(boolean allowLearnerVideoExport) { + this.allowLearnerVideoExport = allowLearnerVideoExport; + } + + public boolean isLockOnFinish() { + return lockOnFinish; + } + + public void setLockOnFinish(boolean lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + public Long getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(Long currentTab) { + this.currentTab = currentTab; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderRecordingDTO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,178 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.dto; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; +import java.util.Date; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderRecording; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; + +public class VideoRecorderRecordingDTO { + + private static Logger logger = Logger.getLogger(VideoRecorderRecordingDTO.class); + + public Long uid; + + public Date createDate; + + public Date updateDate; + + public VideoRecorderUser createBy; + + public String title; + + public String description; + + public String notes; + + public Float rating; + + public VideoRecorderSession videoRecorderSession; + + public String filename; + + /* Constructors */ + public VideoRecorderRecordingDTO(){} + + public VideoRecorderRecordingDTO(VideoRecorderRecording videoRecorderRecording) { + this.uid = videoRecorderRecording.getUid(); + this.createDate = videoRecorderRecording.getCreateDate(); + this.updateDate = videoRecorderRecording.getUpdateDate(); + this.createBy = videoRecorderRecording.getCreateBy(); + this.title = videoRecorderRecording.getTitle(); + this.description = videoRecorderRecording.getDescription(); + this.notes = videoRecorderRecording.getNotes(); + this.rating = videoRecorderRecording.getRating(); + this.videoRecorderSession = videoRecorderRecording.getVideoRecorderSession(); + this.filename = videoRecorderRecording.getFilename(); + } + + public static List getVideoRecorderRecordingDTO(List vrrList){ + List retSet = new ArrayList(); + if(vrrList == null || vrrList.isEmpty()) + return retSet; + + Iterator iter = vrrList.iterator(); + while(iter.hasNext()){ + VideoRecorderRecording vrr = (VideoRecorderRecording) iter.next(); + VideoRecorderRecordingDTO vrrDto = new VideoRecorderRecordingDTO(vrr); + retSet.add(vrrDto); + } + return retSet; + } + + /* Getters / Setters */ + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + public VideoRecorderUser getCreateBy() { + return createBy; + } + + public void setCreateBy(VideoRecorderUser createBy) { + this.createBy = createBy; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + public Float getRating() { + return rating; + } + + public void setRating(Float rating) { + this.rating = rating; + } + + public VideoRecorderSession getVideoRecorderSession() { + return this.videoRecorderSession; + } + + public void setVideoRecorderSession(VideoRecorderSession videoRecorderSession) { + this.videoRecorderSession = videoRecorderSession; + } + + public String getFilename() { + return this.filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderSessionDTO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,116 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; + +public class VideoRecorderSessionDTO implements Comparable { + + Long sessionID; + + String sessionName; + + Set userDTOs = new TreeSet(); + + int numberOfLearners; + + int numberOfFinishedLearners;; + + public VideoRecorderSessionDTO(VideoRecorderSession session) { + this.sessionID = session.getSessionId(); + this.sessionName = session.getSessionName(); + + numberOfFinishedLearners = 0; + for (Iterator iterator = session.getVideoRecorderUsers().iterator(); iterator.hasNext();) { + VideoRecorderUser user = (VideoRecorderUser) iterator.next(); + VideoRecorderUserDTO userDTO = new VideoRecorderUserDTO(user); + if (userDTO.getEntryUID() != null) { + numberOfFinishedLearners++; + } + userDTOs.add(userDTO); + } + + numberOfLearners = userDTOs.size(); + + } + + public VideoRecorderSessionDTO() {} + + public Long getSessionID() { + return sessionID; + } + + public void setSessionID(Long sessionID) { + this.sessionID = sessionID; + } + + public String getSessionName() { + return sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + public int compareTo(Object o) { + int returnValue; + VideoRecorderSessionDTO toSession = (VideoRecorderSessionDTO)o; + returnValue = this.sessionName.compareTo(toSession.sessionName); + if (returnValue == 0) { + returnValue = this.sessionID.compareTo(toSession.sessionID); + } + return returnValue; + } + + public Set getUserDTOs() { + return userDTOs; + } + + public void setUserDTOs(Set videoRecorderUsers) { + this.userDTOs = videoRecorderUsers; + } + + public int getNumberOfLearners() { + return numberOfLearners; + } + + public void setNumberOfLearners(int numberOfLearners) { + this.numberOfLearners = numberOfLearners; + } + + public int getNumberOfFinishedLearners() { + return numberOfFinishedLearners; + } + + public void setNumberOfFinishedLearners(int numberOfFinishedLearners) { + this.numberOfFinishedLearners = numberOfFinishedLearners; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderUserDTO.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderUserDTO.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/dto/VideoRecorderUserDTO.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,120 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.dto; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; + +public class VideoRecorderUserDTO implements Comparable{ + + public Long uid; + + public String loginName; + + public String firstName; + + public String lastName; + + public boolean finishedActivity; + + public Long entryUID; + + public VideoRecorderUserDTO(VideoRecorderUser user, NotebookEntry entry) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + this.entryUID = user.getEntryUID(); + } + + public VideoRecorderUserDTO(VideoRecorderUser user) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + this.entryUID = user.getEntryUID(); + } + + public int compareTo(Object o) { + int returnValue; + VideoRecorderUserDTO toUser = (VideoRecorderUserDTO)o; + returnValue = this.lastName.compareTo(toUser.lastName); + if (returnValue == 0) { + returnValue = this.uid.compareTo(toUser.uid); + } + return returnValue; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getEntryUID() { + return entryUID; + } + + public void setEntryUID(Long entryUID) { + this.entryUID = entryUID; + } + + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,493 @@ +/**************************************************************** + * 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.videoRecorder.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.learningdesign.TextSearchConditionComparator; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderService; + +/** + * @hibernate.class table="tl_lavidr10_videoRecorder" + */ + +public class VideoRecorder implements java.io.Serializable, Cloneable { + + /** + * + */ + private static final long serialVersionUID = 579733009969321015L; + + static Logger log = Logger.getLogger(VideoRecorderService.class.getName()); + + // 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 boolean allowUseVoice; + + private boolean allowUseCamera; + + private boolean allowLearnerVideoExport; + + private boolean allowLearnerVideoVisibility; + + private String onlineInstructions; + + private String offlineInstructions; + + private boolean contentInUse; + + private boolean defineLater; + + private Long toolContentId; + + private Set videoRecorderAttachments; + + private Set videoRecorderSessions; + + private Set conditions = new TreeSet(new TextSearchConditionComparator()); + + // *********** NON Persisit fields + private IToolContentHandler toolContentHandler; + + // Constructors + + /** default constructor */ + public VideoRecorder() { + } + + /** full constructor */ + public VideoRecorder(Date createDate, Date updateDate, Long createBy, String title, String instructions, + boolean runOffline, boolean lockOnFinished, boolean filteringEnabled, String filterKeywords, + String onlineInstructions, String offlineInstructions, boolean contentInUse, boolean defineLater, + boolean allowUseVoice, boolean allowUseCamera, boolean allowLearnerVideoExport, boolean allowLearnerVideoVisibility, + Long toolContentId, Set videoRecorderAttachments, Set videoRecorderSessions) { + 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.videoRecorderAttachments = videoRecorderAttachments; + this.videoRecorderSessions = videoRecorderSessions; + this.allowUseVoice = allowUseVoice; + this.allowUseCamera = allowUseCamera; + this.allowLearnerVideoExport = allowLearnerVideoExport; + this.allowLearnerVideoVisibility = allowLearnerVideoVisibility; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="create_date" + * + */ + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.property column="update_date" + * + */ + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + /** + * @hibernate.property column="create_by" length="20" + * + */ + + public Long getCreateBy() { + return createBy; + } + + public void setCreateBy(Long createBy) { + this.createBy = createBy; + } + + /** + * @hibernate.property column="title" length="255" + * + */ + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="instructions" length="65535" + * + */ + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @hibernate.property column="run_offline" length="1" + * + */ + + public boolean isRunOffline() { + return runOffline; + } + + public void setRunOffline(boolean runOffline) { + this.runOffline = runOffline; + } + + /** + * @hibernate.property column="lock_on_finished" length="1" + * + */ + + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + /** + * @hibernate.property column="allow_use_voice" length="1" + * @return + */ + public boolean isAllowUseVoice() { + return allowUseVoice; + } + + public void setAllowUseVoice(boolean allowUseVoice) { + this.allowUseVoice = allowUseVoice; + } + + /** + * @hibernate.property column="allow_use_camera" length="1" + * @return + */ + public boolean isAllowUseCamera() { + return allowUseCamera; + } + + public void setAllowUseCamera(boolean allowUseCamera) { + this.allowUseCamera = allowUseCamera; + } + + /** + * @hibernate.property column="allow_learner_video_visibility" length="1" + * @return + */ + public boolean isAllowLearnerVideoVisibility() { + return allowLearnerVideoVisibility; + } + + public void setAllowLearnerVideoVisibility(boolean allowLearnerVideoVisibility) { + this.allowLearnerVideoVisibility = allowLearnerVideoVisibility; + } + + /** + * @hibernate.property column="allow_learner_video_export" length="1" + * @return + */ + public boolean isAllowLearnerVideoExport() { + return allowLearnerVideoExport; + } + + public void setAllowLearnerVideoExport(boolean allowLearnerVideoExport) { + this.allowLearnerVideoExport = allowLearnerVideoExport; + } + + /** + * @hibernate.property column="online_instructions" length="65535" + * + */ + + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + /** + * @hibernate.property column="offline_instructions" length="65535" + * + */ + + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + /** + * @hibernate.property column="content_in_use" length="1" + * + */ + + public boolean isContentInUse() { + return contentInUse; + } + + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @hibernate.property column="define_later" length="1" + * + */ + + public boolean isDefineLater() { + return defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + /** + * @hibernate.property column="tool_content_id" length="20" + * + */ + + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentId) { + this.toolContentId = toolContentId; + } + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all-delete-orphan" + * @hibernate.collection-key column="videoRecorder_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment" + * + */ + + public Set getVideoRecorderAttachments() { + return videoRecorderAttachments; + } + + public void setVideoRecorderAttachments(Set videoRecorderAttachments) { + this.videoRecorderAttachments = videoRecorderAttachments; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="videoRecorder_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession" + * + */ + + public Set getVideoRecorderSessions() { + return videoRecorderSessions; + } + + public void setVideoRecorderSessions(Set videoRecorderSessions) { + this.videoRecorderSessions = videoRecorderSessions; + } + + /** + * @hibernate.set lazy="true" cascade="all" + * sort="org.lamsfoundation.lams.learningdesign.TextSearchConditionComparator" + * @hibernate.collection-key column="content_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition" + * + */ + public Set getConditions() { + return conditions; + } + + public void setConditions(Set conditions) { + this.conditions = conditions; + } + + /** + * toString + * + * @return String + */ + @Override + 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("allowUseVoice").append("='").append(isAllowUseVoice()).append("' "); + buffer.append("allowUseCamera").append("='").append(isAllowUseCamera()).append("' "); + buffer.append("allowLearnerVideoVisibility").append("='").append(isAllowLearnerVideoVisibility()).append("' "); + buffer.append("allowLearnerVideoExport").append("='").append(isAllowLearnerVideoExport()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (other == null) { + return false; + } + if (!(other instanceof VideoRecorder)) { + return false; + } + VideoRecorder castOther = (VideoRecorder) other; + + return this.getUid() == castOther.getUid() || this.getUid() != null && castOther.getUid() != null + && this.getUid().equals(castOther.getUid()); + } + + @Override + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public static VideoRecorder newInstance(VideoRecorder fromContent, Long toContentId, + IToolContentHandler videoRecorderToolContentHandler) { + VideoRecorder toContent = new VideoRecorder(); + fromContent.toolContentHandler = videoRecorderToolContentHandler; + toContent = (VideoRecorder) fromContent.clone(); + toContent.setToolContentId(toContentId); + toContent.setCreateDate(new Date()); + return toContent; + } + + @Override + protected Object clone() { + + VideoRecorder videoRecorder = null; + try { + videoRecorder = (VideoRecorder) super.clone(); + videoRecorder.setUid(null); + + if (videoRecorderAttachments != null) { + // create a copy of the attachments + Iterator iter = videoRecorderAttachments.iterator(); + Set set = new HashSet(); + while (iter.hasNext()) { + VideoRecorderAttachment originalFile = (VideoRecorderAttachment) iter.next(); + VideoRecorderAttachment newFile = (VideoRecorderAttachment) originalFile.clone(); + set.add(newFile); + } + videoRecorder.videoRecorderAttachments = set; + } + // create an empty set for the videoRecorderSession + videoRecorder.videoRecorderSessions = new HashSet(); + + if (conditions != null) { + Set set = new TreeSet(new TextSearchConditionComparator()); + for (VideoRecorderCondition condition : conditions) { + set.add((VideoRecorderCondition) condition.clone()); + } + videoRecorder.setConditions(set); + } + + } catch (CloneNotSupportedException cnse) { + VideoRecorder.log.error("Error cloning " + VideoRecorder.class); + } + return videoRecorder; + } + + public IToolContentHandler getToolContentHandler() { + return toolContentHandler; + } + + public void setToolContentHandler(IToolContentHandler toolContentHandler) { + this.toolContentHandler = toolContentHandler; + } + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,233 @@ +/**************************************************************** + * 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.videoRecorder.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.log4j.Logger; + +/** + * + * The details of files attached to the tool. In most cases this will be the + * online/offline instruction files. + * + * @hibernate.class table="tl_lavidr10_attachment" + * + */ + +public class VideoRecorderAttachment implements java.io.Serializable, Cloneable { + + + + /** + * + */ + private static final long serialVersionUID = 47452859888067500L; + + private static final Logger log = Logger.getLogger(VideoRecorderAttachment.class); + + /** + * + */ + private Long uid; + + private Long fileVersionId; + + private String fileType; + + private String fileName; + + private Long fileUuid; + + private Date createDate; + + private VideoRecorder videoRecorder; + + // Constructors + + /** default constructor */ + public VideoRecorderAttachment() { + } + + /** Constructor setting up all the properties except for videoRecorder one*/ + public VideoRecorderAttachment(Long fileVersionId, String fileType, String fileName, Long fileUuid, Date createDate) { + this.fileVersionId = fileVersionId; + this.fileType = fileType; + this.fileName = fileName; + this.fileUuid = fileUuid; + this.createDate = createDate; + } + + // 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="videoRecorder_uid" + * + */ + + public VideoRecorder getVideoRecorder() { + return this.videoRecorder; + } + + public void setVideoRecorder(VideoRecorder videoRecorder) { + this.videoRecorder = videoRecorder; + } + + /** + * 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 o) { + if (this == o) + return true; + if (!(o instanceof VideoRecorderAttachment)) + return false; + + final VideoRecorderAttachment genericEntity = (VideoRecorderAttachment) o; + + return new EqualsBuilder() + .append(this.uid,genericEntity.uid) + .append(this.fileVersionId,genericEntity.fileVersionId) + .append(this.fileName,genericEntity.fileName) + .append(this.fileType,genericEntity.fileType) + .append(this.createDate,genericEntity.createDate) + .isEquals(); + } + + public int hashCode() { + int result = 17; + result = 37 * result + + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone() { + Object obj = null; + try { + obj = super.clone(); + ((VideoRecorderAttachment) obj).setUid(null); + } catch (CloneNotSupportedException e) { + log.error("Failed to clone " + VideoRecorderAttachment.class); + } + + return obj; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,47 @@ +package org.lamsfoundation.lams.tool.videoRecorder.model; + +import org.lamsfoundation.lams.learningdesign.BranchCondition; +import org.lamsfoundation.lams.learningdesign.LearningDesign; +import org.lamsfoundation.lams.learningdesign.TextSearchCondition; +import org.lamsfoundation.lams.learningdesign.dto.TextSearchConditionDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderConditionDTO; + +/** + * Basically the same as {@link TextSearchCondition}. No new functionality was required. + * + * @author Marcin Cieslak + * + */ +public class VideoRecorderCondition extends TextSearchCondition { + + public VideoRecorderCondition() { + super(); + } + + public VideoRecorderCondition(TextSearchConditionDTO conditionDTO) { + super(conditionDTO); + } + + public VideoRecorderCondition(Long conditionId, Integer conditionUIID, Integer orderId, String name, String displayName, + String allWords, String phrase, String anyWords, String excludedWords) { + super(conditionId, conditionUIID, orderId, name, displayName, BranchCondition.OUTPUT_TYPE_STRING, null, null, + null, allWords, phrase, anyWords, excludedWords); + } + + @Override + public Object clone() { + return new VideoRecorderCondition(null, null, orderId, name, displayName, allWords, phrase, anyWords, excludedWords); + } + + @Override + public VideoRecorderCondition clone(int uiidOffset) { + Integer newConditionUIID = LearningDesign.addOffset(conditionUIID, uiidOffset); + return new VideoRecorderCondition(null, newConditionUIID, orderId, name, displayName, allWords, phrase, anyWords, + excludedWords); + } + + @Override + public VideoRecorderConditionDTO getBranchConditionDTO(Integer toolActivityUIID) { + return new VideoRecorderConditionDTO(this, toolActivityUIID); + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,281 @@ +/**************************************************************** + * 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.videoRecorder.model; + +import java.util.Date; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; + +/** + * + * Caches recording details. + * + * @hibernate.class table="tl_lavidr10_recording" + */ + +public class VideoRecorderRecording implements java.io.Serializable { + + private static final long serialVersionUID = -3701664859818409197L; + + // Fields + private Long uid; + + private Date createDate; + + private Date updateDate; + + private VideoRecorderUser createBy; + + private String title; + + private String description; + + private String notes; + + private Float rating; + + private VideoRecorderSession videoRecorderSession; + + private String filename; + + // Constructors + + /** default constructor */ + public VideoRecorderRecording() { + } + + public VideoRecorderRecording(VideoRecorderRecordingDTO recording, VideoRecorderSession videoRecorderSession) { + this.createDate = recording.createDate; + this.updateDate = recording.updateDate; + this.createBy = recording.createBy; + this.title = recording.title; + this.description = recording.description; + this.notes = recording.notes; + this.rating = recording.rating; + this.videoRecorderSession = videoRecorderSession; + this.filename = recording.filename; + } + + /** full constructor */ + public VideoRecorderRecording( + Date createDate, Date updateDate, VideoRecorderUser createBy, String title, String description, + String notes, Float rating, Long videoRecorderUid, VideoRecorderSession videoRecorderSession, String filename) { + + this.createDate = createDate; + this.updateDate = updateDate; + this.createBy = createBy; + this.title = title; + this.description = description; + this.notes = notes; + this.rating = rating; + this.videoRecorderSession = videoRecorderSession; + this.filename = filename; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="create_date" + * + */ + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.property column="update_date" + * + */ + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + /** + * @return Returns the VideoRecorderUser of the person who created the recording + * + * @hibernate.many-to-one + * column="create_by" + * cascade="none" + * + */ + + public VideoRecorderUser getCreateBy() { + return createBy; + } + + public void setCreateBy(VideoRecorderUser createBy) { + this.createBy = createBy; + } + + /** + * @hibernate.property column="title" length="255" + * + */ + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="description" length="1027" + * + */ + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + /** + * @hibernate.property column="notes" length="1027" + * + */ + + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + /** + * @hibernate.property column="rating" + * + */ + + public Float getRating() { + return rating; + } + + public void setRating(Float rating) { + this.rating = rating; + } + + /** + * Gets the toolSession + * + * @hibernate.many-to-one cascade="none" + * class="org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession" + * column="videoRecorder_session_uid" + * + */ + + public VideoRecorderSession getVideoRecorderSession() { + return this.videoRecorderSession; + } + + public void setVideoRecorderSession(VideoRecorderSession videoRecorderSession) { + this.videoRecorderSession = videoRecorderSession; + } + + /** + * @hibernate.property column="filename" length="255" + * + */ + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append( + Integer.toHexString(hashCode())).append(" ["); + buffer.append("uid").append("='").append(getUid()).append("', "); + buffer.append("createDate").append("='").append(getCreateDate()).append("', "); + buffer.append("updateDate").append("='").append(getUpdateDate()).append("', "); + buffer.append("createBy").append("='").append(getCreateBy()).append("', "); + buffer.append("createTitle").append("='").append(getTitle()).append("', "); + buffer.append("createDescription").append("='").append(getDescription()).append("', "); + buffer.append("notes").append("='").append(getNotes()).append("', "); + buffer.append("videoRecorderSessionUid").append("='").append(getVideoRecorderSession().getSessionId()); + buffer.append("filename").append("='").append(getFilename()); + buffer.append("']"); + + return buffer.toString(); + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof VideoRecorderRecording)) + return false; + VideoRecorderRecording castOther = (VideoRecorderRecording) 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; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,249 @@ +/**************************************************************** + * 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.videoRecorder.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; + +/** + * + * Represents the tool session. + * + * @hibernate.class table="tl_lavidr10_session" + */ + +public class VideoRecorderSession implements java.io.Serializable { + + private static Logger log = Logger.getLogger(VideoRecorderSession.class); + /** + * + */ + private static final long serialVersionUID = 4407078136514639026L; + + // Fields + private Long uid; + + private Date sessionEndDate; + + private Date sessionStartDate; + + private Integer status; + + private Long sessionId; + + private String sessionName; + + private VideoRecorder videoRecorder; + + private Set videoRecorderUsers; + + // Constructors + + /** default constructor */ + public VideoRecorderSession() { + } + + /** full constructor */ + public VideoRecorderSession(Date sessionEndDate, Date sessionStartDate, + Integer status, Long sessionId, String sessionName, VideoRecorder videoRecorder, + Set videoRecorderUsers) { + this.sessionEndDate = sessionEndDate; + this.sessionStartDate = sessionStartDate; + this.status = status; + this.sessionId = sessionId; + this.sessionName = sessionName; + this.videoRecorder = videoRecorder; + this.videoRecorderUsers = videoRecorderUsers; + } + + // 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="videoRecorder_uid" + * + */ + + public VideoRecorder getVideoRecorder() { + return this.videoRecorder; + } + + public void setVideoRecorder(VideoRecorder videoRecorder) { + this.videoRecorder = videoRecorder; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="videoRecorder_session_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser" + * + */ + + public Set getVideoRecorderUsers() { + return this.videoRecorderUsers; + } + + public void setVideoRecorderUsers(Set videoRecorderUsers) { + this.videoRecorderUsers = videoRecorderUsers; + } + + /** + * 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 VideoRecorderSession)) + return false; + VideoRecorderSession castOther = (VideoRecorderSession) 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; + } + + public Object clone(){ + + VideoRecorderSession session = null; + try{ + session = (VideoRecorderSession) super.clone(); + session.videoRecorderUsers = new HashSet(); + } catch (CloneNotSupportedException e) { + log.error("When clone " + VideoRecorderSession.class + " failed"); + } + return session; + } + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,216 @@ +/**************************************************************** + * 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.videoRecorder.model; + +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * + * 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_lavidr10_user" + */ + +public class VideoRecorderUser implements java.io.Serializable { + + /** + * + */ + private static final long serialVersionUID = -3701664859818409197L; + + // Fields + private Long uid; + + private Long userId; + + private String lastName; + + private String firstName; + + private String loginName; + + private VideoRecorderSession videoRecorderSession; + + private boolean finishedActivity; + + private Long entryUID; + + // Constructors + + /** default constructor */ + public VideoRecorderUser() { + } + + public VideoRecorderUser(UserDTO user, VideoRecorderSession videoRecorderSession) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.videoRecorderSession = videoRecorderSession; + this.finishedActivity = false; + } + + /** full constructor */ + public VideoRecorderUser(Long userId, String lastName, String firstName, + VideoRecorderSession videoRecorderSession) { + this.userId = userId; + this.lastName = lastName; + this.firstName = firstName; + this.videoRecorderSession = videoRecorderSession; + } + + // 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="login_name" length="255" + * + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + /** + * @hibernate.property column="first_name" length="255" + * + */ + public String getFirstName() { + return this.firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @hibernate.property column="finishedActivity" + */ + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="videoRecorder_session_uid" + * + */ + public VideoRecorderSession getVideoRecorderSession() { + return this.videoRecorderSession; + } + + public void setVideoRecorderSession(VideoRecorderSession videoRecorderSession) { + this.videoRecorderSession = videoRecorderSession; + } + + /** + * @hibernate.property column="entry_uid" + */ + public Long getEntryUID() { + return entryUID; + } + + public void setEntryUID(Long entryUID) { + this.entryUID = entryUID; + } + + /** + * 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 VideoRecorderUser)) + return false; + VideoRecorderUser castOther = (VideoRecorderUser) 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; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/IVideoRecorderService.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,208 @@ +/**************************************************************** + * 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.videoRecorder.service; + +import java.util.Collection; +import java.util.List; + +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderRecording; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderException; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * Defines the services available to the web layer from the VideoRecorder Service + */ +public interface IVideoRecorderService { + /** + * Makes a copy of the default content and assigns it a newContentID + * + * @params newContentID + * @return + */ + public VideoRecorder copyDefaultContent(Long newContentID); + + /** + * Returns an instance of the VideoRecorder tools default content. + * + * @return + */ + public VideoRecorder getDefaultContent(); + + /** + * @param toolSignature + * @return + */ + public Long getDefaultContentIdBySignature(String toolSignature); + + /** + * @param toolContentID + * @return + */ + public VideoRecorder getVideoRecorderByContentId(Long toolContentID); + + /** + * @param toolContentId + * @param file + * @param type + * @return + */ + public VideoRecorderAttachment uploadFileToContent(Long toolContentId, FormFile file, String type); + + /** + * @param uuid + * @param versionID + */ + public void deleteFromRepository(Long uuid, Long versionID) throws VideoRecorderException; + + /** + * @param contentID + * @param uuid + * @param versionID + * @param type + */ + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type); + + /** + * @param videoRecorder + */ + public void saveOrUpdateVideoRecorder(VideoRecorder videoRecorder); + + /** + * @param toolSessionId + * @return + */ + public VideoRecorderSession getSessionBySessionId(Long toolSessionId); + + /** + * @param videoRecorderSession + */ + public void saveOrUpdateVideoRecorderSession(VideoRecorderSession videoRecorderSession); + + /** + * + * @param userId + * @param toolSessionId + * @return + */ + public VideoRecorderUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId); + + /** + * + * @param uid + * @return + */ + public VideoRecorderUser getUserByUID(Long uid); + + /** + * + * @param videoRecorderUser + */ + public void saveOrUpdateVideoRecorderUser(VideoRecorderUser videoRecorderUser); + + /** + * + * @param user + * @param videoRecorderSession + * @return + */ + public VideoRecorderUser createVideoRecorderUser(UserDTO user, VideoRecorderSession videoRecorderSession); + + /** + * + * @param recordingId + * @return + */ + public VideoRecorderRecording getRecordingById(Long recordingId); + + /** + * + * @param toolSessionId + * @return + */ + public List getRecordingsByToolSessionId(Long toolSessionId); + + /** + * + * @param toolSessionId + * @paramuserId + * @return + */ + public List getRecordingsByToolSessionIdAndUserId(Long toolSessionId, Long userId); + + /** + * + * @param videoRecorderRecording + */ + public void saveOrUpdateVideoRecorderRecording(VideoRecorderRecording videoRecorderRecording); + + /** + * + * @param id + * @param idType + * @param signature + * @param userID + * @param title + * @param entry + * @return + */ + Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); + + /** + * + * @param uid + * @return + */ + NotebookEntry getEntry(Long uid); + + /** + * + * @param uid + * @param title + * @param entry + */ + void updateEntry(Long uid, String entry); + + /** + * Creates an unique name for a ChatCondition. It consists of the tool output definition name and a unique positive + * integer number. + * + * @param existingConditions + * existing conditions; required to check if a condition with the same name does not exist. + * @return unique ChatCondition name + */ + String createConditionName(Collection existingConditions); + + void releaseConditionsFromCache(VideoRecorder videoRecorder); + + void deleteCondition(VideoRecorderCondition condition); +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderOutputFactory.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,165 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; + +import org.lamsfoundation.lams.learningdesign.BranchCondition; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.OutputFactory; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants; + +/** + * Output factory for VideoRecorder tool. Currently it provides only one type of output - the entry that user provided. + * + * @author Marcin Cieslak + */ +public class VideoRecorderOutputFactory extends OutputFactory { + + /** + * {@inheritDoc} + */ + @Override + public SortedMap getToolOutputDefinitions(Object toolContentObject) + throws ToolException { + SortedMap definitionMap = new TreeMap(); + if (toolContentObject != null) { + ToolOutputDefinition videoRecorderEntryDefinition = buildStringOutputDefinition(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME); + VideoRecorder videoRecorder = (VideoRecorder) toolContentObject; + // adding all existing conditions + videoRecorderEntryDefinition.setDefaultConditions(new ArrayList(videoRecorder.getConditions())); + // if no conditions were created in the tool instance, a default condition is added; + if (videoRecorderEntryDefinition.getDefaultConditions().isEmpty()) { + VideoRecorderCondition defaultCondition = createDefaultComplexCondition(videoRecorder); + videoRecorder.getConditions().add(defaultCondition); + videoRecorderEntryDefinition.getDefaultConditions().add(defaultCondition); + } + videoRecorderEntryDefinition.setShowConditionNameOnly(true); + definitionMap.put(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, videoRecorderEntryDefinition); + } + + return definitionMap; + } + + /** + * Follows {@link VideoRecorderService#getToolOutput(List, Long, Long)}. + * + */ + public SortedMap getToolOutput(List names, IVideoRecorderService videoRecorderService, + Long toolSessionId, Long learnerId) { + + TreeMap outputs = new TreeMap(); + // cached tool output for all text search conditions + ToolOutput videoRecorderEntryOutput = null; + if (names == null) { + // output will be set for all the existing conditions + VideoRecorder videoRecorder = videoRecorderService.getSessionBySessionId(toolSessionId).getVideoRecorder(); + Set conditions = videoRecorder.getConditions(); + for (VideoRecorderCondition condition : conditions) { + String name = condition.getName(); + if (isTextSearchConditionName(name) && videoRecorderEntryOutput != null) { + outputs.put(name, videoRecorderEntryOutput); + } else { + ToolOutput output = getToolOutput(name, videoRecorderService, toolSessionId, learnerId); + if (output != null) { + outputs.put(name, output); + if (isTextSearchConditionName(name)) { + videoRecorderEntryOutput = output; + } + } + } + } + } else { + for (String name : names) { + if (isTextSearchConditionName(name) && videoRecorderEntryOutput != null) { + outputs.put(name, videoRecorderEntryOutput); + } else { + ToolOutput output = getToolOutput(name, videoRecorderService, toolSessionId, learnerId); + if (output != null) { + outputs.put(name, output); + if (isTextSearchConditionName(name)) { + videoRecorderEntryOutput = output; + } + } + } + } + } + return outputs; + + } + + public ToolOutput getToolOutput(String name, IVideoRecorderService chatService, Long toolSessionId, Long learnerId) { + if (isTextSearchConditionName(name)) { + // entry is loaded from DB + VideoRecorder videoRecorder = chatService.getSessionBySessionId(toolSessionId).getVideoRecorder(); + + VideoRecorderUser user = chatService.getUserByUserIdAndSessionId(learnerId, toolSessionId); + NotebookEntry entry = chatService.getEntry(user.getEntryUID()); + + String value = entry == null ? null : entry.getEntry(); + + return new ToolOutput(name, getI18NText(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, true), value); + + } + return null; + } + + @Override + protected String[] splitConditionName(String conditionName) { + return super.splitConditionName(conditionName); + } + + protected String buildConditionName(String uniquePart) { + return super.buildConditionName(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, uniquePart); + } + + private boolean isTextSearchConditionName(String name) { + return name != null && name.startsWith(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME); + } + + /** + * Creates a default condition so teachers know how to use complex conditions for this tool. + * + * @param videoRecorder + * content of the tool + * @return default videoRecorder condition + */ + protected VideoRecorderCondition createDefaultComplexCondition(VideoRecorder videoRecorder) { + String name = buildConditionName(VideoRecorderConstants.TEXT_SEARCH_DEFINITION_NAME, videoRecorder.getToolContentId() + .toString()); + // Default condition checks if the text contains word "LAMS" + return new VideoRecorderCondition(null, null, 1, name, getI18NText( + VideoRecorderConstants.TEXT_SEARCH_DEFAULT_CONDITION_DISPLAY_NAME_KEY, false), "LAMS", null, null, null); + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderService.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,688 @@ +/**************************************************************** + * 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.videoRecorder.service; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Collection; +import java.util.Date; +import java.util.Hashtable; +import java.util.List; +import java.util.Random; +import java.util.Set; +import java.util.SortedMap; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.AccessDeniedException; +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.InvalidParameterException; +import org.lamsfoundation.lams.contentrepository.LoginException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.RepositoryProxy; +import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; +import org.lamsfoundation.lams.learning.service.ILearnerService; +import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; +import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; +import org.lamsfoundation.lams.tool.ToolContentImport102Manager; +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.ToolSessionExportOutputData; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderAttachmentDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderRecordingDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderSessionDAO; +import org.lamsfoundation.lams.tool.videoRecorder.dao.IVideoRecorderUserDAO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderRecording; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderException; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderToolContentHandler; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.util.audit.IAuditService; + +/** + * An implementation of the IVideoRecorderService interface. + * + * As a requirement, all LAMS tool's service bean must implement ToolContentManager and ToolSessionManager. + */ + +public class VideoRecorderService implements ToolSessionManager, ToolContentManager, IVideoRecorderService, + ToolContentImport102Manager { + + static Logger logger = Logger.getLogger(VideoRecorderService.class.getName()); + + private IVideoRecorderDAO videoRecorderDAO = null; + + private IVideoRecorderSessionDAO videoRecorderSessionDAO = null; + + private IVideoRecorderRecordingDAO videoRecorderRecordingDAO = null; + + private IVideoRecorderUserDAO videoRecorderUserDAO = null; + + private IVideoRecorderAttachmentDAO videoRecorderAttachmentDAO = null; + + private ILearnerService learnerService; + + private ILamsToolService toolService; + + private IToolContentHandler videoRecorderToolContentHandler = null; + + private IRepositoryService repositoryService = null; + + private IAuditService auditService = null; + + private IExportToolContentService exportContentService; + + private ICoreNotebookService coreNotebookService; + + private VideoRecorderOutputFactory videoRecorderOutputFactory; + + private Random generator = new Random(); + + public VideoRecorderService() { + super(); + // TODO Auto-generated constructor stub + } + + /* ************ Methods from ToolSessionManager ************* */ + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { + if (VideoRecorderService.logger.isDebugEnabled()) { + VideoRecorderService.logger.debug("entering method createToolSession:" + " toolSessionId = " + toolSessionId + + " toolSessionName = " + toolSessionName + " toolContentId = " + toolContentId); + } + + VideoRecorderSession session = new VideoRecorderSession(); + session.setSessionId(toolSessionId); + session.setSessionName(toolSessionName); + // learner starts + // TODO need to also set other fields. + VideoRecorder videoRecorder = videoRecorderDAO.getByContentId(toolContentId); + session.setVideoRecorder(videoRecorder); + videoRecorderSessionDAO.saveOrUpdate(session); + } + + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + return learnerService.completeToolSession(toolSessionId, learnerId); + } + + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { + // TODO Auto-generated method stub + return null; + } + + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, + ToolException { + // TODO Auto-generated method stub + return null; + } + + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { + videoRecorderSessionDAO.deleteBySessionID(toolSessionId); + // TODO check if cascade worked + } + + /** + * Get the tool output for the given tool output names. + * + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.util.List, java.lang.Long, + * java.lang.Long) + */ + public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { + return getVideoRecorderOutputFactory().getToolOutput(names, this, toolSessionId, learnerId); + } + + /** + * Get the tool output for the given tool output name. + * + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.lang.String, java.lang.Long, + * java.lang.Long) + */ + public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { + return getVideoRecorderOutputFactory().getToolOutput(name, this, toolSessionId, learnerId); + } + + /* ************ Methods from ToolContentManager ************************* */ + + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + + if (VideoRecorderService.logger.isDebugEnabled()) { + VideoRecorderService.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); + } + + VideoRecorder fromContent = null; + if (fromContentId != null) { + fromContent = videoRecorderDAO.getByContentId(fromContentId); + } + if (fromContent == null) { + // create the fromContent using the default tool content + fromContent = getDefaultContent(); + } + VideoRecorder toContent = VideoRecorder.newInstance(fromContent, toContentId, videoRecorderToolContentHandler); + videoRecorderDAO.saveOrUpdate(toContent); + } + + public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException { + VideoRecorder videoRecorder = videoRecorderDAO.getByContentId(toolContentId); + if (videoRecorder == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + videoRecorder.setDefineLater(value); + videoRecorderDAO.saveOrUpdate(videoRecorder); + } + + public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException { + VideoRecorder videoRecorder = videoRecorderDAO.getByContentId(toolContentId); + if (videoRecorder == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + videoRecorder.setRunOffline(value); + videoRecorderDAO.saveOrUpdate(videoRecorder); + } + + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, + ToolException { + // TODO Auto-generated method stub + } + + /** + * Export the XML fragment for the tool's content, along with any files needed for the content. + * + * @throws DataMissingException + * if no tool content matches the toolSessionId + * @throws ToolException + * if any other error occurs + */ + + public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { + VideoRecorder videoRecorder = videoRecorderDAO.getByContentId(toolContentId); + if (videoRecorder == null) { + videoRecorder = getDefaultContent(); + } + if (videoRecorder == null) { + throw new DataMissingException("Unable to find default content for the videoRecorder tool"); + } + + // set ResourceToolContentHandler as null to avoid copy file node in + // repository again. + videoRecorder = VideoRecorder.newInstance(videoRecorder, toolContentId, null); + videoRecorder.setToolContentHandler(null); + videoRecorder.setVideoRecorderSessions(null); + Set atts = videoRecorder.getVideoRecorderAttachments(); + for (VideoRecorderAttachment att : atts) { + att.setVideoRecorder(null); + } + try { + exportContentService.registerFileClassForExport(VideoRecorderAttachment.class.getName(), "fileUuid", + "fileVersionId"); + exportContentService.exportToolContent(toolContentId, videoRecorder, videoRecorderToolContentHandler, rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } + } + + /** + * Import the XML fragment for the tool's content, along with any files needed for the content. + * + * @throws ToolException + * if any other error occurs + */ + public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion, + String toVersion) throws ToolException { + try { + exportContentService.registerFileClassForImport(VideoRecorderAttachment.class.getName(), "fileUuid", + "fileVersionId", "fileName", "fileType", null, null); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath, videoRecorderToolContentHandler, + fromVersion, toVersion); + if (!(toolPOJO instanceof VideoRecorder)) { + throw new ImportToolContentException("Import VideoRecorder tool content failed. Deserialized object is " + + toolPOJO); + } + VideoRecorder videoRecorder = (VideoRecorder) toolPOJO; + + // reset it to new toolContentId + videoRecorder.setToolContentId(toolContentId); + videoRecorder.setCreateBy(new Long(newUserUid.longValue())); + + videoRecorderDAO.saveOrUpdate(videoRecorder); + } catch (ImportToolContentException e) { + throw new ToolException(e); + } + } + + /** + * Get the definitions for possible output for an activity, based on the toolContentId. These may be definitions + * that are always available for the tool (e.g. number of marks for Multiple Choice) or a custom definition created + * for a particular activity such as the answer to the third question contains the word Koala and hence the need for + * the toolContentId + * + * @return SortedMap of ToolOutputDefinitions with the key being the name of each definition + */ + public SortedMap getToolOutputDefinitions(Long toolContentId) throws ToolException { + VideoRecorder videoRecorder = getVideoRecorderDAO().getByContentId(toolContentId); + if (videoRecorder == null) { + videoRecorder = getDefaultContent(); + } + return getVideoRecorderOutputFactory().getToolOutputDefinitions(videoRecorder); + } + + /* ********** IVideoRecorderService Methods ********************************* */ + + public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry) { + return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry); + } + + public NotebookEntry getEntry(Long uid) { + return coreNotebookService.getEntry(uid); + } + + public void updateEntry(Long uid, String entry) { + coreNotebookService.updateEntry(uid, "", entry); + } + + 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"; + VideoRecorderService.logger.error(error); + throw new VideoRecorderException(error); + } + return toolContentId; + } + + public VideoRecorder getDefaultContent() { + Long defaultContentID = getDefaultContentIdBySignature(VideoRecorderConstants.TOOL_SIGNATURE); + VideoRecorder defaultContent = getVideoRecorderByContentId(defaultContentID); + if (defaultContent == null) { + String error = "Could not retrieve default content record for this tool"; + VideoRecorderService.logger.error(error); + throw new VideoRecorderException(error); + } + if (defaultContent.getConditions().isEmpty()) { + defaultContent.getConditions() + .add(getVideoRecorderOutputFactory().createDefaultComplexCondition(defaultContent)); + } + return defaultContent; + } + + public VideoRecorder copyDefaultContent(Long newContentID) { + + if (newContentID == null) { + String error = "Cannot copy the VideoRecorder tools default content: + " + "newContentID is null"; + VideoRecorderService.logger.error(error); + throw new VideoRecorderException(error); + } + + VideoRecorder defaultContent = getDefaultContent(); + // create new videoRecorder using the newContentID + VideoRecorder newContent = new VideoRecorder(); + newContent = VideoRecorder.newInstance(defaultContent, newContentID, videoRecorderToolContentHandler); + videoRecorderDAO.saveOrUpdate(newContent); + return newContent; + } + + public VideoRecorder getVideoRecorderByContentId(Long toolContentID) { + VideoRecorder videoRecorder = videoRecorderDAO.getByContentId(toolContentID); + if (videoRecorder == null) { + VideoRecorderService.logger.debug("Could not find the content with toolContentID:" + toolContentID); + } + return videoRecorder; + } + + public VideoRecorderSession getSessionBySessionId(Long toolSessionId) { + VideoRecorderSession videoRecorderSession = videoRecorderSessionDAO.getBySessionId(toolSessionId); + if (videoRecorderSession == null) { + VideoRecorderService.logger.debug("Could not find the videoRecorder session with toolSessionID:" + toolSessionId); + } + return videoRecorderSession; + } + + public VideoRecorderUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId) { + return videoRecorderUserDAO.getByUserIdAndSessionId(userId, toolSessionId); + } + + public VideoRecorderUser getUserByLoginNameAndSessionId(String loginName, Long toolSessionId) { + return videoRecorderUserDAO.getByLoginNameAndSessionId(loginName, toolSessionId); + } + + public VideoRecorderUser getUserByUID(Long uid) { + return videoRecorderUserDAO.getByUID(uid); + } + + public VideoRecorderRecording getRecordingById(Long recordingId){ + return videoRecorderRecordingDAO.getRecordingById(recordingId); + } + + public List getRecordingsByToolSessionId(Long toolSessionId){ + List list = videoRecorderRecordingDAO.getByToolSessionId(toolSessionId); + + return VideoRecorderRecordingDTO.getVideoRecorderRecordingDTO(list); + } + + public List getRecordingsByToolSessionIdAndUserId(Long toolSessionId, Long userId){ + List list = videoRecorderRecordingDAO.getBySessionAndUserIds(toolSessionId, userId); + + return VideoRecorderRecordingDTO.getVideoRecorderRecordingDTO(list); + } + + public VideoRecorderAttachment uploadFileToContent(Long toolContentId, FormFile file, String type) { + if (file == null || StringUtils.isEmpty(file.getFileName())) { + throw new VideoRecorderException("Could not find upload file: " + file); + } + + NodeKey nodeKey = processFile(file, type); + + VideoRecorderAttachment attachment = new VideoRecorderAttachment(nodeKey.getVersion(), type, file.getFileName(), nodeKey + .getUuid(), new Date()); + return attachment; + } + + public void deleteFromRepository(Long uuid, Long versionID) throws VideoRecorderException { + ITicket ticket = getRepositoryLoginTicket(); + try { + repositoryService.deleteVersion(ticket, uuid, versionID); + } catch (Exception e) { + throw new VideoRecorderException("Exception occured while deleting files from" + " the repository " + + e.getMessage()); + } + } + + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type) { + videoRecorderDAO.deleteInstructionFile(contentID, uuid, versionID, type); + + } + + public void saveOrUpdateVideoRecorder(VideoRecorder videoRecorder) { + videoRecorderDAO.saveOrUpdate(videoRecorder); + } + + public void saveOrUpdateVideoRecorderSession(VideoRecorderSession videoRecorderSession) { + videoRecorderSessionDAO.saveOrUpdate(videoRecorderSession); + } + + public void saveOrUpdateVideoRecorderUser(VideoRecorderUser videoRecorderUser) { + videoRecorderUserDAO.saveOrUpdate(videoRecorderUser); + } + + public void saveOrUpdateVideoRecorderRecording(VideoRecorderRecording videoRecorderRecording){ + videoRecorderRecordingDAO.saveOrUpdate(videoRecorderRecording); + } + + public VideoRecorderUser createVideoRecorderUser(UserDTO user, VideoRecorderSession videoRecorderSession) { + VideoRecorderUser videoRecorderUser = new VideoRecorderUser(user, videoRecorderSession); + saveOrUpdateVideoRecorderUser(videoRecorderUser); + return videoRecorderUser; + } + + public IAuditService getAuditService() { + return auditService; + } + + public void setAuditService(IAuditService auditService) { + this.auditService = auditService; + } + + private NodeKey processFile(FormFile file, String type) { + NodeKey node = null; + if (file != null && !StringUtils.isEmpty(file.getFileName())) { + String fileName = file.getFileName(); + try { + node = getVideoRecorderToolContentHandler().uploadFile(file.getInputStream(), fileName, + file.getContentType(), type); + } catch (InvalidParameterException e) { + throw new VideoRecorderException("InvalidParameterException occured while trying to upload File" + + e.getMessage()); + } catch (FileNotFoundException e) { + throw new VideoRecorderException("FileNotFoundException occured while trying to upload File" + + e.getMessage()); + } catch (RepositoryCheckedException e) { + throw new VideoRecorderException("RepositoryCheckedException occured while trying to upload File" + + e.getMessage()); + } catch (IOException e) { + throw new VideoRecorderException("IOException occured while trying to upload File" + e.getMessage()); + } + } + return node; + } + + /** + * This method verifies the credentials of the SubmitFiles Tool and gives it the Ticket to login and + * access the Content Repository. + * + * A valid ticket is needed in order to access the content from the repository. This method would be called evertime + * the tool needs to upload/download files from the content repository. + * + * @return ITicket The ticket for repostory access + * @throws SubmitFilesException + */ + private ITicket getRepositoryLoginTicket() throws VideoRecorderException { + repositoryService = RepositoryProxy.getRepositoryService(); + ICredentials credentials = new SimpleCredentials(VideoRecorderToolContentHandler.repositoryUser, + VideoRecorderToolContentHandler.repositoryId); + try { + ITicket ticket = repositoryService.login(credentials, VideoRecorderToolContentHandler.repositoryWorkspaceName); + return ticket; + } catch (AccessDeniedException ae) { + throw new VideoRecorderException("Access Denied to repository." + ae.getMessage()); + } catch (WorkspaceNotFoundException we) { + throw new VideoRecorderException("Workspace not found." + we.getMessage()); + } catch (LoginException e) { + throw new VideoRecorderException("Login failed." + e.getMessage()); + } + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + /** + * Import the data for a 1.0.2 VideoRecorder + */ + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) { + Date now = new Date(); + VideoRecorder videoRecorder = new VideoRecorder(); + videoRecorder.setContentInUse(Boolean.FALSE); + videoRecorder.setCreateBy(new Long(user.getUserID().longValue())); + videoRecorder.setCreateDate(now); + videoRecorder.setDefineLater(Boolean.FALSE); + videoRecorder.setInstructions(WebUtil.convertNewlines((String) importValues + .get(ToolContentImport102Manager.CONTENT_BODY))); + videoRecorder.setLockOnFinished(Boolean.TRUE); + videoRecorder.setOfflineInstructions(null); + videoRecorder.setOnlineInstructions(null); + videoRecorder.setRunOffline(Boolean.FALSE); + videoRecorder.setTitle((String) importValues.get(ToolContentImport102Manager.CONTENT_TITLE)); + videoRecorder.setToolContentId(toolContentId); + videoRecorder.setUpdateDate(now); + // leave as empty, no need to set them to anything. + // setVideoRecorderAttachments(Set videoRecorderAttachments); + // setVideoRecorderSessions(Set videoRecorderSessions); + videoRecorderDAO.saveOrUpdate(videoRecorder); + } + + /** Set the description, throws away the title value as this is not supported in 2.0 */ + public void setReflectiveData(Long toolContentId, String title, String description) throws ToolException, + DataMissingException { + + VideoRecorderService.logger + .warn("Setting the reflective field on a videoRecorder. This doesn't make sense as the videoRecorder is for reflection and we don't reflect on reflection!"); + VideoRecorder videoRecorder = getVideoRecorderByContentId(toolContentId); + if (videoRecorder == null) { + throw new DataMissingException("Unable to set reflective data titled " + title + + " on activity toolContentId " + toolContentId + " as the tool content does not exist."); + } + + videoRecorder.setInstructions(description); + } + + // ========================================================================================= + /* ********** Used by Spring to "inject" the linked objects ************* */ + + public IVideoRecorderAttachmentDAO getVideoRecorderAttachmentDAO() { + return videoRecorderAttachmentDAO; + } + + public void setVideoRecorderAttachmentDAO(IVideoRecorderAttachmentDAO attachmentDAO) { + videoRecorderAttachmentDAO = attachmentDAO; + } + + public IVideoRecorderDAO getVideoRecorderDAO() { + return videoRecorderDAO; + } + + public void setVideoRecorderDAO(IVideoRecorderDAO videoRecorderDAO) { + this.videoRecorderDAO = videoRecorderDAO; + } + + public IToolContentHandler getVideoRecorderToolContentHandler() { + return videoRecorderToolContentHandler; + } + + public void setVideoRecorderToolContentHandler(IToolContentHandler videoRecorderToolContentHandler) { + this.videoRecorderToolContentHandler = videoRecorderToolContentHandler; + } + + public IVideoRecorderSessionDAO getVideoRecorderSessionDAO() { + return videoRecorderSessionDAO; + } + + public void setVideoRecorderSessionDAO(IVideoRecorderSessionDAO sessionDAO) { + videoRecorderSessionDAO = sessionDAO; + } + + public IVideoRecorderRecordingDAO getVideoRecorderRecordingDAO() { + return videoRecorderRecordingDAO; + } + + public void setVideoRecorderRecordingDAO(IVideoRecorderRecordingDAO videoRecorderRecordingDAO) { + this.videoRecorderRecordingDAO = videoRecorderRecordingDAO; + } + + public ILamsToolService getToolService() { + return toolService; + } + + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + + public IVideoRecorderUserDAO getVideoRecorderUserDAO() { + return videoRecorderUserDAO; + } + + public void setVideoRecorderUserDAO(IVideoRecorderUserDAO userDAO) { + videoRecorderUserDAO = 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 VideoRecorderOutputFactory getVideoRecorderOutputFactory() { + return videoRecorderOutputFactory; + } + + public void setVideoRecorderOutputFactory(VideoRecorderOutputFactory videoRecorderOutputFactory) { + this.videoRecorderOutputFactory = videoRecorderOutputFactory; + } + + /** + * {@inheritDoc} + */ + public String createConditionName(Collection existingConditions) { + String uniqueNumber = null; + do { + uniqueNumber = String.valueOf(Math.abs(generator.nextInt())); + for (VideoRecorderCondition condition : existingConditions) { + String[] splitedName = getVideoRecorderOutputFactory().splitConditionName(condition.getName()); + if (uniqueNumber.equals(splitedName[1])) { + uniqueNumber = null; + } + } + } while (uniqueNumber == null); + return getVideoRecorderOutputFactory().buildConditionName(uniqueNumber); + } + + public void releaseConditionsFromCache(VideoRecorder videoRecorder) { + if (videoRecorder.getConditions() != null) { + for (VideoRecorderCondition condition : videoRecorder.getConditions()) { + getVideoRecorderDAO().releaseFromCache(condition); + } + } + } + + public void deleteCondition(VideoRecorderCondition condition) { + if (condition != null && condition.getConditionId() != null) { + videoRecorderDAO.delete(condition); + } + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderServiceProxy.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderServiceProxy.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/service/VideoRecorderServiceProxy.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,79 @@ +/**************************************************************** + * 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.videoRecorder.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + + +/** + *

This class act as the proxy between web layer and service layer. It is + * designed to decouple the presentation logic and business logic completely. + * In this way, the presentation tier will no longer be aware of the changes in + * service layer. Therefore we can feel free to switch the business logic + * implementation.

+ */ + +public class VideoRecorderServiceProxy { + + public static final IVideoRecorderService getVideoRecorderService(ServletContext servletContext) + { + return (IVideoRecorderService)getVideoRecorderDomainService(servletContext); + } + + private static Object getVideoRecorderDomainService(ServletContext servletContext) + { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean("videoRecorderService"); + } + + /* + * Return the videoRecorder tool version of tool session manager implementation. + * It will delegate to the Spring helper method to retrieve the proper + * bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return noticeboard service object.*/ + public static final ToolSessionManager getVideoRecorderSessionManager(ServletContext servletContext) + { + return (ToolSessionManager)getVideoRecorderDomainService(servletContext); + } + + + /* + * Return the videoRecorder tool version of tool content manager implementation. + * It will delegate to the Spring helper method to retrieve the proper + * bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return noticeboard service object. */ + public static final ToolContentManager getVideoRecorderContentManager(ServletContext servletContext) + { + return (ToolContentManager)getVideoRecorderDomainService(servletContext); + } + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderConstants.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,63 @@ +/**************************************************************** + * 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.videoRecorder.util; + +public interface VideoRecorderConstants { + public static final String TOOL_SIGNATURE = "lavidr10"; + + // VideoRecorder session status + public static final Integer SESSION_NOT_STARTED = new Integer(0); + public static final Integer SESSION_IN_PROGRESS = new Integer(1); + public static final Integer SESSION_COMPLETED = new Integer(2); + + public static final String AUTHORING_DEFAULT_TAB = "1"; + public static final String ATTACHMENT_LIST = "attachmentList"; + public static final String DELETED_ATTACHMENT_LIST = "deletedAttachmentList"; + public static final String AUTH_SESSION_ID_COUNTER = "authoringSessionIdCounter"; + public static final String AUTH_SESSION_ID = "authoringSessionId"; + + public static final int MONITORING_SUMMARY_MAX_MESSAGES = 5; + + // Attribute names + public static final String ATTR_MESSAGE = "message"; + public static final String ATTR_SESSION_MAP = "sessionMap"; + + // Parameter names + public static final String PARAM_PARENT_PAGE = "parentPage"; + + static final String FILTER_REPLACE_TEXT = "***"; + + public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; + public static final String ATTR_CONDITION_SET = "conditionList"; + + public static final String PARAM_ORDER_ID = "orderId"; + public static final String ATTR_DELETED_CONDITION_LIST = "deletedConditionList"; + public static final String TEXT_SEARCH_DEFINITION_NAME = "text.search.output.definition.videoRecorder"; + public static final String TEXT_SEARCH_DEFAULT_CONDITION_DISPLAY_NAME_KEY = "text.search.output.definition.videoRecorder.default.condition"; + public static final String SUCCESS = "success"; + public static final String ERROR_MSG_CONDITION = "error.condition"; + public static final String ERROR_MSG_NAME_BLANK = "error.condition.name.blank"; + public static final String ERROR_MSG_NAME_DUPLICATED = "error.condition.duplicated.name"; +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderException.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderException.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderException.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,57 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.videoRecorder.util; + +/** + * + * @author Anthony Sukkar + * + */ +public class VideoRecorderException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = -5518806968051758859L; + + public VideoRecorderException(String message) { + super(message); + } + + public VideoRecorderException(String message, Throwable cause) { + super(message, cause); + } + + public VideoRecorderException() { + super(); + + } + + public VideoRecorderException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderRecordingComparator.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderRecordingComparator.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderRecordingComparator.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,30 @@ +package org.lamsfoundation.lams.tool.videoRecorder.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; + +/** + * + * @author Paul Georges + * + */ +public class VideoRecorderRecordingComparator implements Comparator { + + public int compare(VideoRecorderRecordingDTO dto1, VideoRecorderRecordingDTO dto2) { + /* + VideoRecorderRecordingDTO dto1 = (VideoRecorderRecordingDTO) o1; + VideoRecorderRecordingDTO dto2 = (VideoRecorderRecordingDTO) o2; + */ + Long userId1 = dto1.getCreateBy().getUid(); + Long userId2 = dto2.getCreateBy().getUid(); + + if(userId1 > userId2) { + return -1; + } else if(userId1 == userId2) { + return 0; + } else { + return 1; + } + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderToolContentHandler.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderToolContentHandler.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/util/VideoRecorderToolContentHandler.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,76 @@ +/**************************************************************** + * 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.videoRecorder.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + */ +public class VideoRecorderToolContentHandler extends ToolContentHandler { + + // TODO these three fields were changed to public, since accessor methods + // cannot be made static. Check if we can do this a better way. + public static String repositoryWorkspaceName = "videoRecorderworkspace"; + + public static String repositoryUser = "videoRecorder"; + + public static char[] repositoryId = { 'l', 'a', 'm', 's', '-', 'e', 'x' }; + + /** + * + */ + public VideoRecorderToolContentHandler() { + 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_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + org.lamsfoundation.lams.tool.videoRecorder.ApplicationResources + + + + + + + + + org/lamsfoundation/lams/learningdesign/BranchCondition.hbm.xml + org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorder.hbm.xml + org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderSession.hbm.xml + org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderUser.hbm.xml + org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderAttachment.hbm.xml + org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderCondition.hbm.xml + org/lamsfoundation/lams/tool/videoRecorder/model/VideoRecorderRecording.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 + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringAction.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,504 @@ +/**************************************************************** + * 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.videoRecorder.web.actions; + +import java.util.ArrayList; +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 java.util.SortedSet; +import java.util.TreeSet; + +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.learningdesign.TextSearchConditionComparator; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderAttachment; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; +import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants; +import org.lamsfoundation.lams.tool.videoRecorder.web.forms.AuthoringForm; +import org.lamsfoundation.lams.util.FileValidatorUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +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="message_page" path="tiles:/generic/message" + */ +public class AuthoringAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(AuthoringAction.class); + + public IVideoRecorderService videoRecorderService; + + // 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"; + private static final String KEY_ONLINE_FILES = "onlineFiles"; + private static final String KEY_OFFLINE_FILES = "offlineFiles"; + private static final String KEY_UNSAVED_ONLINE_FILES = "unsavedOnlineFiles"; + private static final String KEY_UNSAVED_OFFLINE_FILES = "unsavedOfflineFiles"; + private static final String KEY_DELETED_FILES = "deletedFiles"; + + /** + * 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); + + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, "mode", true); + + // set up videoRecorderService + if (videoRecorderService == null) { + videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(this.getServlet().getServletContext()); + } + + // retrieving VideoRecorder with given toolContentID + VideoRecorder videoRecorder = videoRecorderService.getVideoRecorderByContentId(toolContentID); + if (videoRecorder == null) { + videoRecorder = videoRecorderService.copyDefaultContent(toolContentID); + videoRecorder.setCreateDate(new Date()); + videoRecorderService.saveOrUpdateVideoRecorder(videoRecorder); + // TODO NOTE: this causes DB orphans when LD not saved. + } + + if (mode != null && mode.isTeacher()) { + // Set the defineLater flag so that learners cannot use content + // while we + // are editing. This flag is released when updateContent is called. + videoRecorder.setDefineLater(true); + videoRecorderService.saveOrUpdateVideoRecorder(videoRecorder); + } + + // Set up the authForm. + AuthoringForm authForm = (AuthoringForm) form; + updateAuthForm(authForm, videoRecorder); + + // Set up sessionMap + SessionMap map = createSessionMap(videoRecorder, getAccessMode(request), contentFolderID, + toolContentID); + authForm.setSessionMapID(map.getSessionID()); + + // add the sessionMap to HTTPSession. + request.getSession().setAttribute(map.getSessionID(), map); + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP, map); + + return mapping.findForward("success"); + } + + public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + // TODO need error checking. + + // get authForm and session map. + AuthoringForm authForm = (AuthoringForm) form; + SessionMap map = getSessionMap(request, authForm); + + // get videoRecorder content. + VideoRecorder videoRecorder = videoRecorderService.getVideoRecorderByContentId((Long) map.get(AuthoringAction.KEY_TOOL_CONTENT_ID)); + + // update videoRecorder content using form inputs. + ToolAccessMode mode = (ToolAccessMode) map.get(AuthoringAction.KEY_MODE); + updateVideoRecorder(videoRecorder, authForm, mode); + + // remove attachments marked for deletion. + Set attachments = videoRecorder.getVideoRecorderAttachments(); + if (attachments == null) { + attachments = new HashSet(); + } + + for (VideoRecorderAttachment att : getAttList(AuthoringAction.KEY_DELETED_FILES, map)) { + // remove from db, leave in repository + attachments.remove(att); + } + + // add unsaved attachments + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map)); + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map)); + + // set attachments in case it didn't exist + videoRecorder.setVideoRecorderAttachments(attachments); + + videoRecorderService.releaseConditionsFromCache(videoRecorder); + + Set conditions = videoRecorder.getConditions(); + if (conditions == null) { + conditions = new TreeSet(new TextSearchConditionComparator()); + } + SortedSet conditionSet = (SortedSet) map + .get(VideoRecorderConstants.ATTR_CONDITION_SET); + conditions.addAll(conditionSet); + + List deletedConditionList = (List) map + .get(VideoRecorderConstants.ATTR_DELETED_CONDITION_LIST); + if (deletedConditionList != null) { + for (VideoRecorderCondition condition : deletedConditionList) { + // remove from db, leave in repository + conditions.remove(condition); + videoRecorderService.deleteCondition(condition); + } + } + + // set attachments in case it didn't exist + videoRecorder.setConditions(conditionSet); + + // set the update date + videoRecorder.setUpdateDate(new Date()); + + // releasing defineLater flag so that learner can start using the tool. + videoRecorder.setDefineLater(false); + + videoRecorderService.saveOrUpdateVideoRecorder(videoRecorder); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); + + // add the sessionMapID to form + authForm.setSessionMapID(map.getSessionID()); + + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP, map); + + return mapping.findForward("success"); + } + + public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward deleteOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward deleteOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward removeUnsavedOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward removeUnsavedOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + /* ========== Private Methods ********** */ + + private ActionForward uploadFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + FormFile file; + List unsavedFiles; + List savedFiles; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + file = authForm.getOfflineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + file = authForm.getOnlineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + // validate file max size + ActionMessages errors = new ActionMessages(); + FileValidatorUtil.validateFileSize(file, true, errors); + if (!errors.isEmpty()) { + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP, map); + this.saveErrors(request, errors); + return mapping.findForward("success"); + } + + if (file.getFileName().length() != 0) { + + // upload file to repository + VideoRecorderAttachment newAtt = videoRecorderService.uploadFileToContent((Long) map + .get(AuthoringAction.KEY_TOOL_CONTENT_ID), file, type); + + // Add attachment to unsavedFiles + // check to see if file with same name exists + VideoRecorderAttachment currAtt; + Iterator iter = savedFiles.iterator(); + while (iter.hasNext()) { + currAtt = (VideoRecorderAttachment) iter.next(); + if (StringUtils.equals(currAtt.getFileName(), newAtt.getFileName()) + && StringUtils.equals(currAtt.getFileType(), newAtt.getFileType())) { + // move from this this list to deleted list. + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(currAtt); + iter.remove(); + break; + } + } + unsavedFiles.add(newAtt); + + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + } + return mapping.findForward("success"); + } + + private ActionForward deleteFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List fileList; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + fileList = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + fileList = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + Iterator iter = fileList.iterator(); + + while (iter.hasNext()) { + VideoRecorderAttachment att = (VideoRecorderAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // move to delete file list, deleted at next updateContent + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(att); + + // remove from this list + iter.remove(); + break; + } + } + + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + private ActionForward removeUnsaved(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List unsavedFiles; + + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + } else { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + } + + Iterator iter = unsavedFiles.iterator(); + while (iter.hasNext()) { + VideoRecorderAttachment att = (VideoRecorderAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // delete from repository and list + videoRecorderService.deleteFromRepository(att.getFileUuid(), att.getFileVersionId()); + iter.remove(); + break; + } + } + + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + /** + * Updates VideoRecorder content using AuthoringForm inputs. + * + * @param authForm + * @param mode + * @return + */ + private void updateVideoRecorder(VideoRecorder videoRecorder, AuthoringForm authForm, ToolAccessMode mode) { + videoRecorder.setTitle(authForm.getTitle()); + videoRecorder.setInstructions(authForm.getInstructions()); + if (mode.isAuthor()) { // Teacher cannot modify following + videoRecorder.setOfflineInstructions(authForm.getOnlineInstruction()); + videoRecorder.setOnlineInstructions(authForm.getOfflineInstruction()); + videoRecorder.setLockOnFinished(authForm.isLockOnFinished()); + videoRecorder.setAllowUseVoice(authForm.isAllowUseVoice()); + videoRecorder.setAllowUseCamera(authForm.isAllowUseCamera()); + videoRecorder.setAllowLearnerVideoVisibility(authForm.isAllowLearnerVideoVisibility()); + videoRecorder.setAllowLearnerVideoExport(authForm.isAllowLearnerVideoExport()); + } + } + + /** + * Updates AuthoringForm using VideoRecorder content. + * + * @param videoRecorder + * @param authForm + * @return + */ + private void updateAuthForm(AuthoringForm authForm, VideoRecorder videoRecorder) { + authForm.setTitle(videoRecorder.getTitle()); + authForm.setInstructions(videoRecorder.getInstructions()); + authForm.setOnlineInstruction(videoRecorder.getOnlineInstructions()); + authForm.setOfflineInstruction(videoRecorder.getOfflineInstructions()); + authForm.setLockOnFinished(videoRecorder.isLockOnFinished()); + authForm.setAllowUseVoice(videoRecorder.isAllowUseVoice()); + authForm.setAllowUseCamera(videoRecorder.isAllowUseCamera()); + authForm.setAllowLearnerVideoVisibility(videoRecorder.isAllowLearnerVideoVisibility()); + authForm.setAllowLearnerVideoExport(videoRecorder.isAllowLearnerVideoExport()); + } + + /** + * Updates SessionMap using VideoRecorder content. + * + * @param videoRecorder + * @param mode + */ + private SessionMap createSessionMap(VideoRecorder videoRecorder, 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); + map.put(AuthoringAction.KEY_ONLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_OFFLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_DELETED_FILES, new LinkedList()); + map.put(VideoRecorderConstants.ATTR_DELETED_CONDITION_LIST, new ArrayList()); + + Iterator iter = videoRecorder.getVideoRecorderAttachments().iterator(); + while (iter.hasNext()) { + VideoRecorderAttachment attachment = (VideoRecorderAttachment) iter.next(); + String type = attachment.getFileType(); + if (type.equals(IToolContentHandler.TYPE_OFFLINE)) { + getAttList(AuthoringAction.KEY_OFFLINE_FILES, map).add(attachment); + } + if (type.equals(IToolContentHandler.TYPE_ONLINE)) { + getAttList(AuthoringAction.KEY_ONLINE_FILES, map).add(attachment); + } + } + + SortedSet set = new TreeSet(new TextSearchConditionComparator()); + + if (videoRecorder.getConditions() != null) { + set.addAll(videoRecorder.getConditions()); + } + map.put(VideoRecorderConstants.ATTR_CONDITION_SET, set); + return map; + } + + /** + * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR mode. + * + * @param request + * @return + */ + private ToolAccessMode getAccessMode(HttpServletRequest request) { + ToolAccessMode mode; + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if (StringUtils.equalsIgnoreCase(modeStr, ToolAccessMode.TEACHER.toString())) { + mode = ToolAccessMode.TEACHER; + } else { + mode = ToolAccessMode.AUTHOR; + } + return mode; + } + + /** + * Retrieves a List of attachments from the map using the key. + * + * @param key + * @param map + * @return + */ + private List getAttList(String key, SessionMap map) { + List list = (List) map.get(key); + return list; + } + + /** + * Retrieve the SessionMap from the HttpSession. + * + * @param request + * @param authForm + * @return + */ + private SessionMap getSessionMap(HttpServletRequest request, AuthoringForm authForm) { + return (SessionMap) request.getSession().getAttribute(authForm.getSessionMapID()); + } + + /** + * Lists deleted VideoRecorder conditions, which could be persisted or non-persisted items. + * + * @param request + * @return + */ + private List getDeletedVideoRecorderConditionList(SessionMap sessionMap) { + List list = (List) sessionMap.get(VideoRecorderConstants.ATTR_DELETED_CONDITION_LIST); + if (list == null) { + list = new ArrayList(); + sessionMap.put(VideoRecorderConstants.ATTR_DELETED_CONDITION_LIST, list); + } + return list; + + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringVideoRecorderConditionAction.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringVideoRecorderConditionAction.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/AuthoringVideoRecorderConditionAction.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,418 @@ +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + +package org.lamsfoundation.lams.tool.videoRecorder.web.actions; + +import java.util.ArrayList; +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.learningdesign.TextSearchConditionComparator; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; +import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderException; +import org.lamsfoundation.lams.tool.videoRecorder.web.forms.AuthoringForm; +import org.lamsfoundation.lams.tool.videoRecorder.web.forms.VideoRecorderConditionForm; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * Auxiliary action in author mode. It contains operations with VideoRecorderCondition. The rest of operations are located in + * AuthoringAction action. + * + * @author Marcin Cieslak + * @see org.lamsfoundation.lams.tool.videoRecorder.web.action.AuthoringAction + * + */ +public class AuthoringVideoRecorderConditionAction extends Action { + public IVideoRecorderService videoRecorderService; + + @Override + public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + String param = mapping.getParameter(); + + if (param.equals("newConditionInit")) { + return newConditionInit(mapping, form, request, response); + } + if (param.equals("editCondition")) { + return editCondition(mapping, form, request, response); + } + if (param.equals("saveOrUpdateCondition")) { + return saveOrUpdateCondition(mapping, form, request, response); + } + if (param.equals("removeCondition")) { + return removeCondition(mapping, form, request, response); + } + if (param.equals("upCondition")) { + return upCondition(mapping, form, request, response); + } + if (param.equals("downCondition")) { + return downCondition(mapping, form, request, response); + } + + return null; + } + + /** + * Display empty page for new taskList item. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward newConditionInit(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + String sessionMapID = WebUtil.readStrParam(request, VideoRecorderConstants.ATTR_SESSION_MAP_ID); + ((VideoRecorderConditionForm) form).setSessionMapID(sessionMapID); + ((VideoRecorderConditionForm) form).setOrderId(-1); + return mapping.findForward("addcondition"); + } + + /** + * Display edit page for existed taskList item. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward editCondition(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + VideoRecorderConditionForm videoRecorderConditionForm = (VideoRecorderConditionForm) form; + String sessionMapID = videoRecorderConditionForm.getSessionMapID(); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + int orderId = NumberUtils.stringToInt(request.getParameter(VideoRecorderConstants.PARAM_ORDER_ID), -1); + VideoRecorderCondition condition = null; + if (orderId != -1) { + SortedSet conditionSet = getVideoRecorderConditionSet(sessionMap); + List conditionList = new ArrayList(conditionSet); + condition = conditionList.get(orderId); + if (condition != null) { + populateConditionToForm(orderId, condition, (VideoRecorderConditionForm) form, request); + } + } + return condition == null ? null : mapping.findForward("addcondition"); + } + + /** + * This method will get necessary information from taskList item form and save or update into + * HttpSession VideoRecorderItemList. Notice, this save is not persist them into database, just save + * HttpSession temporarily. Only they will be persist when the entire authoring page is being + * persisted. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws ServletException + */ + private ActionForward saveOrUpdateCondition(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + VideoRecorderConditionForm conditionForm = (VideoRecorderConditionForm) form; + ActionErrors errors = validateVideoRecorderCondition(conditionForm, request); + + if (!errors.isEmpty()) { + this.addErrors(request, errors); + return mapping.findForward("addcondition"); + } + + try { + extractFormToVideoRecorderCondition(request, conditionForm); + } catch (Exception e) { + // any upload exception will display as normal error message rather then throw exception directly + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(VideoRecorderConstants.ERROR_MSG_CONDITION, e + .getMessage())); + if (!errors.isEmpty()) { + this.addErrors(request, errors); + return mapping.findForward("addcondition"); + } + } + // set session map ID so that itemlist.jsp can get sessionMAP + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP_ID, conditionForm.getSessionMapID()); + // return null to close this window + return mapping.findForward(VideoRecorderConstants.SUCCESS); + } + + /** + * Remove taskList item from HttpSession list and update page display. As authoring rule, all persist only happen + * when user submit whole page. So this remove is just impact HttpSession values. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward removeCondition(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, VideoRecorderConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + int orderId = NumberUtils.stringToInt(request.getParameter(VideoRecorderConstants.PARAM_ORDER_ID), -1); + if (orderId != -1) { + SortedSet conditionSet = getVideoRecorderConditionSet(sessionMap); + List conditionList = new ArrayList(conditionSet); + VideoRecorderCondition condition = conditionList.remove(orderId); + for (VideoRecorderCondition otherCondition : conditionSet) { + if (otherCondition.getOrderId() > orderId) { + otherCondition.setOrderId(otherCondition.getOrderId() - 1); + } + } + conditionSet.clear(); + conditionSet.addAll(conditionList); + // add to delList + List delList = getDeletedVideoRecorderConditionList(sessionMap); + delList.add(condition); + } + + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP_ID, sessionMapID); + return mapping.findForward(VideoRecorderConstants.SUCCESS); + } + + /** + * Move up current item. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward upCondition(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return switchItem(mapping, request, true); + } + + /** + * Move down current item. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward downCondition(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return switchItem(mapping, request, false); + } + + private ActionForward switchItem(ActionMapping mapping, HttpServletRequest request, boolean up) { + // get back sessionMAP + String sessionMapID = WebUtil.readStrParam(request, VideoRecorderConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + + int orderId = NumberUtils.stringToInt(request.getParameter(VideoRecorderConstants.PARAM_ORDER_ID), -1); + if (orderId != -1) { + SortedSet conditionSet = getVideoRecorderConditionSet(sessionMap); + List conditionList = new ArrayList(conditionSet); + // get current and the target item, and switch their sequnece + VideoRecorderCondition condition = conditionList.get(orderId); + VideoRecorderCondition repCondition; + if (up) { + repCondition = conditionList.get(--orderId); + } else { + repCondition = conditionList.get(++orderId); + } + int upSeqId = repCondition.getOrderId(); + repCondition.setOrderId(condition.getOrderId()); + condition.setOrderId(upSeqId); + + // put back list, it will be sorted again + conditionSet.clear(); + conditionSet.addAll(conditionList); + } + + request.setAttribute(VideoRecorderConstants.ATTR_SESSION_MAP_ID, sessionMapID); + return mapping.findForward(VideoRecorderConstants.SUCCESS); + } + + // ************************************************************************************* + // Private methods for internal needs + // ************************************************************************************* + + /** + * List save current taskList items. + * + * @param request + * @return + */ + private SortedSet getVideoRecorderConditionSet(SessionMap sessionMap) { + SortedSet set = (SortedSet) sessionMap + .get(VideoRecorderConstants.ATTR_CONDITION_SET); + if (set == null) { + set = new TreeSet(new TextSearchConditionComparator()); + sessionMap.put(VideoRecorderConstants.ATTR_CONDITION_SET, set); + } + return set; + } + + /** + * List save deleted taskList items, which could be persisted or non-persisted items. + * + * @param request + * @return + */ + private List getDeletedVideoRecorderConditionList(SessionMap sessionMap) { + return getListFromSession(sessionMap, VideoRecorderConstants.ATTR_DELETED_CONDITION_LIST); + } + + /** + * Get java.util.List from HttpSession by given name. + * + * @param request + * @param name + * @return + */ + private List getListFromSession(SessionMap sessionMap, String name) { + List list = (List) sessionMap.get(name); + if (list == null) { + list = new ArrayList(); + sessionMap.put(name, list); + } + return list; + } + + /** + * This method will populate taskList item information to its form for edit use. + * + * @param orderId + * @param condition + * @param form + * @param request + */ + private void populateConditionToForm(int orderId, VideoRecorderCondition condition, VideoRecorderConditionForm form, + HttpServletRequest request) { + form.populateForm(condition); + if (orderId >= 0) { + form.setOrderId(orderId + 1); + } + } + + /** + * Extract form content to taskListContent. + * + * @param request + * @param form + * @throws VideoRecorderException + */ + private void extractFormToVideoRecorderCondition(HttpServletRequest request, VideoRecorderConditionForm form) + throws Exception { + /* + * BE CAREFUL: This method will copy necessary info from request form to a old or new VideoRecorderItem instance. It + * gets all info EXCEPT VideoRecorderItem.createDate and VideoRecorderItem.createBy, which need be set when persisting + * this taskList item. + */ + + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(form.getSessionMapID()); + // check whether it is "edit(old item)" or "add(new item)" + SortedSet conditionSet = getVideoRecorderConditionSet(sessionMap); + int orderId = form.getOrderId(); + VideoRecorderCondition condition = null; + + if (orderId == -1) { // add + String properConditionName = getVideoRecorderService().createConditionName(conditionSet); + condition = form.extractCondition(); + condition.setName(properConditionName); + int maxSeq = 1; + if (conditionSet != null && conditionSet.size() > 0) { + VideoRecorderCondition last = conditionSet.last(); + maxSeq = last.getOrderId() + 1; + } + condition.setOrderId(maxSeq); + conditionSet.add(condition); + } else { // edit + List conditionList = new ArrayList(conditionSet); + condition = conditionList.get(orderId - 1); + form.extractCondition(condition); + } + } + + /** + * Validate taskListCondition + * + * @param conditionForm + * @return + */ + private ActionErrors validateVideoRecorderCondition(VideoRecorderConditionForm conditionForm, HttpServletRequest request) { + ActionErrors errors = new ActionErrors(); + + String formConditionName = conditionForm.getDisplayName(); + if (StringUtils.isBlank(formConditionName)) { + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(VideoRecorderConstants.ERROR_MSG_NAME_BLANK)); + } else { + + Integer formConditionSequenceId = conditionForm.getOrderId(); + + String sessionMapID = conditionForm.getSessionMapID(); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + SortedSet conditionList = getVideoRecorderConditionSet(sessionMap); + for (VideoRecorderCondition condition : conditionList) { + if (formConditionName.equals(condition.getName()) + && !formConditionSequenceId.equals(new Integer(condition.getOrderId() - 1).toString())) { + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage( + VideoRecorderConstants.ERROR_MSG_NAME_DUPLICATED)); + break; + } + } + } + return errors; + } + + private ActionMessages validate(AuthoringForm taskListForm, ActionMapping mapping, HttpServletRequest request) { + return new ActionMessages(); + } + + private IVideoRecorderService getVideoRecorderService() { + if (videoRecorderService == null) { + videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(this.getServlet().getServletContext()); + } + return videoRecorderService; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/ClearSessionAction.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/ClearSessionAction.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/ClearSessionAction.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,51 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.web.actions; + +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction; +import org.lamsfoundation.lams.tool.ToolAccessMode; + +/** + * This class give a chance to clear HttpSession when user save/close authoring page. + * @author Steve.Ni + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/clearsession" validate="false" + * + * @version $Revision$ + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(String customiseSessionID,HttpSession session, ToolAccessMode mode) { + if(mode.isAuthor()){ + session.removeAttribute(customiseSessionID); + } + } + + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/LearningAction.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,235 @@ +/**************************************************************** + * 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.videoRecorder.web.actions; + +import java.io.IOException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +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.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.videoRecorder.dto.VideoRecorderDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderUserDTO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderException; +import org.lamsfoundation.lams.tool.videoRecorder.web.forms.LearningForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** + * @author + * @version + * + * @struts.action path="/learning" parameter="dispatch" scope="request" + * name="learningForm" + * @struts.action-forward name="videoRecorder" path="tiles:/learning/main" + * @struts.action-forward name="runOffline" path="tiles:/learning/runOffline" + * @struts.action-forward name="defineLater" path="tiles:/learning/defineLater" + */ +public class LearningAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(LearningAction.class); + + private static final boolean MODE_OPTIONAL = false; + + private IVideoRecorderService videoRecorderService; + + public ActionForward unspecified(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) + throws Exception { + + 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 videoRecorderService + if (videoRecorderService == null) { + videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(this + .getServlet().getServletContext()); + } + + // Retrieve the session and content. + VideoRecorderSession videoRecorderSession = videoRecorderService + .getSessionBySessionId(toolSessionID); + if (videoRecorderSession == null) { + throw new VideoRecorderException( + "Cannot retreive session with toolSessionID" + + toolSessionID); + } + + VideoRecorder videoRecorder = videoRecorderSession.getVideoRecorder(); + + // check defineLater + if (videoRecorder.isDefineLater()) { + return mapping.findForward("defineLater"); + } + + VideoRecorderUser videoRecorderUser; + if (mode.equals(ToolAccessMode.TEACHER)) { + Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + videoRecorderUser = videoRecorderService.getUserByUserIdAndSessionId(userID, toolSessionID); + } else { + videoRecorderUser = getCurrentUser(toolSessionID); + } + + // set mode, toolSessionID and VideoRecorderDTO + request.setAttribute("mode", mode.toString()); + request.setAttribute("userId", videoRecorderUser.getUid()); + learningForm.setToolSessionID(toolSessionID); + request.setAttribute("toolSessionId", toolSessionID); + + VideoRecorderDTO videoRecorderDTO = new VideoRecorderDTO(videoRecorder); + request.setAttribute("videoRecorderDTO", videoRecorderDTO); + + /* + List videoRecorderRecordingDTOs; + + if(videoRecorderDTO.allowLearnerVideoVisibility){ + videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionId(toolSessionID); + } else{ + videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionIdAndUserId(toolSessionID, videoRecorderUser.getUserId()); + } + + request.setAttribute("videoRecorderRecordingDTOs", videoRecorderRecordingDTOs); + */ + + // Set the content in use flag. + if (!videoRecorder.isContentInUse()) { + videoRecorder.setContentInUse(new Boolean(true)); + videoRecorderService.saveOrUpdateVideoRecorder(videoRecorder); + } + + // check runOffline + if (videoRecorder.isRunOffline()) { + return mapping.findForward("runOffline"); + } + + // get any existing videoRecorder entry + + // set readOnly flag. + if (mode.equals(ToolAccessMode.TEACHER) || (videoRecorder.isLockOnFinished() && videoRecorderUser.isFinishedActivity())) { + request.setAttribute("contentEditable", false); + } else { + request.setAttribute("contentEditable", true); + } + request.setAttribute("finishedActivity", videoRecorderUser.isFinishedActivity()); + + return mapping.findForward("videoRecorder"); + } + + private VideoRecorderUser getCurrentUser(Long toolSessionId) { + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute( + AttributeNames.USER); + + // attempt to retrieve user using userId and toolSessionId + VideoRecorderUser videoRecorderUser = videoRecorderService + .getUserByUserIdAndSessionId(new Long(user.getUserID() + .intValue()), toolSessionId); + + if (videoRecorderUser == null) { + VideoRecorderSession videoRecorderSession = videoRecorderService + .getSessionBySessionId(toolSessionId); + videoRecorderUser = videoRecorderService.createVideoRecorderUser(user, + videoRecorderSession); + } + + return videoRecorderUser; + } + + public ActionForward finishActivity(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + + Long toolSessionID = WebUtil.readLongParam(request, "toolSessionID"); + + VideoRecorderUser videoRecorderUser = getCurrentUser(toolSessionID); + + if (videoRecorderUser != null) { + + LearningForm learningForm = (LearningForm) form; + + // TODO fix idType to use real value not 999 + + if (videoRecorderUser.getEntryUID() == null) { + videoRecorderUser.setEntryUID(videoRecorderService.createNotebookEntry( + toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, VideoRecorderConstants.TOOL_SIGNATURE, + videoRecorderUser.getUserId().intValue(), learningForm + .getEntryText())); + } else { + // update existing entry. + videoRecorderService.updateEntry(videoRecorderUser.getEntryUID(), + learningForm.getEntryText()); + } + + videoRecorderUser.setFinishedActivity(true); + videoRecorderService.saveOrUpdateVideoRecorderUser(videoRecorderUser); + } else { + log.error("finishActivity(): couldn't find VideoRecorderUser with id: " + + videoRecorderUser.getUserId() + "and toolSessionID: " + + toolSessionID); + } + + ToolSessionManager sessionMgrService = VideoRecorderServiceProxy + .getVideoRecorderSessionManager(getServlet().getServletContext()); + + String nextActivityUrl; + try { + nextActivityUrl = sessionMgrService.leaveToolSession(toolSessionID, + videoRecorderUser.getUserId()); + response.sendRedirect(nextActivityUrl); + } catch (DataMissingException e) { + throw new VideoRecorderException(e); + } catch (ToolException e) { + throw new VideoRecorderException(e); + } catch (IOException e) { + throw new VideoRecorderException(e); + } + + return null; // TODO need to return proper page. + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/actions/MonitoringAction.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,117 @@ +/**************************************************************** + * 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.videoRecorder.web.actions; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +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.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderUserDTO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +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="videoRecorder_display" + * path="tiles:/monitoring/videoRecorder_display" + * + */ +public class MonitoringAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(MonitoringAction.class); + + public IVideoRecorderService videoRecorderService; + + 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); + + VideoRecorder videoRecorder = videoRecorderService + .getVideoRecorderByContentId(toolContentID); + + if (videoRecorder == null) { + // TODO error page. + } + + VideoRecorderDTO videoRecorderDT0 = new VideoRecorderDTO(videoRecorder); + + Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB,true); + videoRecorderDT0.setCurrentTab(currentTab); + + request.setAttribute("videoRecorderDTO", videoRecorderDT0); + request.setAttribute("contentFolderID", contentFolderID); + return mapping.findForward("success"); + } + + public ActionForward showVideoRecorder(ActionMapping mapping, ActionForm form, + HttpServletRequest request, HttpServletResponse response) { + + setupService(); + + Long uid = new Long(WebUtil.readLongParam(request, "userUID")); + + VideoRecorderUser user = videoRecorderService.getUserByUID(uid); + NotebookEntry entry = videoRecorderService.getEntry(user.getEntryUID()); + + VideoRecorderUserDTO userDTO = new VideoRecorderUserDTO(user, entry); + + request.setAttribute("userDTO", userDTO); + + return mapping.findForward("videoRecorder_display"); + } + + /** + * set up videoRecorderService + */ + private void setupService() { + if (videoRecorderService == null) { + videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(this + .getServlet().getServletContext()); + } + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/AuthoringForm.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/AuthoringForm.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/AuthoringForm.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,214 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.web.forms; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @struts.form name="authoringForm" + */ +public class AuthoringForm extends ActionForm { + + private static final long serialVersionUID = 3950453134542135495L; + + // Properties + + String title; + + String instructions; + + String offlineInstruction; + + String onlineInstruction; + + boolean lockOnFinished; + + boolean allowUseVoice; + + boolean allowUseCamera; + + boolean allowLearnerVideoExport; + + boolean allowLearnerVideoVisibility; + + FormFile onlineFile; + + FormFile offlineFile; + + String currentTab; + + String dispatch; + + String sessionMapID; + + Long deleteFileUuid; + + SessionMap sessionMap; + + @Override + public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) { + ActionErrors ac = new ActionErrors(); + ac.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("this is an error")); + + return ac; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + + public String getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + public FormFile getOfflineFile() { + return offlineFile; + } + + public void setOfflineFile(FormFile offlineFile) { + this.offlineFile = offlineFile; + } + + public String getOfflineInstruction() { + return offlineInstruction; + } + + public void setOfflineInstruction(String offlineInstruction) { + this.offlineInstruction = offlineInstruction; + } + + public FormFile getOnlineFile() { + return onlineFile; + } + + public void setOnlineFile(FormFile onlineFile) { + this.onlineFile = onlineFile; + } + + public String getOnlineInstruction() { + return onlineInstruction; + } + + public void setOnlineInstruction(String onlineInstruction) { + this.onlineInstruction = onlineInstruction; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setSessionMap(SessionMap sessionMap) { + this.sessionMap = sessionMap; + } + + public SessionMap getSessionMap() { + return sessionMap; + } + + public Long getDeleteFileUuid() { + return deleteFileUuid; + } + + public void setDeleteFileUuid(Long deleteFile) { + this.deleteFileUuid = deleteFile; + } + + public boolean isAllowUseVoice() { + return allowUseVoice; + } + + public void setAllowUseVoice(boolean allowUseVoice) { + this.allowUseVoice = allowUseVoice; + } + + public boolean isAllowUseCamera() { + return allowUseCamera; + } + + public void setAllowUseCamera(boolean allowUseCamera) { + this.allowUseCamera = allowUseCamera; + } + + public boolean isAllowLearnerVideoVisibility() { + return allowLearnerVideoVisibility; + } + + public void setAllowLearnerVideoVisibility(boolean allowLearnerVideoVisibility) { + this.allowLearnerVideoVisibility = allowLearnerVideoVisibility; + } + + public boolean isAllowLearnerVideoExport() { + return allowLearnerVideoExport; + } + + public void setAllowLearnerVideoExport(boolean allowLearnerVideoExport) { + this.allowLearnerVideoExport = allowLearnerVideoExport; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/LearningForm.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/LearningForm.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/LearningForm.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,96 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.web.forms; + +import org.apache.struts.action.ActionForm; + +/** + * + * @author Anthony Sukkar + * + * @struts.form name="learningForm" + */ +public class LearningForm extends ActionForm { + + private static final long serialVersionUID = -4728946254882237144L; + + String title; + String instructions; + + String dispatch; + Long toolSessionID; + String mode; + + String entryText; + + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public Long getToolSessionID() { + return toolSessionID; + } + + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getEntryText() { + return entryText; + } + + public void setEntryText(String entryText) { + this.entryText = entryText; + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/MonitoringForm.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/MonitoringForm.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/MonitoringForm.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,83 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.web.forms; + +import org.apache.struts.action.ActionForm; + +/** + * @struts.form name="monitoringForm" + */ +public class MonitoringForm extends ActionForm { + + private static final long serialVersionUID = 9096908688391850595L; + + String dispatch; + boolean teacherVisible; + Long toolSessionID; + + // editing message page. + Long messageUID; + String messageBody; + boolean messageHidden; + + public String getMessageBody() { + return messageBody; + } + public void setMessageBody(String messageBody) { + this.messageBody = messageBody; + } + public Long getMessageUID() { + return messageUID; + } + public void setMessageUID(Long messageUID) { + this.messageUID = messageUID; + } + public String getDispatch() { + return dispatch; + } + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + public Long getToolSessionID() { + return toolSessionID; + } + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + public boolean isTeacherVisible() { + return teacherVisible; + } + public void setTeacherVisible(boolean visible) { + this.teacherVisible = visible; + } + public boolean isMessageHidden() { + return messageHidden; + } + public void setMessageHidden(boolean messageHidden) { + this.messageHidden = messageHidden; + } + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/VideoRecorderConditionForm.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/VideoRecorderConditionForm.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/forms/VideoRecorderConditionForm.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,61 @@ +package org.lamsfoundation.lams.tool.videoRecorder.web.forms; + +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderCondition; +import org.lamsfoundation.lams.web.TextSearchActionForm; + +/** + * A text search form with additional parameters for VideoRecorder needs. + * + * @author Marcin Cieslak + * @struts.form name="videoRecorderConditionForm" + */ +public class VideoRecorderConditionForm extends TextSearchActionForm { + + private Integer orderId; + private String displayName; + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String name) { + displayName = name; + } + + public VideoRecorderConditionForm() { + } + + public void populateForm(VideoRecorderCondition condition) { + super.populateForm(condition); + setOrderId(condition.getOrderId()); + setDisplayName(condition.getDisplayName()); + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + /** + * Fills a new VideoRecorderCondition with data contained in this form. Note that some cruicial data is missing, so the + * condition is NOT complete. + * + * @return created condition + */ + public VideoRecorderCondition extractCondition() { + return new VideoRecorderCondition(null, null, getOrderId(), null, getDisplayName(), getAllWords(), getPhrase(), + getAnyWords(), getExcludedWords()); + } + + public void extractCondition(VideoRecorderCondition condition) { + condition.setOrderId(getOrderId()); + condition.setDisplayName(getDisplayName()); + condition.setAllWords(getAllWords()); + condition.setPhrase(getPhrase()); + condition.setAnyWords(getAnyWords()); + condition.setExcludedWords(getExcludedWords()); + } +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/ExportServlet.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,183 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.web.servlets; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderSessionDTO; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderUserDTO; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorder; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderException; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + +public class ExportServlet extends AbstractExportPortfolioServlet { + + private static final long serialVersionUID = -2829707715037631881L; + + private static Logger logger = Logger.getLogger(ExportServlet.class); + + private final String FILENAME = "videoRecorder_main.html"; + + private IVideoRecorderService videoRecorderService; + + protected String doExport(HttpServletRequest request, + HttpServletResponse response, String directoryName, Cookie[] cookies) { + + if (videoRecorderService == null) { + videoRecorderService = VideoRecorderServiceProxy + .getVideoRecorderService(getServletContext()); + } + + try { + if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, + ToolAccessMode.LEARNER); + doLearnerExport(request, response, directoryName, cookies); + } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER + .toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, + ToolAccessMode.TEACHER); + doTeacherExport(request, response, directoryName, cookies); + } + } catch (VideoRecorderException e) { + logger.error("Cannot perform export for videoRecorder tool."); + } + + String basePath = request.getScheme() + "://" + request.getServerName() + + ":" + request.getServerPort() + request.getContextPath(); + writeResponseToFile(basePath + "/pages/export/exportPortfolio.jsp", + directoryName, FILENAME, cookies); + + return FILENAME; + } + + protected String doOfflineExport(HttpServletRequest request, HttpServletResponse response, String directoryName, Cookie[] cookies) { + if (toolContentID == null && toolSessionID == null) { + logger.error("Tool content Id or and session Id are null. Unable to activity title"); + } else { + if (videoRecorderService == null) { + videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(getServletContext()); + } + + VideoRecorder content = null; + if ( toolContentID != null ) { + content = videoRecorderService.getVideoRecorderByContentId(toolContentID); + } else { + VideoRecorderSession session=videoRecorderService.getSessionBySessionId(toolSessionID); + if ( session != null ) + content = session.getVideoRecorder(); + } + if ( content != null ) { + activityTitle = content.getTitle(); + } + } + return super.doOfflineExport(request, response, directoryName, cookies); + } + + private void doLearnerExport(HttpServletRequest request, + HttpServletResponse response, String directoryName, Cookie[] cookies) + throws VideoRecorderException { + + logger.debug("doExportLearner: toolContentID:" + toolSessionID); + + // check if toolContentID available + if (toolSessionID == null) { + String error = "Tool Session ID is missing. Unable to continue"; + logger.error(error); + throw new VideoRecorderException(error); + } + + VideoRecorderSession videoRecorderSession = videoRecorderService + .getSessionBySessionId(toolSessionID); + + VideoRecorder videoRecorder = videoRecorderSession.getVideoRecorder(); + + UserDTO lamsUserDTO = (UserDTO) SessionManager.getSession() + .getAttribute(AttributeNames.USER); + + VideoRecorderUser videoRecorderUser = videoRecorderService + .getUserByUserIdAndSessionId(new Long(lamsUserDTO.getUserID()), + toolSessionID); + + NotebookEntry videoRecorderEntry = videoRecorderService.getEntry(videoRecorderUser + .getEntryUID()); + + // construct dto's + VideoRecorderDTO videoRecorderDTO = new VideoRecorderDTO(); + videoRecorderDTO.setTitle(videoRecorder.getTitle()); + videoRecorderDTO.setInstructions(videoRecorder.getInstructions()); + + VideoRecorderSessionDTO sessionDTO = new VideoRecorderSessionDTO(); + sessionDTO.setSessionName(videoRecorderSession.getSessionName()); + sessionDTO.setSessionID(videoRecorderSession.getSessionId()); + + // If the user hasn't put in their entry yet, videoRecorderEntry will be null; + VideoRecorderUserDTO userDTO = videoRecorderEntry != null + ? new VideoRecorderUserDTO(videoRecorderUser,videoRecorderEntry) + : new VideoRecorderUserDTO(videoRecorderUser); + + sessionDTO.getUserDTOs().add(userDTO); + videoRecorderDTO.getSessionDTOs().add(sessionDTO); + + request.getSession().setAttribute("videoRecorderDTO", videoRecorderDTO); + } + + private void doTeacherExport(HttpServletRequest request, + HttpServletResponse response, String directoryName, Cookie[] cookies) + throws VideoRecorderException { + + logger.debug("doExportTeacher: toolContentID:" + toolContentID); + + // check if toolContentID available + if (toolContentID == null) { + String error = "Tool Content ID is missing. Unable to continue"; + logger.error(error); + throw new VideoRecorderException(error); + } + + VideoRecorder videoRecorder = videoRecorderService + .getVideoRecorderByContentId(toolContentID); + + VideoRecorderDTO videoRecorderDTO = new VideoRecorderDTO(videoRecorder); + + request.getSession().setAttribute("videoRecorderDTO", videoRecorderDTO); + } + +} Index: lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java =================================================================== diff -u --- lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java (revision 0) +++ lams_tool_videorecorder/src/java/org/lamsfoundation/lams/tool/videoRecorder/web/servlets/VideoRecorderAction.java (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,231 @@ +/**************************************************************** + * 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 version 2.0 + * 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.videoRecorder.web.servlets; + +import java.io.IOException; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderRecording; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderSession; +import org.lamsfoundation.lams.tool.videoRecorder.model.VideoRecorderUser; +import org.lamsfoundation.lams.tool.videoRecorder.service.IVideoRecorderService; +import org.lamsfoundation.lams.tool.videoRecorder.service.VideoRecorderServiceProxy; +import org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderRecordingComparator; +import org.lamsfoundation.lams.tool.videoRecorder.dto.VideoRecorderRecordingDTO; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** +* The action servlet that provides the support for the +*
    +*
  • AJAX based Chosen Grouping screen
  • +*
  • forwards to the learner's view grouping screen for Random Grouping.
  • +*
+* +* @author Paul Georges + +* ----------------XDoclet Tags-------------------- +* +* @struts:action path="/videoRecorderActions" +* parameter="method" +* validate="false" +* +* ----------------XDoclet Tags-------------------- +*/ +public class VideoRecorderAction extends LamsDispatchAction { + + //--------------------------------------------------------------------- + private static final String TOOL_SESSION_ID = "toolSessionId"; + private static final String USER_ID = "userId"; + private static final String TITLE = "title"; + private static final String DESCRIPTION = "description"; + private static final String FILENAME = "filename"; + private static final String RECORDING_ID = "recordingId"; + private static final String RATING = "rating"; + + private static final String OK_MSG = "ok"; + private static final String ERROR_MSG = "error"; + + private Integer getUserId(HttpServletRequest request) { + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + return user != null ? user.getUserID() : null; + } + + /** + * Desctipion + * + * Input parameters: toolSessionID, userID (possibly null) + * + * Output format: xml + */ + public ActionForward getRecordingsByToolSessionIdAndUserId(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + // get paramaters from POST + Long toolSessionId = WebUtil.readLongParam(request, TOOL_SESSION_ID); + Long userId = WebUtil.readLongParam(request, USER_ID); + + // get service + IVideoRecorderService videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(getServlet().getServletContext()); + + // create list of recording DTOs + List videoRecorderRecordingDTOs; + + /* + // if no user is specified + if(userId == 0){ + // get all recordings + videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionId(toolSessionId); + // otherwise + } else{ + // get all recordings from user specified + videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionIdAndUserId(toolSessionId, userId); + } + */ + + // if no user is specified + videoRecorderRecordingDTOs = videoRecorderService.getRecordingsByToolSessionId(toolSessionId); + + // sort the list of recording DTOs in order to create the xml correctly + Comparator comp = new VideoRecorderRecordingComparator(); + Collections.sort(videoRecorderRecordingDTOs, comp); + + String xmlOutput = buildVideoRecordingsXML(videoRecorderRecordingDTOs); + writeAJAXResponse(response, xmlOutput); + return null; + } + + public ActionForward saveRecording(ActionMapping mapping, + ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException { + + try{ + // get paramaters from POST + Long toolSessionId = WebUtil.readLongParam(request, TOOL_SESSION_ID); + Long recordingId = WebUtil.readLongParam(request, RECORDING_ID); + Long userId = WebUtil.readLongParam(request, USER_ID); + String title = WebUtil.readStrParam(request, TITLE); + String description = WebUtil.readStrParam(request, DESCRIPTION); + String filename = WebUtil.readStrParam(request, FILENAME); + int rating = WebUtil.readIntParam(request, RATING); + + // get service + IVideoRecorderService videoRecorderService = VideoRecorderServiceProxy.getVideoRecorderService(getServlet().getServletContext()); + + // get user + VideoRecorderUser user = videoRecorderService.getUserByUID(userId); + + // get session + VideoRecorderSession session = videoRecorderService.getSessionBySessionId(toolSessionId); + + // create videoRecording + VideoRecorderRecording videoRecording; + + // if no recordingId is sent, create a new recording + if(recordingId == -1){ + videoRecording = new VideoRecorderRecording(); + videoRecording.setCreateBy(user); + videoRecording.setVideoRecorderSession(session); + videoRecording.setFilename(filename); + videoRecording.setRating((float)rating); + videoRecording.setCreateDate(new Date()); + videoRecording.setNotes(""); + } + // otherwise get the recording from the DAO + else{ + videoRecording = videoRecorderService.getRecordingById(recordingId); + } + + videoRecording.setUpdateDate(new Date()); + videoRecording.setTitle(title); + videoRecording.setDescription(description); + + videoRecorderService.saveOrUpdateVideoRecorderRecording(videoRecording); + + writeAJAXResponse(response, OK_MSG); + + }catch(Exception e){ + writeAJAXResponse(response, ERROR_MSG + e.getMessage()); + } + + return null; + } + + private String buildVideoRecordingsXML(List videoRecorderRecordingDTOs){ + String xmlOutput = ""; + Long lastUserId = Long.valueOf("-1"); + Long currentUserId = Long.valueOf("-1"); + + for(VideoRecorderRecordingDTO videoRecorderRecordingDTO: videoRecorderRecordingDTOs){ + VideoRecorderUser user = videoRecorderRecordingDTO.getCreateBy(); + currentUserId = user.getUserId(); + if(currentUserId != lastUserId){ + if(lastUserId != -1){ + xmlOutput += ""; + } + xmlOutput += ""; + xmlOutput += "" + user.getFirstName() + " " + user.getLastName() + ""; + } + + xmlOutput += ""; + xmlOutput += "" + videoRecorderRecordingDTO.getTitle() + ""; + xmlOutput += "" + user.getUid() + ""; + xmlOutput += "" + user.getUserId() + ""; + xmlOutput += "" + user.getFirstName() + " " + user.getLoginName() + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getCreateDate() + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getUpdateDate() + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getDescription() + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getNotes() + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getUid() + ""; + xmlOutput += "" + videoRecorderRecordingDTO.getFilename() + ""; + xmlOutput += ""; + + lastUserId = currentUserId; + } + + if(lastUserId == currentUserId && (lastUserId != -1 || currentUserId != -1)){ + xmlOutput += ""; + } + + xmlOutput += ""; + return xmlOutput; + } +} \ No newline at end of file Index: lams_tool_videorecorder/web/403.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/403.jsp (revision 0) +++ lams_tool_videorecorder/web/403.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,25 @@ +<%-- +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 version 2 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 +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + Index: lams_tool_videorecorder/web/404.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/404.jsp (revision 0) +++ lams_tool_videorecorder/web/404.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,27 @@ +<%-- +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 version 2 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 +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + Index: lams_tool_videorecorder/web/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_videorecorder/web/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_videorecorder/web/META-INF/MANIFEST.MF (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,5 @@ +Implementation-Title: LAMS - VideoRecorder Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: + Index: lams_tool_videorecorder/web/WEB-INF/fckeditor/tlds/FCKeditor.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,215 @@ + + + + + 2.3 + 1.1 + FCKeditor + http://fckeditor.net/tags-fckeditor + FCKeditor taglib + + editor + com.fredck.FCKeditor.tags.FCKeditorTag + JSP + + id + true + true + + + basePath + false + true + + + toolbarSet + false + true + + + width + false + true + + + height + false + true + + + customConfigurationsPath + false + true + + + editorAreaCSS + false + true + + + baseHref + false + true + + + skinPath + false + true + + + pluginsPath + false + true + + + fullPage + false + true + + + debug + false + true + + + autoDetectLanguage + false + true + + + defaultLanguage + false + true + + + contentLangDirection + false + true + + + enableXHTML + false + true + + + enableSourceXHTML + false + true + + + fillEmptyBlocks + false + true + + + formatSource + false + true + + + formatOutput + false + true + + + formatIndentator + false + true + + + geckoUseSPAN + false + true + + + startupFocus + false + true + + + forcePasteAsPlainText + false + true + + + forceSimpleAmpersand + false + true + + + tabSpaces + false + true + + + useBROnCarriageReturn + false + true + + + toolbarStartExpanded + false + true + + + toolbarCanCollapse + false + true + + + fontColors + false + true + + + fontNames + false + true + + + fontSizes + false + true + + + fontFormats + false + true + + + stylesXmlPath + false + true + + + linkBrowserURL + false + true + + + imageBrowserURL + false + true + + + flashBrowserURL + false + true + + + linkUploadURL + false + true + + + imageUploadURL + false + true + + + flashUploadURL + false + true + + + Index: lams_tool_videorecorder/web/WEB-INF/jstl/tlds/c.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/jstl/tlds/c.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/jstl/tlds/c.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,563 @@ + + + + + JSTL 1.1 core library + JSTL core + 1.1 + c + http://java.sun.com/jsp/jstl/core + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + + + + Catches any Throwable that occurs in its body and optionally + exposes it. + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + +Name of the exported scoped variable for the +exception thrown from a nested action. The type of the +scoped variable is the type of the exception thrown. + + var + false + false + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + +The test condition that determines whether or +not the body content should be processed. + + test + true + true + boolean + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + +The URL of the resource to import. + + url + true + true + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Name of the exported scoped variable for the +resource's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL resource that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +resource. + + charEncoding + false + true + + + + + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + +Collection of items to iterate over. + + items + false + true + java.lang.Object + + + +If items specified: +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. +If items not specified: +Iteration begins with index set at the value +specified. + + begin + false + true + int + + + +If items specified: +Iteration ends at the item located at the +specified index (inclusive). +If items not specified: +Iteration ends when index reaches the value +specified. + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. Its type depends +on the object of the underlying collection. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Iterates over tokens, separated by the supplied delimeters + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + +String of tokens to iterate over. + + items + true + true + java.lang.String + + + +The set of delimiters (the characters that +separate the tokens in the string). + + delims + true + true + java.lang.String + + + +Iteration begins at the token located at the +specified index. First token has index 0. + + begin + false + true + int + + + +Iteration ends at the token located at the +specified index (inclusive). + + end + false + true + int + + + +Iteration will only process every step tokens +of the string, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +current item of the iteration. This scoped +variable has nested visibility. + + var + false + false + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of +type +javax.servlet.jsp.jstl.core.LoopTag +Status. This scoped variable has nested +visibility. + + varStatus + false + false + + + + + + Like <%= ... >, but for expressions. + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + +Expression to be evaluated. + + value + true + true + + + +Default value if the resulting value is null. + + default + false + true + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default value is +true. + + escapeXml + false + true + + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'import' tag's URL. + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + +Name of the query string parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Redirects to a new URL. + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + +The URL of the resource to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Removes a scoped variable (from a particular scope, if specified). + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + +Name of the scoped variable to be removed. + + var + true + false + + + +Scope for var. + + scope + false + false + + + + + + Sets the result of an expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + +Name of the exported scoped variable to hold the value +specified in the action. The type of the scoped variable is +whatever type the value expression evaluates to. + + var + false + false + + + +Expression to be evaluated. + + value + false + true + + + +Target object whose property will be set. Must evaluate to +a JavaBeans object with setter property property, or to a +java.util.Map object. + + target + false + true + + + +Name of the property to be set in the target object. + + property + false + true + + + +Scope for var. + + scope + false + false + + + + + + Creates a URL with optional query parameters. + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + +Name of the exported scoped variable for the +processed url. The type of the scoped variable is +String. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +URL to be processed. + + value + false + true + + + +Name of the context when specifying a relative URL +resource that belongs to a foreign context. + + context + false + true + + + + + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + +The test condition that determines whether or not the +body content should be processed. + + test + true + true + boolean + + + + Index: lams_tool_videorecorder/web/WEB-INF/jstl/tlds/fmt.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/jstl/tlds/fmt.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/jstl/tlds/fmt.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,671 @@ + + + + + JSTL 1.1 i18n-capable formatting library + JSTL fmt + 1.1 + fmt + http://java.sun.com/jsp/jstl/fmt + + + + Provides core validation features for JSTL tags. + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + + + + Sets the request character encoding + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + +Name of character encoding to be applied when +decoding request parameters. + + value + false + true + + + + + + Stores the given locale in the locale configuration variable + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + +A String value is interpreted as the +printable representation of a locale, which +must contain a two-letter (lower-case) +language code (as defined by ISO-639), +and may contain a two-letter (upper-case) +country code (as defined by ISO-3166). +Language and country codes must be +separated by hyphen (-) or underscore +(_). + + value + true + true + + + +Vendor- or browser-specific variant. +See the java.util.Locale javadocs for +more information on variants. + + variant + false + true + + + +Scope of the locale configuration variable. + + scope + false + false + + + + + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See +java.util.TimeZone for more information on +supported time zone formats. + + value + true + true + + + + + + Stores the given time zone in the time zone configuration variable + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + +The time zone. A String value is interpreted as +a time zone ID. This may be one of the time zone +IDs supported by the Java platform (such as +"America/Los_Angeles") or a custom time zone +ID (such as "GMT-8"). See java.util.TimeZone for +more information on supported time zone +formats. + + value + true + true + + + +Name of the exported scoped variable which +stores the time zone of type +java.util.TimeZone. + + var + false + false + + + +Scope of var or the time zone configuration +variable. + + scope + false + false + + + + + + Loads a resource bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Prefix to be prepended to the value of the message +key of any nested <fmt:message> action. + + prefix + false + true + + + + + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Resource bundle base name. This is the bundle's +fully-qualified resource name, which has the same +form as a fully-qualified class name, that is, it uses +"." as the package component separator and does not +have any file type (such as ".class" or ".properties") +suffix. + + basename + true + true + + + +Name of the exported scoped variable which stores +the i18n localization context of type +javax.servlet.jsp.jstl.fmt.LocalizationC +ontext. + + var + false + false + + + +Scope of var or the localization context +configuration variable. + + scope + false + false + + + + + + Maps key to localized message and performs parametric replacement + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + +Message key to be looked up. + + key + false + true + + + +Localization context in whose resource +bundle the message key is looked up. + + bundle + false + true + + + +Name of the exported scoped variable +which stores the localized message. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Supplies an argument for parametric replacement to a containing + <message> tag + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + +Argument used for parametric replacement. + + value + false + true + + + + + + Formats a numeric value as a number, currency, or percentage + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + +Numeric value to be formatted. + + value + false + true + + + +Specifies whether the value is to be +formatted as number, currency, or +percentage. + + type + false + true + + + +Custom formatting pattern. + + pattern + false + true + + + +ISO 4217 currency code. Applied only +when formatting currencies (i.e. if type is +equal to "currency"); ignored otherwise. + + currencyCode + false + true + + + +Currency symbol. Applied only when +formatting currencies (i.e. if type is equal +to "currency"); ignored otherwise. + + currencySymbol + false + true + + + +Specifies whether the formatted output +will contain any grouping separators. + + groupingUsed + false + true + + + +Maximum number of digits in the integer +portion of the formatted output. + + maxIntegerDigits + false + true + + + +Minimum number of digits in the integer +portion of the formatted output. + + minIntegerDigits + false + true + + + +Maximum number of digits in the +fractional portion of the formatted output. + + maxFractionDigits + false + true + + + +Minimum number of digits in the +fractional portion of the formatted output. + + minFractionDigits + false + true + + + +Name of the exported scoped variable +which stores the formatted result as a +String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a number, currency, or percentage + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + +String to be parsed. + + value + false + true + + + +Specifies whether the string in the value +attribute should be parsed as a number, +currency, or percentage. + + type + false + true + + + +Custom formatting pattern that determines +how the string in the value attribute is to be +parsed. + + pattern + false + true + + + +Locale whose default formatting pattern (for +numbers, currencies, or percentages, +respectively) is to be used during the parse +operation, or to which the pattern specified +via the pattern attribute (if present) is +applied. + + parseLocale + false + true + + + +Specifies whether just the integer portion of +the given value should be parsed. + + integerOnly + false + true + + + +Name of the exported scoped variable which +stores the parsed result (of type +java.lang.Number). + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Formats a date and/or time using the supplied styles and pattern + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + +Date and/or time to be formatted. + + value + true + true + + + +Specifies whether the time, the date, or both +the time and date components of the given +date are to be formatted. + + type + false + true + + + +Predefined formatting style for dates. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a date or both a date and +time (i.e. if type is missing or is equal to +"date" or "both"); ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting style for times. Follows +the semantics defined in class +java.text.DateFormat. Applied only +when formatting a time or both a date and +time (i.e. if type is equal to "time" or "both"); +ignored otherwise. + + timeStyle + false + true + + + +Custom formatting style for dates and times. + + pattern + false + true + + + +Time zone in which to represent the formatted +time. + + timeZone + false + true + + + +Name of the exported scoped variable which +stores the formatted result as a String. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + + + Parses the string representation of a date and/or time + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + +Date string to be parsed. + + value + false + true + + + +Specifies whether the date string in the +value attribute is supposed to contain a +time, a date, or both. + + type + false + true + + + +Predefined formatting style for days +which determines how the date +component of the date string is to be +parsed. Applied only when formatting a +date or both a date and time (i.e. if type +is missing or is equal to "date" or "both"); +ignored otherwise. + + dateStyle + false + true + + + +Predefined formatting styles for times +which determines how the time +component in the date string is to be +parsed. Applied only when formatting a +time or both a date and time (i.e. if type +is equal to "time" or "both"); ignored +otherwise. + + timeStyle + false + true + + + +Custom formatting pattern which +determines how the date string is to be +parsed. + + pattern + false + true + + + +Time zone in which to interpret any time +information in the date string. + + timeZone + false + true + + + +Locale whose predefined formatting styles +for dates and times are to be used during +the parse operation, or to which the +pattern specified via the pattern +attribute (if present) is applied. + + parseLocale + false + true + + + +Name of the exported scoped variable in +which the parsing result (of type +java.util.Date) is stored. + + var + false + false + + + +Scope of var. + + scope + false + false + + + + Index: lams_tool_videorecorder/web/WEB-INF/jstl/tlds/fn.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/jstl/tlds/fn.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/jstl/tlds/fn.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,207 @@ + + + + + JSTL 1.1 functions library + JSTL functions + 1.1 + fn + http://java.sun.com/jsp/jstl/functions + + + + Tests if an input string contains the specified substring. + + contains + org.apache.taglibs.standard.functions.Functions + boolean contains(java.lang.String, java.lang.String) + + <c:if test="${fn:contains(name, searchString)}"> + + + + + + Tests if an input string contains the specified substring in a case insensitive way. + + containsIgnoreCase + org.apache.taglibs.standard.functions.Functions + boolean containsIgnoreCase(java.lang.String, java.lang.String) + + <c:if test="${fn:containsIgnoreCase(name, searchString)}"> + + + + + + Tests if an input string ends with the specified suffix. + + endsWith + org.apache.taglibs.standard.functions.Functions + boolean endsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:endsWith(filename, ".txt")}"> + + + + + + Escapes characters that could be interpreted as XML markup. + + escapeXml + org.apache.taglibs.standard.functions.Functions + java.lang.String escapeXml(java.lang.String) + + ${fn:escapeXml(param:info)} + + + + + + Returns the index withing a string of the first occurrence of a specified substring. + + indexOf + org.apache.taglibs.standard.functions.Functions + int indexOf(java.lang.String, java.lang.String) + + ${fn:indexOf(name, "-")} + + + + + + Joins all elements of an array into a string. + + join + org.apache.taglibs.standard.functions.Functions + java.lang.String join(java.lang.String[], java.lang.String) + + ${fn:join(array, ";")} + + + + + + Returns the number of items in a collection, or the number of characters in a string. + + length + org.apache.taglibs.standard.functions.Functions + int length(java.lang.Object) + + You have ${fn:length(shoppingCart.products)} in your shopping cart. + + + + + + Returns a string resulting from replacing in an input string all occurrences + of a "before" string into an "after" substring. + + replace + org.apache.taglibs.standard.functions.Functions + java.lang.String replace(java.lang.String, java.lang.String, java.lang.String) + + ${fn:replace(text, "-", "•")} + + + + + + Splits a string into an array of substrings. + + split + org.apache.taglibs.standard.functions.Functions + java.lang.String[] split(java.lang.String, java.lang.String) + + ${fn:split(customerNames, ";")} + + + + + + Tests if an input string starts with the specified prefix. + + startsWith + org.apache.taglibs.standard.functions.Functions + boolean startsWith(java.lang.String, java.lang.String) + + <c:if test="${fn:startsWith(product.id, "100-")}"> + + + + + + Returns a subset of a string. + + substring + org.apache.taglibs.standard.functions.Functions + java.lang.String substring(java.lang.String, int, int) + + P.O. Box: ${fn:substring(zip, 6, -1)} + + + + + + Returns a subset of a string following a specific substring. + + substringAfter + org.apache.taglibs.standard.functions.Functions + java.lang.String substringAfter(java.lang.String, java.lang.String) + + P.O. Box: ${fn:substringAfter(zip, "-")} + + + + + + Returns a subset of a string before a specific substring. + + substringBefore + org.apache.taglibs.standard.functions.Functions + java.lang.String substringBefore(java.lang.String, java.lang.String) + + Zip (without P.O. Box): ${fn:substringBefore(zip, "-")} + + + + + + Converts all of the characters of a string to lower case. + + toLowerCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toLowerCase(java.lang.String) + + Product name: ${fn.toLowerCase(product.name)} + + + + + + Converts all of the characters of a string to upper case. + + toUpperCase + org.apache.taglibs.standard.functions.Functions + java.lang.String toUpperCase(java.lang.String) + + Product name: ${fn.UpperCase(product.name)} + + + + + + Removes white spaces from both ends of a string. + + trim + org.apache.taglibs.standard.functions.Functions + java.lang.String trim(java.lang.String) + + Name: ${fn.trim(name)} + + + + Index: lams_tool_videorecorder/web/WEB-INF/jstl/tlds/permittedTaglibs.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/jstl/tlds/permittedTaglibs.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/jstl/tlds/permittedTaglibs.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,34 @@ + + + + + Restricts JSP pages to the JSTL tag libraries + + permittedTaglibs + 1.1 + permittedTaglibs + http://jakarta.apache.org/taglibs/standard/permittedTaglibs + + + + javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV + + + + Whitespace-separated list of taglib URIs to permit. This example + TLD for the Standard Taglib allows only JSTL 'el' taglibs to be + imported. + + permittedTaglibs + + http://java.sun.com/jsp/jstl/core + http://java.sun.com/jsp/jstl/fmt + http://java.sun.com/jsp/jstl/sql + http://java.sun.com/jsp/jstl/xml + + + + Index: lams_tool_videorecorder/web/WEB-INF/jstl/tlds/scriptfree.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/jstl/tlds/scriptfree.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/jstl/tlds/scriptfree.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,51 @@ + + + + + Validates JSP pages to prohibit use of scripting elements. + + 1.1 + scriptfree + http://jakarta.apache.org/taglibs/standard/scriptfree + + + + Validates prohibitions against scripting elements. + + + javax.servlet.jsp.jstl.tlv.ScriptFreeTLV + + + + Controls whether or not declarations are considered valid. + + allowDeclarations + false + + + + Controls whether or not scriptlets are considered valid. + + allowScriptlets + false + + + + Controls whether or not top-level expressions are considered valid. + + allowExpressions + false + + + + Controls whether or not expressions used to supply request-time + attribute values are considered valid. + + allowRTExpressions + false + + + Index: lams_tool_videorecorder/web/WEB-INF/jstl/tlds/x.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/jstl/tlds/x.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/jstl/tlds/x.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,448 @@ + + + + + JSTL 1.1 XML library + JSTL XML + 1.1 + x + http://java.sun.com/jsp/jstl/xml + + + + Provides validation features for JSTL XML tags. + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + + + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + + + + Like <%= ... >, but for XPath expressions. + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + +XPath expression to be evaluated. + + select + true + false + + + +Determines whether characters <,>,&,'," in the +resulting string should be converted to their +corresponding character entity codes. Default +value is true. + + escapeXml + false + true + + + + + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + +The test condition that tells whether or not the +body content should be processed. + + select + true + false + + + +Name of the exported scoped variable for the +resulting value of the test condition. The type +of the scoped variable is Boolean. + + var + false + false + + + +Scope for var. + + scope + false + false + + + + + + XML iteration tag. + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + +Name of the exported scoped variable for the +current item of the iteration. This scoped variable +has nested visibility. Its type depends on the +result of the XPath expression in the select +attribute. + + var + false + false + + + +XPath expression to be evaluated. + + select + true + false + + + +Iteration begins at the item located at the +specified index. First item of the collection has +index 0. + + begin + false + true + int + + + +Iteration ends at the item located at the specified +index (inclusive). + + end + false + true + int + + + +Iteration will only process every step items of +the collection, starting with the first one. + + step + false + true + int + + + +Name of the exported scoped variable for the +status of the iteration. Object exported is of type +javax.servlet.jsp.jstl.core.LoopTagStatus. This scoped variable has nested visibility. + + varStatus + false + false + + + + + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + + + + Adds a parameter to a containing 'transform' tag's Transformer + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + +Name of the transformation parameter. + + name + true + true + + + +Value of the parameter. + + value + false + true + + + + + + Parses XML content from 'source' attribute or 'body' + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is implementation +dependent. + + var + false + false + + + +Name of the exported scoped variable for +the parsed XML document. The type of the +scoped variable is +org.w3c.dom.Document. + + varDom + false + false + + + +Scope for var. + + scope + false + false + + + +Scope for varDom. + + scopeDom + false + false + + + +Deprecated. Use attribute 'doc' instead. + + xml + false + true + + + +Source XML document to be parsed. + + doc + false + true + + + +The system identifier (URI) for parsing the +XML document. + + systemId + false + true + + + +Filter to be applied to the source +document. + + filter + false + true + + + + + + Saves the result of an XPath expression evaluation in a 'scope' + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + +Name of the exported scoped variable to hold +the value specified in the action. The type of the +scoped variable is whatever type the select +expression evaluates to. + + var + true + false + + + +XPath expression to be evaluated. + + select + false + false + + + +Scope for var. + + scope + false + false + + + + + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + +Name of the exported +scoped variable for the +transformed XML +document. The type of the +scoped variable is +org.w3c.dom.Document. + + var + false + false + + + +Scope for var. + + scope + false + false + + + +Result +Object that captures or +processes the transformation +result. + + result + false + true + + + +Deprecated. Use attribute +'doc' instead. + + xml + false + true + + + +Source XML document to be +transformed. (If exported by +<x:set>, it must correspond +to a well-formed XML +document, not a partial +document.) + + doc + false + true + + + +Deprecated. Use attribute +'docSystemId' instead. + + xmlSystemId + false + true + + + +The system identifier (URI) +for parsing the XML +document. + + docSystemId + false + true + + + +javax.xml.transform.Source +Transformation stylesheet as +a String, Reader, or +Source object. + + xslt + false + true + + + +The system identifier (URI) +for parsing the XSLT +stylesheet. + + xsltSystemId + false + true + + + + + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + +The test condition that tells whether or +not the body content should be +processed + + select + true + false + + + + Index: lams_tool_videorecorder/web/WEB-INF/lams.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/lams.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/lams.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,517 @@ + + + + + 1.0 + lams + + LAMSTags + + + + + Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ + Base URL for the current web app + + + WebAppURL + org.lamsfoundation.lams.web.tag.WebAppURLTag + empty + + + + + Output a random number for the learner and passon flash movies to communicate directly. + generate unique ID + + + generateID + org.lamsfoundation.lams.web.tag.GenerateIDTag + empty + + + Output a random number for the learner and passon flash movies to communicate directly. + id + false + + true + + + + + + + Get the configuration value for the specified key + Configuration value + + + Configuration + org.lamsfoundation.lams.web.tag.ConfigurationTag + empty + + + Get the configuration value for the specified key + key + false + + true + + + + + + + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL + + + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag + empty + + + + + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + + Converts text from \n or \r\n to <BR> before rendering + Converts text from \n or \r\n to <BR> before rendering + + + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + empty + + + Converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + Converts text from \n or \r\n to <BR> before rendering + escapeHtml + false + + true + + + + + + + Help tag + Help tag + + + help + org.lamsfoundation.lams.web.tag.HelpTag + empty + + + Help tag + module + false + + true + + + + Help tag + toolSignature + false + + true + + + + Help tag + page + false + + true + + + + Help tag + style + false + + true + + + + + + + Converts role name into form usable as message resources key + Converts role name into form usable as message resources key + + + role + org.lamsfoundation.lams.web.tag.RoleTag + empty + + + Converts role name into form usable as message resources key + role + true + + true + + + + + + + Output stylesheet based on the user preferences. + User's chosen stylesheet + + + css + org.lamsfoundation.lams.web.tag.CssTag + empty + + + Output stylesheet based on the user preferences. + localLinkPath + false + + true + + + + Output stylesheet based on the user preferences. + style + false + + true + + + + + + + Output details from the shared session UserDTO object + user details + + + user + org.lamsfoundation.lams.web.tag.UserTag + empty + + + Output details from the shared session UserDTO object + property + true + + true + + + + + + + STRUTS-textarea + org.lamsfoundation.lams.web.tag.MultiLinesTextareaTag + empty + + accesskey + false + true + + + alt + false + true + + + altKey + false + true + + + bundle + false + true + + + cols + false + true + + + disabled + false + true + + + errorKey + false + true + + + errorStyle + false + true + + + errorStyleClass + false + true + + + errorStyleId + false + true + + + index + false + true + + + indexed + false + true + + + name + false + true + + + onblur + false + true + + + onchange + false + true + + + onclick + false + true + + + ondblclick + false + true + + + onfocus + false + true + + + onkeydown + false + true + + + onkeypress + false + true + + + onkeyup + false + true + + + onmousedown + false + true + + + onmousemove + false + true + + + onmouseout + false + true + + + onmouseover + false + true + + + onmouseup + false + true + + + property + true + true + + + readonly + false + true + + + rows + false + true + + + style + false + true + + + styleClass + false + true + + + styleId + false + true + + + tabindex + false + true + + + title + false + true + + + titleKey + false + true + + + value + false + true + + + + Tab + /WEB-INF/tags/Tab.tag + + + Tabs + /WEB-INF/tags/Tabs.tag + + + TabBody + /WEB-INF/tags/TabBody.tag + + + TabName + /WEB-INF/tags/TabName.tag + + + FCKEditor + /WEB-INF/tags/FCKEditor.tag + + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + + + headItems + /WEB-INF/tags/headItems.tag + + + Passon + /WEB-INF/tags/Passon.tag + + + ExportPortOutput + /WEB-INF/tags/ExportPortOutput.tag + + + Date + /WEB-INF/tags/Date.tag + + + DefineLater + /WEB-INF/tags/DefineLater.tag + + + ImgButtonWrapper + /WEB-INF/tags/ImgButtonWrapper.tag + + + TextSearch + /WEB-INF/tags/TextSearch.tag + + + textarea + org.lamsfoundation.lams.web.tag.LAMSMultiLinesTextareaTag + JSP + true + + Render text exactly same as original input, which even won't escape the input HTML tag. + + + + + name + true + true + + + + + id + false + true + + + + + onchange + false + true + + + + head + /WEB-INF/tags/Head.tag + + + ProgressOutput + /WEB-INF/tags/ProgressOutput.tag + + + LearnerFlashEnabled + /WEB-INF/tags/LearnerFlashEnabled.tag + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/struts-config.xml =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/struts-config.xml (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/struts-config.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/tiles-defs.xml =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/tiles-defs.xml (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/tiles-defs.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-bean.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-bean.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-bean.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,382 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean + +cookie +org.apache.struts.taglib.bean.CookieTag +org.apache.struts.taglib.bean.CookieTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +define +org.apache.struts.taglib.bean.DefineTag +org.apache.struts.taglib.bean.DefineTei +JSP + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +header +org.apache.struts.taglib.bean.HeaderTag +org.apache.struts.taglib.bean.HeaderTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +include +org.apache.struts.taglib.bean.IncludeTag +org.apache.struts.taglib.bean.IncludeTei +empty + +anchor +false +true + + +forward +false +true + + +href +false +true + + +id +true +false + + +name +false +true + + +page +false +true + + +transaction +false +true + + + +message +org.apache.struts.taglib.bean.MessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +page +org.apache.struts.taglib.bean.PageTag +org.apache.struts.taglib.bean.PageTei +empty + +id +true +false + + +property +true +true + + + +parameter +org.apache.struts.taglib.bean.ParameterTag +org.apache.struts.taglib.bean.ParameterTei +empty + +id +true +false + + +multiple +false +true + + +name +true +true + + +value +false +true + + + +resource +org.apache.struts.taglib.bean.ResourceTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.struts.taglib.bean.SizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +false + + +name +false +true + + +property +false +true + + +scope +false +true + + + +struts +org.apache.struts.taglib.bean.StrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + +write +org.apache.struts.taglib.bean.WriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +true +true + + +property +false +true + + +scope +false +true + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-html.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-html.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-html.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-logic.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-logic.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-logic.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,652 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic + +empty +org.apache.struts.taglib.logic.EmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.logic.EqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +forward +org.apache.struts.taglib.logic.ForwardTag +empty + +name +true +true + + + +greaterEqual +org.apache.struts.taglib.logic.GreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.logic.GreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.logic.IterateTag +org.apache.struts.taglib.logic.IterateTei +JSP + +collection +false +true + + +id +true +false + + +indexId +false +false + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.logic.LessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.logic.LessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.logic.MatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.logic.MessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.logic.MessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.logic.NotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.logic.NotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.logic.NotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.logic.NotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.logic.PresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +redirect +org.apache.struts.taglib.logic.RedirectTag + +action +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-nested.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-nested.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-nested.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-tiles.tld =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-tiles.tld (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/tlds/struts-tiles.tld (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,344 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles + +insert +org.apache.struts.taglib.tiles.InsertTag +JSP + +template +false +true + + +component +false +true + + +page +false +true + + +definition +false +true + + +attribute +false +false + + +name +false +true + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +flush +false +false + + +ignore +false +true + + +role +false +true + + +controllerUrl +false +true + + +controllerClass +false +true + + + +definition +org.apache.struts.taglib.tiles.DefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.struts.taglib.tiles.PutTag +JSP + +name +false +false + + +value +false +true + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +putList +org.apache.struts.taglib.tiles.PutListTag +JSP + +name +true +false + + + +add +org.apache.struts.taglib.tiles.AddTag +JSP + +value +false +false + + +content +false +true + + +direct +false +false + + +type +false +false + + +beanName +false +true + + +beanProperty +false +true + + +beanScope +false +false + + +role +false +true + + + +get +org.apache.struts.taglib.tiles.GetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.struts.taglib.tiles.GetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.struts.taglib.tiles.UseAttributeTag +org.apache.struts.taglib.tiles.UseAttributeTei +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.struts.taglib.tiles.ImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.struts.taglib.tiles.InitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/struts/validator-rules.xml =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/struts/validator-rules.xml (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/struts/validator-rules.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/AuthoringButton.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,93 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * AuthoringButton.tag + * Author: Dapeng Ni + * Description: Creates the save/cancel button for authoring page + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> + +<%@ attribute name="formID" required="true" rtexprvalue="true" %> +<%@ attribute name="toolSignature" required="true" rtexprvalue="true" %> +<%@ attribute name="toolContentID" required="true" rtexprvalue="true" %> +<%@ attribute name="contentFolderID" required="true" rtexprvalue="true" %> +<%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %> + +<%-- Optional attribute --%> +<%@ attribute name="accessMode" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %> +<%@ attribute name="defineLater" required="false" rtexprvalue="true" %> +<%@ attribute name="customiseSessionID" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + +

+ + + + + + +

+ Index: lams_tool_videorecorder/web/WEB-INF/tags/Date.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/Date.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/Date.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,52 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * Author: Fiona Malikoff + * Description: Format a date, using the locale, based on standard parameters. + * Need to use long for the date otherwise the AU locale comes out as 1/2/06 and + * full is needed to include the timezone. + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="value" required="true" rtexprvalue="true" type="java.util.Date" %> +<%@ attribute name="style" required="false" rtexprvalue="true"%> +<%@ attribute name="type" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/DefineLater.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/DefineLater.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/DefineLater.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * DefineLater.tag + * Author: Fiona Malikoff + * Description: Layout for "Define Later" screens - to be used in learning. + * A suggested layout - unless the tool has special requirements, this layout should be used. + * Expects to be used inside
+ */ +%> + +<%@ tag body-content="scriptless"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-core" prefix="c"%> + +<%@ attribute name="defineLaterMessageKey" required="false" + rtexprvalue="true"%> +<%@ attribute name="buttonTryAgainKey" required="false" + rtexprvalue="true"%> + +<%-- Default value for I18N keys --%> + + + + + + + +

+ +

+
+ +
Index: lams_tool_videorecorder/web/WEB-INF/tags/ExportPortOutput.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/ExportPortOutput.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/ExportPortOutput.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,59 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * Passon + * Author: Fiona Malikoff + * Description: Outputs the Activity details on the main page in export portfolio. Recursive tag. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="actport" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.learning.export.ActivityPortfolio" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +
  • + + + " target="_blank"/> + + + + + + + + +
      + + + +
    +
    +
    + +
  • + Index: lams_tool_videorecorder/web/WEB-INF/tags/FCKEditor.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/FCKEditor.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/FCKEditor.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,57 @@ +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="fck-editor" prefix="fck"%> + +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="true" rtexprvalue="true"%> +<%@ attribute name="toolbarSet" required="false" rtexprvalue="true"%> +<%@ attribute name="contentFolderID" required="false" rtexprvalue="true"%> + + + + + + + + + +/fckeditor/ + + + + + ${value} + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/Head.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/Head.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/Head.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,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 version 2.0 + * 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 + * **************************************************************** + */ + +/** + * Head.tag + * Author: Fiona Malikoff + * Description: Sets up the non-cache pragma statements and the UTF-8 + * encoding. Use in place of the normal head tag. + */ +%> + +<%@ tag body-content="scriptless"%> + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,37 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * ImgButtonWrapper.tag + * Author: Mitchell Seaton + * Description: Simple wrapper that will display buttons correctly when RTL page rendering is used. + */ + + %> +<%@ tag body-content="scriptless" %> +
    +
    + +
    +
    Index: lams_tool_videorecorder/web/WEB-INF/tags/LearnerFlashEnabled.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,45 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * Learner Flash Enabled + * Author: Fiona Malikoff + * Description: Is Flash enabled for learner? + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + true + false + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/Passon.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/Passon.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/Passon.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,86 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * Passon + * Author: Mitchell Seaton + * Description: Passes on progress data to the Flash Learner to update the progress bar. + * + */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="progress" required="true" rtexprvalue="true" type="java.lang.String" %> +<%@ attribute name="version" required="false" rtexprvalue="true" %> +<%@ attribute name="id" required="true" rtexprvalue="true" %> +<%@ attribute name="redirect" required="false" rtexprvalue="true" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/ProgressOutput.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/ProgressOutput.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/ProgressOutput.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,79 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * Progress Output + * Author: Fiona Malikoff + * Description: Outputs the Activity details on the jsp progress page. Recursive tag + * + */ + + /** Need to add current ! */ + + %> +<%@ tag body-content="empty" %> +<%@ attribute name="activity" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.learning.web.bean.ActivityURL" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +
  • + + + + + + + + + + + + + + + + + + + + + + + + ${activity.title} + + + + + +
      + + + +
    +
    +
    + +
  • + Index: lams_tool_videorecorder/web/WEB-INF/tags/Tab.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/Tab.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/Tab.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,85 @@ +<% + /**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * Tab.tag + * Author: Mitchell Seaton + * Description: Creates a tab element. + * Wiki: + */ +%> +<%@ tag body-content="empty"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="false" rtexprvalue="true"%> +<%@ attribute name="key" required="false" rtexprvalue="true"%> +<%@ attribute name="inactive" required="false" rtexprvalue="true"%> +<%@ attribute name="methodCall" required="false" rtexprvalue="true"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%-- Check if bundle is set --%> + + + + + + + + + + +<%-- + Usually methodCall is selectTab, but the calling code can override methodCall if desired. + this is handy if the page needs different logic on initialisation and user switching tabs +--%> + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/TabBody.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/TabBody.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,52 @@ +<%/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + +/** + * TabBody.tag + * Author: Mitchell Seaton + * Description: Creates the body container for a tab element + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="tabTitle" required="false" rtexprvalue="true"%> +<%@ attribute name="titleKey" required="false" rtexprvalue="true"%> +<%@ attribute name="page" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-bean" prefix="bean"%> + + +
    + + + + + + + + + +
    + Index: lams_tool_videorecorder/web/WEB-INF/tags/TabName.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/TabName.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/TabName.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,60 @@ +<%/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + +/** + * TabName Tag + * Author: Mitchell Seaton + * Description: Shortens name that are too long to fit inside a tab + */ + + %> +<%@ tag body-content="scriptless" %> + +<%@ attribute name="url" required="true" rtexprvalue="true"%> +<%@ attribute name="highlight" required="false" rtexprvalue="true" %> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-function" prefix="fn"%> + +12 + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/Tabs.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/Tabs.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/Tabs.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,69 @@ +<%/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + +/** + * Tabs.tag + * Author: Mitchell Seaton + * Description: Create a tab list from a input collection or nested Tab tags. + * Wiki: + */ + + %> +<%@ tag body-content="scriptless"%> +<%@ attribute name="collection" type="java.util.Collection" required="false" rtexprvalue="true"%> +<%@ attribute name="control" required="false" rtexprvalue="true"%> +<%@ attribute name="useKey" required="false" rtexprvalue="true"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/TextSearch.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/TextSearch.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/TextSearch.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,136 @@ +<% +/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + + /** + * TextSearch.tag + * Author: Marcin Cieslak + * Description: Displays form for creating text search conditions. + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +<%-- Required attributes --%> +<%@ attribute name="sessionMapID" required="true" rtexprvalue="true" %> +<%@ attribute name="wrapInFormTag" required="true" rtexprvalue="true" %> + +<%-- Optional attributes --%> +<%@ attribute name="action" required="false" rtexprvalue="true" %> +<%@ attribute name="formID" required="false" rtexprvalue="true" %> +<%@ attribute name="headingLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="allWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="phraseLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="anyWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="excludedWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelAction" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/tags/headItems.tag =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/tags/headItems.tag (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/tags/headItems.tag (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,52 @@ +<%/**************************************************************** + * 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 version 2.0 + * 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 + * **************************************************************** + */ + +/** + * Standard Head Items + * Author: Fiona Malikoff + * Description: Includes all the standard head items e.g. the + * lams css files, sets the content type, standard javascript files. + */ + + %> +<%@ tag body-content="empty"%> + +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/WEB-INF/web.xml =================================================================== diff -u --- lams_tool_videorecorder/web/WEB-INF/web.xml (revision 0) +++ lams_tool_videorecorder/web/WEB-INF/web.xml (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,339 @@ + + + + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.videoRecorder.ApplicationResources + + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/tool/videoRecorder/videoRecorderApplicationContext.xml + classpath:/org/lamsfoundation/lams/tool/videoRecorder/dbupdates/autopatchContext.xml + + + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + videoRecorderSessionFactory + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + + + SystemSessionFilter + /* + + + hibernateFilter + /* + + + LocaleFilter + /* + + + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + + + 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 + + + + + Attachment Download + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + videoRecorderToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.videoRecorder.web.servlets.ExportServlet + + + + action + *.do + + + + + Connector + /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + + + + 120 + + + + + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + + + + + + + + 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 + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + 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 + MONITOR + + + + 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 + + + Can create/modify a learning design and edit default tool content + AUTHOR ADMIN + + + Index: lams_tool_videorecorder/web/common/empty.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/empty.jsp (revision 0) +++ lams_tool_videorecorder/web/common/empty.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_videorecorder/web/common/footer.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/footer.jsp (revision 0) +++ lams_tool_videorecorder/web/common/footer.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1 @@ +

    Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org

    Index: lams_tool_videorecorder/web/common/header.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/header.jsp (revision 0) +++ lams_tool_videorecorder/web/common/header.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,17 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + Index: lams_tool_videorecorder/web/common/learnerheader.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/learnerheader.jsp (revision 0) +++ lams_tool_videorecorder/web/common/learnerheader.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,22 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + + + + + + Index: lams_tool_videorecorder/web/common/message.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/message.jsp (revision 0) +++ lams_tool_videorecorder/web/common/message.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,5 @@ +<%@ include file="/common/taglibs.jsp"%> + +

    + ${requestScope.message}; +

    Index: lams_tool_videorecorder/web/common/messages.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/messages.jsp (revision 0) +++ lams_tool_videorecorder/web/common/messages.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,20 @@ +<%-- Error Messages --%> + +
    + +    +   
    +
    +
    +
    + +<%-- Success Messages --%> + +
    + +    +   
    +
    +
    +
    Index: lams_tool_videorecorder/web/common/taglibs.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/common/taglibs.jsp (revision 0) +++ lams_tool_videorecorder/web/common/taglibs.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,11 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> + +<%@ taglib uri="tags-bean" prefix="bean"%> +<%@ taglib uri="tags-logic" prefix="logic"%> +<%@ taglib uri="tags-tiles" prefix="tiles"%> +<%@ taglib uri="tags-html" prefix="html"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="fck-editor" prefix="fck"%> + Index: lams_tool_videorecorder/web/error.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/error.jsp (revision 0) +++ lams_tool_videorecorder/web/error.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,91 @@ +<%-- +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 version 2 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 +--%> + + + +<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + +<%-- Catch JSP Servlet Exception --%> +<% +if (exception != null) { +%> + + <%=exception.getMessage()%> + + + <%=exception.getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + exception.printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { +%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() + .getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} +%> + +
    + + + +
    + + + +
    Index: lams_tool_videorecorder/web/images/cross.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/down.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/down_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/edit.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/icon_videoRecorder.swf =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/success.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/up.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/images/up_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/includes/flash/AC_OETags.js =================================================================== diff -u --- lams_tool_videorecorder/web/includes/flash/AC_OETags.js (revision 0) +++ lams_tool_videorecorder/web/includes/flash/AC_OETags.js (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,278 @@ +// Flash Player Version Detection - Rev 1.6 +// Detect Client Browser type +// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. +var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; +var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; +var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; + +function ControlVersion() +{ + var version; + var axo; + var e; + + // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry + + try { + // version will be set for 7.X or greater players + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); + version = axo.GetVariable("$version"); + } catch (e) { + } + + if (!version) + { + try { + // version will be set for 6.X players only + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); + + // installed player is some revision of 6.0 + // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, + // so we have to be careful. + + // default to the first public version + version = "WIN 6,0,21,0"; + + // throws if AllowScripAccess does not exist (introduced in 6.0r47) + axo.AllowScriptAccess = "always"; + + // safe to call for 6.0r47 or greater + version = axo.GetVariable("$version"); + + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 4.X or 5.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); + version = axo.GetVariable("$version"); + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 3.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); + version = "WIN 3,0,18,0"; + } catch (e) { + } + } + + if (!version) + { + try { + // version will be set for 2.X player + axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); + version = "WIN 2,0,0,11"; + } catch (e) { + version = -1; + } + } + + return version; +} + +// JavaScript helper required to detect Flash Player PlugIn version information +function GetSwfVer(){ + // NS/Opera version >= 3 check for Flash plugin in plugin array + var flashVer = -1; + + if (navigator.plugins != null && navigator.plugins.length > 0) { + if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { + var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; + var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; + var descArray = flashDescription.split(" "); + var tempArrayMajor = descArray[2].split("."); + var versionMajor = tempArrayMajor[0]; + var versionMinor = tempArrayMajor[1]; + var versionRevision = descArray[3]; + if (versionRevision == "") { + versionRevision = descArray[4]; + } + if (versionRevision[0] == "d") { + versionRevision = versionRevision.substring(1); + } else if (versionRevision[0] == "r") { + versionRevision = versionRevision.substring(1); + if (versionRevision.indexOf("d") > 0) { + versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); + } + } else if (versionRevision[0] == "b") { + versionRevision = versionRevision.substring(1); + } + var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; + } + } + // MSN/WebTV 2.6 supports Flash 4 + else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; + // WebTV 2.5 supports Flash 3 + else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; + // older WebTV supports Flash 2 + else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; + else if ( isIE && isWin && !isOpera ) { + flashVer = ControlVersion(); + } + return flashVer; +} + +// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available +function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) +{ + versionStr = GetSwfVer(); + if (versionStr == -1 ) { + return false; + } else if (versionStr != 0) { + if(isIE && isWin && !isOpera) { + // Given "WIN 2,0,0,11" + tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] + tempString = tempArray[1]; // "2,0,0,11" + versionArray = tempString.split(","); // ['2', '0', '0', '11'] + } else { + versionArray = versionStr.split("."); + } + var versionMajor = versionArray[0]; + var versionMinor = versionArray[1]; + var versionRevision = versionArray[2]; + + // is the major.revision >= requested major.revision AND the minor version >= requested minor + if (versionMajor > parseFloat(reqMajorVer)) { + return true; + } else if (versionMajor == parseFloat(reqMajorVer)) { + if (versionMinor > parseFloat(reqMinorVer)) + return true; + else if (versionMinor == parseFloat(reqMinorVer)) { + if (versionRevision >= parseFloat(reqRevision)) + return true; + } + } + return false; + } +} + +function AC_AddExtension(src, ext) +{ + if (src.indexOf('?') != -1) + return src.replace(/\?/, ext+'?'); + else + return src + ext; +} + +function AC_Generateobj(objAttrs, params, embedAttrs) +{ + var str = ''; + if (isIE && isWin && !isOpera) + { + str += ' '; + str += ''; + } else { + str += ' + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_videorecorder/web/includes/flash/VideoRecorder.swf =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/includes/flash/history/history.css =================================================================== diff -u --- lams_tool_videorecorder/web/includes/flash/history/history.css (revision 0) +++ lams_tool_videorecorder/web/includes/flash/history/history.css (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,6 @@ +/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */ + +#ie_historyFrame { width: 0px; height: 0px; display:none } +#firefox_anchorDiv { width: 0px; height: 0px; display:none } +#safari_formDiv { width: 0px; height: 0px; display:none } +#safari_rememberDiv { width: 0px; height: 0px; display:none } Index: lams_tool_videorecorder/web/includes/flash/history/history.js =================================================================== diff -u --- lams_tool_videorecorder/web/includes/flash/history/history.js (revision 0) +++ lams_tool_videorecorder/web/includes/flash/history/history.js (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,662 @@ +BrowserHistoryUtils = { + addEvent: function(elm, evType, fn, useCapture) { + useCapture = useCapture || false; + if (elm.addEventListener) { + elm.addEventListener(evType, fn, useCapture); + return true; + } + else if (elm.attachEvent) { + var r = elm.attachEvent('on' + evType, fn); + return r; + } + else { + elm['on' + evType] = fn; + } + } +} + +BrowserHistory = (function() { + // type of browser + var browser = { + ie: false, + firefox: false, + safari: false, + opera: false, + version: -1 + }; + + // if setDefaultURL has been called, our first clue + // that the SWF is ready and listening + //var swfReady = false; + + // the URL we'll send to the SWF once it is ready + //var pendingURL = ''; + + // Default app state URL to use when no fragment ID present + var defaultHash = ''; + + // Last-known app state URL + var currentHref = document.location.href; + + // Initial URL (used only by IE) + var initialHref = document.location.href; + + // Initial URL (used only by IE) + var initialHash = document.location.hash; + + // History frame source URL prefix (used only by IE) + var historyFrameSourcePrefix = 'history/historyFrame.html?'; + + // History maintenance (used only by Safari) + var currentHistoryLength = -1; + + var historyHash = []; + + var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash); + + var backStack = []; + var forwardStack = []; + + var currentObjectId = null; + + //UserAgent detection + var useragent = navigator.userAgent.toLowerCase(); + + if (useragent.indexOf("opera") != -1) { + browser.opera = true; + } else if (useragent.indexOf("msie") != -1) { + browser.ie = true; + browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4)); + } else if (useragent.indexOf("safari") != -1) { + browser.safari = true; + browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7)); + } else if (useragent.indexOf("gecko") != -1) { + browser.firefox = true; + } + + if (browser.ie == true && browser.version == 7) { + window["_ie_firstload"] = false; + } + + // Accessor functions for obtaining specific elements of the page. + function getHistoryFrame() + { + return document.getElementById('ie_historyFrame'); + } + + function getAnchorElement() + { + return document.getElementById('firefox_anchorDiv'); + } + + function getFormElement() + { + return document.getElementById('safari_formDiv'); + } + + function getRememberElement() + { + return document.getElementById("safari_remember_field"); + } + + // Get the Flash player object for performing ExternalInterface callbacks. + // Updated for changes to SWFObject2. + function getPlayer(id) { + if (id && document.getElementById(id)) { + var r = document.getElementById(id); + if (typeof r.SetVariable != "undefined") { + return r; + } + else { + var o = r.getElementsByTagName("object"); + var e = r.getElementsByTagName("embed"); + if (o.length > 0 && typeof o[0].SetVariable != "undefined") { + return o[0]; + } + else if (e.length > 0 && typeof e[0].SetVariable != "undefined") { + return e[0]; + } + } + } + else { + var o = document.getElementsByTagName("object"); + var e = document.getElementsByTagName("embed"); + if (e.length > 0 && typeof e[0].SetVariable != "undefined") { + return e[0]; + } + else if (o.length > 0 && typeof o[0].SetVariable != "undefined") { + return o[0]; + } + else if (o.length > 1 && typeof o[1].SetVariable != "undefined") { + return o[1]; + } + } + return undefined; + } + + function getPlayers() { + var players = []; + if (players.length == 0) { + var tmp = document.getElementsByTagName('object'); + players = tmp; + } + + if (players.length == 0 || players[0].object == null) { + var tmp = document.getElementsByTagName('embed'); + players = tmp; + } + return players; + } + + function getIframeHash() { + var doc = getHistoryFrame().contentWindow.document; + var hash = String(doc.location.search); + if (hash.length == 1 && hash.charAt(0) == "?") { + hash = ""; + } + else if (hash.length >= 2 && hash.charAt(0) == "?") { + hash = hash.substring(1); + } + return hash; + } + + /* Get the current location hash excluding the '#' symbol. */ + function getHash() { + // It would be nice if we could use document.location.hash here, + // but it's faulty sometimes. + var idx = document.location.href.indexOf('#'); + return (idx >= 0) ? document.location.href.substr(idx+1) : ''; + } + + /* Get the current location hash excluding the '#' symbol. */ + function setHash(hash) { + // It would be nice if we could use document.location.hash here, + // but it's faulty sometimes. + if (hash == '') hash = '#' + document.location.hash = hash; + } + + function createState(baseUrl, newUrl, flexAppUrl) { + return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null }; + } + + /* Add a history entry to the browser. + * baseUrl: the portion of the location prior to the '#' + * newUrl: the entire new URL, including '#' and following fragment + * flexAppUrl: the portion of the location following the '#' only + */ + function addHistoryEntry(baseUrl, newUrl, flexAppUrl) { + + //delete all the history entries + forwardStack = []; + + if (browser.ie) { + //Check to see if we are being asked to do a navigate for the first + //history entry, and if so ignore, because it's coming from the creation + //of the history iframe + if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) { + currentHref = initialHref; + return; + } + if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) { + newUrl = baseUrl + '#' + defaultHash; + flexAppUrl = defaultHash; + } else { + // for IE, tell the history frame to go somewhere without a '#' + // in order to get this entry into the browser history. + getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl; + } + setHash(flexAppUrl); + } else { + + //ADR + if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) { + initialState = createState(baseUrl, newUrl, flexAppUrl); + } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) { + backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl); + } + + if (browser.safari) { + // for Safari, submit a form whose action points to the desired URL + if (browser.version <= 419.3) { + var file = window.location.pathname.toString(); + file = file.substring(file.lastIndexOf("/")+1); + getFormElement().innerHTML = '
    '; + //get the current elements and add them to the form + var qs = window.location.search.substring(1); + var qs_arr = qs.split("&"); + for (var i = 0; i < qs_arr.length; i++) { + var tmp = qs_arr[i].split("="); + var elem = document.createElement("input"); + elem.type = "hidden"; + elem.name = tmp[0]; + elem.value = tmp[1]; + document.forms.historyForm.appendChild(elem); + } + document.forms.historyForm.submit(); + } else { + top.location.hash = flexAppUrl; + } + // We also have to maintain the history by hand for Safari + historyHash[history.length] = flexAppUrl; + _storeStates(); + } else { + // Otherwise, write an anchor into the page and tell the browser to go there + addAnchor(flexAppUrl); + setHash(flexAppUrl); + } + } + backStack.push(createState(baseUrl, newUrl, flexAppUrl)); + } + + function _storeStates() { + if (browser.safari) { + getRememberElement().value = historyHash.join(","); + } + } + + function handleBackButton() { + //The "current" page is always at the top of the history stack. + var current = backStack.pop(); + if (!current) { return; } + var last = backStack[backStack.length - 1]; + if (!last && backStack.length == 0){ + last = initialState; + } + forwardStack.push(current); + } + + function handleForwardButton() { + //summary: private method. Do not call this directly. + + var last = forwardStack.pop(); + if (!last) { return; } + backStack.push(last); + } + + function handleArbitraryUrl() { + //delete all the history entries + forwardStack = []; + } + + /* Called periodically to poll to see if we need to detect navigation that has occurred */ + function checkForUrlChange() { + + if (browser.ie) { + if (currentHref != document.location.href && currentHref + '#' != document.location.href) { + //This occurs when the user has navigated to a specific URL + //within the app, and didn't use browser back/forward + //IE seems to have a bug where it stops updating the URL it + //shows the end-user at this point, but programatically it + //appears to be correct. Do a full app reload to get around + //this issue. + if (browser.version < 7) { + currentHref = document.location.href; + document.location.reload(); + } else { + if (getHash() != getIframeHash()) { + // this.iframe.src = this.blankURL + hash; + var sourceToSet = historyFrameSourcePrefix + getHash(); + getHistoryFrame().src = sourceToSet; + } + } + } + } + + if (browser.safari) { + // For Safari, we have to check to see if history.length changed. + if (currentHistoryLength >= 0 && history.length != currentHistoryLength) { + //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|")); + // If it did change, then we have to look the old state up + // in our hand-maintained array since document.location.hash + // won't have changed, then call back into BrowserManager. + currentHistoryLength = history.length; + var flexAppUrl = historyHash[currentHistoryLength]; + if (flexAppUrl == '') { + //flexAppUrl = defaultHash; + } + //ADR: to fix multiple + if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { + var pl = getPlayers(); + for (var i = 0; i < pl.length; i++) { + pl[i].browserURLChange(flexAppUrl); + } + } else { + getPlayer().browserURLChange(flexAppUrl); + } + _storeStates(); + } + } + if (browser.firefox) { + if (currentHref != document.location.href) { + var bsl = backStack.length; + + var urlActions = { + back: false, + forward: false, + set: false + } + + if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) { + urlActions.back = true; + // FIXME: could this ever be a forward button? + // we can't clear it because we still need to check for forwards. Ugg. + // clearInterval(this.locationTimer); + handleBackButton(); + } + + // first check to see if we could have gone forward. We always halt on + // a no-hash item. + if (forwardStack.length > 0) { + if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) { + urlActions.forward = true; + handleForwardButton(); + } + } + + // ok, that didn't work, try someplace back in the history stack + if ((bsl >= 2) && (backStack[bsl - 2])) { + if (backStack[bsl - 2].flexAppUrl == getHash()) { + urlActions.back = true; + handleBackButton(); + } + } + + if (!urlActions.back && !urlActions.forward) { + var foundInStacks = { + back: -1, + forward: -1 + } + + for (var i = 0; i < backStack.length; i++) { + if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { + arbitraryUrl = true; + foundInStacks.back = i; + } + } + for (var i = 0; i < forwardStack.length; i++) { + if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) { + arbitraryUrl = true; + foundInStacks.forward = i; + } + } + handleArbitraryUrl(); + } + + // Firefox changed; do a callback into BrowserManager to tell it. + currentHref = document.location.href; + var flexAppUrl = getHash(); + if (flexAppUrl == '') { + //flexAppUrl = defaultHash; + } + //ADR: to fix multiple + if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { + var pl = getPlayers(); + for (var i = 0; i < pl.length; i++) { + pl[i].browserURLChange(flexAppUrl); + } + } else { + getPlayer().browserURLChange(flexAppUrl); + } + } + } + //setTimeout(checkForUrlChange, 50); + } + + /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */ + function addAnchor(flexAppUrl) + { + if (document.getElementsByName(flexAppUrl).length == 0) { + getAnchorElement().innerHTML += "" + flexAppUrl + ""; + } + } + + var _initialize = function () { + if (browser.ie) + { + var scripts = document.getElementsByTagName('script'); + for (var i = 0, s; s = scripts[i]; i++) { + if (s.src.indexOf("history.js") > -1) { + var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html"); + } + } + historyFrameSourcePrefix = iframe_location + "?"; + var src = historyFrameSourcePrefix; + + var iframe = document.createElement("iframe"); + iframe.id = 'ie_historyFrame'; + iframe.name = 'ie_historyFrame'; + //iframe.src = historyFrameSourcePrefix; + try { + document.body.appendChild(iframe); + } catch(e) { + setTimeout(function() { + document.body.appendChild(iframe); + }, 0); + } + } + + if (browser.safari) + { + var rememberDiv = document.createElement("div"); + rememberDiv.id = 'safari_rememberDiv'; + document.body.appendChild(rememberDiv); + rememberDiv.innerHTML = ''; + + var formDiv = document.createElement("div"); + formDiv.id = 'safari_formDiv'; + document.body.appendChild(formDiv); + + var reloader_content = document.createElement('div'); + reloader_content.id = 'safarireloader'; + var scripts = document.getElementsByTagName('script'); + for (var i = 0, s; s = scripts[i]; i++) { + if (s.src.indexOf("history.js") > -1) { + html = (new String(s.src)).replace(".js", ".html"); + } + } + reloader_content.innerHTML = ''; + document.body.appendChild(reloader_content); + reloader_content.style.position = 'absolute'; + reloader_content.style.left = reloader_content.style.top = '-9999px'; + iframe = reloader_content.getElementsByTagName('iframe')[0]; + + if (document.getElementById("safari_remember_field").value != "" ) { + historyHash = document.getElementById("safari_remember_field").value.split(","); + } + + } + + if (browser.firefox) + { + var anchorDiv = document.createElement("div"); + anchorDiv.id = 'firefox_anchorDiv'; + document.body.appendChild(anchorDiv); + } + + //setTimeout(checkForUrlChange, 50); + } + + return { + historyHash: historyHash, + backStack: function() { return backStack; }, + forwardStack: function() { return forwardStack }, + getPlayer: getPlayer, + initialize: function(src) { + _initialize(src); + }, + setURL: function(url) { + document.location.href = url; + }, + getURL: function() { + return document.location.href; + }, + getTitle: function() { + return document.title; + }, + setTitle: function(title) { + try { + backStack[backStack.length - 1].title = title; + } catch(e) { } + //if on safari, set the title to be the empty string. + if (browser.safari) { + if (title == "") { + try { + var tmp = window.location.href.toString(); + title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#")); + } catch(e) { + title = ""; + } + } + } + document.title = title; + }, + setDefaultURL: function(def) + { + defaultHash = def; + def = getHash(); + //trailing ? is important else an extra frame gets added to the history + //when navigating back to the first page. Alternatively could check + //in history frame navigation to compare # and ?. + if (browser.ie) + { + window['_ie_firstload'] = true; + var sourceToSet = historyFrameSourcePrefix + def; + var func = function() { + getHistoryFrame().src = sourceToSet; + window.location.replace("#" + def); + setInterval(checkForUrlChange, 50); + } + try { + func(); + } catch(e) { + window.setTimeout(function() { func(); }, 0); + } + } + + if (browser.safari) + { + currentHistoryLength = history.length; + if (historyHash.length == 0) { + historyHash[currentHistoryLength] = def; + var newloc = "#" + def; + window.location.replace(newloc); + } else { + //alert(historyHash[historyHash.length-1]); + } + //setHash(def); + setInterval(checkForUrlChange, 50); + } + + + if (browser.firefox || browser.opera) + { + var reg = new RegExp("#" + def + "$"); + if (window.location.toString().match(reg)) { + } else { + var newloc ="#" + def; + window.location.replace(newloc); + } + setInterval(checkForUrlChange, 50); + //setHash(def); + } + + }, + + /* Set the current browser URL; called from inside BrowserManager to propagate + * the application state out to the container. + */ + setBrowserURL: function(flexAppUrl, objectId) { + if (browser.ie && typeof objectId != "undefined") { + currentObjectId = objectId; + } + //fromIframe = fromIframe || false; + //fromFlex = fromFlex || false; + //alert("setBrowserURL: " + flexAppUrl); + //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ; + + var pos = document.location.href.indexOf('#'); + var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href; + var newUrl = baseUrl + '#' + flexAppUrl; + + if (document.location.href != newUrl && document.location.href + '#' != newUrl) { + currentHref = newUrl; + addHistoryEntry(baseUrl, newUrl, flexAppUrl); + currentHistoryLength = history.length; + } + + return false; + }, + + browserURLChange: function(flexAppUrl) { + var objectId = null; + if (browser.ie && currentObjectId != null) { + objectId = currentObjectId; + } + pendingURL = ''; + + if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) { + var pl = getPlayers(); + for (var i = 0; i < pl.length; i++) { + try { + pl[i].browserURLChange(flexAppUrl); + } catch(e) { } + } + } else { + try { + getPlayer(objectId).browserURLChange(flexAppUrl); + } catch(e) { } + } + + currentObjectId = null; + } + + } + +})(); + +// Initialization + +// Automated unit testing and other diagnostics + +function setURL(url) +{ + document.location.href = url; +} + +function backButton() +{ + history.back(); +} + +function forwardButton() +{ + history.forward(); +} + +function goForwardOrBackInHistory(step) +{ + history.go(step); +} + +//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); }); +(function(i) { + var u =navigator.userAgent;var e=/*@cc_on!@*/false; + var st = setTimeout; + if(/webkit/i.test(u)){ + st(function(){ + var dr=document.readyState; + if(dr=="loaded"||dr=="complete"){i()} + else{st(arguments.callee,10);}},10); + } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ + document.addEventListener("DOMContentLoaded",i,false); + } else if(e){ + (function(){ + var t=document.createElement('doc:rdy'); + try{t.doScroll('left'); + i();t=null; + }catch(e){st(arguments.callee,0);}})(); + } else{ + window.onload=i; + } +})( function() {BrowserHistory.initialize();} ); Index: lams_tool_videorecorder/web/includes/flash/history/historyFrame.html =================================================================== diff -u --- lams_tool_videorecorder/web/includes/flash/history/historyFrame.html (revision 0) +++ lams_tool_videorecorder/web/includes/flash/history/historyFrame.html (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,29 @@ + + + + + + + + Hidden frame for Browser History support. + + Index: lams_tool_videorecorder/web/includes/flash/playerProductInstall.swf =================================================================== diff -u Binary files differ Index: lams_tool_videorecorder/web/includes/javascript/authoring.js =================================================================== diff -u --- lams_tool_videorecorder/web/includes/javascript/authoring.js (revision 0) +++ lams_tool_videorecorder/web/includes/javascript/authoring.js (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,24 @@ + +function init() { + // open the current tab + var tag = document.getElementById("currentTab"); + if (tag.value != "") { + selectTab(tag.value); + } else { + selectTab(1); + } +} +function doSelectTab(tabId) { + var tag = document.getElementById("currentTab"); + tag.value = tabId; + selectTab(tabId); +} +function doSubmit(method) { + document.authoringForm.dispatch.value = method; + document.authoringForm.submit(); +} +function deleteAttachment(dispatch, uuid) { + document.authoringForm.dispatch.value = dispatch; + document.authoringForm.deleteFileUuid.value = uuid; + document.authoringForm.submit(); +} Index: lams_tool_videorecorder/web/includes/javascript/monitoring.js =================================================================== diff -u --- lams_tool_videorecorder/web/includes/javascript/monitoring.js (revision 0) +++ lams_tool_videorecorder/web/includes/javascript/monitoring.js (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,16 @@ + +function init() { + if (initialTabId) { + selectTab(initialTabId); + } else { + selectTab(1); + } +} +function doSelectTab(tabId) { + selectTab(tabId); +} +function doSubmit(method, tabId) { + document.monitoringForm.method.value = method; + document.monitoringForm.submit(); +} + Index: lams_tool_videorecorder/web/layouts/defaultLayout.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/layouts/defaultLayout.jsp (revision 0) +++ lams_tool_videorecorder/web/layouts/defaultLayout.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,22 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
    + + +

    + +

    +
    +
    + +
    + +
    + +
    Index: lams_tool_videorecorder/web/layouts/learningLayout.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/layouts/learningLayout.jsp (revision 0) +++ lams_tool_videorecorder/web/layouts/learningLayout.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,13 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + Index: lams_tool_videorecorder/web/layouts/tabLayout.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/layouts/tabLayout.jsp (revision 0) +++ lams_tool_videorecorder/web/layouts/tabLayout.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,18 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
    + + +

    + +

    + +
    + +
    Index: lams_tool_videorecorder/web/pages/authoring/addCondition.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/addCondition.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/addCondition.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,45 @@ + +<%@ include file="/common/taglibs.jsp"%> + + + + <%@ include file="/common/taglibs.jsp"%> + + + + + + <fmt:message key="activity.title" /> + + + + + + + + <%@ include file="/common/messages.jsp"%> + + +

    + +

    + +
    + +
    +
    + +
    + <%-- Text search form fields are being included --%> + +
    + + + + + + +
    Index: lams_tool_videorecorder/web/pages/authoring/advanced.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/advanced.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/advanced.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,43 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    Index: lams_tool_videorecorder/web/pages/authoring/authoring.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/authoring.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/authoring.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,76 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page + import="org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants"%> + + + + + + + + + + + + + + +
    + + + + +
    + + + + +

    + +
    +
    +

    +
    +
    + + + + <%-- Page tabs --%> + + + + + + + + +
    +
    + + + Index: lams_tool_videorecorder/web/pages/authoring/basic.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/basic.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/basic.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,28 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    + +
    + +
    Index: lams_tool_videorecorder/web/pages/authoring/conditionList.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/conditionList.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/conditionList.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,91 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + +
    +

    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + +
    + ${status.index + 1} + + ${condition.displayName} + + + " + onclick="upCondition(${status.index},'${sessionMapID}')"> + + "> + + + + + + "> + + + " + onclick="downCondition(${status.index},'${sessionMapID}')"> + + + " + onclick="editCondition(${status.index},'${sessionMapID}')" /> + + " + onclick="deleteCondition(${status.index},'${sessionMapID}')" /> +
    +
    + +<%-- This script will works when a new resoruce Condition submit in order to refresh "TaskList List" panel. --%> + Index: lams_tool_videorecorder/web/pages/authoring/conditions.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/conditions.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/conditions.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,110 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + +
    + + <%@ include file="/pages/authoring/conditionList.jsp"%> +
    + +

    + ');" class="button-add-item"> + +

    + + +

    + +

    Index: lams_tool_videorecorder/web/pages/authoring/headItems.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/headItems.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/headItems.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,10 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + Index: lams_tool_videorecorder/web/pages/authoring/instructions.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/authoring/instructions.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/authoring/instructions.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,207 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + <%-- Online Instructions --%> + + + + + <%-- Online Attachments --%> + + + + + + + <%-- Online Attachments Upload --%> + + + + + + + + + <%-- Offline Instructions --%> + + + + + + + <%-- Offline Attachments --%> + + + + + + + <%--Offline Attachments Upload --%> + + + + +
    +
    + +
    + +
    +
    +
      + + <%-- Online Saved Files --%> + +
    • + + + + + +   + + + + + +   + + + + +
    • +
      + + <%-- Online Unsaved Files --%> + +
    • + + * + + + + +   + + + + + +   + + + + +
    • +
      + +
    +
    +
    +
    + +
    + + + + + + + +
    +
    +
    +
    + +
    + +
    +
    +
      + + <%-- Offline Saved Attachments --%> + +
    • + + + + + +   + + + + + +   + + + + +
    • +
      + + <%-- Offline Unsaved Attachments --%> + +
    • + + * + + + + +   + + + + + +   + + + + +
    • +
      + +
    +
    +
    +
    + +
    + + + + + + + +
    Index: lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/export/exportPortfolio.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,92 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + <c:out value="${videoRecorderDTO.title}" escapeXml="false" /> + + + + + + +
    + +

    + +

    + +

    + +

    + + +
    + +
    +
    + + +
    +

    + ${session.sessionName} +

    +

    +   +

    + + + + + + + + + + + + + + + + + + + + +
    + ${user.firstName} ${user.lastName } +
    + + + +
    + + + +
    + + + +
    +
    +
    +
    +
    + + + + + + + + Index: lams_tool_videorecorder/web/pages/learning/defineLater.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/learning/defineLater.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/learning/defineLater.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,11 @@ +<%@ include file="/common/taglibs.jsp"%> + +
    +

    + +

    + +
    + + + Index: lams_tool_videorecorder/web/pages/learning/headItems.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/learning/headItems.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/learning/headItems.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_videorecorder/web/pages/learning/runOffline.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/learning/runOffline.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/learning/runOffline.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,31 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +
    +

    + ${videoRecorderDTO.title} +

    + +

    + +

    + + + + + + +
    + + button.finish + +
    +
    +
    +
    + Index: lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/learning/videoRecorder.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,160 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +
    +

    + ${videoRecorderDTO.title} +

    + +

    + ${videoRecorderDTO.instructions} +

    + + +
    + + + + + + + + +
    +
    + +   + + + + + + + +
    + + +
    +
    Index: lams_tool_videorecorder/web/pages/monitoring/editActivity.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/editActivity.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/editActivity.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,43 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +

    + +

    +
    + + + + + + + + + + + + +
    + + + +
    + + + +
    + +

    + + + + + + + + +

    + + Index: lams_tool_videorecorder/web/pages/monitoring/headItems.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/headItems.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/headItems.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,9 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + Index: lams_tool_videorecorder/web/pages/monitoring/instructions.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/instructions.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/instructions.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,95 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    Index: lams_tool_videorecorder/web/pages/monitoring/monitoring.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/monitoring.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/monitoring.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,25 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.videoRecorder.util.VideoRecorderConstants"%> + + + +
    + + + + + + +
    + + Index: lams_tool_videorecorder/web/pages/monitoring/statistics.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/statistics.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/statistics.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,34 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + +
    +

    + ${session.sessionName} +

    +
    + + + + + + + + + + +
    + heading.totalLearnersInGroup + + ${session.numberOfLearners} +
    + heading.totalFinishedLearnersInGroup + + ${session.numberOfFinishedLearners} +
    +
    Index: lams_tool_videorecorder/web/pages/monitoring/summary.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/summary.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/summary.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,174 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + +

    + + + + + +

    +
    + + + + + + + + + +
    +

    + ${session.sessionName} +

    +
    + + + + + + +
    + + + ${session.numberOfLearners} +
    + + + + + + + + + + + + + + + +
    + + + +
    + ${user.firstName} ${user.lastName} + + + + + + + + + + + + +
    +
    Index: lams_tool_videorecorder/web/pages/monitoring/videoRecorderDisplay.jsp =================================================================== diff -u --- lams_tool_videorecorder/web/pages/monitoring/videoRecorderDisplay.jsp (revision 0) +++ lams_tool_videorecorder/web/pages/monitoring/videoRecorderDisplay.jsp (revision 3d081de4a45da632ee6029251318fac795d41813) @@ -0,0 +1,37 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +
    +

    + ${userDTO.firstName} ${userDTO.lastName } +

    +
    + + + + +
    + + + +
    + + + +