Index: lams_tool_wiki_orig/.classpath =================================================================== diff -u --- lams_tool_wiki_orig/.classpath (revision 0) +++ lams_tool_wiki_orig/.classpath (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/.cvsignore =================================================================== diff -u --- lams_tool_wiki_orig/.cvsignore (revision 0) +++ lams_tool_wiki_orig/.cvsignore (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,2 @@ +build +classes Index: lams_tool_wiki_orig/.mymetadata =================================================================== diff -u --- lams_tool_wiki_orig/.mymetadata (revision 0) +++ lams_tool_wiki_orig/.mymetadata (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,13 @@ + + + + + + + Index: lams_tool_wiki_orig/.mystrutsdata =================================================================== diff -u --- lams_tool_wiki_orig/.mystrutsdata (revision 0) +++ lams_tool_wiki_orig/.mystrutsdata (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,9 @@ + + + 2 + org.lamsfoundation.lams.tool.noticeboard + 0 + action + false + false + Index: lams_tool_wiki_orig/.project =================================================================== diff -u --- lams_tool_wiki_orig/.project (revision 0) +++ lams_tool_wiki_orig/.project (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,11 @@ + + + lams_tool_wiki + + + + + + + + Index: lams_tool_wiki_orig/build.properties =================================================================== diff -u --- lams_tool_wiki_orig/build.properties (revision 0) +++ lams_tool_wiki_orig/build.properties (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,23 @@ + +# project-wide properties +signature=lawiki10 + +package=org/lams/lams/tool/wiki +package.name=org.lams.lams.tool.wiki + +## Test toolContentID +test.contentid=355 + +# project version +tool.version=20080301 + +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.0 + +# Language files package +language.files.package=org.lams.lams.tool.wiki + + Index: lams_tool_wiki_orig/build.xml =================================================================== diff -u --- lams_tool_wiki_orig/build.xml (revision 0) +++ lams_tool_wiki_orig/build.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,565 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploying the Wiki Tool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiAttachment.hbm.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiAttachment.hbm.xml (revision 0) +++ lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiAttachment.hbm.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiContent.hbm.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiContent.hbm.xml (revision 0) +++ lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiContent.hbm.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiSession.hbm.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiSession.hbm.xml (revision 0) +++ lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiSession.hbm.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiUser.hbm.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiUser.hbm.xml (revision 0) +++ lams_tool_wiki_orig/conf/hibernate/mappings/org/lams/lams/tool/wiki/WikiUser.hbm.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/conf/jar/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_wiki_orig/conf/jar/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_wiki_orig/conf/jar/META-INF/MANIFEST.MF (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,4 @@ +Implementation-Title: LAMS - Wiki Tool +Implementation-Version: 2.0 RC1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: ./lams.jar ./lams_learning.jar Index: lams_tool_wiki_orig/conf/language/lams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_wiki_orig/conf/language/lams/ApplicationResources.properties (revision 0) +++ lams_tool_wiki_orig/conf/language/lams/ApplicationResources.properties (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,66 @@ +appName = noticeboard +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Fri Mar 07 07:16:25 GMT 2008 + +#=================== labels for Noticeboard =================# + +activity.title =Wiki +activity.description =Tool for displaying HTML content including external sources such as images and other media. +activity.helptext =Displays formatted text and links to external sources on a read only page. +tool.display.name =Noticeboard Tool +tool.description =Tool that displays a noticeboard +label.authoring.heading.basic =Basic +label.authoring.heading.advanced =Advanced +label.authoring.heading.instructions =Instructions +button.upload =Upload +basic.title =Title: +basic.content =Content: +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.defineLaterSet =Please wait for the teacher to complete the contents of this activity. +heading.totalLearners =Total Number of Learners: +heading.totalLearnersInGroup =Number of Learners in Group: +button.edit =Edit +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +heading.group =Group {0}: +message.contentInUseSet =The modification of content is not allowed since one or more students has attempted the activity. +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.next =Next +error.mandatoryField ={0} field is mandatory. +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Noticeboard 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. +button.try.again =Try again +authoring.msg.cancel.save =Do you want to close this window without saving? +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +button.continue =Continue +message.no.reflection =No reflection has yet been made. +titleHeading.reflections =Reflections +titleHeading.reflection =Reflection +message.no.reflections =No reflections have yet been made. +advanced.reflectOnActivity =Add Notebook at end of Noticeboard with the following instructions: +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes. +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +button.finish =Next Activity + + +#======= End labels: Exported 55 labels for en AU ===== Index: lams_tool_wiki_orig/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_wiki_orig/conf/language/lams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_wiki_orig/conf/language/lams/ApplicationResources_en_AU.properties (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,66 @@ +appName = noticeboard +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Fri Mar 07 07:16:25 GMT 2008 + +#=================== labels for Noticeboard =================# + +activity.title =Wiki +activity.description =Tool for displaying HTML content including external sources such as images and other media. +activity.helptext =Displays formatted text and links to external sources on a read only page. +tool.display.name =Noticeboard Tool +tool.description =Tool that displays a noticeboard +label.authoring.heading.basic =Basic +label.authoring.heading.advanced =Advanced +label.authoring.heading.instructions =Instructions +button.upload =Upload +basic.title =Title: +basic.content =Content: +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.defineLaterSet =Please wait for the teacher to complete the contents of this activity. +heading.totalLearners =Total Number of Learners: +heading.totalLearnersInGroup =Number of Learners in Group: +button.edit =Edit +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +heading.group =Group {0}: +message.contentInUseSet =The modification of content is not allowed since one or more students has attempted the activity. +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.next =Next +error.mandatoryField ={0} field is mandatory. +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Noticeboard 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. +button.try.again =Try again +authoring.msg.cancel.save =Do you want to close this window without saving? +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +button.continue =Continue +message.no.reflection =No reflection has yet been made. +titleHeading.reflections =Reflections +titleHeading.reflection =Reflection +message.no.reflections =No reflections have yet been made. +advanced.reflectOnActivity =Add Notebook at end of Noticeboard with the following instructions: +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes. +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +button.finish =Next Activity + + +#======= End labels: Exported 55 labels for en AU ===== Index: lams_tool_wiki_orig/conf/language/rams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_wiki_orig/conf/language/rams/ApplicationResources.properties (revision 0) +++ lams_tool_wiki_orig/conf/language/rams/ApplicationResources.properties (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,67 @@ +appName = noticeboard +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the RAMS Community by Ernie Ghiglione on Tue Mar 25 15:30:16 EST 2008 + +#=================== labels for Noticeboard =================# + +appName =noticeboard +activity.title =Wiki +activity.description =Tool for displaying HTML content including external sources such as images and other media. +activity.helptext =Displays formatted text and links to external sources on a read only page. +tool.display.name =Noticeboard Tool +tool.description =Tool that displays a noticeboard +label.authoring.heading.basic =Basic +label.authoring.heading.advanced =Advanced +label.authoring.heading.instructions =Instructions +button.upload =Upload +basic.title =Title: +basic.content =Content: +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.defineLaterSet =Please wait for the Monitor to complete the contents of this activity. +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +button.edit =Edit +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +heading.group =Group {0}: +heading.totalLearners =Total Number of Participants: +heading.totalLearnersInGroup =Number of Participants in Group: +message.contentInUseSet =The modification of content is not allowed since one or more participants has attempted the activity. +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.finish =Finish +button.next =Next +error.mandatoryField ={0} field is mandatory. +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Noticeboard 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. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try again +advanced.reflectOnActivity =Add Notebook at end of Noticeboard with the following instructions: +button.continue =Continue +titleHeading.reflections =Reflections +titleHeading.reflection =Reflection +message.no.reflections =No reflections have yet been made. +message.no.reflection =No reflection has yet been made. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes. +message.alertContentEdit =Warning: One of more participant have accessed this activity. Changing this content will result in students getting different information. + + +#======= End labels: Exported 56 labels for en AU ===== Index: lams_tool_wiki_orig/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_wiki_orig/conf/language/rams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_wiki_orig/conf/language/rams/ApplicationResources_en_AU.properties (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,67 @@ +appName = noticeboard +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the RAMS Community by Ernie Ghiglione on Tue Mar 25 15:30:16 EST 2008 + +#=================== labels for Noticeboard =================# + +appName =noticeboard +activity.title =Wiki +activity.description =Tool for displaying HTML content including external sources such as images and other media. +activity.helptext =Displays formatted text and links to external sources on a read only page. +tool.display.name =Noticeboard Tool +tool.description =Tool that displays a noticeboard +label.authoring.heading.basic =Basic +label.authoring.heading.advanced =Advanced +label.authoring.heading.instructions =Instructions +button.upload =Upload +basic.title =Title: +basic.content =Content: +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.defineLaterSet =Please wait for the Monitor to complete the contents of this activity. +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +button.edit =Edit +titleHeading.summary =Summary +titleHeading.instructions =Instructions +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +heading.group =Group {0}: +heading.totalLearners =Total Number of Participants: +heading.totalLearnersInGroup =Number of Participants in Group: +message.contentInUseSet =The modification of content is not allowed since one or more participants has attempted the activity. +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.finish =Finish +button.next =Next +error.mandatoryField ={0} field is mandatory. +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occured with the Noticeboard 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. +authoring.msg.cancel.save =Do you want to close this window without saving? +button.try.again =Try again +advanced.reflectOnActivity =Add Notebook at end of Noticeboard with the following instructions: +button.continue =Continue +titleHeading.reflections =Reflections +titleHeading.reflection =Reflection +message.no.reflections =No reflections have yet been made. +message.no.reflection =No reflection has yet been made. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes. +message.alertContentEdit =Warning: One of more participant have accessed this activity. Changing this content will result in students getting different information. + + +#======= End labels: Exported 56 labels for en AU ===== Index: lams_tool_wiki_orig/conf/middlegen/mysql.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/middlegen/mysql.xml (revision 0) +++ lams_tool_wiki_orig/conf/middlegen/mysql.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/conf/middlegen/wiki-prefs.properties =================================================================== diff -u --- lams_tool_wiki_orig/conf/middlegen/wiki-prefs.properties (revision 0) +++ lams_tool_wiki_orig/conf/middlegen/wiki-prefs.properties (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,119 @@ +# Middlegen Preferences +hibernate.tables.tl_lawiki10_attachment.base-class-name=TlLanb11Attachment +hibernate.tables.tl_lawiki10_attachment.columns.attachment_id.columnspecialty=key +hibernate.tables.tl_lawiki10_attachment.columns.attachment_id.java-name=attachmentId +hibernate.tables.tl_lawiki10_attachment.columns.attachment_id.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_attachment.columns.filename.columnspecialty=property +hibernate.tables.tl_lawiki10_attachment.columns.filename.java-name=filename +hibernate.tables.tl_lawiki10_attachment.columns.filename.java-type=java.lang.String +hibernate.tables.tl_lawiki10_attachment.columns.wiki_content_uid.columnspecialty=foreign key +hibernate.tables.tl_lawiki10_attachment.columns.wiki_content_uid.java-name=wikiContentUid +hibernate.tables.tl_lawiki10_attachment.columns.wiki_content_uid.java-type=long +hibernate.tables.tl_lawiki10_attachment.columns.online_file.columnspecialty=property +hibernate.tables.tl_lawiki10_attachment.columns.online_file.java-name=onlineFile +hibernate.tables.tl_lawiki10_attachment.columns.online_file.java-type=boolean +hibernate.tables.tl_lawiki10_attachment.columns.uuid.columnspecialty=property +hibernate.tables.tl_lawiki10_attachment.columns.uuid.java-name=uuid +hibernate.tables.tl_lawiki10_attachment.columns.uuid.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_attachment.columns.version_id.columnspecialty=property +hibernate.tables.tl_lawiki10_attachment.columns.version_id.java-name=versionId +hibernate.tables.tl_lawiki10_attachment.columns.version_id.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_attachment.keygenerator=native +hibernate.tables.tl_lawiki10_content.base-class-name=TlLanb11Content +hibernate.tables.tl_lawiki10_content.columns.content.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.content.java-name=content +hibernate.tables.tl_lawiki10_content.columns.content.java-type=java.lang.String +hibernate.tables.tl_lawiki10_content.columns.content_in_use.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.content_in_use.java-name=contentInUse +hibernate.tables.tl_lawiki10_content.columns.content_in_use.java-type=java.lang.Byte +hibernate.tables.tl_lawiki10_content.columns.creator_user_id.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.creator_user_id.java-name=creatorUserId +hibernate.tables.tl_lawiki10_content.columns.creator_user_id.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_content.columns.date_created.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.date_created.java-name=dateCreated +hibernate.tables.tl_lawiki10_content.columns.date_created.java-type=java.sql.Timestamp +hibernate.tables.tl_lawiki10_content.columns.date_updated.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.date_updated.java-name=dateUpdated +hibernate.tables.tl_lawiki10_content.columns.date_updated.java-type=java.sql.Timestamp +hibernate.tables.tl_lawiki10_content.columns.define_later.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.define_later.java-name=defineLater +hibernate.tables.tl_lawiki10_content.columns.define_later.java-type=boolean +hibernate.tables.tl_lawiki10_content.columns.force_offline.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.force_offline.java-name=forceOffline +hibernate.tables.tl_lawiki10_content.columns.force_offline.java-type=boolean +hibernate.tables.tl_lawiki10_content.columns.wiki_content_id.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.wiki_content_id.java-name=wikiContentId +hibernate.tables.tl_lawiki10_content.columns.wiki_content_id.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_content.columns.offline_instructions.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.offline_instructions.java-name=offlineInstructions +hibernate.tables.tl_lawiki10_content.columns.offline_instructions.java-type=java.lang.String +hibernate.tables.tl_lawiki10_content.columns.online_instructions.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.online_instructions.java-name=onlineInstructions +hibernate.tables.tl_lawiki10_content.columns.online_instructions.java-type=java.lang.String +hibernate.tables.tl_lawiki10_content.columns.title.columnspecialty=property +hibernate.tables.tl_lawiki10_content.columns.title.java-name=title +hibernate.tables.tl_lawiki10_content.columns.title.java-type=java.lang.String +hibernate.tables.tl_lawiki10_content.columns.uid.columnspecialty=key +hibernate.tables.tl_lawiki10_content.columns.uid.java-name=uid +hibernate.tables.tl_lawiki10_content.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_content.keygenerator=native +hibernate.tables.tl_lawiki10_session.base-class-name=TlLanb11Session +hibernate.tables.tl_lawiki10_session.columns.wiki_content_uid.columnspecialty=foreign key +hibernate.tables.tl_lawiki10_session.columns.wiki_content_uid.java-name=wikiContentUid +hibernate.tables.tl_lawiki10_session.columns.wiki_content_uid.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_session.columns.wiki_session_id.columnspecialty=property +hibernate.tables.tl_lawiki10_session.columns.wiki_session_id.java-name=wikiSessionId +hibernate.tables.tl_lawiki10_session.columns.wiki_session_id.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_session.columns.session_end_date.columnspecialty=property +hibernate.tables.tl_lawiki10_session.columns.session_end_date.java-name=sessionEndDate +hibernate.tables.tl_lawiki10_session.columns.session_end_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lawiki10_session.columns.session_start_date.columnspecialty=property +hibernate.tables.tl_lawiki10_session.columns.session_start_date.java-name=sessionStartDate +hibernate.tables.tl_lawiki10_session.columns.session_start_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lawiki10_session.columns.session_status.columnspecialty=property +hibernate.tables.tl_lawiki10_session.columns.session_status.java-name=sessionStatus +hibernate.tables.tl_lawiki10_session.columns.session_status.java-type=java.lang.String +hibernate.tables.tl_lawiki10_session.columns.uid.columnspecialty=key +hibernate.tables.tl_lawiki10_session.columns.uid.java-name=uid +hibernate.tables.tl_lawiki10_session.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_session.keygenerator=native +hibernate.tables.tl_lawiki10_user.base-class-name=TlLanb11User +hibernate.tables.tl_lawiki10_user.columns.fullname.columnspecialty=property +hibernate.tables.tl_lawiki10_user.columns.fullname.java-name=fullname +hibernate.tables.tl_lawiki10_user.columns.fullname.java-type=java.lang.String +hibernate.tables.tl_lawiki10_user.columns.wiki_session_uid.columnspecialty=foreign key +hibernate.tables.tl_lawiki10_user.columns.wiki_session_uid.java-name=wikiSessionUid +hibernate.tables.tl_lawiki10_user.columns.wiki_session_uid.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_user.columns.uid.columnspecialty=key +hibernate.tables.tl_lawiki10_user.columns.uid.java-name=uid +hibernate.tables.tl_lawiki10_user.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_user.columns.user_id.columnspecialty=property +hibernate.tables.tl_lawiki10_user.columns.user_id.java-name=userId +hibernate.tables.tl_lawiki10_user.columns.user_id.java-type=java.lang.Long +hibernate.tables.tl_lawiki10_user.columns.user_status.columnspecialty=property +hibernate.tables.tl_lawiki10_user.columns.user_status.java-name=userStatus +hibernate.tables.tl_lawiki10_user.columns.user_status.java-type=java.lang.String +hibernate.tables.tl_lawiki10_user.columns.username.columnspecialty=property +hibernate.tables.tl_lawiki10_user.columns.username.java-name=username +hibernate.tables.tl_lawiki10_user.columns.username.java-type=java.lang.String +hibernate.tables.tl_lawiki10_user.keygenerator=assigned +relations.tl_lawiki10_content-tl_lawiki10_attachment.tl_lawiki10_attachment-has-tl_lawiki10_content.enabled=true +relations.tl_lawiki10_content-tl_lawiki10_attachment.tl_lawiki10_attachment-has-tl_lawiki10_content.target-many=false +relations.tl_lawiki10_content-tl_lawiki10_attachment.tl_lawiki10_content-has-tl_lawiki10_attachment.enabled=true +relations.tl_lawiki10_content-tl_lawiki10_attachment.tl_lawiki10_content-has-tl_lawiki10_attachment.target-many=true +relations.tl_lawiki10_content-tl_lawiki10_session.tl_lawiki10_content-has-tl_lawiki10_session.enabled=true +relations.tl_lawiki10_content-tl_lawiki10_session.tl_lawiki10_content-has-tl_lawiki10_session.target-many=true +relations.tl_lawiki10_content-tl_lawiki10_session.tl_lawiki10_session-has-tl_lawiki10_content.enabled=true +relations.tl_lawiki10_content-tl_lawiki10_session.tl_lawiki10_session-has-tl_lawiki10_content.target-many=false +relations.tl_lawiki10_session-tl_lawiki10_user.tl_lawiki10_session-has-tl_lawiki10_user.enabled=true +relations.tl_lawiki10_session-tl_lawiki10_user.tl_lawiki10_session-has-tl_lawiki10_user.target-many=true +relations.tl_lawiki10_session-tl_lawiki10_user.tl_lawiki10_user-has-tl_lawiki10_session.enabled=true +relations.tl_lawiki10_session-tl_lawiki10_user.tl_lawiki10_user-has-tl_lawiki10_session.target-many=false +tables.tl_lawiki10_attachment.x=53 +tables.tl_lawiki10_attachment.y=58 +tables.tl_lawiki10_content.x=290 +tables.tl_lawiki10_content.y=20 +tables.tl_lawiki10_session.x=652 +tables.tl_lawiki10_session.y=43 +tables.tl_lawiki10_user.x=971 +tables.tl_lawiki10_user.y=35 Index: lams_tool_wiki_orig/conf/war/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_wiki_orig/conf/war/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_wiki_orig/conf/war/META-INF/MANIFEST.MF (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,4 @@ +Implementation-Title: LAMS - Wiki Tool +Implementation-Version: 2.0 RC1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: ./lams.jar ./lams-tool-lawiki10.jar ./lams-contentrepository.jar ./lams-learning.jar Index: lams_tool_wiki_orig/conf/xdoclet/error-pages.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/error-pages.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/error-pages.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,13 @@ + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + Index: lams_tool_wiki_orig/conf/xdoclet/filter-mappings.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/filter-mappings.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/filter-mappings.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,14 @@ + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + Index: lams_tool_wiki_orig/conf/xdoclet/filters.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/filters.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/filters.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,36 @@ + + + + SystemSessionFilter + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + wikiSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + encoding + UTF-8 + + Index: lams_tool_wiki_orig/conf/xdoclet/global-exceptions.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/global-exceptions.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/global-exceptions.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,8 @@ + + + Index: lams_tool_wiki_orig/conf/xdoclet/global-forwards.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/global-forwards.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/global-forwards.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,4 @@ + + + Index: lams_tool_wiki_orig/conf/xdoclet/listeners.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/listeners.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/listeners.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,5 @@ + + + org.springframework.web.context.ContextLoaderListener + + Index: lams_tool_wiki_orig/conf/xdoclet/servlet-mappings.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/servlet-mappings.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/servlet-mappings.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,14 @@ + + action + *.do + + + + download + /download/* + + + + exportPortfolio + /portfolioExport + Index: lams_tool_wiki_orig/conf/xdoclet/servlets.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/servlets.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/servlets.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,48 @@ + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + + download + Instructions Download + Instructions Download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + wikiToolContentHandler + + 3 + + + + exportPortfolio + Export Portfolio + Export Portfolio + org.lams.lams.tool.wiki.web.WikiExportServlet + + + + + + + + Index: lams_tool_wiki_orig/conf/xdoclet/struts-message-resources.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/struts-message-resources.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/struts-message-resources.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1 @@ + Index: lams_tool_wiki_orig/conf/xdoclet/struts-plugins.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/struts-plugins.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/struts-plugins.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,8 @@ + + + + + + + Index: lams_tool_wiki_orig/conf/xdoclet/taglibs.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/taglibs.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/taglibs.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,65 @@ + + + + + + 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 + + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + + + + + tags-lams + /WEB-INF/lams.tld + + + Index: lams_tool_wiki_orig/conf/xdoclet/web-security.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/web-security.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/web-security.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,107 @@ + + + + Secure Content + /* + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoringv2.do + /starter/authoring.do + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + + + Staff Content + /starter/monitor.do + /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_wiki_orig/conf/xdoclet/web-settings.xml =================================================================== diff -u --- lams_tool_wiki_orig/conf/xdoclet/web-settings.xml (revision 0) +++ lams_tool_wiki_orig/conf/xdoclet/web-settings.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,20 @@ + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lams.lams.tool.wiki.ApplicationResources + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lams/lams/tool/wiki/applicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + + + + + org.springframework.web.context.ContextLoaderListener + + Index: lams_tool_wiki_orig/db/model/lams_tool_wiki.clay =================================================================== diff -u --- lams_tool_wiki_orig/db/model/lams_tool_wiki.clay (revision 0) +++ lams_tool_wiki_orig/db/model/lams_tool_wiki.clay (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,394 @@ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + Index: lams_tool_wiki_orig/db/sql/activity_insert.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/activity_insert.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/activity_insert.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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$ + +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 +, 'Displays a WikiX' +, 'WikiX' +, '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 +, 4 +, NULL +, NULL +, NULL +, NULL +, NULL +, NULL +, 'tool/lawiki10/images/icon_htmlwiki.swf' +, NULL +, NULL +, NULL +, 'org.lams.lams.tool.wiki.ApplicationResources' +) Index: lams_tool_wiki_orig/db/sql/create_lams_tool_wiki.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/create_lams_tool_wiki.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/create_lams_tool_wiki.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,85 @@ +-- $Id$ + +CREATE TABLE tl_lawiki10_content ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_content_id BIGINT(20) UNIQUE NOT NULL + , title TEXT + , content TEXT + , online_instructions TEXT + , offline_instructions TEXT + , define_later TINYINT(1) + , force_offline TINYINT(1) + , reflect_on_activity TINYINT(1) + , reflect_instructions TEXT + , content_in_use TINYINT(1) + , creator_user_id BIGINT(20) + , date_created DATETIME + , date_updated DATETIME + , PRIMARY KEY (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lawiki10_session ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_session_id BIGINT(20) UNIQUE NOT NULL + , wiki_session_name VARCHAR(255) NOT NULL + , wiki_content_uid BIGINT(20) NOT NULL + , session_start_date DATETIME + , session_end_date DATETIME + , session_status VARCHAR(100) + , PRIMARY KEY (uid) + , INDEX (wiki_content_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_session_1 FOREIGN KEY (wiki_content_uid) + REFERENCES tl_lawiki10_content (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lawiki10_user ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , user_id BIGINT(20) NOT NULL + , wiki_session_uid BIGINT(20) NOT NULL + , username VARCHAR(255) + , fullname VARCHAR(255) + , user_status VARCHAR(50) + , PRIMARY KEY (uid) + , INDEX (wiki_session_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_user_1 FOREIGN KEY (wiki_session_uid) + REFERENCES tl_lawiki10_session (uid) +)TYPE=InnoDB; + + +CREATE TABLE tl_lawiki10_attachment ( + attachment_id BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_content_uid BIGINT(20) NOT NULL + , filename VARCHAR(255) NOT NULL + , uuid BIGINT(20) NOT NULL + , version_id BIGINT(20) + , online_file TINYINT(1) NOT NULL + , PRIMARY KEY (attachment_id) + , INDEX (wiki_content_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_attachment_1 FOREIGN KEY (wiki_content_uid) + REFERENCES tl_lawiki10_content (uid) +)TYPE=InnoDB; + +-- Default Content For Wiki Tool + +INSERT INTO tl_lawiki10_content ( wiki_content_id, + title, + content, + online_instructions, + offline_instructions, + define_later, + force_offline, + reflect_on_activity, + reflect_instructions, + content_in_use, + date_created) +VALUES (${default_content_id}, + 'Wiki', + 'Content', + '', + '', + 0, + 0, + 0, + 'Reflect on wiki', + 0, + now()); Index: lams_tool_wiki_orig/db/sql/drop_lams_tool_wiki.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/drop_lams_tool_wiki.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/drop_lams_tool_wiki.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,7 @@ +-- $Id$ + +DROP TABLE IF EXISTS tl_lawiki10_attachment; +DROP TABLE IF EXISTS tl_lawiki10_user; +DROP TABLE IF EXISTS tl_lawiki10_session; +DROP TABLE IF EXISTS tl_lawiki10_content; + Index: lams_tool_wiki_orig/db/sql/init_lams_tool_wiki.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/init_lams_tool_wiki.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/init_lams_tool_wiki.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,63 @@ +-- $Id$ + +-- Ensure an existing table does not exist +DROP TABLE IF EXISTS tl_lawiki10_user; +DROP TABLE IF EXISTS tl_lawiki10_attachment; +DROP TABLE IF EXISTS tl_lawiki10_session; +DROP TABLE IF EXISTS tl_lawiki10_content; + +-- Create a fresh copy of the wiki table +CREATE TABLE tl_lawiki10_content ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_content_id BIGINT(20) UNIQUE NOT NULL + , title TEXT + , content TEXT + , online_instructions TEXT + , offline_instructions TEXT + , define_later TINYINT(1) + , force_offline TINYINT(1) + , content_in_use TINYINT(1) + , creator_user_id BIGINT(20) + , date_created DATETIME + , date_updated DATETIME + , PRIMARY KEY (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lawiki10_session ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_session_id BIGINT(20) UNIQUE NOT NULL + , wiki_content_uid BIGINT(20) NOT NULL + , session_start_date DATETIME + , session_end_date DATETIME + , session_status VARCHAR(100) + , PRIMARY KEY (uid) + , INDEX (wiki_content_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_session_1 FOREIGN KEY (wiki_content_uid) + REFERENCES lams.tl_lawiki10_content (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lawiki10_user ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , user_id BIGINT(20) NOT NULL + , wiki_session_uid BIGINT(20) NOT NULL + , username VARCHAR(255) + , fullname VARCHAR(255) + , user_status VARCHAR(50) + , PRIMARY KEY (uid) + , INDEX (wiki_session_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_user_1 FOREIGN KEY (wiki_session_uid) + REFERENCES lams.tl_lawiki10_session (uid) +)TYPE=InnoDB; + +CREATE TABLE tl_lawiki10_attachment ( + attachment_id BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_content_uid BIGINT(20) NOT NULL + , filename VARCHAR(255) NOT NULL + , uuid BIGINT(20) NOT NULL + , version_id BIGINT(20) + , online_file TINYINT(1) NOT NULL + , PRIMARY KEY (attachment_id) + , INDEX (wiki_content_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_attachment_1 FOREIGN KEY (wiki_content_uid) + REFERENCES lams.tl_lawiki10_content (uid) +)TYPE=InnoDB; Index: lams_tool_wiki_orig/db/sql/insert_lams_tool_wiki_data.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/insert_lams_tool_wiki_data.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/insert_lams_tool_wiki_data.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,96 @@ +-- $Id$ + + +-- test data for wiki content table + +INSERT INTO tl_lawiki10_content ( uid, + wiki_content_id, + title, + content, + online_instructions, + offline_instructions, + define_later, + force_offline, + content_in_use, + creator_user_id, + date_created, + date_updated) +VALUES (null, + '2500', + 'Welcome', + 'Welcome to these activities', + 'Enter the online instructions here', + 'Enter the offline instructions here', + 0, + 0, + 0, + '2300', + now(), + NULL); + + +INSERT INTO tl_lawiki10_session ( uid, + wiki_session_id, + wiki_content_uid, + session_start_date, + session_end_date, + session_status) +VALUES (null, + '2400', + LAST_INSERT_ID(), + now(), + now(), + 'INCOMPLETE'); + +INSERT INTO tl_lawiki10_user ( uid, + user_id, + wiki_session_uid, + username, + fullname, + user_status) +VALUES (null, + '2600', + LAST_INSERT_ID(), + 'test', + 'test', + 'NOT_ATTEMPTED'); + +-- Data needed to run the examples on the wiki starter page + +INSERT INTO tl_lawiki10_content ( uid, + wiki_content_id, + title, + content, + online_instructions, + offline_instructions, + define_later, + force_offline, + content_in_use, + creator_user_id, + date_created, + date_updated) +VALUES (null, + '355', + 'Welcome', + 'Welcome to these activities', + 'Enter the online instructions here', + 'Enter the offline instructions here', + 0, + 0, + 0, + NULL, + now(), + NULL); + + INSERT INTO tl_lawiki10_session ( uid, + wiki_session_id, + wiki_content_uid, + session_start_date, + session_end_date, + session_status) +VALUES (null, + '455', + LAST_INSERT_ID(), + now(), + now(), + 'NOT_ATTEMPTED'); Index: lams_tool_wiki_orig/db/sql/insert_test_data.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/insert_test_data.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/insert_test_data.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,27 @@ +-- $Id$ + +INSERT INTO tl_lawiki10_session ( uid, + wiki_session_id, + wiki_content_uid, + session_start_date, + session_end_date, + session_status) +VALUES (null, + '455', + '1', + now(), + now(), + 'INCOMPLETE'); + +INSERT INTO tl_lawiki10_user ( uid, + user_id, + wiki_session_uid, + username, + fullname, + user_status) +VALUES (null, + '555', + LAST_INSERT_ID(), + 'test', + 'test', + 'NOT_ATTEMPTED'); Index: lams_tool_wiki_orig/db/sql/library_insert.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/library_insert.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/library_insert.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,16 @@ +-- $Id$ + +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'Displays a Wiki', +'Wiki', +0, +NOW() +) Index: lams_tool_wiki_orig/db/sql/test_data_lams_tool_wiki.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/test_data_lams_tool_wiki.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/test_data_lams_tool_wiki.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,58 @@ +-- $Id$ + +CREATE TABLE lams.tl_lawiki10_content ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_content_id BIGINT(20) UNIQUE NOT NULL + , title TEXT + , content TEXT + , online_instructions TEXT + , offline_instructions TEXT + , define_later TINYINT(1) + , force_offline TINYINT(1) + , content_in_use TINYINT(1) + , creator_user_id BIGINT(20) + , date_created DATETIME + , date_updated DATETIME + , PRIMARY KEY (uid) +)TYPE=InnoDB; + +CREATE TABLE lams.tl_lawiki10_session ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_session_id BIGINT(20) UNIQUE NOT NULL + , wiki_content_uid BIGINT(20) NOT NULL + , session_start_date DATETIME + , session_end_date DATETIME + , session_status VARCHAR(100) + , PRIMARY KEY (uid) + , INDEX (wiki_content_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_session_1 FOREIGN KEY (wiki_content_uid) + REFERENCES lams.tl_lawiki10_content (uid) +)TYPE=InnoDB; + +CREATE TABLE lams.tl_lawiki10_user ( + uid BIGINT(20) NOT NULL AUTO_INCREMENT + , user_id BIGINT(20) UNIQUE NOT NULL + , wiki_session_uid BIGINT(20) NOT NULL + , username VARCHAR(50) + , fullname VARCHAR(50) + , user_status VARCHAR(50) + , PRIMARY KEY (uid) + , INDEX (wiki_session_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_user_1 FOREIGN KEY (wiki_session_uid) + REFERENCES lams.tl_lawiki10_session (uid) +)TYPE=InnoDB; + + +CREATE TABLE lams.tl_lawiki10_attachment ( + attachment_id BIGINT(20) NOT NULL AUTO_INCREMENT + , wiki_content_uid BIGINT(20) NOT NULL + , filename VARCHAR(255) NOT NULL + , uuid BIGINT(20) NOT NULL + , version_id BIGINT(20) + , online_file TINYINT(1) NOT NULL + , PRIMARY KEY (attachment_id) + , INDEX (wiki_content_uid) + , CONSTRAINT FK_NEW_1823610286__tl_lawiki10_attachment_1 FOREIGN KEY (wiki_content_uid) + REFERENCES lams.tl_lawiki10_content (uid) +)TYPE=InnoDB; + Index: lams_tool_wiki_orig/db/sql/tool_insert.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/tool_insert.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/tool_insert.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,62 @@ +-- $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 +) +VALUES +( +'lawiki10', +'wikiService', +'WikiX', +'Displays a WikiX', +'wiki', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/lawiki10/starter/learner.do?mode=learner', +'tool/lawiki10/starter/learner.do?mode=author', +'tool/lawiki10/starter/learner.do?mode=teacher', +'tool/lawiki10/authoring.do', +'tool/lawiki10/monitoring.do', +'tool/lawiki10/authoring.do?defineLater=true', +'tool/lawiki10/portfolioExport?mode=learner', +'tool/lawiki10/portfolioExport?mode=teacher', +NULL, +NULL, +'http://wiki.lamsfoundation.org/display/lamsdocs/lawiki10', +'org.lams.lams.tool.wiki.ApplicationResources', +'lams-tool-lawiki10.jar', +'/org/lams/lams/tool/wiki/applicationContext.xml', +NOW(), +NOW() +); Index: lams_tool_wiki_orig/db/sql/updatescripts/updateTo20070214.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/updatescripts/updateTo20070214.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/updatescripts/updateTo20070214.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,6 @@ +-- Update the Wiki tables to 20070214 +-- This is for the LAMS 2.0.1 release. + +ALTER TABLE tl_lawiki10_user CHANGE COLUMN username username VARCHAR(255), CHANGE COLUMN fullname fullname VARCHAR(255); + +UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lawiki10.jar', context_file = '/org/lams/lams/tool/wiki/applicationContext.xml' where tool_signature = 'lawiki10'; Index: lams_tool_wiki_orig/db/sql/updatescripts/updateTo20070315.sql =================================================================== diff -u --- lams_tool_wiki_orig/db/sql/updatescripts/updateTo20070315.sql (revision 0) +++ lams_tool_wiki_orig/db/sql/updatescripts/updateTo20070315.sql (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,6 @@ +-- Update the Wiki tables to 20070315 +-- This is for the LAMS 2.0.2 release. + +ALTER TABLE tl_lawiki10_user CHANGE COLUMN username username VARCHAR(255), CHANGE COLUMN fullname fullname VARCHAR(255); + +UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lawiki10.jar', context_file = '/org/lams/lams/tool/wiki/applicationContext.xml' where tool_signature = 'lawiki10'; Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiApplicationException.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiApplicationException.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiApplicationException.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,71 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki; + +/** Generic exception class for the wiki tool + */ + +public class WikiApplicationException extends RuntimeException +{ + /** + * Default Constructor + */ + public WikiApplicationException() + { + super(); + } + + /** + * Constructor for customized error message + * @param message + */ + public WikiApplicationException(String message) + { + super(message); + } + + /** + * Constructor for wrapping the throwable object + * @param cause + */ + public WikiApplicationException(Throwable cause) + { + super(cause); + } + + /** + * Constructor for wrapping both the customized error message and + * throwable exception object. + * @param message + * @param cause + */ + public WikiApplicationException(String message, Throwable cause) + { + super(message, cause); + } + +} + + Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiAttachment.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiAttachment.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiAttachment.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,267 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki; + +import java.io.Serializable; + +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; + + +/** + *

This class represents a file that is uploaded to the wiki tool. + * It is used in the authoring environment, when an author + * uploads an online/offline instructions file. The file is actually stored + * in the content repository, however, the file details will be stored in the + * tl_lawiki10_attachment table. The file uploaded, will be of two types: online or offline. + *

+ * @hibernate.class table="tl_lawiki10_attachment" + * @author mtruong + */ +public class WikiAttachment implements Serializable, Cloneable { + + private static final long serialVersionUID = -3471513404550541296L; + private static Logger log = Logger.getLogger(WikiAttachment.class); + + /** identifier field */ + private Long attachmentId; + + /** persistent field. Cannot be null */ + private WikiContent wikiContent; + + /** persistent field. Cannot be null */ + private String filename; + + /** unique persistent field. Cannot be null */ + private Long uuid; + + /** nullable persistent field */ + private Long versionId; + + /** persistent field. Cannot be null. It can either take values "ONLINE" or "OFFLINE" */ + private boolean onlineFile; + + /** The two different types of files/attachment that can be uploaded */ + public final static String TYPE_ONLINE = "ONLINE"; + public final static String TYPE_OFFLINE = "OFFLINE"; + + /**default constructor */ + public WikiAttachment() {} + + /** minimal constructor */ + public WikiAttachment(WikiContent wikiContent, + String filename, + boolean isOnline) + { + this.wikiContent = wikiContent; + this.filename = filename; + this.onlineFile = isOnline; + } + + /**full constructor */ + public WikiAttachment(WikiContent wikiContent, + String filename, + Long uuid, + Long versionId, + boolean isOnline) + { + this.wikiContent = wikiContent; + this.filename = filename; + this.uuid = uuid; + this.versionId = versionId; + this.onlineFile = isOnline; + } + + /** Clone this attachment, including the unique id. This leaves two records pointing to the same item + * in the content repository. */ + public Object clone(){ + Object obj = null; + try { + obj = super.clone(); + } catch (CloneNotSupportedException e) { + log.error("Clone " + WikiAttachment.class + " not supported"); + } + return obj; + } + + /** + * @hibernate.id + * generator-class="native" + * type="java.lang.Long" + * column="attachment_id" + * + * @return Returns the attachmentId. + */ + public Long getAttachmentId() { + return attachmentId; + } + + /** + * @param attachmentId The attachmentId to set. + */ + public void setAttachmentId(Long attachmentId) { + this.attachmentId = attachmentId; + } + + /** + * @hibernate.property + * column="filename" + * length="255" + * not-null="true" + * + * @return Returns the filename. + */ + public String getFilename() { + return filename; + } + /** + * @param filename The filename to set. + */ + public void setFilename(String filename) { + this.filename = filename; + } + + /** + * @hibernate.property + * column="online_file" + * length="1" + * not-null="true" + * + * @return Returns the isOnline. + */ + public boolean isOnlineFile() { + return onlineFile; + } + /** + * @param isOnline The isOnline to set. + */ + public void setOnlineFile(boolean isOnline) { + this.onlineFile = isOnline; + } + + /** + * @hibernate.many-to-one + * not-null="true" + * + * @hibernate.column + * name="wiki_content_uid" + * + * @return Returns the wikiContent. + */ + public WikiContent getWikiContent() { + return wikiContent; + } + /** + * @param wikiContent The wikiContent to set. + */ + public void setWikiContent(WikiContent wikiContent) { + this.wikiContent = wikiContent; + } + + /** + * @hibernate.property + * column="uuid" + * not-null="true" + * length="20" + * + * @return Returns the uuid. + */ + public Long getUuid() { + return uuid; + } + /** + * @param uuid The uuid to set. + */ + public void setUuid(Long uuid) { + this.uuid = uuid; + } + + /** + * @hibernate.property + * column="version_id" + * length="20" + * + * @return Returns the versionId. + */ + public Long getVersionId() { //nullable + return versionId; + } + /** + * @param versionId The versionId to set. + */ + public void setVersionId(Long versionId) { + this.versionId = versionId; + } + + public String getFileProperty() + { + if (isOnlineFile()) + { + return TYPE_ONLINE; + } + else + return TYPE_OFFLINE; + } + + public void setFileProperty(String fileProperty) { + if(StringUtils.equals(IToolContentHandler.TYPE_ONLINE,fileProperty)) + this.onlineFile = true; + else + this.onlineFile = false; + } + + public String returnKeyName() + { + return (getFilename() + "-" + getFileProperty()); + } + + /** Are two WikiAttachments equal? Checks attachmentId, filename, + * uuid, version id and online/offline status. Does not check the related + * content object. + */ + public boolean equals(Object other) { + if ( (this == other ) ) return true; + if ( !(other instanceof WikiAttachment) ) return false; + WikiAttachment castOther = (WikiAttachment) other; + return new EqualsBuilder() + .append(this.getAttachmentId(), castOther.getAttachmentId()) + .append(this.getFilename(), castOther.getFilename()) + .append(this.getUuid(), castOther.getUuid()) + .append(this.getVersionId(), castOther.getVersionId()) + .append(this.isOnlineFile(), castOther.isOnlineFile()) + .isEquals(); + } + + /** Generate the hashcode for the class. Based on the attachment id only. */ + public int hashCode() { + return new HashCodeBuilder() + .append(getAttachmentId()) + .toHashCode(); + } +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiConstants.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiConstants.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiConstants.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,138 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki; + +/** + * + *

This is a constant utility class that defined all constants need to be + * shared around the wiki tool.

+ * + * @author mtruong + */ +public class WikiConstants +{ + /** + * Private Construtor to avoid instantiation. + */ + private WikiConstants(){} + + public final static String TOOL_SIGNATURE="lawiki10"; + + + // ------------------------------------------ + // DEFAULT IDs for testing purposes + // ------------------------------------------ + public static final Long DEFAULT_CONTENT_ID = new Long(2500); + public static final Long DEFAULT_SESSION_ID = new Long(2400); + public static final Long DEFAULT_CREATOR_ID = new Long(2300); + + // ------------------------------------------- + // Action Forward names + // ------------------------------------------- + + public static final String INSTRUCTIONS = "Instructions"; + + public static final String AUTHOR_PAGE = "authoringContent"; + + public static final String DISPLAY_MESSAGE = "displayMessage"; + public static final String DISPLAY_LEARNER_CONTENT = "displayLearnerContent"; + public static final String REFLECT_ON_ACTIVITY = "reflectOnActivity"; + + public static final String MONITOR_PAGE = "monitorPage"; + public static final String MONITOR_REFLECTION_PAGE ="monitorReflectionPage"; + + // ------------------------------ + // Action Names + // ------------------------------ + + public static final String DONE = "done"; + public static final String SAVE = "save"; + + + // -------------------------------------------- + // Session Attributes + // -------------------------------------------- + + + + //used in monitoring + public static final String TITLE = "title"; + public static final String CONTENT = "content"; + public static final String ONLINE_INSTRUCTIONS = "onlineInstructions"; + public static final String OFFLINE_INSTRUCTIONS = "offlineInstructions"; + public static final String TOOL_CONTENT_ID_INMONITORMODE = "toolContentIdInMonitor"; + + public static final String DEFINE_LATER = "defineLater"; + public static final String PAGE_EDITABLE = "isPageEditable"; + public static final String EXPORT_PORTFOLIO = "exportPortfolio"; + + //used in authoring + public static final String TOOL_CONTENT_ID = "toolContentID"; //request + session variable + public static final String CONTENT_FOLDER_ID = "contentFolderID"; //request variable + public static final String RICH_TEXT_TITLE = "richTextTitle"; + public static final String RICH_TEXT_CONTENT = "richTextContent"; + public static final String RICH_TEXT_ONLINE_INSTRN = "richTextOnlineInstructions"; + public static final String RICH_TEXT_OFFLINE_INSTRN = "richTextOfflineInstructions"; + + public static final String ATTACHMENT_LIST = "attachmentList"; + public static final String DELETED_ATTACHMENT_LIST = "deletedAttachmentList"; + + public static final String READ_ONLY_MODE = "readOnlyMode"; + + + public static final String USER_ID = "userID"; + public static final String TOOL_SESSION_ID = "toolSessionID"; + + // --------------------------------------------------------------------------- + // Lookup Dispatch Action Keys (used in WikiAuthoringAction class, WikiLearnerAction), + // labels used in ApplicationResources.properties + // --------------------------------------------------------------------------- + + public static final String BUTTON_SAVE = "button.save"; + public static final String BUTTON_DONE = "button.done"; + public static final String BUTTON_FINISH = "button.finish"; + public static final String BUTTON_EDIT = "button.edit"; + public static final String BUTTON_UPLOAD = "button.upload"; + public static final String LINK_DELETE="link.delete"; + public static final String BUTTON_CONTINUE = "button.continue"; + + + //-------------- + // Flags + //-------------- + + public static final int FLAG_DEFINE_LATER = 1; + public static final int FLAG_CONTENT_IN_USE = 2; + public static final int FLAG_RUN_OFFLINE = 3; + + //------------------------------ + // Error Keys/Messages + //------------------------------ + + public static final String ERROR_NBAPPLICATION = "error.exception.NbApplication"; + public static final String ERROR_MANDATORY="error.mandatoryField"; + public static final String ERR_MISSING_PARAM = "error.missingParam"; + public static final String ERROR_FILE_UPLOAD_CONTENT_REPOSITORY = "error.contentrepository"; +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiContent.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiContent.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiContent.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,447 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki; + +import java.io.Serializable; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.lamsfoundation.lams.contentrepository.ItemNotFoundException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; + + +/** + *

Persistent wiki object/bean that defines the content for the wiki tool. + * Provides accessors and mutators to get/set wiki attributes

+ * @hibernate.class table="tl_lawiki10_content" + * @author mtruong + */ +public class WikiContent implements Serializable { + + /** identifier field */ + private Long uid; + + /** non-nullable persistent field */ + private Long wikiContentId; + + /** nullable persistent field */ + private String title; + + /** nullable persistent field */ + private String content; + + /** nullable persistent field */ + private String onlineInstructions; + + /** nullable persistent field */ + private String offlineInstructions; + + /** nullable persistent field */ + private boolean defineLater; + + /** nullable persistent field */ + private boolean forceOffline; + + private Boolean reflectOnActivity; + + private String reflectInstructions; + + /** nullable persistent field */ + private boolean contentInUse; + + /** nullable persistent field */ + private Long creatorUserId; + + /** nullable persistent field */ + private Date dateCreated; + + /** nullable persistent field */ + private Date dateUpdated; + + /** persistent field */ + private Set wikiSessions = new HashSet(); + + private Set wikiAttachments = new HashSet(); + + /** default constructor */ + public WikiContent() + { + } + + /** full constructor */ + public WikiContent(Long wikiContentId, + String title, + String content, + String onlineInstructions, + String offlineInstructions, + boolean defineLater, + boolean forceOffline, + boolean reflectOnActivity, + String reflectInstructions, + boolean contentInUse, + Long creatorUserId, + Date dateCreated, + Date dateUpdated) + { + this.wikiContentId = wikiContentId; + this.title = title; + this.content = content; + this.onlineInstructions = onlineInstructions; + this.offlineInstructions = offlineInstructions; + this.defineLater = defineLater; + this.forceOffline = forceOffline; + this.reflectOnActivity = reflectOnActivity; + this.reflectInstructions = reflectInstructions; + this.contentInUse = contentInUse; + this.creatorUserId = creatorUserId; + this.dateCreated = dateCreated; + this.dateUpdated = dateUpdated; + } + + /** + * Minimal Constructor used to initialise values for the WikiContent object + * @return + */ + + public WikiContent(Long wikiContentId, + String title, + String content, + String onlineInstructions, + String offlineInstructions, + Date dateCreated) + { + this.wikiContentId = wikiContentId; + this.title = title; + this.content = content; + this.onlineInstructions = onlineInstructions; + this.offlineInstructions = offlineInstructions; + this.defineLater = false; + this.forceOffline = false; + this.reflectOnActivity = false; + this.contentInUse = false; + this.creatorUserId = null; + this.dateCreated = dateCreated; + this.dateUpdated = null; + } + + + + /** + * @hibernate.property + * column="content" + * length="65535" + */ + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + /** + * + * @hibernate.property + * column="creator_user_id" + * length="20" + */ + public Long getCreatorUserId() { + return creatorUserId; + } + + public void setCreatorUserId(Long creatorUserId) { + this.creatorUserId = creatorUserId; + } + + /** + * + * @hibernate.property + * column="date_created" + * length="19" + */ + public Date getDateCreated() { + return dateCreated; + } + + public void setDateCreated(Date dateCreated) { + this.dateCreated = dateCreated; + } + + /** + * + * @hibernate.property + * column="date_updated" + * length="19" + */ + public Date getDateUpdated() { + return dateUpdated; + } + + public void setDateUpdated(Date dateUpdated) { + this.dateUpdated = dateUpdated; + } + + /** + * @hibernate.property + * column="define_later" + * length="1" + */ + public boolean isDefineLater() { + return defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + /** + * @hibernate.property + * column="force_offline" + * length="1" + */ + public boolean isForceOffline() { + return forceOffline; + } + + public void setForceOffline(boolean forceOffline) { + this.forceOffline = forceOffline; + } + + /** + * @hibernate.property + * column="reflect_on_activity" + * length="1" + */ + public boolean getReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + /** + * @hibernate.property + * column="reflect_instructions" + * length="65535" + */ + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + /** + * @hibernate.property + * column="content_in_use" + * length="1" + */ + + public boolean isContentInUse() { + return contentInUse; + } + /** + * @param contentInUse The contentInUse to set. + */ + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @hibernate.property + * column="wiki_content_id" + * length="20" + * not-null="true" + */ + + public Long getWikiContentId() { + return wikiContentId; + } + + public void setWikiContentId(Long wikiContentId) { + this.wikiContentId = wikiContentId; + } + /** + * @hibernate.set + * lazy="true" + * inverse="true" + * cascade="all-delete-orphan" + * @hibernate.collection-key + * column="wiki_content_uid" + * @hibernate.collection-one-to-many + * class="org.lams.lams.tool.wiki.WikiSession" + */ + public Set getWikiSessions() { + if (this.wikiSessions == null) + { + setWikiSessions(new HashSet()); + } + return wikiSessions; + } + + public void setWikiSessions(Set wikiSessions) { + this.wikiSessions = wikiSessions; + } + + /** + * @hibernate.set + * lazy="true" + * inverse="true" + * cascade="all-delete-orphan" + * @hibernate.collection-key + * column="wiki_content_uid" + * @hibernate.collection-one-to-many + * class="org.lams.lams.tool.wiki.WikiAttachment" + */ + public Set getWikiAttachments() { + return wikiAttachments; + } + /** + * @param wikiAttachments The wikiAttachments to set. + */ + public void setWikiAttachments(Set wikiAttachments) { + this.wikiAttachments = wikiAttachments; + } + + + + /** + * + * @hibernate.property + * column="offline_instructions" + * length="65535" + */ + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + /** + * + * @hibernate.property + * column="online_instructions" + * length="65535" + */ + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + /** + * @hibernate.property + * column="title" + * length="65535" + */ + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.id + * generator-class="native" + * type="java.lang.Long" + * column="uid" + * unsaved-value="0" + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + + + + + + + /** + * Creates a new WikiContent object from the supplied object. + * Assigns it the toContendId. Also copies all the items in the attachment set + * to the new object's attachment set. So while the two contents have different + * attachment records, they point to the same entries in the database. + * + * @param wiki WikiContent object containing the content to copy from + * @param toContentId The new Id of the new wiki object + * @return newContent The new wiki content object + * @throws RepositoryCheckedException + * @throws ItemNotFoundException + */ + public static WikiContent newInstance(WikiContent wiki, Long toContentId, IToolContentHandler toolContentHandler) throws ItemNotFoundException, RepositoryCheckedException + { + WikiContent newContent = new WikiContent(toContentId, + wiki.getTitle(), + wiki.getContent(), + wiki.getOnlineInstructions(), + wiki.getOfflineInstructions(), + wiki.isDefineLater(), + wiki.isForceOffline(), + wiki.getReflectOnActivity(), + wiki.getReflectInstructions(), + wiki.isContentInUse(), + wiki.getCreatorUserId(), + wiki.getDateCreated(), + wiki.getDateUpdated()); + + if ( wiki.getWikiAttachments() != null && wiki.getWikiAttachments().size() > 0 ) { + HashSet newAttachmentSet = new HashSet(); + Iterator iter = wiki.getWikiAttachments().iterator(); + while (iter.hasNext()) { + WikiAttachment element = (WikiAttachment) iter.next(); + WikiAttachment newAttachment = new WikiAttachment(newContent, element.getFilename(), element.isOnlineFile()); + //keep old value do not duplicate file + newAttachment.setUuid(element.getUuid()); + newAttachment.setVersionId(element.getVersionId()); + + newAttachmentSet.add(newAttachment); + } + newContent.setWikiAttachments(newAttachmentSet); + } + + return newContent; + } + + + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiSession.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiSession.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiSession.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,271 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki; + +import org.lams.lams.tool.wiki.WikiContent; +import java.io.Serializable; +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +/** + *

The WikiSession class represents a tool session for a wiki activity. + * Each tool session may represent a group of users, if grouping is used, or may + * represent one learner if there is no grouping for this particular activity. + *

+ *
+ *

The session status has three possible status': + *

  • NOT_ATTEMPTED: which means that the tool session has been established, but no learners have reached this activity yet + *
  • INCOMPLETE: which means that a learner has reached this activity + *
  • COMPLETED: The session status will never be set to complete as you don't know when this tool is going to end. + *

+ * @author mtruong + * @hibernate.class table="tl_lawiki10_session" + */ + +public class WikiSession implements Serializable { + + + public final static String NOT_ATTEMPTED = "NOT_ATTEMPTED"; + + public final static String INCOMPLETE = "INCOMPLETE"; + + public static final String COMPLETED = "COMPLETED"; + + /** identifier field */ + private Long uid; + + /** persistent field*/ + private Long wikiSessionId; + + /** persistent field*/ + private String wikiSessionName; + + /** nullable persistent field */ + private Date sessionStartDate; + + /** nullable persistent field */ + private Date sessionEndDate; + + /** nullable persistent field */ + private String sessionStatus; + + /** persistent field */ + private WikiContent wikiContent; + + /** persistent field */ + private Set wikiUsers = new HashSet(); + + /** default constructor */ + public WikiSession() + { + + } + + /** full constructor */ + public WikiSession(Long wikiSessionId, + String wikiSessionName, + WikiContent wikiContent, + Date sessionStartDate, + Date sessionEndDate, + String sessionStatus) + { + this.wikiSessionId = wikiSessionId; + this.wikiSessionName = wikiSessionName; + //this.wikiContentId = wikiContentId; + this.wikiContent = wikiContent; + this.sessionStartDate = sessionStartDate; + this.sessionEndDate = sessionEndDate; + this.sessionStatus = sessionStatus; + } + + /** + * Constructor used when creating a new wikiSession given + * the wikiContent id + */ + + public WikiSession(Long wikiSessionId, + String wikiSessionName, + WikiContent wikiContent, + Date sessionStartDate, + String sessionStatus) + { + this.wikiSessionId = wikiSessionId; + this.wikiSessionName = wikiSessionName; + this.wikiContent = wikiContent; + this.sessionStartDate = sessionStartDate; + this.sessionEndDate = null; + this.sessionStatus = sessionStatus; + } + + public WikiSession(Long wikiSessionId, + String wikiSessionName, + WikiContent wikiContent) + { + this.wikiSessionId = wikiSessionId; + this.wikiSessionName = wikiSessionName; + this.wikiContent = wikiContent; + this.sessionStartDate = new Date(System.currentTimeMillis()); + this.sessionStatus = WikiSession.INCOMPLETE; + } + + public WikiSession(Long wikiSessionId, String wikiSessionName) + { + this.wikiSessionId = wikiSessionId; + this.wikiSessionName = wikiSessionName; + this.sessionStartDate = new Date(System.currentTimeMillis()); + this.sessionStatus = WikiSession.INCOMPLETE; + } + + public WikiSession(Long wikiSessionId) + { + this.wikiSessionId = wikiSessionId; + this.sessionStartDate = new Date(System.currentTimeMillis()); + this.sessionStatus = WikiSession.INCOMPLETE; + } + + /** + * @hibernate.many-to-one + * not-null="true" + * @hibernate.column name="wiki_content_uid" + */ + public WikiContent getWikiContent() { + return wikiContent; + } + + public void setWikiContent(WikiContent wikiContent) { + this.wikiContent = wikiContent; + } + + /** + * @hibernate.property + * column="wiki_session_id" + * length="20" + * not-null="true" + */ + public Long getWikiSessionId() { + return wikiSessionId; + } + + public void setWikiSessionId(Long wikiSessionId) { + this.wikiSessionId = wikiSessionId; + } + + /** + * @hibernate.property + * column="wiki_session_name" + * length="255" + * not-null="true" + */ + public String getWikiSessionName() { + return wikiSessionName; + } + + public void setWikiSessionName(String wikiSessionName) { + this.wikiSessionName = wikiSessionName; + } + + /** + * @hibernate.property + * column="session_end_date" + * length="19" + */ + public Date getSessionEndDate() { + return sessionEndDate; + } + + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + + /** + * @hibernate.property + * column="session_start_date" + * length="19" + */ + public Date getSessionStartDate() { + return sessionStartDate; + } + + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + + /** + * @hibernate.property + * column="session_status" + * length="100" + */ + public String getSessionStatus() { + return sessionStatus; + } + + public void setSessionStatus(String sessionStatus) { + this.sessionStatus = sessionStatus; + } + + /** + * @hibernate.id + * generator-class="native" + * type="java.lang.Long" + * column="uid" + * unsaved-value="0" + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.set + * lazy="true" + * inverse="true" + * cascade="all-delete-orphan" + * + * @hibernate.collection-key + * column="wiki_session_uid" + * @hibernate.collection-one-to-many + * class="org.lams.lams.tool.wiki.WikiUser" + */ + public Set getWikiUsers() { + if (this.wikiUsers == null) + { + setWikiUsers(new HashSet()); + } + + return wikiUsers; + } + /** + * @param wikiUsers The wikiUsers to set. + */ + public void setWikiUsers(Set wikiUsers) { + this.wikiUsers = wikiUsers; + } + + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiUser.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiUser.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/WikiUser.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,188 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki; + +import java.io.Serializable; + +/** + * @hibernate.class table="tl_lawiki10_user" + * @author mtruong + * + *

The WikiUser class represents the learners that will participate + * the wiki activity. Each learner will have a tool session id which represents + * which group they belong to, or there is no grouping, then each learner will have their own + * tool session id.

+ *

The userStatus can be of two values + *

    + *
  • INCOMPLETE: Which means that the user has not yet finished this activity.
  • + *
  • COMPLETED: Which means the user has completed this activity (when the user clicks on finish)
  • + *
      + *

      + */ +public class WikiUser implements Serializable { + + private Long uid; + private Long userId; + private WikiSession wikiSession; + private String username; + private String fullname; + private String userStatus; + + public final static String INCOMPLETE = "INCOMPLETE"; + + public static final String COMPLETED = "COMPLETED"; + + public WikiUser() + { + + } + /** minimal constructor */ + public WikiUser(Long userId, WikiSession wikiSession) + { + this.userId = userId; + this.wikiSession = wikiSession; + this.userStatus = WikiUser.INCOMPLETE; + } + + public WikiUser(Long userId) + { + this.userId = userId; + this.userStatus = WikiUser.INCOMPLETE; + } + + /** full constructor */ + public WikiUser(Long userId, + WikiSession wikiSession, + String username, + String fullname, + String status) + { + this.userId = userId; + this.wikiSession = wikiSession; + this.username = username; + this.fullname = fullname; + this.userStatus = status; + } + + /** + * @hibernate.property + * column="fullname" + * length="255" + * + * @return Returns the fullname. + */ + public String getFullname() { + return fullname; + } + /** + * @param fullname The fullname to set. + */ + public void setFullname(String fullname) { + this.fullname = fullname; + } + /** + * @hibernate.many-to-one + * not-null="true" + * @hibernate.column + * name="wiki_session_uid" + * + * @return Returns the wikiSession. + */ + public WikiSession getWikiSession() { + return wikiSession; + } + /** + * @param wikiSession The wikiSession to set. + */ + public void setWikiSession(WikiSession wikiSession) { + this.wikiSession = wikiSession; + } + /** + * @hibernate.id + * generator-class="native" + * type="java.lang.Long" + * column="uid" + * + * @return Returns the uid. + */ + public Long getUid() { + return uid; + } + /** + * @param uid The uid to set. + */ + public void setUid(Long uid) { + this.uid = uid; + } + /** + * @hibernate.property + * column="user_id" + * length="20" + * not-null="true" + * + * @return Returns the userId. + */ + public Long getUserId() { + return userId; + } + /** + * @param userId The userId to set. + */ + public void setUserId(Long userId) { + this.userId = userId; + } + /** + * @hibernate.property + * column="username" + * length="255" + * + * @return Returns the username. + */ + public String getUsername() { + return username; + } + /** + * @param username The username to set. + */ + public void setUsername(String username) { + this.username = username; + } + /** + * @hibernate.property + * column="user_status" + * length="50" + * + * @return Returns the userStatus. + */ + public String getUserStatus() { + return userStatus; + } + /** + * @param userStatus The userStatus to set. + */ + public void setUserStatus(String userStatus) { + this.userStatus = userStatus; + } +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/applicationContext.xml =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/applicationContext.xml (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/applicationContext.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + org/lams/lams/tool/wiki/WikiContent.hbm.xml + org/lams/lams/tool/wiki/WikiSession.hbm.xml + org/lams/lams/tool/wiki/WikiUser.hbm.xml + org/lams/lams/tool/wiki/WikiAttachment.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_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiAttachmentDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiAttachmentDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiAttachmentDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,110 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dao; + +import java.util.List; + +import org.lams.lams.tool.wiki.WikiAttachment; +import org.lams.lams.tool.wiki.WikiContent; +/** + * @author mtruong + * + *

      Handles database access for uploading, updates and removal of files.

      + */ +public interface IWikiAttachmentDAO { + + /** + * Return the persistent instance of WikiAttachment with the given + * identifier attachmentId + * + * @param attachmentId The unique identifier for attachment. If null, a null object will be returned. + * @return an instance of WikiAttachment + */ + public WikiAttachment retrieveAttachment(Long attachmentId); + + /** + * Return the persistent instance of WikiAttachment with the given + * unique identifier uuid. + * + * @param uuid The uuid of the file, which is also the uuid of the file which is stored in the content repository. + * @return an instance of WikiAttachment + */ + public WikiAttachment retrieveAttachmentByUuid(Long uuid); + + /** + * Return the persistent instance of WikiAttachment with the given + * filename. If there is more than one file with the same filename + * then only the first file in the list will be returned. + * + * @param filename The name of the file + * @return an instance of WikiAttachment + */ + public WikiAttachment retrieveAttachmentByFilename(String filename); + + /** + * Returns a list of attachment ids which are associated with this + * instance of WikiContent. + *

      For example, if the given instance wikiContent has a tool content id + * of 3, and consider an extract of the tl_lawiki10_attachment table:

      + *
       
      +     * 		 ----------------------------
      +     * 		 attachmentId | toolContentId
      +     * 		 ----------------------------
      +     * 			1		  | 	1
      +     * 			2		  | 	3
      +     * 			3		  | 	3
      +     * 			4 		  | 	1
      +     * 		 ----------------------------
      +     * 
      + * Then a call to getAttachmentIdsFromContent will return a list containing the values + * 2 and 3. + * @param wikiContent + * @return + */ + public List getAttachmentIdsFromContent(WikiContent wikiContent); + + /** + *

      Persist the given persistent instance of WikiAttachment.

      + * + * @param attachment The instance of WikiAttachment to persist. + */ + public void saveAttachment(WikiAttachment attachment); + + /** + *

      Delete the given persistent instance of WikiAttachment.

      + * + * @param attachment The instance of WikiAttachment to delete. + */ + public void removeAttachment(WikiAttachment attachment); + + /** + *

      Delete the given instance of WikiAttachment with the + * given uuid + * + * @param uuid The unique id of the file/attachment. + */ + public void removeAttachment(Long uuid); + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiContentDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiContentDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiContentDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,114 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dao; + +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; + +/** + *

      Interface for the WikiContent DAO, defines methods needed to access/modify + * wiki content

      + * @author mtruong + */ +public interface IWikiContentDAO { + + + /** + *

      Return the persistent instance of a WikiContent + * with the given identifier uid, returns null if not found.

      + * + * @param uid an identifier for the WikiContent instance. + * @return the persistent instance of a WikiContent or null if not found + */ + public WikiContent getWikiContentByUID(Long uid); + + /** + *

      Return the persistent instance of a WikiContent + * with the given tool content id wikiContentId, + * returns null if not found.

      + * + * @param wikiContentId The tool content id + * @return the persistent instance of a WikiContent or null if not found. + */ + public WikiContent findWikiContentById(Long wikiContentId); + + /** + *

      Returns the persistent instance of WikiContent + * with the given tool session id wikiSessionId, returns null if not found. + * + * @param wikiSessionId The tool session id + * @return a persistent instance of WikiContent or null if not found. + */ + public WikiContent getWikiContentBySession(Long wikiSessionId); + + /** + *

      Persist the given persistent instance of WikiContent.

      + * + * @param wikiContent The instance of WikiContent to persist. + */ + public void saveWikiContent(WikiContent wikiContent); + + /** + *

      Update the given persistent instance of WikiContent.

      + * + * @param wikiContent The instance of WikiContent to persist. + */ + public void updateWikiContent(WikiContent wikiContent); + + /** + *

      Delete the given instance of WikiContent

      + * + * @param wikiContent The instance of WikiContent to delete. + */ + public void removeWiki(WikiContent wikiContent); + + /** + *

      Delete the given instance of WikiContent with the + * given tool content id wikiContentId + * + * @param wikiContentId The tool content Id. + */ + public void removeWiki(Long wikiContentId); + + + /** + *

      Deletes all instances of WikiSession that are associated + * with the given instance of WikiContent

      + * + * @param wikiContent The instance of WikiContent in which corresponding instances of WikiSession should be deleted. + */ + public void removeWikiSessions(WikiContent wikiContent); + + /** + *

      Creates a persistent instance of WikiSession which is associated + * with the WikiContent with tool content id wikiContentId + *

      + * + * @param wikiContentId The tool content id + * @param wikiSession The instance of WikiSession to add + */ + public void addWikiSession(Long wikiContentId, WikiSession wikiSession); + + } Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiSessionDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiSessionDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiSessionDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,131 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dao; + +import java.util.List; + +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.WikiUser; + + +/** + *

      Interface for the WikiSession DAO, defines methods needed to access/modify + * wiki session

      + * @author mtruong + */ +public interface IWikiSessionDAO { + + + /** + *

      Return the persistent instance of a WikiSession + * with the given tool session id wikiSessionId, + * returns null if not found.

      + * + * @param wikiSessionId The tool session id + * @return the persistent instance of a WikiSession or null if not found. + */ + public WikiSession findWikiSessionById(Long wikiSessionId); + + + /** + *

      Persist the given persistent instance of WikiSession.

      + * + * @param wikiSession The instance of WikiSession to persist. + */ + public void saveWikiSession(WikiSession wikiSession); + + /** + *

      Update the given persistent instance of WikiSession.

      + * + * @param wikiContent The instance of WikiSession to persist. + */ + public void updateWikiSession(WikiSession wikiSession); + + + /** + *

      Delete the given instance of WikiSession

      + * + * @param wikiSession The instance of WikiSession to delete. + */ + public void removeWikiSession(WikiSession wikiSession); + + /** + *

      Delete the given instance of WikiSession with the + * given tool session id wikiSessionid + * + * @param wikiSessionId The tool session Id. + */ + public void removeWikiSession(Long wikiSessionId); + + /** + *

      Returns the persistent instance of WikiSession + * associated with the given wiki user, with user id userId, + * returns null if not found. + * + * @param userId The wiki user id + * @return a persistent instance of WikiSessions or null if not found. + */ + public WikiSession getWikiSessionByUser(Long userId); + + /** + *

      Deletes all instances of WikiUser that are associated + * with the given instance of WikiSession

      + * + * @param wikiSession The instance of WikiSession in which corresponding instances of WikiUser should be deleted. + */ + public void removeWikiUsers(WikiSession wikiSession); + + /** + *

      Creates and persists an instance of WikiUser which is associated + * with the WikiSession with tool session id wikiSessionId

      + * + * @param wikiSessionId The tool session id + * @param user The instance of WikiUser + */ + public void addWikiUsers(Long wikiSessionId, WikiUser user); + + /** + * Returns a list of tool session ids which are associated with this + * instance of WikiContent. + *

      For example, if the given instance wikiContent has a tool content id + * of 3, and consider an extract of the tl_lawiki10_session table:

      + *
       
      +     * 		 ----------------------------
      +     * 		 attachmentId | toolSessionId
      +     * 		 ----------------------------
      +     * 			1		  | 	3
      +     * 			2		  | 	3
      +     * 			3		  | 	3
      +     * 			4 		  | 	1
      +     * 		 ----------------------------
      +     * 
      + * Then a call to getSessionsFromContent will return a list containing the values + * 1, 2 and 3. + * @param wikiContent The instance of WikiContent in which you want the list of toolSessionIds + * @return a list of tool session Ids + */ + public List getSessionsFromContent(WikiContent wikiContent); +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiUserDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiUserDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/IWikiUserDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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.lams.lams.tool.wiki.dao; + +import java.util.List; + +import org.lams.lams.tool.wiki.WikiUser; +import org.lams.lams.tool.wiki.WikiSession; + +/** + * @author mtruong + * + *

      Interface for the WikiSession DAO, defines methods needed to access/modify + * wiki users (learners of the wiki activity)

      + */ +public interface IWikiUserDAO { + + + /** + *

      Return the persistent instance of a WikiUser + * with the given user id userId, + * returns null if not found.

      + * + * @param userId The id of a WikiUser + * @return the persistent instance of a WikiUser or null if not found. + */ + public WikiUser getWikiUser(Long userId, Long toolSessionId); + + /** + *

      Return the persistent instance of a WikiUser + * who has the user id userId and tool session id + * sessionId + * returns null if not found.

      + * + * @param userId. The id of the learner + * @param sessionId. The tool session id to which this user belongs to. + * @return the persistent instance of a WikiUser or null if not found. + */ + public WikiUser getWikiUserBySession(Long userId, Long sessionId); + + /** + *

      Persist the given persistent instance of WikiUser.

      + * + * @param wikiUser The instance of WikiUser to persist. + */ + public void saveWikiUser(WikiUser wikiUser); + + /** + *

      Update the given persistent instance of WikiUser.

      + * + * @param wikiUser The instance of WikiUser to persist. + */ + public void updateWikiUser(WikiUser wikiUser); + + /** + *

      Delete the given instance of WikiUser

      + * + * @param wikiUser The instance of WikiUser to delete. + */ + public void removeWikiUser(WikiUser wikiUser); + + /** + *

      Delete the given instance of WikiUser with the + * given user id userId + * + * @param userId The wiki user id. + */ + public void removeWikiUser(Long userId); + + /** + * Returns the number of users that are in this particular + * session. + * + * @param wikiSession + * @return the number of users that are in this session + */ + public int getNumberOfUsers(WikiSession wikiSession); + + public List getWikiUsersBySession(Long sessionId); +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiAttachmentDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiAttachmentDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiAttachmentDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,123 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.lams.lams.tool.wiki.WikiAttachment; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; +/** + * @author mtruong + * + *

      Hibernate implementation for database access of wiki attachment, + * which are generally the uploads, updates and removal of online/offline + * instruction files

      + */ +public class WikiAttachmentDAO extends HibernateDaoSupport implements IWikiAttachmentDAO { + + private static final String FIND_NB_ATTACHMENT_BY_UUID = "from " + WikiAttachment.class.getName() + " as wiki where wiki.uuid=?"; + private static final String FIND_NB_ATTACHMENT_BY_FILENAME = "from " + WikiAttachment.class.getName() + " as wiki where wiki.filename=?"; + private static final String GET_ATTACHMENT_FROM_CONTENT = "select wiki.attachmentId from " + WikiAttachment.class.getName() + " as wiki where wiki.wikiContent= :wikiContent"; + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#retrieveAttachment(java.lang.Long) */ + public WikiAttachment retrieveAttachment(Long attachmentId) + { + return (WikiAttachment)this.getHibernateTemplate().get(WikiAttachment.class, attachmentId); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#retrieveAttachmentByUuid(java.lang.Long) */ + public WikiAttachment retrieveAttachmentByUuid(Long uuid) + { + List attachments = getSession().createQuery(FIND_NB_ATTACHMENT_BY_UUID) + .setLong(0,uuid.longValue()) + .list(); + + if(attachments != null && attachments.size() > 0){ + WikiAttachment wiki = (WikiAttachment) attachments.get(0); + return wiki; + } + else + return null; + + + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#retrieveAttachmentByFilename(java.lang.String) */ + public WikiAttachment retrieveAttachmentByFilename(String filename) + { + List attachments = getSession().createQuery(FIND_NB_ATTACHMENT_BY_FILENAME) + .setString(0, filename) + .list(); + + if(attachments != null && attachments.size() > 0){ + WikiAttachment wiki = (WikiAttachment) attachments.get(0); + return wiki; + } + else + return null; + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#getAttachmentIdsFromContent(org.lams.lams.tool.wiki.WikiContent) */ + public List getAttachmentIdsFromContent(WikiContent wikiContent) + { + return (getHibernateTemplate().findByNamedParam(GET_ATTACHMENT_FROM_CONTENT, + "wikiContent", + wikiContent)); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#saveAttachment(org.lams.lams.tool.wiki.WikiContent) */ + public void saveAttachment(WikiAttachment attachment) + { + this.getHibernateTemplate().saveOrUpdate(attachment); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#removeAttachment(org.lams.lams.tool.wiki.WikiContent) */ + public void removeAttachment(WikiAttachment attachment) + { + //this.getHibernateTemplate().delete(attachment); + removeAttachment(attachment.getUuid()); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO#removeAttachment(java.lang.Long) */ + public void removeAttachment(Long uuid) + { + //this.getHibernateTemplate().delete(retrieveAttachmentByUuid(uuid)); + List attachments = getSession().createQuery(FIND_NB_ATTACHMENT_BY_UUID) + .setLong(0,uuid.longValue()) + .list(); + + if(attachments != null && attachments.size() > 0){ + WikiAttachment wiki = (WikiAttachment) attachments.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + this.getHibernateTemplate().delete(wiki); + this.getHibernateTemplate().flush(); + } + + } +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiContentDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiContentDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiContentDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,148 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dao.hibernate; + +import java.util.List; +import java.lang.Long; + +import org.hibernate.FlushMode; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.dao.IWikiContentDAO; +import org.springframework.orm.hibernate3.HibernateCallback; +import org.springframework.orm.hibernate3.HibernateTemplate; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + +/** + * @author mtruong + *

      Hibernate implementation for database access to Wiki content for the wiki tool.

      + */ + +public class WikiContentDAO extends HibernateDaoSupport implements IWikiContentDAO { + + private static final String FIND_NB_CONTENT = "from " + WikiContent.class.getName() + " as wiki where wiki.wikiContentId=?"; + + + private static final String LOAD_NB_BY_SESSION = "select wiki from WikiContent wiki left join fetch " + + "wiki.wikiSessions session where session.wikiSessionId=:sessionId"; + + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#getWikiContentByUID(java.lang.Long) */ + public WikiContent getWikiContentByUID(Long uid) + { + return (WikiContent) this.getHibernateTemplate() + .get(WikiContent.class, uid); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#findWikiContentById(java.lang.Long) */ + public WikiContent findWikiContentById(Long wikiContentId) + { + String query = "from WikiContent as wiki where wiki.wikiContentId = ?"; + List content = getHibernateTemplate().find(query,wikiContentId); + + if(content!=null && content.size() == 0) + { + return null; + } + else + { + return (WikiContent)content.get(0); + } + + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#getWikiContentBySession(java.lang.Long) */ + public WikiContent getWikiContentBySession(final Long wikiSessionId) + { + return (WikiContent) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session session) throws HibernateException + { + return session.createQuery(LOAD_NB_BY_SESSION) + .setLong("sessionId", + wikiSessionId.longValue()) + .uniqueResult(); + } + }); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#saveWikiContent(org.lams.lams.tool.wiki.WikiContent) */ + public void saveWikiContent(WikiContent wikiContent) + { + this.getHibernateTemplate().save(wikiContent); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#updateWikiContent(org.lams.lams.tool.wiki.WikiContent) */ + public void updateWikiContent(WikiContent wikiContent) + { + this.getHibernateTemplate().update(wikiContent); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#removeWiki(java.lang.Long)*/ + public void removeWiki(Long wikiContentId) + { + if ( wikiContentId != null) { + //String query = "from org.lams.lams.tool.wiki.WikiContent as wiki where wiki.wikiContentId=?"; + List list = getSession().createQuery(FIND_NB_CONTENT) + .setLong(0,wikiContentId.longValue()) + .list(); + + if(list != null && list.size() > 0){ + WikiContent wiki = (WikiContent) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + this.getHibernateTemplate().delete(wiki); + this.getHibernateTemplate().flush(); + } + } + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#removeWiki(org.lams.lams.tool.wiki.WikiContent)*/ + public void removeWiki(WikiContent wikiContent) + { + removeWiki(wikiContent.getWikiContentId()); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#removeWikiSessions(org.lams.lams.tool.wiki.WikiContent)*/ + public void removeWikiSessions(WikiContent wikiContent) + { + this.getHibernateTemplate().deleteAll(wikiContent.getWikiSessions()); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiContentDAO#addWikiSession(java.lang.Long, org.lams.lams.tool.wiki.WikiSession) */ + public void addWikiSession(Long wikiContentId, WikiSession wikiSession) + { + WikiContent content = findWikiContentById(wikiContentId); + wikiSession.setWikiContent(content); + content.getWikiSessions().add(wikiSession); + this.getHibernateTemplate().saveOrUpdate(wikiSession); + this.getHibernateTemplate().saveOrUpdate(content); + } + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiSessionDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiSessionDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiSessionDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,156 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.hibernate.HibernateException; +import org.hibernate.Session; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.WikiUser; +import org.lams.lams.tool.wiki.dao.IWikiSessionDAO; +import org.springframework.orm.hibernate3.HibernateCallback; +import org.springframework.orm.hibernate3.HibernateTemplate; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + +/** + * @author mtruong + *

      Hibernate implementation for database access to Wiki sessions for the wiki tool.

      + */ + +public class WikiSessionDAO extends HibernateDaoSupport implements IWikiSessionDAO { + + private static final String FIND_NB_SESSION = "from " + WikiSession.class.getName() + " as wiki where wiki.wikiSessionId=?"; + + private static final String LOAD_NBSESSION_BY_USER = "select ns from WikiSession ns left join fetch " + + "ns.wikiUsers user where user.userId=:userId"; + + private static final String GET_SESSIONS_FROM_CONTENT = "select ns.wikiSessionId from WikiSession ns where ns.wikiContent= :wikiContent"; + + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#findWikiSessionById(java.lang.Long) */ + public WikiSession findWikiSessionById(Long wikiSessionId) + { + String query = "from WikiSession wikiS where wikiS.wikiSessionId=?"; + List session = getHibernateTemplate().find(query,wikiSessionId); + + if(session!=null && session.size() == 0) + { + return null; + } + else + { + return (WikiSession)session.get(0); + } + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#saveWikiSession(org.lams.lams.tool.wiki.WikiSession) */ + public void saveWikiSession(WikiSession wikiSession) + { + this.getHibernateTemplate().save(wikiSession); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#updateWikiSession(org.lams.lams.tool.wiki.WikiSession) */ + public void updateWikiSession(WikiSession wikiSession) + { + this.getHibernateTemplate().update(wikiSession); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#removeWikiSession(java.lang.Long) */ + public void removeWikiSession(Long wikiSessionId) + { + + HibernateTemplate templ = this.getHibernateTemplate(); + if ( wikiSessionId != null) { + //String query = "from org.lams.lams.tool.wiki.WikiContent as wiki where wiki.wikiContentId=?"; + List list = getSession().createQuery(FIND_NB_SESSION) + .setLong(0,wikiSessionId.longValue()) + .list(); + + if(list != null && list.size() > 0){ + WikiSession wiki = (WikiSession) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + templ.delete(wiki); + templ.flush(); + } + } + + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#removeWikiSession(org.lams.lams.tool.wiki.WikiSession) */ + public void removeWikiSession(WikiSession wikiSession) + { + removeWikiSession(wikiSession.getWikiSessionId()); + //this.getHibernateTemplate().delete(wikiSession); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#getWikiSessionByUser(java.lang.Long) */ + public WikiSession getWikiSessionByUser(final Long userId) + { + return (WikiSession) getHibernateTemplate().execute(new HibernateCallback() + { + + public Object doInHibernate(Session session) throws HibernateException + { + return session.createQuery(LOAD_NBSESSION_BY_USER) + .setLong("userId", + userId.longValue()) + .uniqueResult(); + } + }); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#removeWikiUsers(org.lams.lams.tool.wiki.WikiSession) */ + public void removeWikiUsers(WikiSession wikiSession) + { + this.getHibernateTemplate().deleteAll(wikiSession.getWikiUsers()); + } + + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#addWikiUsers(java.lang.Long, org.lams.lams.tool.wiki.WikiSession) */ + public void addWikiUsers(Long wikiSessionId, WikiUser user) + { + WikiSession session = findWikiSessionById(wikiSessionId); + user.setWikiSession(session); + session.getWikiUsers().add(user); + this.getHibernateTemplate().saveOrUpdate(user); + this.getHibernateTemplate().merge(session); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiSessionDAO#getSessionsFromContent(org.lams.lams.tool.wiki.WikiSession) */ + public List getSessionsFromContent(WikiContent wikiContent) + { + return (getHibernateTemplate().findByNamedParam(GET_SESSIONS_FROM_CONTENT, + "wikiContent", + wikiContent)); + } + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiUserDAO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiUserDAO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dao/hibernate/WikiUserDAO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,135 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License 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.lams.lams.tool.wiki.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.lams.lams.tool.wiki.dao.IWikiUserDAO; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiUser; +import org.springframework.orm.hibernate3.HibernateTemplate; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; +import org.lams.lams.tool.wiki.WikiSession; + +/** + * @author mtruong + *

      Hibernate implementation for database access to Wiki users (learners) for the wiki tool.

      + */ +public class WikiUserDAO extends HibernateDaoSupport implements IWikiUserDAO { + + private static final String FIND_NB_USER = "from " + WikiUser.class.getName() + " as wiki where wiki.userId=?"; + + private static final String FIND_NB_USER_BY_SESSION = "from " + WikiUser.class.getName() + " as wiki where wiki.userId=? and wiki.wikiSession.wikiSessionId=?"; + + private static final String COUNT_USERS_IN_SESSION = "select nu.userId from WikiUser nu where nu.wikiSession= :wikiSession"; + + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#getWikiUserByID(java.lang.Long) */ + public WikiUser getWikiUser(Long userId, Long sessionId) + { + String query = "from WikiUser user where user.userId=? and user.wikiSession.wikiSessionId=?"; + Object[] values = new Object[2]; + values[0] = userId; + values[1] = sessionId; + List users = getHibernateTemplate().find(query,values); + if(users!=null && users.size() == 0) + { + return null; + } + else + { + return (WikiUser)users.get(0); + } + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#getWikiUserBySession(java.lang.Long, java.lang.Long)*/ + public WikiUser getWikiUserBySession(Long userId, Long sessionId) + { + List usersReturned = getSession().createQuery(FIND_NB_USER_BY_SESSION) + .setLong(0,userId.longValue()) + .setLong(1, sessionId.longValue()) + .list(); + + if(usersReturned != null && usersReturned.size() > 0){ + WikiUser wiki = (WikiUser) usersReturned.get(0); + return wiki; + } + else + return null; + + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#saveWikiUser(org.lams.lams.tool.wiki.WikiUser) */ + public void saveWikiUser(WikiUser wikiUser) + { + this.getHibernateTemplate().save(wikiUser); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#updateWikiUser(org.lams.lams.tool.wiki.WikiUser) */ + public void updateWikiUser(WikiUser wikiUser) + { + this.getHibernateTemplate().update(wikiUser); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#removeWikiUser(java.lang.Long) */ + public void removeWikiUser(Long userId) + { + if ( userId != null) { + //String query = "from org.lams.lams.tool.wiki.WikiContent as wiki where wiki.wikiContentId=?"; + List list = getSession().createQuery(FIND_NB_USER) + .setLong(0,userId.longValue()) + .list(); + + if(list != null && list.size() > 0){ + WikiUser wiki = (WikiUser) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + this.getHibernateTemplate().delete(wiki); + this.getHibernateTemplate().flush(); + } + } + + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#removeWikiUser(org.lams.lams.tool.wiki.WikiUser) */ + public void removeWikiUser(WikiUser wikiUser) + { + // this.getHibernateTemplate().delete(wikiUser); + removeWikiUser(wikiUser.getUserId()); + } + + /** @see org.lams.lams.tool.wiki.dao.IWikiUserDAO#getNumberOfUsers((org.lams.lams.tool.wiki.WikiSession) */ + public int getNumberOfUsers(WikiSession wikiSession) + { + return (getHibernateTemplate().findByNamedParam(COUNT_USERS_IN_SESSION, + "wikiSession", + wikiSession)).size(); + } + + public List getWikiUsersBySession(Long sessionId) { + String query = "from WikiUser user where user.wikiSession.wikiSessionId=?"; + return getHibernateTemplate().find(query,sessionId); + } +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dto/ReflectionDTO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dto/ReflectionDTO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/dto/ReflectionDTO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,84 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.dto; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; + +/** + * @author jliew + * + */ +public class ReflectionDTO { + + private Long userId; + private String username; + private String fullName; + private String entry; + private Long externalId; + + public ReflectionDTO(NotebookEntry wikiEntry) { + this.entry = wikiEntry.getEntry(); + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getEntry() { + return entry; + } + + public void setEntry(String entry) { + this.entry = entry; + } + + public Long getExternalId() { + return externalId; + } + + public void setExternalId(Long externalId) { + this.externalId = externalId; + } + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/IWikiService.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/IWikiService.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/IWikiService.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,333 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.service; + +import java.io.InputStream; +import java.util.List; + +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lams.lams.tool.wiki.WikiAttachment; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.WikiUser; + + +/** + * Defines the contract that the tool service provider must follow + * + * @author mtruong + */ +public interface IWikiService { + + //=================================================================== + // WikiContent access methods + //=================================================================== + + + + /** + *

      Returns the persistent instance of WikiContent + * with the given tool session id wikiSessionId, returns null if not found. + * + * @param wikiSessionId The tool session id + * @return a persistent instance of WikiContent or null if not found. + */ + public WikiContent retrieveWikiBySessionID(Long wikiSessionId); + + /** + *

      Retrieve an instance of WikiContent with the given + * tool content id wikiContentId

      + * @param wikiContentId The tool content id + * @return an instance of WikiContent + */ + public WikiContent retrieveWiki(Long wikiContentId); + + + /** + *

      Persist/Update the given persistent instance of WikiContent.

      + * + * @param wikiContent The instance of WikiContent to persist. + */ + public void saveWiki(WikiContent wikiContent); + + + /** + *

      Deletes all instances of WikiSession that are associated + * with the given instance of WikiContent

      + * + * @param wikiContent The instance of WikiContent in which corresponding instances of WikiSession should be deleted. + */ + public void removeWikiSessionsFromContent(WikiContent wikiContent); + + /** + *

      Delete the given instance of WikiContent with the + * given tool content id wikiContentId + * + * @param wikiContentId The tool content Id. + */ + public void removeWiki(Long wikiContentId); + + /** + *

      Delete the given instance of WikiContent

      + * + * @param wikiContent The instance of WikiContent to delete. + */ + public void removeWiki(WikiContent wikiContent); + + + //=================================================================== + // WikiSession access methods + //=================================================================== + /** + *

      Return the persistent instance of a WikiSession + * with the given tool session id wikiSessionId, + * returns null if not found.

      + * + * @param wikiSessionId The tool session id + * @return the persistent instance of a WikiSession or null if not found. + */ + public WikiSession retrieveWikiSession(Long wikiSessionId); + + + /** + * Persists the new WikiSession object into the database. + * + * @param wikiSession the WikiSession object to persist + */ + public void saveWikiSession(WikiSession wikiSession); + + + /** + * Updates the values of the wiki session. + * @param wikiSession + */ + public void updateWikiSession(WikiSession wikiSession); + + /** + * Remove the wiki session object with session id of + * that specified in the argument. + * + * @param wikiSessionId The id of the requested wiki object + * + */ + public void removeSession(Long wikiSessionId); + + /** + *

      Delete the given instance of WikiSession

      + * + * @param wikiSession The instance of WikiSession to delete. + */ + public void removeSession(WikiSession wikiSession); + + + /** + *

      Deletes all instances of WikiUser that are associated + * with the given instance of WikiSession

      + * + * @param wikiSession The instance of WikiSession in which corresponding instances of WikiUser should be deleted. + */ + public void removeWikiUsersFromSession(WikiSession wikiSession); + + /** + *

      Returns the persistent instance of WikiSession + * with the given wiki user iduserId, returns null if not found. + * + * @param userId The user id + * @return a persistent instance of WikiSession or null if not found. + */ + public WikiSession retrieveWikiSessionByUserID(Long userId); + + //=================================================================== + // WikiUser access methods + //=================================================================== + /** + *

      Return the persistent instance of a WikiUser + * with the given user idwikiUserId, + * returns null if not found.

      + * + * @param wikiUserId The user id of the instance of WikiUser + * @return the persistent instance of a WikiUser or null if not found. + */ + public WikiUser retrieveWikiUser(Long wikiUserId, Long toolSessionId); + + /** + *

      Return the persistent instance of a WikiUser + * who has the user id userId and tool session id + * sessionId + * returns null if not found.

      + * + * @param userId. The id of the learner + * @param sessionId. The tool session id to which this user belongs to. + * @return the persistent instance of a WikiUser or null if not found. + */ + public WikiUser retrieveWikiUserBySession(Long userId, Long sessionId); + + /** + * Persists the new WikiUser object into the database. + * + * @param wikiUser the WikiUser object to persist + */ + public void saveWikiUser(WikiUser wikiUser); + + + /** + * Updates the values of the wiki user. + * @param wikiUser + */ + public void updateWikiUser(WikiUser wikiUser); + + /** + * Remove the wiki user object with user id of + * that specified in the argument. + * + * @param wikiUserId The id of the requested wiki object + * @param toolSessionId The id of the wikiUser's associated wikiSession + * + */ + public void removeUser(Long wikiUserId, Long toolSessionId); + + /** + *

      Delete the given instance of WikiUser

      + * + * @param wikiUser The instance of WikiUser to delete. + */ + public void removeUser(WikiUser wikiUser); + + /** + *

      Saves the instance of WikiSession to the database. + * This instance is added to the collection of sessions from + * WikiContent with tool content id wikiContentId

      + * + * @param wikiContentId The tool content Id + * @param session The instance of WikiSession to persist + */ + public void addSession(Long wikiContentId, WikiSession session); + + /** + *

      Saves the instance of WikiUser to the database. + * wikiUser is added to the collection of users from + * WikiSession with tool session id wikiSessionId

      + * + * @param wikiSessionId The tool session id + * @param user The instance of WikiUser to persist + */ + public void addUser(Long wikiSessionId, WikiUser wikiUser); + + /** + *

      Retrieves a list of the session IDs from the given instance of WikiContent

      + * @param content + * @return list of session ids (Long) + */ + public List getSessionIdsFromContent(WikiContent content); + + /** + *

      Returns the number of users in this session

      + * @param session + * @return The number of users in the session + */ + public int getNumberOfUsersInSession(WikiSession session); + + /** + *

      Finds the number of learners that have participated in this tool activity + * with the given toolContentId. It finds all the toolSessionIds relating to this + * toolContentId, and calculates the number of users in each tool session(group). + * Returns the total number of users across all sessions

      + * @param toolContentId + * @return the total number of users for this tool activity + */ + public int calculateTotalNumberOfUsers(Long toolContentId); + + //=================================================================== + // WikiAttachment access methods + //=================================================================== + + /** + *

      Retrieve an instance of WikiAttachment with the given + * attachment id attachmentId

      + * @param attachmentId The id for the attachment file + * @return an instance of WikiAttachment + */ + public WikiAttachment retrieveAttachment(Long attachmentId); + + /** + *

      Retrieve the file attachment with the given uuid

      + * @param uuid The unique identifier for the file, corresponds to the uuid for the file stored in content repository + * @return an instance of WikiAttachment + */ + public WikiAttachment retrieveAttachmentByUuid(Long uuid); + + /** + *

      Retrieve an instance of WikiAttachment with the + * filename filename

      + * @param filename The filename of the attachment that you want to retrieve + * @return an instance of WikiAttachment + */ + public WikiAttachment retrieveAttachmentByFilename(String filename); + + /** + *

      Retrieve the list of attachment ids with the given instance of WikiContent

      + * @param wikiContent The given instance of WikiContent + * @return List. the list of attachment ids (java.lang.Long) + */ + public List getAttachmentIdsFromContent(WikiContent wikiContent); + + /** + *

      Saves (persists) or update the WikiAttachment object in the + * database.

      + * @param content The overall wiki content object to which the attachment is to be added + * @param attachment The instance of WikiAttachment to save + */ + public void saveAttachment(WikiContent content, WikiAttachment attachment); + + /** + * Removes the WikiAttachment object from the database. + * @param content The overall wiki content object to which the attachment is to be added + * @param attachment The instance of WikiAttachment to delete. + */ + public void removeAttachment(WikiContent content, WikiAttachment attachment) throws RepositoryCheckedException; + + /** + * Add a file to the content repository. Does not add a record to the wiki tables. + * @throws RepositoryCheckedException + */ + public NodeKey uploadFile(InputStream istream, String filename, String contentType, String fileType) throws RepositoryCheckedException; + + /** + * This method retrieves the default content id. + * @param toolSignature The tool signature which is defined in lams_tool table. + * @return the default content id + */ + public Long getToolDefaultContentIdBySignature(String toolSignature); + + public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); + + public NotebookEntry getEntry(Long id, Integer idType, String signature, Integer userID); + + public void updateEntry(NotebookEntry notebookEntry); + + public List getUsersBySession(Long sessionId); +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/WikiServicePOJO.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/WikiServicePOJO.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/WikiServicePOJO.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,1250 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.service; + +import java.io.InputStream; +import java.util.Date; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.ItemNotFoundException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.learning.service.ILearnerService; +import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; +import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.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.lams.lams.tool.wiki.WikiApplicationException; +import org.lams.lams.tool.wiki.WikiAttachment; +import org.lams.lams.tool.wiki.WikiConstants; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.WikiUser; +import org.lams.lams.tool.wiki.dao.IWikiAttachmentDAO; +import org.lams.lams.tool.wiki.dao.IWikiContentDAO; +import org.lams.lams.tool.wiki.dao.IWikiSessionDAO; +import org.lams.lams.tool.wiki.dao.IWikiUserDAO; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.springframework.dao.DataAccessException; + + + +/** + * An implementation of the WikiService interface. + * + * As a requirement, all LAMS tool's service bean must implement ToolContentManager and ToolSessionManager. + * @author mtruong + * + */ +public class WikiServicePOJO implements IWikiService, ToolContentManager, ToolSessionManager, ToolContentImport102Manager { + + private WikiContent wikiContent; + private IWikiContentDAO wikiContentDAO=null; + + private WikiSession wikiSession; + private IWikiSessionDAO wikiSessionDAO = null; + + private ILearnerService learnerService; + private ILamsToolService toolService; + + private WikiUser wikiUser; + private IWikiUserDAO wikiUserDAO=null; + + private IWikiAttachmentDAO wikiAttachmentDAO = null; + private IToolContentHandler wikiToolContentHandler = null; + + private IExportToolContentService exportContentService; + private static Logger log = Logger.getLogger(WikiServicePOJO.class); + + private ICoreNotebookService coreNotebookService; + + + /* ============================================================================== + * Methods for access to WikiContent objects + * ============================================================================== + */ + + + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#retrieveWiki(Long) + */ + public WikiContent retrieveWiki(Long wikiContentId) throws WikiApplicationException + { + if (wikiContentId == null) + { + String error = "Unable to continue. The tool content id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiContent = wikiContentDAO.findWikiContentById(wikiContentId); + + } + catch (DataAccessException e) + { + throw new WikiApplicationException("An exception has occured when trying to retrieve wiki content: " + + e.getMessage(), + e); + } + + return wikiContent; + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#retrieveWikiBySessionID(Long) + */ + public WikiContent retrieveWikiBySessionID(Long wikiSessionId) + { + if (wikiSessionId == null) + { + String error = "Unable to continue. The tool session id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiContent = wikiContentDAO.getWikiContentBySession(wikiSessionId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("An exception has occured when trying to retrieve wiki content: " + + e.getMessage(), + e); + } + + return wikiContent; + } + + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#saveWiki(org.lams.lams.tool.wiki.WikiContent) + */ + public void saveWiki(WikiContent wikiContent) + { + try + { + if ( wikiContent.getUid() == null ) { + wikiContentDAO.saveWikiContent(wikiContent); + } else { + wikiContentDAO.updateWikiContent(wikiContent); + } + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to save the wiki content object: " + + e.getMessage(), e); + } + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeWikiSessions(org.lams.lams.tool.wiki.WikiContent) + */ + public void removeWikiSessionsFromContent(WikiContent wikiContent) + { + try + { + wikiContent.getWikiSessions().clear(); + //updateWiki(wikiContent); + + wikiContentDAO.removeWikiSessions(wikiContent); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove the sessions associated with this wiki content object: " + + e.getMessage(), e); + } + + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeWiki(org.lams.lams.tool.wiki.WikiContent) + */ + public void removeWiki(Long wikiContentId) + { + if (wikiContentId == null) + { + String error = "Unable to continue. The tool content id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiContentDAO.removeWiki(wikiContentId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove this wiki content object: " + + e.getMessage(), e); + } + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeWiki(org.lams.lams.tool.wiki.WikiContent) + */ + public void removeWiki(WikiContent wikiContent) + { + try + { + wikiContentDAO.removeWiki(wikiContent); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove this wiki content object: " + + e.getMessage(), e); + } + } + + + /* ============================================================================== + * Methods for access to WikiSession objects + * ============================================================================== + */ + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#retrieveWikiSession(Long) + */ + public WikiSession retrieveWikiSession(Long wikiSessionId) + { + if (wikiSessionId == null) + { + String error = "Unable to continue. The tool session id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiSession = wikiSessionDAO.findWikiSessionById(wikiSessionId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("An exception has occured when trying to retrieve wiki session object: " + + e.getMessage(), + e); + } + + return wikiSession; + } + + + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#saveWikiSession(org.lams.lams.tool.wiki.WikiSession) + */ + public void saveWikiSession(WikiSession wikiSession) + { + try + { + WikiContent content = wikiSession.getWikiContent(); + // content.getWikiSessions().add(wikiSession); + // content. + + /* updateWiki(content); */ + wikiSessionDAO.saveWikiSession(wikiSession); + } + catch(DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to save this wiki session: " + +e.getMessage(), e); + } + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#updateWikiSession(org.lams.lams.tool.wiki.WikiSession) + */ + public void updateWikiSession(WikiSession wikiSession) + { + try + { + wikiSessionDAO.updateWikiSession(wikiSession); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to update this wiki session: " + +e.getMessage(), e); + } + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeSession(Long) + */ + public void removeSession(Long wikiSessionId) + { + if (wikiSessionId == null) + { + String error = "Unable to continue. The tool session id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + WikiSession sessionToDelete = retrieveWikiSession(wikiSessionId); + WikiContent contentReferredBySession = sessionToDelete.getWikiContent(); + //un-associate the session from content + contentReferredBySession.getWikiSessions().remove(sessionToDelete); + wikiSessionDAO.removeWikiSession(wikiSessionId); + // updateWiki(contentReferredBySession); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove this wiki session object: " + + e.getMessage(), e); + } + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeSession(org.lams.lams.tool.wiki.WikiSession) + */ + public void removeSession(WikiSession wikiSession) + { + try + { + WikiContent contentReferredBySession = wikiSession.getWikiContent(); + //un-associate the session from content + contentReferredBySession.getWikiSessions().remove(wikiSession); + + wikiSessionDAO.removeWikiSession(wikiSession); + // updateWiki(contentReferredBySession); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove this wiki session object: " + + e.getMessage(), e); + } + } + + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeWikiUsersFromSession(org.lams.lams.tool.wiki.WikiSession) + */ + public void removeWikiUsersFromSession(WikiSession wikiSession) + { + try + { + wikiSession.getWikiUsers().clear(); + // updateWikiSession(wikiSession); + + wikiSessionDAO.removeWikiUsers(wikiSession); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove the users associated with this wiki session instance: " + + e.getMessage(), e); + } + + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#retrieveWikiSessionByUserID(java.lang.Long) + */ + public WikiSession retrieveWikiSessionByUserID(Long userId) + { + if (userId == null) + { + String error = "Unable to continue. The tool session id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiSession = wikiSessionDAO.getWikiSessionByUser(userId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to retrieve wiki session instance " + + e.getMessage(), e); + } + return wikiSession; + + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#getSessionIdsFromContent(org.lams.lams.tool.wiki.WikiContent) */ + public List getSessionIdsFromContent(WikiContent content) + { + List list = null; + try + { + list = wikiSessionDAO.getSessionsFromContent(content); + } + catch(DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to the list of session ids from content " + + e.getMessage(), e); + } + return list; + } + + /* ============================================================================== + * Methods for access to WikiUser objects + * ============================================================================== + */ + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#retrieveWikiUser(java.lang.Long) + */ + public WikiUser retrieveWikiUser(Long wikiUserId, Long wikiSessionId) + { + if (wikiUserId == null) + { + String error = "Unable to continue. The user id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiUser = wikiUserDAO.getWikiUser(wikiUserId, wikiSessionId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("An exception has occured when trying to retrieve wiki user: " + + e.getMessage(), + e); + } + + return wikiUser; + } + + + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#saveWikiUser(org.lams.lams.tool.wiki.WikiUser) + */ + public void saveWikiUser(WikiUser wikiUser) + { + try + { + WikiSession session = wikiUser.getWikiSession(); + session.getWikiUsers().add(wikiUser); + // updateWikiSession(session); + + wikiUserDAO.saveWikiUser(wikiUser); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to save the wiki user object: " + + e.getMessage(), e); + } + } + + /** org.lams.lams.tool.wiki.service.IWikiService#retrieveWikiUserBySession(java.lang.Long, java.lang.Long) */ + public WikiUser retrieveWikiUserBySession(Long userId, Long sessionId) + { + try + { + wikiUser = wikiUserDAO.getWikiUserBySession(userId, sessionId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to retrive the wiki user object: " + + e.getMessage(), e); + } + + return wikiUser; + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#updateWikiUser(org.lams.lams.tool.wiki.WikiUser) + */ + public void updateWikiUser(WikiUser wikiUser) + { + try + { + wikiUserDAO.updateWikiUser(wikiUser); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to update the wiki user object: " + + e.getMessage(), e); + } + } + + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeUser(org.lams.lams.tool.wiki.WikiUser) + */ + public void removeUser(WikiUser wikiUser) + { + try + { + WikiSession session = wikiUser.getWikiSession(); + session.getWikiUsers().remove(wikiUser); + + wikiUserDAO.removeWikiUser(wikiUser); + + // updateWikiSession(session); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove the wiki user object: " + + e.getMessage(), e); + } + } + + /** + * @see org.lams.lams.tool.wiki.service.IWikiService#removeUser(java.lang.Long) + */ + public void removeUser(Long wikiUserId, Long toolSessionId) + { + if (wikiUserId == null) + { + String error = "Unable to continue. The user id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + try + { + WikiUser user = retrieveWikiUser(wikiUserId, toolSessionId); + WikiSession session = user.getWikiSession(); + session.getWikiUsers().remove(user); + wikiUserDAO.removeWikiUser(wikiUserId); + + // updateWikiSession(session); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove the wiki user object: " + + e.getMessage(), e); + } + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#addSession(java.lang.Long, org.lams.lams.tool.wiki.WikiSession) */ + public void addSession(Long wikiContentId, WikiSession session) + { + + if (wikiContentId == null || session == null) + { + String error = "Unable to continue. The tool content id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + wikiContentDAO.addWikiSession(wikiContentId, session); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to create session: " + + e.getMessage(), e); + } + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#addUser(java.lang.Long, org.lams.lams.tool.wiki.WikiSession) */ + public void addUser(Long wikiSessionId, WikiUser user) + { + + if (wikiSessionId == null) + { + String error = "Unable to continue. The tool session id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + try + { + wikiSessionDAO.addWikiUsers(wikiSessionId, user); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to create user: " + + e.getMessage(), e); + } + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#getNumberOfUsersInSession(org.lams.lams.tool.wiki.oticeboardSession) */ + public int getNumberOfUsersInSession(WikiSession session) + { + int numberOfUsers; + try + { + numberOfUsers = wikiUserDAO.getNumberOfUsers(session); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to get the number of users in the session: " + + e.getMessage(), e); + } + return numberOfUsers; + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#calculateTotalNumberOfUsers(java.lang.Long) */ + public int calculateTotalNumberOfUsers(Long toolContentId) + { + + if (toolContentId == null) + { + String error = "Unable to continue. The tool content id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + int totalNumberOfUsers = 0; + try + { + wikiContent = retrieveWiki(toolContentId); + List listOfSessionIds = getSessionIdsFromContent(wikiContent); + + Iterator i = listOfSessionIds.iterator(); + + while(i.hasNext()) + { + Long sessionId = (Long)i.next(); + int usersInThisSession = getNumberOfUsersInSession(retrieveWikiSession(sessionId)); + totalNumberOfUsers = totalNumberOfUsers + usersInThisSession; + } + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while calculating the total number of users in tool activity " + + e.getMessage(), e); + } + return totalNumberOfUsers; + } + + public List getUsersBySession(Long sessionId) { + + if (sessionId!=null) { + try { + return wikiUserDAO.getWikiUsersBySession(sessionId); + } catch (DataAccessException e) { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to get the list of users in the session: " + + e.getMessage(), e); + } + } else { + log.error("Unable to continue. Session id is missing"); + } + return null; + } + + /* ============================================================================== + * Methods for access to WikiUser objects + * ============================================================================== + */ + + /** @see org.lams.lams.tool.wiki.service.IWikiService#retrieveAttachment(java.lang.Long) */ + public WikiAttachment retrieveAttachment(Long attachmentId) + { + if (attachmentId == null) + { + String error = "Unable to continue. The attachment id is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + + try + { + return wikiAttachmentDAO.retrieveAttachment(attachmentId); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to retrieve the attachment " + + e.getMessage(), e); + } + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#retrieveAttachmentByUuid(java.lang.Long) */ + public WikiAttachment retrieveAttachmentByUuid(Long uuid) + { + if (uuid == null) + { + String error = "Unable to continue. The uuid is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + try + { + return wikiAttachmentDAO.retrieveAttachmentByUuid(uuid); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to retrieve the attachment " + + e.getMessage(), e); + } + } + /** @see org.lams.lams.tool.wiki.service.IWikiService#retrieveAttachment(java.lang.String) */ + public WikiAttachment retrieveAttachmentByFilename(String filename) + { + if (filename == null || filename.trim().length() == 0) + { + String error = "Unable to continue. The filename is missing"; + log.error(error); + throw new WikiApplicationException(error); + } + try + { + return wikiAttachmentDAO.retrieveAttachmentByFilename(filename); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to retrieve the attachment with filename " + filename + " " + + e.getMessage(), e); + } + } + + + /** @see org.lams.lams.tool.wiki.service.IWikiService#getAttachmentIdsFromContent(org.lams.lams.tool.wiki.WikiContent) */ + public List getAttachmentIdsFromContent(WikiContent wikiContent) + { + try + { + return wikiAttachmentDAO.getAttachmentIdsFromContent(wikiContent); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to retrieve the list of attachment ids " + + e.getMessage(), e); + } + } + + /** @see org.lams.lams.tool.wiki.service.IWikiService#saveAttachment(org.lams.lams.tool.wiki.WikiAttachment) */ + public void saveAttachment(WikiContent content, WikiAttachment attachment) + { + try + { + content.getWikiAttachments().add(attachment); + attachment.setWikiContent(content); + saveWiki(content); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to save the attachment " + + e.getMessage(), e); + } + } + + /** @throws RepositoryCheckedException + * @throws + * @see org.lams.lams.tool.wiki.service.IWikiService#removeAttachment(org.lams.lams.tool.wiki.WikiAttachment) */ + public void removeAttachment(WikiContent content, WikiAttachment attachment) throws RepositoryCheckedException + { + try + { + attachment.setWikiContent(null); + content.getWikiAttachments().remove(attachment); + saveWiki(content); + } + catch (DataAccessException e) + { + throw new WikiApplicationException("EXCEPTION: An exception has occurred while trying to remove this attachment" + + e.getMessage(), e); + } + } + + /** @throws RepositoryCheckedException + * @see org.lams.lams.tool.wiki.service.IWikiService#uploadFile(java.io.InputStream, java.lang.String, java.lang.String, java.lang.String) */ + public NodeKey uploadFile(InputStream istream, String filename, String contentType, String fileType) throws RepositoryCheckedException + { + return wikiToolContentHandler.uploadFile(istream, filename, contentType, fileType); + } + + /* ===============Methods implemented from ToolContentManager =============== */ + + /** @see org.lamsfoundation.lams.tool.ToolContentManager#copyToolContent(java.lang.Long, java.lang.Long)*/ + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + + if (toContentId == null) + throw new ToolException("Failed to copy Wiki tool content. Missing parameter: toContentId"); + if (fromContentId == null) + { + //use the default content Id + //fromContentId = WikiConstants.DEFAULT_CONTENT_ID; + fromContentId = getToolDefaultContentIdBySignature(WikiConstants.TOOL_SIGNATURE); + } + + //fromContentId might not have any content, in this case use default content + //default content id might not have any contnet, throw exception + WikiContent originalWiki = null; + + try { + if ((originalWiki = retrieveWiki(fromContentId))== null) //the id given does not have content, use default content + { + //use default content id to grab contents + WikiContent defaultContent = retrieveWiki(getToolDefaultContentIdBySignature(WikiConstants.TOOL_SIGNATURE)); + + if (defaultContent != null) + { + WikiContent newContent = WikiContent.newInstance(defaultContent, toContentId, wikiToolContentHandler); + saveWiki(newContent); + } + else + { + throw new ToolException("Default content is missing. Unable to copy tool content"); + } + } + else + { + WikiContent newWikiContent = WikiContent.newInstance(originalWiki, toContentId, wikiToolContentHandler); + saveWiki(newWikiContent); + } + } catch (RepositoryCheckedException e) { + log.error("Unable to copy the tool content due to a content repository error. fromContentId "+fromContentId+" toContentId "+toContentId); + throw new ToolException(e); + } + + + } + + /** @see org.lamsfoundation.lams.tool.ToolContentManager#setAsDefineLater(java.lang.Long)*/ + public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException + { + WikiContent wikiContent = getAndCheckIDandObject(toolContentId); + + wikiContent.setDefineLater(value); + //wikiContent.setContentInUse(false); //if define later is set to true, then contentInUse flag should be false + saveWiki(wikiContent); + + } + + /** @see org.lamsfoundation.lams.tool.ToolContentManager#setAsRunOffline(java.lang.Long)*/ + public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException + { + WikiContent wikiContent = getAndCheckIDandObject(toolContentId); + + wikiContent.setForceOffline(value); + saveWiki(wikiContent); + } + + /** @see org.lamsfoundation.lams.tool.ToolContentManager#removeToolContent(java.lang.Long)*/ + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, ToolException + { + WikiContent wikiContent = getAndCheckIDandObject(toolContentId); + //if session data exist and removeSessionData=false, throw an exception + if ((!wikiContent.getWikiSessions().isEmpty()) && !removeSessionData) + throw new SessionDataExistsException("Delete failed: There is session data that belongs to this tool content id"); + + //remove any attachments that belong to this tool entry + Set attachments = wikiContent.getWikiAttachments(); + Iterator i = attachments.iterator(); + while(i.hasNext()) + { + try + { + removeAttachment(wikiContent, (WikiAttachment)i.next()); + } + catch(RepositoryCheckedException e) + { + //TODO: not sure if suppose to throw another type of exception or not + } + } + + removeWiki(toolContentId); + } + + private WikiContent getAndCheckIDandObject(Long toolContentId) throws ToolException, DataMissingException + { + if (toolContentId == null) + throw new ToolException("Tool content ID is missing. Unable to continue"); + + WikiContent wikiContent = retrieveWiki(toolContentId); + if (wikiContent == null) + throw new DataMissingException("No tool content matches this tool content id"); + + return wikiContent; + } + + private WikiSession getAndCheckSessionIDandObject(Long toolSessionId) throws ToolException, DataMissingException + { + if (toolSessionId == null) + throw new ToolException("Tool session ID is missing. Unable to continue"); + + WikiSession wikiSession = retrieveWikiSession(toolSessionId); + if (wikiSession == null) + throw new DataMissingException("No tool session matches this tool session id"); + + return wikiSession; + } + + /*private void checkSessionIDandObject(Long toolSessionId) throws ToolException, DataMissingException + { + if (toolSessionId == null) + throw new ToolException("Tool session ID is missing. Unable to continue"); + + WikiSession wikiSession = retrieveWikiSession(toolSessionId); + if (wikiSession == null) + throw new DataMissingException("No tool session matches this tool session id"); + } */ + + /** + * 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 { + WikiContent toolContentObj = wikiContentDAO.findWikiContentById(toolContentId); + if(toolContentObj == null) { + Long defaultContentId = getToolDefaultContentIdBySignature(WikiConstants.TOOL_SIGNATURE); + toolContentObj = retrieveWiki(defaultContentId); + } + if(toolContentObj == null) + throw new DataMissingException("Unable to find default content for the wiki tool"); + + try { + //set ResourceToolContentHandler as null to avoid copy file node in repository again. + toolContentObj = WikiContent.newInstance(toolContentObj,toolContentId,null); + toolContentObj.setWikiSessions(null); + exportContentService.registerFileClassForExport(WikiAttachment.class.getName(),"uuid","versionId"); + exportContentService.exportToolContent( toolContentId, toolContentObj,wikiToolContentHandler, rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } catch (ItemNotFoundException e) { + throw new ToolException(e); + } catch (RepositoryCheckedException 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(WikiAttachment.class.getName() + ,"uuid","versionId","filename","fileProperty",null,null); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath,wikiToolContentHandler,fromVersion,toVersion); + if(!(toolPOJO instanceof WikiContent)) + throw new ImportToolContentException("Import Noteice board tool content failed. Deserialized object is " + toolPOJO); + WikiContent toolContentObj = (WikiContent) toolPOJO; + +// reset it to new toolContentId + toolContentObj.setWikiContentId(toolContentId); + wikiContentDAO.saveWikiContent(toolContentObj); + } 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 { + return new TreeMap(); + } + + + + /* ===============Methods implemented from ToolSessionManager =============== */ + + /** @see org.lamsfoundation.lams.tool.ToolSessionManager#createToolSession(java.lang.Long, java.lang.String, java.lang.Long) */ + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException + { + if (toolSessionId == null || toolContentId == null) + { + String error = "Failed to create tool session. The tool session id or tool content id is invalid"; + throw new ToolException(error); + } + + + if ((wikiContent = retrieveWiki(toolContentId)) == null) + { + //use default content + WikiContent defaultContent = retrieveWiki(getToolDefaultContentIdBySignature(WikiConstants.TOOL_SIGNATURE)); + + if (defaultContent != null) + { + WikiSession newSession = new WikiSession(toolSessionId, + toolSessionName, + defaultContent, + new Date(System.currentTimeMillis()), + WikiSession.NOT_ATTEMPTED); + //saveWikiSession(newSession); + defaultContent.getWikiSessions().add(newSession); + saveWiki(defaultContent); + + } + else + { + throw new ToolException("Default content is missing. Unable to create tool session"); + } + } + else + { + WikiSession wikiSession = new WikiSession(toolSessionId, + toolSessionName, + wikiContent, + new Date(System.currentTimeMillis()), + WikiSession.NOT_ATTEMPTED); + + wikiContent.getWikiSessions().add(wikiSession); + saveWiki(wikiContent); + //saveWikiSession(wikiSession); + } + + + + } + + /** @see org.lamsfoundation.lams.tool.ToolSessionManager#leaveToolSession(java.lang.Long, org.lamsfoundation.lams.usermanagement.User)*/ + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException + { + getAndCheckSessionIDandObject(toolSessionId); + + return learnerService.completeToolSession(toolSessionId, learnerId); + } + + /** @see org.lamsfoundation.lams.tool.ToolSessionManager#exportToolSession(java.lang.Long)*/ + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws ToolException, DataMissingException + { + getAndCheckSessionIDandObject(toolSessionId); + throw new UnsupportedOperationException("not yet implemented"); + } + + /** @see org.lamsfoundation.lams.tool.ToolSessionManager#exportToolSession(java.util.List) */ + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws ToolException, DataMissingException + { + Iterator i = toolSessionIds.iterator(); + if (i.hasNext()) + { + Long id = (Long)i.next(); + getAndCheckSessionIDandObject(id); + } + + + throw new UnsupportedOperationException("not yet implemented"); + } + + /** @see org.lamsfoundation.lams.tool.ToolSessionManager#removeToolSession(java.lang.Long)*/ + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException + { + WikiSession session = getAndCheckSessionIDandObject(toolSessionId); + removeSession(session); + } + + /** + * 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 new TreeMap(); + } + + /** + * 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 null; + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + + /** + * Import the data for a 1.0.2 Wiki or HTMLWiki + */ + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) + { + Date now = new Date(); + WikiContent toolContentObj = new WikiContent(); + String content = WebUtil.convertNewlines((String)importValues.get(ToolContentImport102Manager.CONTENT_BODY)); + toolContentObj.setContent(content); + toolContentObj.setContentInUse(false); + toolContentObj.setCreatorUserId(user.getUserID().longValue()); + toolContentObj.setDateCreated(now); + toolContentObj.setDateUpdated(now); + toolContentObj.setDefineLater(false); + toolContentObj.setForceOffline(false); + toolContentObj.setWikiContentId(toolContentId); + toolContentObj.setOfflineInstructions(null); + toolContentObj.setOnlineInstructions(null); + toolContentObj.setTitle((String)importValues.get(ToolContentImport102Manager.CONTENT_TITLE)); + toolContentObj.setReflectOnActivity(false); + // leave as empty, no need to set them to anything. + //toolContentObj.setWikiSessions(wikiSessions); + //toolContentObj.setWikiAttachments(wikiAttachments); + wikiContentDAO.saveWikiContent(toolContentObj); + } + + /** 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 { + + WikiContent toolContentObj = retrieveWiki(toolContentId); + if ( toolContentObj == null ) { + throw new DataMissingException("Unable to set reflective data titled "+title + +" on activity toolContentId "+toolContentId + +" as the tool content does not exist."); + } + + toolContentObj.setReflectOnActivity(Boolean.TRUE); + toolContentObj.setReflectInstructions(description); + } + + //========================================================================================= + + public Long getToolDefaultContentIdBySignature(String toolSignature) + { + Long contentId = null; + contentId=new Long(toolService.getToolDefaultContentIdBySignature(toolSignature)); + if (contentId == null) + { + String error="Could not retrieve default content id for this tool"; + log.error(error); + throw new WikiApplicationException(error); + } + return contentId; + } + + /* =============== Used by Spring to "inject" the linked objects =============== */ + + /*public IWikiContentDAO getWikiContentDAO() + { + return wikiContentDAO; + } + */ + public void setWikiContentDAO(IWikiContentDAO wikiContentDAO) + { + this.wikiContentDAO = wikiContentDAO; + } + + /*public IWikiSessionDAO getWikiSessionDAO() + { + return wikiSessionDAO; + } + */ + public void setWikiSessionDAO(IWikiSessionDAO wikiSessionDAO) + { + this.wikiSessionDAO = wikiSessionDAO; + } + + /*public IWikiUserDAO getWikiUserDAO() + { + return wikiUserDAO; + } + */ + public void setWikiUserDAO(IWikiUserDAO wikiUserDAO) + { + this.wikiUserDAO = wikiUserDAO; + } + + /** + * @return Returns the learnerService. + */ + /* public ILearnerService getLearnerService() { + return learnerService; + } */ + /** + * @param learnerService The learnerService to set. + */ + public void setLearnerService(ILearnerService learnerService) { + this.learnerService = learnerService; + } + /* public IWikiAttachmentDAO getWikiAttachmentDAO() { + return wikiAttachmentDAO; + } */ + + public void setWikiAttachmentDAO(IWikiAttachmentDAO wikiAttachmentDAO) { + this.wikiAttachmentDAO = wikiAttachmentDAO; + } + /** + * @param toolService The toolService to set. + */ + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + + public IToolContentHandler getWikiToolContentHandler() { + return wikiToolContentHandler; + } + + public void setWikiToolContentHandler(IToolContentHandler wikiToolContentHandler) { + this.wikiToolContentHandler = wikiToolContentHandler; + } + + 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; + } + + /* =============== Wrappers Methods for Notebook Service (Reflective Option) =============== */ + + public Long createNotebookEntry(Long id, Integer idType, String signature, + Integer userID, String entry) { + return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry); + } + + public NotebookEntry getEntry(Long id, Integer idType, String signature, + Integer userID) { + + List list = coreNotebookService.getEntry(id, idType, signature, userID); + if (list == null || list.isEmpty()) { + return null; + } else { + return list.get(0); + } + } + + /** + * @param notebookEntry + */ + public void updateEntry(NotebookEntry notebookEntry) { + coreNotebookService.updateEntry(notebookEntry); + } +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/WikiServiceProxy.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/WikiServiceProxy.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/service/WikiServiceProxy.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,82 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lams.lams.tool.wiki.util.WikiToolContentHandler; +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.

      + * + * @author mtruong + */ + +public class WikiServiceProxy { + + public static final IWikiService getWikiService(ServletContext servletContext) + { + return (IWikiService)getWikiDomainService(servletContext); + } + + private static Object getWikiDomainService(ServletContext servletContext) + { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean("wikiService"); + } + + /* + * Return the wiki 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 wiki service object.*/ + public static final ToolSessionManager getWikiSessionManager(ServletContext servletContext) + { + return (ToolSessionManager)getWikiDomainService(servletContext); + } + + + /* + * Return the wiki 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 wiki service object. */ + public static final ToolContentManager getWikiContentManager(ServletContext servletContext) + { + return (ToolContentManager)getWikiDomainService(servletContext); + } + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/util/WikiToolContentHandler.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/util/WikiToolContentHandler.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/util/WikiToolContentHandler.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,68 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + * + * @author mtruong + */ +public class WikiToolContentHandler extends ToolContentHandler { + + private static String repositoryWorkspaceName = "wikiworkspace"; + private static String repositoryUser = "wiki"; + private static char[] repositoryId = {'l','a','m','s','-','n','b'}; + + /** + * + */ + public WikiToolContentHandler() { + 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_wiki_orig/src/java/org/lams/lams/tool/wiki/util/WikiWebUtil.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/util/WikiWebUtil.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/util/WikiWebUtil.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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.lams.lams.tool.wiki.util; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import org.lams.lams.tool.wiki.WikiApplicationException; +import org.lams.lams.tool.wiki.WikiAttachment; +import org.lams.lams.tool.wiki.WikiConstants; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.service.IWikiService; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * This Web Utility class contains helper methods used in the Action Servlets + * + * @author mtruong + * + */ +public class WikiWebUtil { + + private WikiWebUtil() {} + + public static Long convertToLong(String id) + { + try + { + return new Long(id); + } + catch (NumberFormatException e) + { + return null; + } + + } + + + /** + *

      This method is used in authoring and monitoring to display the list of files that have been uploaded. + * Contents of the collections are WikiAttachments. The current files are included in the attachmentList, + * files that the user has nominated to delete are in the deletedAttachementList.

      + * + *

      If the input collections are null, then the session variables are not modified. This + * is particularly useful for the deleted files.

      + * + * @param request the HttpServletRequest which is used to obtain the HttpSession + * @param attachmentList + * @param deletedAttachmentList + */ + public static SessionMap addUploadsToSession(SessionMap sessionMap, HttpServletRequest request, List attachmentList, List deletedAttachmentList) + { + SessionMap map = sessionMap != null ? sessionMap : new SessionMap(); + map.put(WikiConstants.ATTACHMENT_LIST, attachmentList != null ? attachmentList : new ArrayList()); + map.put(WikiConstants.DELETED_ATTACHMENT_LIST, deletedAttachmentList != null ? deletedAttachmentList : new ArrayList()); + request.getSession().setAttribute(map.getSessionID(), map); + return map; + } + + /** Setup the map containing the files that have been uploaded for this particular tool content id. + * If WikiContent content does not exist, set wiki=null and an empty list will be created. + * + * @param wikiService + * @param wiki + * @return the attachmentList + */ + public static List setupAttachmentList(IWikiService wikiService, WikiContent wiki) { + + List attachmentList = new ArrayList(); + + if ( wikiService!=null && wiki!=null ) { + List attachmentIdList = wikiService.getAttachmentIdsFromContent(wiki); + for (int i=0; iThis class is a simple combination of WikiAuthoringStarterAction and WikiAuthoringAction. + * It has been created for the purpose of supporting the new authoring page which is done using + * DHTML.

      + * + *

      The unspecified method, is the same as the execute method for WikiAuthoringStarterAction. + * It will get called when the method parameter is not specified (that is on first entry + * into the authoring environment).

      + * + *

      The save, upload and delete method is the same as that of WikiAuthoringAction, to see its explanation, + * please see org.lams.lams.tool.wiki.web.WikiAuthoringAction

      + * + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/authoring" name="WikiAuthoringForm" scope="request" + * type="org.lams.lams.tool.wiki.web.WikiAuthoringAction" + * parameter="method" validate="true" input="/author_page.jsp" + * + * @struts:action-forward name="authoringContent" path="/authoring/authoring.jsp" + * @struts:action-forward name="displayMessage" path=".message" + * + * ----------------XDoclet Tags-------------------- + */ + +public class WikiAuthoringAction extends LamsDispatchAction { + static Logger logger = Logger.getLogger(WikiAuthoringAction.class.getName()); + public final static String FORM="WikiAuthoringForm"; + + /** Get the user from the shared session */ + public UserDTO getUser(HttpServletRequest request) { + // set up the user details + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + if ( user == null ) + { + MessageResources resources = getResources(request); + String error = resources.getMessage(WikiConstants.ERR_MISSING_PARAM, "User"); + logger.error(error); + throw new WikiApplicationException(error); + } + return user; + } + + + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws WikiApplicationException { + + //to ensure that we are working with a new form, not one from previous session + WikiAuthoringForm wikiForm = new WikiAuthoringForm(); + + Long contentId = WebUtil.readLongParam(request, WikiConstants.TOOL_CONTENT_ID); + String contentFolderId = WebUtil.readStrParam(request, WikiConstants.CONTENT_FOLDER_ID); + + wikiForm.setToolContentID(contentId.toString()); + + /* DefineLater is used in the basic screen. If defineLater is set, then in the authoring page, + * the two tabs {Advanced, Instructions} are not visible. + */ + wikiForm.setDefineLater(request.getParameter(WikiConstants.DEFINE_LATER)); + + /* + * Retrieve the Service + */ + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + + List attachmentList = null; + if (!contentExists(wikiService, contentId)) + { + // Pre-fill the form with the default content + //WikiContent wiki = wikiService.retrieveWiki(WikiConstants.DEFAULT_CONTENT_ID); + Long defaultToolContentId = wikiService.getToolDefaultContentIdBySignature(WikiConstants.TOOL_SIGNATURE); + // logger.debug("Default tool content id is " + defaultToolContentId); + WikiContent wiki = wikiService.retrieveWiki(defaultToolContentId); + + if (wiki==null) + { + String error= "There is data missing in the database"; + logger.error(error); + throw new WikiApplicationException(error); + } + + //initialise the values in the form, so the values will be shown in the jsp + wikiForm.setToolContentID(contentId.toString()); + wikiForm.setContentFolderID(contentFolderId); + wikiForm.setTitle(wiki.getTitle()); + wikiForm.setContent(wiki.getContent()); + wikiForm.setOnlineInstructions(wiki.getOnlineInstructions()); + wikiForm.setOfflineInstructions(wiki.getOfflineInstructions()); + + attachmentList = WikiWebUtil.setupAttachmentList(wikiService,null); + + } + else //content already exists on the database + { + //get the values from the database + WikiContent wiki = wikiService.retrieveWiki(contentId); + + /* If retrieving existing content, check whether the contentInUse flag is set, if set, the + * author is not allowed to edit content + */ + + /* Define later set to true when the edit activity tab is brought up + * So that users cannot start using the content while the staff member is editing the content */ + wikiForm.populateFormWithWikiContentValues(wiki); + wikiForm.setContentFolderID(contentFolderId); + wiki.setDefineLater(Boolean.parseBoolean(wikiForm.getDefineLater())); + wikiService.saveWiki(wiki); + + /** TODO: setup values in the instructions map */ + + //Setup the map containing the files that have been uploaded for this particular tool content id + attachmentList = WikiWebUtil.setupAttachmentList(wikiService,wiki); + + } + + SessionMap map = WikiWebUtil.addUploadsToSession(null, request, attachmentList, WikiWebUtil.setupDeletedAttachmentList()); + wikiForm.setSessionMapID(map.getSessionID()); + + request.setAttribute(FORM, wikiForm); + return mapping.findForward(WikiConstants.AUTHOR_PAGE); + } + + /** + * Checks the session to see if the title and content session variables exist or not. + * + * @param session The HttpSession to check. + * @return true if the parameters title and content exists in the session, false otherwise + */ + private boolean contentExists(IWikiService service, Long id) + { + WikiContent wiki = service.retrieveWiki(id); + if (wiki == null) + return false; + else + return true; + + } + + public ActionForward save(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws WikiApplicationException { + + WikiAuthoringForm wikiForm = (WikiAuthoringForm)form; + //copyAuthoringFormValuesIntoFormBean(request, wikiForm); + + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + String idAsString = wikiForm.getToolContentID(); + if (idAsString == null) + { + MessageResources resources = getResources(request); + String error = resources.getMessage(WikiConstants.ERR_MISSING_PARAM, "Tool Content Id"); + logger.error(error); + throw new WikiApplicationException(error); + } + Long content_id = WikiWebUtil.convertToLong(wikiForm.getToolContentID()); + + //throws exception if the content id does not exist + checkContentId(content_id); + + WikiContent wikiContent = wikiService.retrieveWiki(content_id); + if ( wikiContent == null ) { + //create a new wiki object + wikiContent = new WikiContent(); + wikiContent.setWikiContentId(content_id); + } + + wikiForm.copyValuesIntoWikiContent(wikiContent); + if ( wikiContent.getDateCreated() == null ) + wikiContent.setDateCreated(wikiContent.getDateUpdated()); + + UserDTO user = getUser(request); + wikiContent.setCreatorUserId(new Long(user.getUserID().longValue())); + + // Author has finished editing the content and mark the defineLater flag to false + wikiContent.setDefineLater(false); + wikiService.saveWiki(wikiContent); + + // Save the attachments then update the attachment collections in the session. + SessionMap sessionMap = getSessionMap(request, wikiForm); + List attachmentList = (List) sessionMap.get(WikiConstants.ATTACHMENT_LIST); + List deletedAttachmentList = (List) sessionMap.get(WikiConstants.DELETED_ATTACHMENT_LIST); + deletedAttachmentList = saveAttachments(wikiService, wikiContent, attachmentList, deletedAttachmentList, mapping, request); + sessionMap = WikiWebUtil.addUploadsToSession(sessionMap, request, attachmentList, deletedAttachmentList); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); + return mapping.findForward(WikiConstants.AUTHOR_PAGE); + + } + + /** + * Go through the attachments collections. Remove any content repository or tool objects + * matching entries in the the deletedAttachments collection, add any new attachments in the + * attachments collection. Clear the deletedAttachments collection, ready for new editing. + */ + private List saveAttachments (IWikiService wikiService, WikiContent wikiContent, + List attachmentList, List deletedAttachmentList, + ActionMapping mapping, HttpServletRequest request) { + + if ( deletedAttachmentList != null ) { + Iterator iter = deletedAttachmentList.iterator(); + while (iter.hasNext()) { + WikiAttachment attachment = (WikiAttachment) iter.next(); + + try + { + // remove tool entry from db, does not removing entry from the content repository + // deleting a non-existent entry shouldn't cause any errors. + if ( attachment.getAttachmentId() != null ) { + wikiService.removeAttachment(wikiContent, attachment); + } + } catch (RepositoryCheckedException e) { + logger.error("Unable to delete file",e); + ActionMessages am = new ActionMessages(); + am.add( ActionMessages.GLOBAL_MESSAGE, + new ActionMessage( WikiConstants.ERROR_FILE_UPLOAD_CONTENT_REPOSITORY , + attachment.getFilename())); + saveErrors( request, am ); + } + } + deletedAttachmentList.clear(); + } + + if ( attachmentList != null ) { + Iterator iter = attachmentList.iterator(); + while (iter.hasNext()) { + WikiAttachment attachment = (WikiAttachment) iter.next(); + + if ( attachment.getAttachmentId() == null ) { + // add entry to tool table - file already in content repository + wikiService.saveAttachment(wikiContent, attachment); + } + } + } + + return deletedAttachmentList; + } + + /** + * This method will either upload an online instructions file or an offline instructions file. + * It will upload an online file if the bean property onlineFile is not null and similarly, + * will upload an offline file if the bean property offlineFile is not null. + * By using the term "upload", we are saving the file information on the local database (?) + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws WikiApplicationException + */ + public ActionForward upload(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws InvalidParameterException, FileNotFoundException, RepositoryCheckedException, IOException, WikiApplicationException { + + + //set up the values in the map + //call the uploadFile method from toolContentHandler + WikiAuthoringForm wikiForm = (WikiAuthoringForm)form; + //copyAuthoringFormValuesIntoFormBean(request, wikiForm); + FormFile theFile; + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + + Long content_id = WikiWebUtil.convertToLong(wikiForm.getToolContentID()); + //throws exception if the content id does not exist + checkContentId(content_id); + WikiContent wikiContent = wikiService.retrieveWiki(content_id); + + //validate file max size + ActionMessages errors = new ActionMessages(); + FileValidatorUtil.validateFileSize(wikiForm.getOnlineFile(), true, errors ); + FileValidatorUtil.validateFileSize(wikiForm.getOfflineFile(), true, errors ); + if(!errors.isEmpty()){ + this.saveErrors(request, errors); + return mapping.findForward(WikiConstants.AUTHOR_PAGE); + } + + //check if the file uploaded is an online instructions file or offline instructions file. + //if one of the types is null, then the other one must have been uploaded. + //here we check if the file is an online one + + if ((wikiForm.getOnlineFile() != null && (wikiForm.getOnlineFile().getFileName().trim().length() != 0)) || + (wikiForm.getOfflineFile() != null && (wikiForm.getOfflineFile().getFileName().trim().length() != 0))) + { + boolean isOnlineFile = ((wikiForm.getOnlineFile() != null && (wikiForm.getOnlineFile().getFileName().trim().length() != 0)) ? true: false ); + theFile = (isOnlineFile ? wikiForm.getOnlineFile() : wikiForm.getOfflineFile()); + String fileType = isOnlineFile ? IToolContentHandler.TYPE_ONLINE : IToolContentHandler.TYPE_OFFLINE; + + SessionMap map = getSessionMap(request, wikiForm); + List attachmentList = (List) map.get(WikiConstants.ATTACHMENT_LIST); + List deletedAttachmentList = (List) map.get(WikiConstants.DELETED_ATTACHMENT_LIST); + + // if a file with the same name already exists then move the old one to deleted + deletedAttachmentList = moveToDelete(theFile.getFileName(), isOnlineFile, attachmentList, deletedAttachmentList ); + + try + { + // This is a new file and so is saved to the content repository. Add it to the + // attachments collection, but don't add it to the tool's tables yet. + NodeKey node = wikiService.uploadFile(theFile.getInputStream(), theFile.getFileName(), theFile.getContentType(), fileType); + WikiAttachment file = new WikiAttachment(); + file.setFilename(theFile.getFileName()); + file.setOnlineFile(isOnlineFile); + file.setWikiContent(wikiContent); + file.setUuid(node.getUuid()); + file.setVersionId(node.getVersion()); + + // add the files to the attachment collection - if one existed, it should have already been removed. + attachmentList.add(file); + map = WikiWebUtil.addUploadsToSession(map, request, attachmentList, deletedAttachmentList); + + //reset the fields so that more files can be uploaded + wikiForm.setOfflineFile(null); + wikiForm.setOnlineFile(null); + } + catch (FileNotFoundException e) { + logger.error("Unable to uploadfile",e); + throw new WikiApplicationException("Unable to upload file, exception was "+e.getMessage()); + } catch (IOException e) { + logger.error("Unable to uploadfile",e); + throw new WikiApplicationException("Unable to upload file, exception was "+e.getMessage()); + } catch (RepositoryCheckedException e) { + logger.error("Unable to uploadfile",e); + throw new WikiApplicationException("Unable to upload file, exception was "+e.getMessage()); + } + } + + wikiForm.setMethod(WikiConstants.INSTRUCTIONS); + + return mapping.findForward(WikiConstants.AUTHOR_PAGE); + } + + /** If this file exists in attachments list, move it to the deleted attachments list. + * Returns the updated deletedAttachments list, creating a new one if needed. Uses the filename + * and isOnline flag to match up the attachment entry */ + private List moveToDelete(String filename, boolean isOnline, List attachmentsList, List deletedAttachmentsList ) { + return moveToDelete(filename, isOnline, null, attachmentsList, deletedAttachmentsList); + } + /** If this file exists in attachments list, move it to the deleted attachments list. + * Returns the updated deletedAttachments list, creating a new one if needed. Uses the uuid of the + * file to match up the attachment entry */ + private List moveToDelete(Long uuid, List attachmentsList, List deletedAttachmentsList ) { + return moveToDelete(null, false, uuid, attachmentsList, deletedAttachmentsList); + } + + /** If this file exists in attachments map, move it to the deleted attachments map. + * Returns the updated deletedAttachments map, creating a new one if needed. If uuid supplied + * then tries to match on that, otherwise uses filename and isOnline. */ + private List moveToDelete(String filename, boolean isOnline, Long uuid, List attachmentsList, List deletedAttachmentsList ) { + + List deletedList = deletedAttachmentsList != null ? deletedAttachmentsList : WikiWebUtil.setupDeletedAttachmentList(); + + if ( attachmentsList != null ) { + Iterator iter = attachmentsList.iterator(); + WikiAttachment attachment = null; + while ( iter.hasNext() && attachment == null ) { + WikiAttachment value = (WikiAttachment) iter.next(); + + if ( uuid != null ) { + // compare using uuid + if ( uuid.equals(value.getUuid()) ) { + attachment = value; + } + } else { + // compare using filename and online/offline flag + if ( value.isOnlineFile() == isOnline && value.getFilename().equals(filename) ) { + attachment = value; + } + } + } + if ( attachment != null ) { + deletedList.add(attachment); + attachmentsList.remove(attachment); + } + } + + return deletedList; + } + + public ActionForward deleteAttachment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + throws InvalidParameterException, RepositoryCheckedException, WikiApplicationException { + + //set up the values in the map + WikiAuthoringForm wikiForm = (WikiAuthoringForm)form; + + Long uuid = wikiForm.getDeleteFileUuid(); + if (uuid == null) + { + String error = "Unable to continue. The file uuid is missing."; + logger.error(error); + throw new WikiApplicationException(error); + } + + // move the file's details from the attachment collection to the deleted attachments collection + // the attachment will be delete on saving. + SessionMap map = getSessionMap(request, wikiForm); + List attachmentList = (List) map.get(WikiConstants.ATTACHMENT_LIST); + List deletedAttachmentList = (List) map.get(WikiConstants.DELETED_ATTACHMENT_LIST); + deletedAttachmentList = moveToDelete(uuid, attachmentList, deletedAttachmentList ); + + wikiForm.setMethod(WikiConstants.INSTRUCTIONS); + + return mapping.findForward(WikiConstants.AUTHOR_PAGE); + } + + + /** + * It is assumed that the contentId is passed as a http parameter + * if the contentId is null, an exception is thrown, otherwise proceed as normal + * + * @param contentId the toolContentId to check + */ + private void checkContentId(Long contentId) + { + if (contentId == null) + { + String error = "Unable to continue. Tool content id missing."; + + throw new WikiApplicationException(error); + } + } + + /** + * Retrieve the SessionMap from the HttpSession. + * + * @param request + * @param authForm + * @return + */ + private SessionMap getSessionMap(HttpServletRequest request, WikiAuthoringForm wikiForm) { + return (SessionMap) request.getSession().getAttribute(wikiForm.getSessionMapID()); + } + + /** + * This method copies the values of the request parameters richTextOnlineInstructions + * richTextOfflineInstructions richTextContent into the form properties + * onlineInstructions, offlineInstructions and content respectively. + * + * @param request HttpServlet request + * @param form The ActionForm class containing data submitted by the forms. + */ + /* private void copyAuthoringFormValuesIntoFormBean(HttpServletRequest request, WikiAuthoringForm form) + { + String onlineInstruction = WebUtil.readStrParam(request, WikiConstants.RICH_TEXT_ONLINE_INSTRN, true); + String offlineInstruction = WebUtil.readStrParam(request, WikiConstants.RICH_TEXT_OFFLINE_INSTRN, true); + String content = WebUtil.readStrParam(request, WikiConstants.RICH_TEXT_CONTENT, true); + String title = WebUtil.readStrParam(request, WikiConstants.RICH_TEXT_TITLE, true); + + + form.setTitle(title); + + form.setContent(content); + + form.setOnlineInstructions(onlineInstruction); + + form.setOfflineInstructions(offlineInstruction); + + } */ + + /* private void copyFormValuesIntoWikiContent(HttpServletRequest request, WikiContent wikiContent) + { + wikiContent.setTitle((String)request.getParameter(WikiConstants.RICH_TEXT_TITLE)); + wikiContent.setContent((String)request.getParameter(WikiConstants.RICH_TEXT_CONTENT)); + wikiContent.setOnlineInstructions((String)request.getParameter(WikiConstants.RICH_TEXT_ONLINE_INSTRN)); + wikiContent.setOfflineInstructions((String)request.getParameter(WikiConstants.RICH_TEXT_OFFLINE_INSTRN)); + + } */ + +} + Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiAuthoringForm.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiAuthoringForm.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiAuthoringForm.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,302 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.web; + +import java.util.Date; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.log4j.Logger; +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.upload.FormFile; +import org.lams.lams.tool.wiki.WikiContent; +import org.lamsfoundation.lams.util.UploadFileUtil; + + +//import org.lams.lams.tool.wiki.WikiConstants; + +/** + *

      ActionForm which holds the state of the wiki form content in the Authoring + * environment. Stores all values in the session scope.

      + * + *

      The validate method does not check whether any of the input from + * title, content, onlineInstructions, offlineInstructions are empty or not. + * This is because I have encountered a situation where even though the field is + * empty, the FCKEditor places a
      tag and so the validate method doesnt work. + * However, the validate method checks the length of the file that has been uploaded, + * the maximum filesize that can be uploaded is a property that is in the UploadFileUtil.

      + * + */ + +/** + * Creation Date: 19-05-05 + * + * ----------------XDoclet Tags-------------------- + * + * @struts:form name="WikiAuthoringForm" type="org.lams.lams.tool.wiki.web.WikiAuthoringForm" + * + * ----------------XDoclet Tags-------------------- + */ + +public class WikiAuthoringForm extends ActionForm { + + private static final long serialVersionUID = -8425012664714570196L; + + static Logger logger = Logger.getLogger(WikiAuthoringForm.class.getName()); + + private String title; + private String content; + private String onlineInstructions; + private String offlineInstructions; + + private String method; + private String toolContentID; + private String contentFolderID; + private String defineLater; + + private boolean reflectOnActivity; + private String reflectInstructions; + + private FormFile onlineFile; + private FormFile offlineFile; + + private String currentTab; + private String sessionMapID; + + private Long deleteFileUuid; + + /** + * @return Returns the offlineFile. + */ + public FormFile getOfflineFile() { + return offlineFile; + } + /** + * @param offlineFile The offlineFile to set. + */ + public void setOfflineFile(FormFile offlineFile) { + this.offlineFile = offlineFile; + } + /** + * @return Returns the onlineFile. + */ + public FormFile getOnlineFile() { + return onlineFile; + } + /** + * @param onlineFile The onlineFile to set. + */ + public void setOnlineFile(FormFile onlineFile) { + this.onlineFile = onlineFile; + } + /** + * @return Returns the defineLater. + */ + public String getDefineLater() { + return defineLater; + } + /** + * @param defineLater The defineLater to set. + */ + public void setDefineLater(String defineLater) { + this.defineLater = defineLater; + } + + public boolean getReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + /** + * @return Returns the content. + */ + public String getContent() { + return content; + } + /** + * @param content The content to set. + */ + public void setContent(String content) { + this.content = content; + } + /** + * @return Returns the title. + */ + public String getTitle() { + return title; + } + /** + * @param title The title to set. + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * @return Returns the online instructions + */ + public String getOnlineInstructions() + { + return onlineInstructions; + } + + /** + * @param onlineInstructions The online instructions to set + */ + public void setOnlineInstructions(String onlineInstructions) + { + this.onlineInstructions = onlineInstructions; + } + + /** + * @return Returns the offline instructions + */ + public String getOfflineInstructions() + { + return offlineInstructions; + } + + /** + * @param offlineInstructions The offline instructions to set + */ + public void setOfflineInstructions(String offlineInstructions) + { + this.offlineInstructions = offlineInstructions; + } + + /** + * @return Returns the method. + */ + public String getMethod() { + return method; + } + /** + * @param method The method to set. + */ + public void setMethod(String method) { + this.method = method; + } + /** + * @return Returns the toolContentID. + */ + public String getToolContentID() { + return toolContentID; + } + /** + * @param toolContentID The toolContentID to set. + */ + public void setToolContentID(String toolContentID) { + this.toolContentID = toolContentID; + } + + /** + * + * @return Returns the contentFolderID + */ + public String getContentFolderID() { + return contentFolderID; + } + + /** + * + * @param contentFolderID The contentFolderID is set + */ + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + public void reset(ActionMapping mapping, HttpServletRequest request) + { + // this.content = null; + //this.title = null; + //this.onlineInstructions = null; + //this.offlineInstructions = null; + this.method= null; + this.defineLater = null; + this.onlineFile = null; + this.offlineFile = null; + this.deleteFileUuid = null; + } + + /** + * This method is to prepopulate the form with values from a wiki content + * object. Used in AuthoringStarterAction + * @param wikiContent + */ + public void populateFormWithWikiContentValues(WikiContent wikiContent) + { + setTitle(wikiContent.getTitle()); + setContent(wikiContent.getContent()); + setOnlineInstructions(wikiContent.getOnlineInstructions()); + setOfflineInstructions(wikiContent.getOfflineInstructions()); + setReflectOnActivity(wikiContent.getReflectOnActivity()); + setReflectInstructions(wikiContent.getReflectInstructions()); + } + + public void copyValuesIntoWikiContent(WikiContent wikiContent) + { + wikiContent.setTitle(getTitle()); + wikiContent.setContent(getContent()); + wikiContent.setOnlineInstructions(getOnlineInstructions()); + wikiContent.setOfflineInstructions(getOfflineInstructions()); + wikiContent.setReflectOnActivity(getReflectOnActivity()); + wikiContent.setReflectInstructions(getReflectInstructions()); + wikiContent.setDateUpdated(new Date(System.currentTimeMillis())); + } + + public String getCurrentTab() { + return currentTab; + } + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + public String getSessionMapID() { + return sessionMapID; + } + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + public Long getDeleteFileUuid() { + return deleteFileUuid; + } + public void setDeleteFileUuid(Long deleteFileUuid) { + this.deleteFileUuid = deleteFileUuid; + } + +} Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiExportAction.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiExportAction.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiExportAction.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,193 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.web; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +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.notebook.service.CoreNotebookConstants; +import org.lams.lams.tool.wiki.WikiApplicationException; +import org.lams.lams.tool.wiki.WikiConstants; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.WikiUser; +import org.lams.lams.tool.wiki.dto.ReflectionDTO; +import org.lams.lams.tool.wiki.service.IWikiService; +import org.lams.lams.tool.wiki.service.WikiServiceProxy; +import org.lams.lams.tool.wiki.util.WikiWebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; + + +/** + * @author mtruong + * + * Export Portfolio functionality. + * + * With this wiki tool, + * both the learner and teacher will export the contents of the wiki. + * + */ + +/** + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/exportPortfolio" name="WikiExportForm" scope="request" type="org.lams.lams.tool.wiki.web.WikiExportAction" + * validate="false" parameter="mode" + * @struts:action-forward name="exportPortfolio" path="/exportPortfolio.jsp" + * ----------------XDoclet Tags-------------------- + */ +public class WikiExportAction extends LamsDispatchAction { + + static Logger logger = Logger.getLogger(WikiExportForm.class.getName()); + + public ActionForward unspecified( + ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) + { + return mapping.findForward(WikiConstants.EXPORT_PORTFOLIO); + } + + public ActionForward learner(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + { + //parameters given are the toolSessionId and userId + WikiExportForm exportForm = (WikiExportForm)form; + Long toolSessionId = WikiWebUtil.convertToLong(request.getParameter(WikiConstants.TOOL_SESSION_ID)); + Long userId = WikiWebUtil.convertToLong(request.getParameter(WikiConstants.USER_ID)); + + + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + + if (userId == null || toolSessionId == null) + { + String error = "Tool session Id or user Id is null. Unable to continue"; + logger.error(error); + throw new WikiApplicationException(error); + } + + WikiUser userInThisSession = wikiService.retrieveWikiUserBySession(userId, toolSessionId); + + if (userInThisSession == null) + { + String error="The user with user id " + userId + " does not exist in this session or session may not exist."; + logger.error(error); + throw new WikiApplicationException(error); + } + + WikiContent content = wikiService.retrieveWikiBySessionID(toolSessionId); + + if (content == null) + { + String error="The content for this activity has not been defined yet."; + logger.error(error); + throw new WikiApplicationException(error); + } + + // Get user's reflection if exists + if (content.getReflectOnActivity()) { + log.debug(content.getReflectOnActivity()); + request.setAttribute("learner", true); + NotebookEntry wikiEntry = wikiService.getEntry(userInThisSession.getWikiSession().getWikiSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, + WikiConstants.TOOL_SIGNATURE, userId.intValue()); + log.debug(wikiEntry); + if (wikiEntry!=null) { + request.setAttribute("wikiEntry", wikiEntry.getEntry()); + } + } + + exportForm.populateForm(content); + + return mapping.findForward(WikiConstants.EXPORT_PORTFOLIO); + } + + public ActionForward teacher(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) + { + //given the toolcontentId as a parameter + WikiExportForm exportForm = (WikiExportForm)form; + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + + Long toolContentId = WikiWebUtil.convertToLong(request.getParameter(WikiConstants.TOOL_CONTENT_ID)); + + //check if toolContentId exists in db or not + if (toolContentId==null) + { + String error="Tool Content Id is missing. Unable to continue"; + logger.error(error); + throw new WikiApplicationException(error); + } + + WikiContent content = wikiService.retrieveWiki(toolContentId); + + if (content == null) + { + String error="Data is missing from the database. Unable to Continue"; + logger.error(error); + throw new WikiApplicationException(error); + } + + // Get class's reflections if exists + if (content.getReflectOnActivity()) { + Set sessions = content.getWikiSessions(); + Iterator i = sessions.iterator(); + List reflections = new ArrayList(); + while (i.hasNext()) + { + WikiSession session = (WikiSession) i.next(); + List sessionUsers = wikiService.getUsersBySession(session.getWikiSessionId()); + for (int j=0; jThe learner action, checks the defineLater and runOffline flags, and if required + * it will show the learner the message screen indicating a reason why they cant see + * the contents of the wiki. + * If none of the flags are set, then the learner is able to see the wiki. + *

      + *

      The difference between author mode (which is basically the preview) + * is that if the defineLater flag is set, it will not be able to see the wiki screen + *

      + * + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/starter/learner" name="WikiLearnerForm" scope="request" type="org.lams.lams.tool.wiki.web.WikiLearnerStarterAction" + * validate="false" parameter="mode" + * @struts:action-forward name="displayLearnerContent" path=".learnerContent" + * @struts:action-forward name="displayMessage" path=".message" + * @struts:action-forward name="defineLater" path=".defineLater" + * ----------------XDoclet Tags-------------------- + */ + +public class WikiLearnerStarterAction extends LamsDispatchAction { + + static Logger logger = Logger.getLogger(WikiLearnerStarterAction.class.getName()); + + private UserDTO getUserDTO(HttpServletRequest request) { + // set up the user details + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + if ( user == null ) + { + MessageResources resources = getResources(request); + String error = resources.getMessage(WikiConstants.ERR_MISSING_PARAM, "User"); + logger.error(error); + throw new WikiApplicationException(error); + } + return user; + } + + /** Get the user id from the shared session */ + public Long getUserID(HttpServletRequest request) { + UserDTO user = getUserDTO(request); + return new Long(user.getUserID().longValue()); + } + + /** Get the user id from the url - needed for the monitoring mode */ + public Long getUserIDFromURLCall(HttpServletRequest request) { + return WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + } + + public ActionForward unspecified( + ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) + { + + return learner(mapping, form, request, response); + } + + public ActionForward learner(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws WikiApplicationException { + + WikiContent wikiContent = null; + WikiUser wikiUser = null; + saveMessages(request, null); + + WikiLearnerForm learnerForm = (WikiLearnerForm)form; + + ActionMessages message = new ActionMessages(); + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + + Long toolSessionID = WikiWebUtil.convertToLong(learnerForm.getToolSessionID()); + + if (toolSessionID == null) + { + String error = "Unable to continue. The parameters tool session id is missing"; + logger.error(error); + throw new WikiApplicationException(error); + } + + wikiContent = wikiService.retrieveWikiBySessionID(toolSessionID); + // wikiSession = wikiService.retrieveWikiSession(toolSessionId); + + + if(wikiContent == null) + { + String error = "An Internal error has occurred. Please exit and retry this sequence"; + logger.error(error); + throw new WikiApplicationException(error); + } + + if ( isFlagSet(wikiContent, WikiConstants.FLAG_DEFINE_LATER) ) { + return mapping.findForward(WikiConstants.DEFINE_LATER); + } + + + boolean readOnly = false; + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE,false); + Long userID = null; + if (mode == ToolAccessMode.LEARNER || mode == ToolAccessMode.AUTHOR ) + { + userID = getUserID(request); + wikiUser = wikiService.retrieveWikiUserBySession(userID, toolSessionID); + + if ( ! wikiContent.isContentInUse() ) { + /* Set the ContentInUse flag to true, and defineLater flag to false */ + wikiContent.setContentInUse(true); + wikiService.saveWiki(wikiContent); + } + + if (wikiUser == null) + { + //create a new user with this session id + wikiUser = new WikiUser(userID); + UserDTO user = getUserDTO(request); + wikiUser.setUsername(user.getLogin()); + wikiUser.setFullname(user.getFirstName()+" "+user.getLastName()); + wikiService.addUser(toolSessionID, wikiUser); + } + } else { + // user will not exist if force completed. + userID = getUserIDFromURLCall(request); + wikiUser = wikiService.retrieveWikiUserBySession(userID, toolSessionID); + readOnly = true; + } + + learnerForm.copyValuesIntoForm(wikiContent, readOnly, mode.toString()); + + NotebookEntry notebookEntry = wikiService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, WikiConstants.TOOL_SIGNATURE, userID.intValue()); + if (notebookEntry != null) { + request.setAttribute("reflectEntry", notebookEntry.getEntry()); + } + request.setAttribute("reflectInstructions", wikiContent.getReflectInstructions()); + request.setAttribute("reflectOnActivity", wikiContent.getReflectOnActivity()); + + Boolean userFinished = (wikiUser!=null && WikiUser.COMPLETED.equals(wikiUser.getUserStatus())); + request.setAttribute("userFinished", userFinished); + + /* + * Checks to see if the runOffline flag is set. + * If the particular flag is set, control is forwarded to jsp page + * displaying to the user the message according to what flag is set. + */ + if (displayMessageToUser(wikiContent, message)) + { + saveMessages(request, message); + return mapping.findForward(WikiConstants.DISPLAY_MESSAGE); + } + + return mapping.findForward(WikiConstants.DISPLAY_LEARNER_CONTENT); + + } + + public ActionForward teacher(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws WikiApplicationException { + return learner(mapping, form, request, response); + } + + public ActionForward author(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws WikiApplicationException { + + return learner(mapping, form, request, response); + + } + + + + + /** + *

      Performs a check on the flag indicated by flag + * In this wiki tool, there are 3 possible flags: + *

    • defineLater
    • + *
    • contentInUse
    • + *
    • runOffline
    • + *
      Returns true if the flag is set, false otherwise

      + * + * @param content The instance of WikiContent + * @param flag The flag to check, can take the following set of values (defineLater, contentInUse, runOffline) + * @return Returns true if flag is set, false otherwise + */ + private boolean isFlagSet(WikiContent content, int flag) throws WikiApplicationException + { + switch (flag) + { + case WikiConstants.FLAG_DEFINE_LATER: + return (content.isDefineLater()); + // break; + case WikiConstants.FLAG_CONTENT_IN_USE: + return (content.isContentInUse()); + // break; + case WikiConstants.FLAG_RUN_OFFLINE: + return(content.isForceOffline()); + // break; + default: + throw new WikiApplicationException("Invalid flag"); + } + + } + + /** + *

      This methods checks the defineLater and runOffline flag. + * If defineLater flag is set, then a message is added to an ActionMessages + * object saying that the contents have not been defined yet. If the runOffline + * flag is set, a message is added to ActionMessages saying that the contents + * are not being run online. + * This method will return true if any one of the defineLater or runOffline flag is set. + * Otherwise false will be returned.

      + * + * @param content The instance of WikiContent + * @param message the instance of ActtionMessages + * @return true if any of the flags are set, false otherwise + */ + private boolean displayMessageToUser(WikiContent content, ActionMessages message) + { + boolean isDefineLaterSet = isFlagSet(content, WikiConstants.FLAG_DEFINE_LATER); + boolean isRunOfflineSet = isFlagSet(content, WikiConstants.FLAG_RUN_OFFLINE); + if(isDefineLaterSet || isRunOfflineSet) + { + if (isDefineLaterSet) + { + message.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.defineLaterSet")); + } + if (isRunOfflineSet) + { + message.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("message.runOfflineSet")); + } + return true; + } + else + return false; + } + + + } Index: lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiMonitoringAction.java =================================================================== diff -u --- lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiMonitoringAction.java (revision 0) +++ lams_tool_wiki_orig/src/java/org/lams/lams/tool/wiki/web/WikiMonitoringAction.java (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,180 @@ +/**************************************************************** + * 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.lams.lams.tool.wiki.web; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +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.notebook.service.CoreNotebookConstants; +import org.lams.lams.tool.wiki.WikiApplicationException; +import org.lams.lams.tool.wiki.WikiConstants; +import org.lams.lams.tool.wiki.WikiContent; +import org.lams.lams.tool.wiki.WikiSession; +import org.lams.lams.tool.wiki.WikiUser; +import org.lams.lams.tool.wiki.dto.ReflectionDTO; +import org.lams.lams.tool.wiki.service.IWikiService; +import org.lams.lams.tool.wiki.service.WikiServiceProxy; +import org.lams.lams.tool.wiki.util.WikiWebUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; + +/** + * @author mtruong + * + * The buttons are a switch between tabs and will forward to a jsp and display + * the appropriate page. + * + * + */ + +/** + * Creation Date: 14-07-05 + * + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/monitoring" name="WikiMonitoringForm" scope="request" type="org.lams.lams.tool.wiki.web.WikiMonitoringAction" + * input=".monitoringContent" validate="false" parameter="method" + * @struts:action-forward name="monitorPage" path="/monitoring/monitoring.jsp" + * @struts:action-forward name="monitorReflectionPage" path=".monitorReflectionPage" + * ----------------XDoclet Tags-------------------- + */ +public class WikiMonitoringAction extends LamsDispatchAction { + + static Logger logger = Logger.getLogger(WikiMonitoringAction.class.getName()); + + public final static String FORM="WikiMonitoringForm"; + + public static final String SUMMARY_TABID = "1"; + public static final String INSTRUCTIONS_TABID = "2"; + public static final String EDITACTIVITY_TABID = "3"; + public static final String STATISTICS_TABID = "4"; + + public ActionForward unspecified( + ActionMapping mapping, + ActionForm form, + HttpServletRequest request, + HttpServletResponse response) throws WikiApplicationException + { + Long toolContentId = WikiWebUtil.convertToLong(request.getParameter(WikiConstants.TOOL_CONTENT_ID)); + String contentFolderID = WebUtil.readStrParam(request, WikiConstants.CONTENT_FOLDER_ID); + if (toolContentId == null) + { + String error = "Unable to continue. Tool content id missing"; + logger.error(error); + throw new WikiApplicationException(error); + } + + WikiMonitoringForm monitorForm = new WikiMonitoringForm(); + + IWikiService wikiService = WikiServiceProxy.getWikiService(getServlet().getServletContext()); + WikiContent content = wikiService.retrieveWiki(toolContentId); + + monitorForm.setTitle(content.getTitle()); + monitorForm.setContent(content.getContent()); + monitorForm.setOnlineInstructions(content.getOnlineInstructions()); + monitorForm.setOfflineInstructions(content.getOfflineInstructions()); + monitorForm.setAttachmentsList(WikiWebUtil.setupAttachmentList(wikiService, content)); + + monitorForm.setContentEditable("true"); + //set up the request parameters to append to the URL + Map mapParameters = new HashMap(); + mapParameters.put(WikiConstants.TOOL_CONTENT_ID, toolContentId.toString()); + mapParameters.put(WikiConstants.DEFINE_LATER, "true"); + mapParameters.put(WikiConstants.CONTENT_FOLDER_ID, contentFolderID); + monitorForm.setParametersToAppend(mapParameters); + + //Get the total number of learners that have participated in this tool activity + monitorForm.setTotalLearners(wikiService.calculateTotalNumberOfUsers(toolContentId)); + + Set sessions = content.getWikiSessions(); + Iterator i = sessions.iterator(); + Map map = new HashMap(); + List reflections = new ArrayList(); + while (i.hasNext()) + { + WikiSession session = (WikiSession) i.next(); + int numUsersInSession = wikiService.getNumberOfUsersInSession(session); + map.put(session.getWikiSessionName(), new Integer(numUsersInSession)); + // Get list of users that have made a reflection entry + if (content.getReflectOnActivity()) { + List sessionUsers = wikiService.getUsersBySession(session.getWikiSessionId()); + for (int j=0; j + + + + + + + + + + com.mysql.jdbc.Driver + jdbc:mysql://localhost/lams?characterEncoding=utf8 + lams + lamsdemo + + + + + + + + org/lams/lams/tool/wiki/WikiContent.hbm.xml + org/lams/lams/tool/wiki/WikiSession.hbm.xml + org/lams/lams/tool/wiki/WikiUser.hbm.xml + org/lams/lams/tool/wiki/WikiAttachment.hbm.xml + + + + + org.hibernate.dialect.MySQLDialect + false + 5 + 20 + 1800 + 50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + PROPAGATION_REQUIRED + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/web/403.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/403.jsp (revision 0) +++ lams_tool_wiki_orig/web/403.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,6 @@ +<%@ 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_wiki_orig/web/404.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/404.jsp (revision 0) +++ lams_tool_wiki_orig/web/404.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,8 @@ +<%@ 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_wiki_orig/web/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_wiki_orig/web/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_wiki_orig/web/META-INF/MANIFEST.MF (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,5 @@ +Implementation-Title: LAMS - Wiki Tool +Implementation-Version: 2.0 RC1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: + Index: lams_tool_wiki_orig/web/WEB-INF/.struts-config.mex =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/.struts-config.mex (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/.struts-config.mex (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1 @@ + \ No newline at end of file Index: lams_tool_wiki_orig/web/WEB-INF/fckeditor/tlds/FCKeditor.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/images/icon_wiki.swf =================================================================== diff -u Binary files differ Index: lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/c.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/c.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/c.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/jstl/tlds/fmt.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/fmt.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/fmt.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/jstl/tlds/fn.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/fn.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/fn.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/jstl/tlds/x.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/x.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/jstl/tlds/x.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/lams.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/lams.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/lams.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,508 @@ + + + + + 1.0 + lams + + LAMSTags + + + + + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL + + + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag + empty + + + + + 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 + escapeXml + false + + true + + + + + + + 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 + + + + + + + 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 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 + + + + + + + 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 + + + + + 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 + + + + + + + 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 + + + + + + + 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 + + + + + + + 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 + + + + + + + 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 + + + indexed + false + true + + + name + false + true + + + owikilur + 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 + + + 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_wiki_orig/web/WEB-INF/struts-config.xml =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts-config.xml (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts-config.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/web/WEB-INF/struts/struts-config_1_2.dtd =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts/struts-config_1_2.dtd (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts/struts-config_1_2.dtd (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,686 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-bean.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-bean.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-bean.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/struts/tlds/struts-html.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-html.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-html.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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_wiki_orig/web/WEB-INF/struts/tlds/struts-logic.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-logic.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-logic.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/struts/tlds/struts-nested.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-nested.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-nested.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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 + + +owikilur +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_wiki_orig/web/WEB-INF/struts/tlds/struts-tiles.tld =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-tiles.tld (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/struts/tlds/struts-tiles.tld (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/AuthoringButton.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/Date.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/Date.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/Date.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/DefineLater.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/DefineLater.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/DefineLater.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/ExportPortOutput.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/ExportPortOutput.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/ExportPortOutput.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/FCKEditor.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/FCKEditor.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/FCKEditor.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/Head.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/Head.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/Head.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/ImgButtonWrapper.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/LearnerFlashEnabled.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/Passon.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/Passon.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/Passon.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/ProgressOutput.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/ProgressOutput.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/ProgressOutput.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/Tab.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/Tab.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/Tab.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/TabBody.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/TabBody.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/TabName.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/TabName.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/TabName.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/Tabs.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/Tabs.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/Tabs.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tags/headItems.tag =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tags/headItems.tag (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tags/headItems.tag (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/WEB-INF/tiles/tiles-defs.xml =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/tiles/tiles-defs.xml (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/tiles/tiles-defs.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/web/WEB-INF/validation.xml =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/validation.xml (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/validation.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,10 @@ + + + + + Index: lams_tool_wiki_orig/web/WEB-INF/validator-rules.xml =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/validator-rules.xml (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/validator-rules.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_wiki_orig/web/WEB-INF/web.xml =================================================================== diff -u --- lams_tool_wiki_orig/web/WEB-INF/web.xml (revision 0) +++ lams_tool_wiki_orig/web/WEB-INF/web.xml (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,320 @@ + + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lams.lams.tool.wiki.ApplicationResources + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lams/lams/tool/wiki/applicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + + + + + org.springframework.web.context.ContextLoaderListener + + + + + + + SystemSessionFilter + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + wikiSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + encoding + UTF-8 + + + + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + + + + + org.springframework.web.context.ContextLoaderListener + + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + download + Instructions Download + Instructions Download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + wikiToolContentHandler + + 3 + + + exportPortfolio + Export Portfolio + Export Portfolio + org.lams.lams.tool.wiki.web.WikiExportServlet + + + + action + *.do + + + + download + /download/* + + + exportPortfolio + /portfolioExport + + + + 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 + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + + + + tags-lams + /WEB-INF/lams.tld + + + + + + + Secure Content + /* + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoringv2.do + /starter/authoring.do + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + Staff Content + /starter/monitor.do + /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_wiki_orig/web/authoring/advance.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/authoring/advance.jsp (revision 0) +++ lams_tool_wiki_orig/web/authoring/advance.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,36 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + +

      + + + +

      + +

      + +

      + + Index: lams_tool_wiki_orig/web/authoring/authoring.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/authoring/authoring.jsp (revision 0) +++ lams_tool_wiki_orig/web/authoring/authoring.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,127 @@ + + +<%@ include file="/includes/taglibs.jsp"%> + +<%@ page + import="org.lams.lams.tool.wiki.WikiConstants"%> + + + + + <fmt:message key="activity.title" /> + + + + + + + +
      + + + + + + + + + + <%-- in define later mode we edit only the basic content. But if we don't have the instructions tab, then the instructions are lost when saving. --%> +

      + +

      + + +
      + + +

      + +
      +
      +

      +
      + + + + + + + + + + + + + +
      + + + Index: lams_tool_wiki_orig/web/authoring/basic.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/authoring/basic.jsp (revision 0) +++ lams_tool_wiki_orig/web/authoring/basic.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,21 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + + +
      +
      + +
      + +
      +
      + +
      + +
      Index: lams_tool_wiki_orig/web/authoring/instructions.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/authoring/instructions.jsp (revision 0) +++ lams_tool_wiki_orig/web/authoring/instructions.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,142 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      + +
      + +
      + +
        + + +
      • + ${attachment.filename} + + + + + &wikisp; + + + + + + &wikisp; + + + + +
      • +
        +
        +
      +
      +
      +
      + +
      + + + + + +
      +
      +
      +
      + +
      + +
      + +
        + + +
      • + ${attachment.filename} + + + + + &wikisp; + + + + + + &wikisp; + + + + +
      • +
        +
        +
      +
      +
      +
      + +
      + + + + + +
      Index: lams_tool_wiki_orig/web/defineLater.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/defineLater.jsp (revision 0) +++ lams_tool_wiki_orig/web/defineLater.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,8 @@ +<%@ include file="/includes/taglibs.jsp"%> + +
      +

      + +

      + +
      Index: lams_tool_wiki_orig/web/error.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/error.jsp (revision 0) +++ lams_tool_wiki_orig/web/error.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,69 @@ + + +<%@ 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_wiki_orig/web/exportPortfolio.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/exportPortfolio.jsp (revision 0) +++ lams_tool_wiki_orig/web/exportPortfolio.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,55 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + <c:out value="${WikiExportForm.title}"/> + + + + + +
      + +

      + +

      + +

      + +

      + + +

      +

      +

      +
      + +

      + + + + + + + + + + + + +
      +
      + +
      + + + + + +
      Index: lams_tool_wiki_orig/web/footer.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/footer.jsp (revision 0) +++ lams_tool_wiki_orig/web/footer.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_wiki_orig/web/header.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/header.jsp (revision 0) +++ lams_tool_wiki_orig/web/header.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1 @@ + Index: lams_tool_wiki_orig/web/images/icon_htmlwiki.swf =================================================================== diff -u Binary files differ Index: lams_tool_wiki_orig/web/images/icon_wiki.swf =================================================================== diff -u Binary files differ Index: lams_tool_wiki_orig/web/includes/taglibs.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/includes/taglibs.jsp (revision 0) +++ lams_tool_wiki_orig/web/includes/taglibs.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -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_wiki_orig/web/learnerContent.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/learnerContent.jsp (revision 0) +++ lams_tool_wiki_orig/web/learnerContent.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,85 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + +
      + +

      + +

      + +

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

      ${reflectInstructions}

      + + + +

      + + + +

      + +
      + + +

      +
      + +
      + +
      +
      + +
      + + + + + + + + + + + + + + + + +
      +
      +
      + + + + Index: lams_tool_wiki_orig/web/login.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/login.jsp (revision 0) +++ lams_tool_wiki_orig/web/login.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,12 @@ +<%@ 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_wiki_orig/web/message.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/message.jsp (revision 0) +++ lams_tool_wiki_orig/web/message.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,49 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + + + +
      + +

      + +

      + + + +

      + +

      +
      +
      + +
      + + + + + + + + + + + + + + + + + +
      + +
      Index: lams_tool_wiki_orig/web/monitoring/m_EditActivity.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/monitoring/m_EditActivity.jsp (revision 0) +++ lams_tool_wiki_orig/web/monitoring/m_EditActivity.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,33 @@ +<%@ include file="/includes/taglibs.jsp"%> + + +

      + +

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

      + + + +

      + Index: lams_tool_wiki_orig/web/monitoring/m_Instructions.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/monitoring/m_Instructions.jsp (revision 0) +++ lams_tool_wiki_orig/web/monitoring/m_Instructions.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,77 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + + + + + +
      + + + +
      + + + +
      + + + +
      + +

      + +

      + + + + + + + + + + + /download/?uuid=&preferDownload=false + /download/?uuid=&preferDownload=true + + + + + + + + +
      + + + + + &wikisp; + + &wikisp; +
      + + + + + + + + + + + + '/>")' class="button"> + + + + +
      +
      +
      Index: lams_tool_wiki_orig/web/monitoring/m_Statistics.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/monitoring/m_Statistics.jsp (revision 0) +++ lams_tool_wiki_orig/web/monitoring/m_Statistics.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,19 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + + + +

      + + + + + +

      + + Index: lams_tool_wiki_orig/web/monitoring/m_Summary.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/monitoring/m_Summary.jsp (revision 0) +++ lams_tool_wiki_orig/web/monitoring/m_Summary.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,40 @@ +<%@ include file="/includes/taglibs.jsp"%> + +

      &wikisp;

      + +

      +

      + +

      + <%@ include file="m_Statistics.jsp"%> + + +

      + + + + + + + + + + + + + + + + + +
      + +
      + + + + +
      + +
      + Index: lams_tool_wiki_orig/web/monitoring/monitoring.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/monitoring/monitoring.jsp (revision 0) +++ lams_tool_wiki_orig/web/monitoring/monitoring.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,84 @@ + + +<%@ include file="/includes/taglibs.jsp"%> + +<%@ page import="java.util.HashMap"%> +<%@ page import="org.lams.lams.tool.wiki.web.WikiMonitoringAction"%> +<%@ page import="org.lams.lams.tool.wiki.WikiConstants"%> + + + + + + + + + + + + + <fmt:message key="activity.title" /> + + + + + + +
      + + + + + + + + + + + +

      + +

      + + + +
      + + + + + + +
      + + + + + + + + Index: lams_tool_wiki_orig/web/monitoring/reflection.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/monitoring/reflection.jsp (revision 0) +++ lams_tool_wiki_orig/web/monitoring/reflection.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,28 @@ +<%@ include file="/includes/taglibs.jsp"%> + +
      + +

      + +

      + + + + + + + + + +
      +

      + +

      +
      +

      + +

      +
      + +
      + Index: lams_tool_wiki_orig/web/reflect.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/reflect.jsp (revision 0) +++ lams_tool_wiki_orig/web/reflect.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,31 @@ +<%@ include file="/includes/taglibs.jsp"%> + + + +
      +

      + +

      + + + +

      + + + +
      + + + + + + +
      + +
      +
      + Index: lams_tool_wiki_orig/web/template/baseContent.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/template/baseContent.jsp (revision 0) +++ lams_tool_wiki_orig/web/template/baseContent.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,22 @@ +<%-- +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 +--%> + +

      Base Content

      Index: lams_tool_wiki_orig/web/template/learnerTemplate.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/template/learnerTemplate.jsp (revision 0) +++ lams_tool_wiki_orig/web/template/learnerTemplate.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,23 @@ + + +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + + + + + + <fmt:message key="activity.title"/> + + + + + + + Index: lams_tool_wiki_orig/web/template/template.jsp =================================================================== diff -u --- lams_tool_wiki_orig/web/template/template.jsp (revision 0) +++ lams_tool_wiki_orig/web/template/template.jsp (revision fd5ca1ebb9d4d7ec7e18b09ae823f942207b9a39) @@ -0,0 +1,23 @@ + + +<%@ include file="/includes/taglibs.jsp"%> + + + + + + + + + + + + <fmt:message key="activity.title"/> + + + + + + +