Index: lams_tool_pixlr/.classpath =================================================================== diff -u --- lams_tool_pixlr/.classpath (revision 0) +++ lams_tool_pixlr/.classpath (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + Index: lams_tool_pixlr/.cvsignore =================================================================== diff -u --- lams_tool_pixlr/.cvsignore (revision 0) +++ lams_tool_pixlr/.cvsignore (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,5 @@ +bin +build +.myeclipse +.mymetadata +.settings Index: lams_tool_pixlr/.myumldata =================================================================== diff -u --- lams_tool_pixlr/.myumldata (revision 0) +++ lams_tool_pixlr/.myumldata (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,2 @@ +#Mon Jul 17 14:17:56 EST 2006 +CodeGenContainer=java.util.Vector Index: lams_tool_pixlr/.project =================================================================== diff -u --- lams_tool_pixlr/.project (revision 0) +++ lams_tool_pixlr/.project (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,49 @@ + + + lams_tool_pixlr + + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + com.ibm.etools.validation.validationbuilder + + + + + com.ibm.sse.model.structuredbuilder + + + + + com.genuitec.eclipse.hibernate.HibernateBuilder + + + + + + com.genuitec.eclipse.hibernate.hibernatenature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jdt.core.javanature + + Index: lams_tool_pixlr/build.properties =================================================================== diff -u --- lams_tool_pixlr/build.properties (revision 0) +++ lams_tool_pixlr/build.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,20 @@ + +# project-wide properties +signature=lapixl10 + +#project version +tool.version=20081217 + +package=org/lamsfoundation/lams/tool/pixlr +package.name=org.lamsfoundation.lams.tool.pixlr +weblib=lib + +# hide tool option +hideTool=false + +# Minimum compatible version +min.server.version.number=2.2 + +# Language files package +language.files.package=org.lamsfoundation.lams.tool.pixlr + Index: lams_tool_pixlr/build.xml =================================================================== diff -u --- lams_tool_pixlr/build.xml (revision 0) +++ lams_tool_pixlr/build.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,529 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Deploying the Pixlr Tool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/conf/hibernate/mappings/hibernate.properties =================================================================== diff -u --- lams_tool_pixlr/conf/hibernate/mappings/hibernate.properties (revision 0) +++ lams_tool_pixlr/conf/hibernate/mappings/hibernate.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,7 @@ +hibernate.connection.username=lams +hibernate.connection.password=lamsdemo +hibernate.connection.url=jdbc:mysql://localhost/lams +hibernate.connection.driver_class=com.mysql.jdbc.Driver +hibernate.dialect=org.hibernate.dialect.MySQLDialect + + Index: lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.hbm.xml =================================================================== diff -u --- lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.hbm.xml (revision 0) +++ lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.hbm.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,232 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.hbm.xml =================================================================== diff -u --- lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.hbm.xml (revision 0) +++ lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.hbm.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.hbm.xml =================================================================== diff -u --- lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.hbm.xml (revision 0) +++ lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.hbm.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.hbm.xml =================================================================== diff -u --- lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.hbm.xml (revision 0) +++ lams_tool_pixlr/conf/hibernate/mappings/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.hbm.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/conf/jar/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_pixlr/conf/jar/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_pixlr/conf/jar/META-INF/MANIFEST.MF (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,3 @@ +Implementation-Title: LAMS - Notebok Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) Index: lams_tool_pixlr/conf/language/lams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_pixlr/conf/language/lams/ApplicationResources.properties (revision 0) +++ lams_tool_pixlr/conf/language/lams/ApplicationResources.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,118 @@ +appName = pixlr +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Oct 29 16:25:46 GMT 2008 + +#=================== labels for pixlr =================# + +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Edit images in Pixlr image editor +message.contentInUseSet =Modification of content is not allowed since one or more students has attempted the activity. +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Pixlr +tool.description =Pixlr Image Editing Tool +activity.title =Pixlr +activity.description =Pixlr Image Editing Tool +pageTitle.authoring =Pixlr Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.lockOnFinished =Lock when finished +advanced.allowViewOthersImages =Allow learners to view other learners images +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning = Pixlr Image Editor +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Pixlr Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occurred with the Pixlr Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +button.try.again =Try Again +button.finish =Next Activity +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.warnLockOnFinishViewAll =Note: After you click on "View All Pixlr Images" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.activityLocked =The instructor has set this activity not to allow image edits after you have finished it. As you are returning to this activity, you are able to see your image but not edit it. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +label.authoring.basic.add.image =Add Image +error.resource.image.not.alowed.format =Allowed file formats: gif, png, jpg +error.resource.item.file.blank =File can not be blank. +error.msg.upload.file.not.found =Could not find upload file {0}. +error.file.upload.failed =Image upload failed, please check your image file and try again. +label.authoring.remove =Remove +learner.edit.image =Edit Image in Pixlr +tooltip.openfullsize =Click to open full size +advanced.reflectOnActivity =Add Notebook at end of Gmap with the following instructions: +button.continue =Continue +button.edit =Edit +button.viewAll =View all learner images +learner.title.viewAll =View All Pixlr Images +button.redo =Redo Activity +button.refresh =Refresh +message.imageListEmpty =No images to display as no learners have edited their images yet. +error.retreiving.image =There was an error retrieving the image from pixlr.com, please contact the system administrator. +message.imageEdited =Image successfully edited. +button.close =Close +monitoring.th.learner =Learner +monitoring.th.image =Edited Image +monitoring.th.reflection =Notebook Entry +monitoring.hideImage =Hide image from other learners +monitoring.showImage =Show image to other learners +message.imageHidden =Image hidden by teacher +monitor.summary.td.notebookInstructions =Notebook instructions +advanced.reflectOnActivity =Add Notebook at end of Pixlr with the following instructions: +title.sessions =Sessions +title.originalImage =Original Image +message.imageNotAvailable =Image not available, either it has not yet been edited or it has been deleted. + +#======= End labels: Exported 103 labels for en AU ===== Index: lams_tool_pixlr/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_pixlr/conf/language/lams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_pixlr/conf/language/lams/ApplicationResources_en_AU.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,118 @@ +appName = pixlr +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Oct 29 16:25:46 GMT 2008 + +#=================== labels for pixlr =================# + +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Edit images in Pixlr image editor +message.contentInUseSet =Modification of content is not allowed since one or more students has attempted the activity. +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Pixlr +tool.description =Pixlr Image Editing Tool +activity.title =Pixlr +activity.description =Pixlr Image Editing Tool +pageTitle.authoring =Pixlr Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.lockOnFinished =Lock when finished +advanced.allowViewOthersImages =Allow learners to view other learners images +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning = Pixlr Image Editor +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Pixlr Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occurred with the Pixlr Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +button.try.again =Try Again +button.finish =Next Activity +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.warnLockOnFinishViewAll =Note: After you click on "View All Pixlr Images" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.activityLocked =The instructor has set this activity not to allow image edits after you have finished it. As you are returning to this activity, you are able to see your image but not edit it. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +label.authoring.basic.add.image =Add Image +error.resource.image.not.alowed.format =Allowed file formats: gif, png, jpg +error.resource.item.file.blank =File can not be blank. +error.msg.upload.file.not.found =Could not find upload file {0}. +error.file.upload.failed =Image upload failed, please check your image file and try again. +label.authoring.remove =Remove +learner.edit.image =Edit Image in Pixlr +tooltip.openfullsize =Click to open full size +advanced.reflectOnActivity =Add Notebook at end of Gmap with the following instructions: +button.continue =Continue +button.edit =Edit +button.viewAll =View all learner images +learner.title.viewAll =View All Pixlr Images +button.redo =Redo Activity +button.refresh =Refresh +message.imageListEmpty =No images to display as no learners have edited their images yet. +error.retreiving.image =There was an error retrieving the image from pixlr.com, please contact the system administrator. +message.imageEdited =Image successfully edited. +button.close =Close +monitoring.th.learner =Learner +monitoring.th.image =Edited Image +monitoring.th.reflection =Notebook Entry +monitoring.hideImage =Hide image from other learners +monitoring.showImage =Show image to other learners +message.imageHidden =Image hidden by teacher +monitor.summary.td.notebookInstructions =Notebook instructions +advanced.reflectOnActivity =Add Notebook at end of Pixlr with the following instructions: +title.sessions =Sessions +title.originalImage =Original Image +message.imageNotAvailable =Image not available, either it has not yet been edited or it has been deleted. + +#======= End labels: Exported 103 labels for en AU ===== Index: lams_tool_pixlr/conf/language/rams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_pixlr/conf/language/rams/ApplicationResources.properties (revision 0) +++ lams_tool_pixlr/conf/language/rams/ApplicationResources.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,118 @@ +appName = pixlr +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Oct 29 16:25:46 GMT 2008 + +#=================== labels for pixlr =================# + +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Edit images in Pixlr image editor +message.contentInUseSet =Modification of content is not allowed since one or more students has attempted the activity. +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Pixlr +tool.description =Pixlr Image Editing Tool +activity.title =Pixlr +activity.description =Pixlr Image Editing Tool +pageTitle.authoring =Pixlr Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.lockOnFinished =Lock when finished +advanced.allowViewOthersImages =Allow learners to view other learners images +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning = Pixlr Image Editor +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Pixlr Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occurred with the Pixlr Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +button.try.again =Try Again +button.finish =Next Activity +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.warnLockOnFinishViewAll =Note: After you click on "View All Pixlr Images" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.activityLocked =The instructor has set this activity not to allow image edits after you have finished it. As you are returning to this activity, you are able to see your image but not edit it. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +label.authoring.basic.add.image =Add Image +error.resource.image.not.alowed.format =Allowed file formats: gif, png, jpg +error.resource.item.file.blank =File can not be blank. +error.msg.upload.file.not.found =Could not find upload file {0}. +error.file.upload.failed =Image upload failed, please check your image file and try again. +label.authoring.remove =Remove +learner.edit.image =Edit Image in Pixlr +tooltip.openfullsize =Click to open full size +advanced.reflectOnActivity =Add Notebook at end of Gmap with the following instructions: +button.continue =Continue +button.edit =Edit +button.viewAll =View all learner images +learner.title.viewAll =View All Pixlr Images +button.redo =Redo Activity +button.refresh =Refresh +message.imageListEmpty =No images to display as no learners have edited their images yet. +error.retreiving.image =There was an error retrieving the image from pixlr.com, please contact the system administrator. +message.imageEdited =Image successfully edited. +button.close =Close +monitoring.th.learner =Learner +monitoring.th.image =Edited Image +monitoring.th.reflection =Notebook Entry +monitoring.hideImage =Hide image from other learners +monitoring.showImage =Show image to other learners +message.imageHidden =Image hidden by teacher +monitor.summary.td.notebookInstructions =Notebook instructions +advanced.reflectOnActivity =Add Notebook at end of Pixlr with the following instructions: +title.sessions =Sessions +title.originalImage =Original Image +message.imageNotAvailable =Image not available, either it has not yet been edited or it has been deleted. + +#======= End labels: Exported 103 labels for en AU ===== Index: lams_tool_pixlr/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_pixlr/conf/language/rams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_pixlr/conf/language/rams/ApplicationResources_en_AU.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,118 @@ +appName = pixlr +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Wed Oct 29 16:25:46 GMT 2008 + +#=================== labels for pixlr =================# + +error.contentrepository =An error has occurred when saving/deleting instruction file {0}. The files may not be saved correctly. +button.instructions =Instructions +instructions.uploadOfflineInstr =Offline Instructions File: +instructions.uploadOnlineInstr =Online Instructions File: +instructions.offlineInstructions =Offline Instructions: +instructions.onlineInstructions =Online Instructions: +activity.helptext =Edit images in Pixlr image editor +message.contentInUseSet =Modification of content is not allowed since one or more students has attempted the activity. +error.content.locked =The content has been locked since it is being used by one or more learners. The modification of the content is not allowed. +tool.display.name =Pixlr +tool.description =Pixlr Image Editing Tool +activity.title =Pixlr +activity.description =Pixlr Image Editing Tool +pageTitle.authoring =Pixlr Authoring +button.basic =Basic +button.advanced =Advanced +button.upload =Upload +label.authoring.basic.title =Title: +label.authoring.basic.content =Content: +advanced.lockOnFinished =Lock when finished +advanced.allowViewOthersImages =Allow learners to view other learners images +instructions.type.online =Online +instructions.type.offline =Offline +label.filename =Filename +label.type =Type +label.attachments =Attachments +link.view =View +link.download =Download +link.delete =Delete +message.updateSuccess =Changes saved +message.unsavedChanges =Page contains unsaved changes +pageTitle.learning = Pixlr Image Editor +message.defineLaterSet =Please wait for the teacher to complete the contents of this activity +message.runOfflineSet =This activity is not being done on the computer. Please see your instructor for details. +pageTitle.monitoring =Pixlr Monitoring +button.summary =Summary +button.editActivity =Edit Activity +button.statistics =Statistics +titleHeading.summary =Summary +titleHeading.statistics =Statistics +titleHeading.editActivity =Edit Activity +titleHeading.exportPortfolio =Export Portfolio +heading.group =Group {0}: +heading.totalLearners =Number of Learners: +heading.totalLearnersInGroup =Total Number of Learners in Group: +heading.totalFinishedLearnersInGroup =Number of Finished Learners: +message.summary =There is no summary available for this tool. +label.view =View +label.notAvailable =Not Available +heading.learner =Learner +heading.notebookEntry =Notebook Entry +button.cancel =Cancel +button.ok =OK +button.done =Done +button.save =Save +button.next =Next +label.save =Save +label.cancel =Cancel +label.created =Created +label.lastModified =Last modified +label.notebookEntry =Notebook entry +error.missingParam =Unable to continue. {0} is missing. +error.exceedMaxFileSize =File size exceeded +error.exception.NbApplication =An internal error has occurred with the Pixlr Tool. If reporting this error, please report:
{0} +error.defineLater =Sorry, the activity is not ready yet. Please wait for the teacher to finishing defining the activity. +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.mandatoryField ={0} field is mandatory. +button.try.again =Try Again +button.finish =Next Activity +message.alertContentEdit =Warning: One of more students have accessed this activity. Changing this content will result in students getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.warnLockOnFinishViewAll =Note: After you click on "View All Pixlr Images" and you come back to this Pixlr activity, you won't be able to continue editing your image. +message.activityLocked =The instructor has set this activity not to allow image edits after you have finished it. As you are returning to this activity, you are able to see your image but not edit it. +titleHeading.instructions =Instructions +label.authoring.basic.instructions =Instructions: +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced Settings +label.authoring.basic.add.image =Add Image +error.resource.image.not.alowed.format =Allowed file formats: gif, png, jpg +error.resource.item.file.blank =File can not be blank. +error.msg.upload.file.not.found =Could not find upload file {0}. +error.file.upload.failed =Image upload failed, please check your image file and try again. +label.authoring.remove =Remove +learner.edit.image =Edit Image in Pixlr +tooltip.openfullsize =Click to open full size +advanced.reflectOnActivity =Add Notebook at end of Gmap with the following instructions: +button.continue =Continue +button.edit =Edit +button.viewAll =View all learner images +learner.title.viewAll =View All Pixlr Images +button.redo =Redo Activity +button.refresh =Refresh +message.imageListEmpty =No images to display as no learners have edited their images yet. +error.retreiving.image =There was an error retrieving the image from pixlr.com, please contact the system administrator. +message.imageEdited =Image successfully edited. +button.close =Close +monitoring.th.learner =Learner +monitoring.th.image =Edited Image +monitoring.th.reflection =Notebook Entry +monitoring.hideImage =Hide image from other learners +monitoring.showImage =Show image to other learners +message.imageHidden =Image hidden by teacher +monitor.summary.td.notebookInstructions =Notebook instructions +advanced.reflectOnActivity =Add Notebook at end of Pixlr with the following instructions: +title.sessions =Sessions +title.originalImage =Original Image +message.imageNotAvailable =Image not available, either it has not yet been edited or it has been deleted. + +#======= End labels: Exported 103 labels for en AU ===== Index: lams_tool_pixlr/conf/middlegen/lams_tool_lapixlr11-prefs.properties =================================================================== diff -u --- lams_tool_pixlr/conf/middlegen/lams_tool_lapixlr11-prefs.properties (revision 0) +++ lams_tool_pixlr/conf/middlegen/lams_tool_lapixlr11-prefs.properties (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,128 @@ +# Middlegen Preferences +hibernate.tables.tl_lapixl10_attachment.base-class-name=PixlrAttachment +hibernate.tables.tl_lapixl10_attachment.columns.create_date.columnspecialty=property +hibernate.tables.tl_lapixl10_attachment.columns.create_date.java-name=createDate +hibernate.tables.tl_lapixl10_attachment.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lapixl10_attachment.columns.pixlr_uid.columnspecialty=foreign key +hibernate.tables.tl_lapixl10_attachment.columns.pixlr_uid.java-name=pixlrUid +hibernate.tables.tl_lapixl10_attachment.columns.pixlr_uid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_attachment.columns.file_name.inctostring=true +hibernate.tables.tl_lapixl10_attachment.columns.file_name.java-name=fileName +hibernate.tables.tl_lapixl10_attachment.columns.file_name.java-type=java.lang.String +hibernate.tables.tl_lapixl10_attachment.columns.file_type.java-name=fileType +hibernate.tables.tl_lapixl10_attachment.columns.file_type.java-type=java.lang.String +hibernate.tables.tl_lapixl10_attachment.columns.file_uuid.columnspecialty=property +hibernate.tables.tl_lapixl10_attachment.columns.file_uuid.incequals=false +hibernate.tables.tl_lapixl10_attachment.columns.file_uuid.inctostring=true +hibernate.tables.tl_lapixl10_attachment.columns.file_uuid.java-name=fileUuid +hibernate.tables.tl_lapixl10_attachment.columns.file_uuid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_attachment.columns.file_version_id.inctostring=true +hibernate.tables.tl_lapixl10_attachment.columns.file_version_id.java-name=fileVersionId +hibernate.tables.tl_lapixl10_attachment.columns.file_version_id.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_attachment.columns.uid.columnspecialty=key +hibernate.tables.tl_lapixl10_attachment.columns.uid.incequals=true +hibernate.tables.tl_lapixl10_attachment.columns.uid.inctostring=true +hibernate.tables.tl_lapixl10_attachment.columns.uid.java-name=uid +hibernate.tables.tl_lapixl10_attachment.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_attachment.equalshashcode=true +hibernate.tables.tl_lapixl10_attachment.keygenerator=native +hibernate.tables.tl_lapixl10_pixlr.base-class-name=Pixlr +hibernate.tables.tl_lapixl10_pixlr.columns.content_in_use.java-name=contentInUse +hibernate.tables.tl_lapixl10_pixlr.columns.content_in_use.java-type=java.lang.Boolean +hibernate.tables.tl_lapixl10_pixlr.columns.create_by.java-name=createBy +hibernate.tables.tl_lapixl10_pixlr.columns.create_by.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_pixlr.columns.create_date.java-name=createDate +hibernate.tables.tl_lapixl10_pixlr.columns.create_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lapixl10_pixlr.columns.define_later.java-name=defineLater +hibernate.tables.tl_lapixl10_pixlr.columns.define_later.java-type=java.lang.Boolean +hibernate.tables.tl_lapixl10_pixlr.columns.instructions.inctostring=true +hibernate.tables.tl_lapixl10_pixlr.columns.instructions.java-name=instructions +hibernate.tables.tl_lapixl10_pixlr.columns.instructions.java-type=java.lang.String +hibernate.tables.tl_lapixl10_pixlr.columns.lock_on_finished.java-name=lockOnFinished +hibernate.tables.tl_lapixl10_pixlr.columns.lock_on_finished.java-type=java.lang.Boolean +hibernate.tables.tl_lapixl10_pixlr.columns.offline_instructions.java-name=offlineInstructions +hibernate.tables.tl_lapixl10_pixlr.columns.offline_instructions.java-type=java.lang.String +hibernate.tables.tl_lapixl10_pixlr.columns.online_instructions.java-name=onlineInstructions +hibernate.tables.tl_lapixl10_pixlr.columns.online_instructions.java-type=java.lang.String +hibernate.tables.tl_lapixl10_pixlr.columns.run_offline.java-name=runOffline +hibernate.tables.tl_lapixl10_pixlr.columns.run_offline.java-type=java.lang.Boolean +hibernate.tables.tl_lapixl10_pixlr.columns.title.inctostring=true +hibernate.tables.tl_lapixl10_pixlr.columns.title.java-name=title +hibernate.tables.tl_lapixl10_pixlr.columns.title.java-type=java.lang.String +hibernate.tables.tl_lapixl10_pixlr.columns.tool_content_id.inctostring=true +hibernate.tables.tl_lapixl10_pixlr.columns.tool_content_id.java-name=toolContentId +hibernate.tables.tl_lapixl10_pixlr.columns.tool_content_id.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_pixlr.columns.uid.columnspecialty=key +hibernate.tables.tl_lapixl10_pixlr.columns.uid.incequals=true +hibernate.tables.tl_lapixl10_pixlr.columns.uid.inctostring=true +hibernate.tables.tl_lapixl10_pixlr.columns.uid.java-name=uid +hibernate.tables.tl_lapixl10_pixlr.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_pixlr.columns.update_date.java-name=updateDate +hibernate.tables.tl_lapixl10_pixlr.columns.update_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lapixl10_pixlr.dynamicInsert=false +hibernate.tables.tl_lapixl10_pixlr.equalshashcode=true +hibernate.tables.tl_lapixl10_pixlr.keygenerator=native +hibernate.tables.tl_lapixl10_session.base-class-name=PixlrSession +hibernate.tables.tl_lapixl10_session.columns.pixlr_uid.java-name=pixlrUid +hibernate.tables.tl_lapixl10_session.columns.pixlr_uid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_session.columns.session_end_date.inctostring=true +hibernate.tables.tl_lapixl10_session.columns.session_end_date.java-name=sessionEndDate +hibernate.tables.tl_lapixl10_session.columns.session_end_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lapixl10_session.columns.session_id.inctostring=true +hibernate.tables.tl_lapixl10_session.columns.session_id.java-name=sessionId +hibernate.tables.tl_lapixl10_session.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_session.columns.session_name.inctostring=true +hibernate.tables.tl_lapixl10_session.columns.session_name.java-name=sessionName +hibernate.tables.tl_lapixl10_session.columns.session_name.java-type=java.lang.String +hibernate.tables.tl_lapixl10_session.columns.session_start_date.inctostring=true +hibernate.tables.tl_lapixl10_session.columns.session_start_date.java-name=sessionStartDate +hibernate.tables.tl_lapixl10_session.columns.session_start_date.java-type=java.sql.Timestamp +hibernate.tables.tl_lapixl10_session.columns.status.inctostring=true +hibernate.tables.tl_lapixl10_session.columns.status.java-name=status +hibernate.tables.tl_lapixl10_session.columns.status.java-type=java.lang.Integer +hibernate.tables.tl_lapixl10_session.columns.uid.columnspecialty=key +hibernate.tables.tl_lapixl10_session.columns.uid.incequals=true +hibernate.tables.tl_lapixl10_session.columns.uid.inctostring=true +hibernate.tables.tl_lapixl10_session.columns.uid.java-name=uid +hibernate.tables.tl_lapixl10_session.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_session.equalshashcode=true +hibernate.tables.tl_lapixl10_session.keygenerator=native +hibernate.tables.tl_lapixl10_user.base-class-name=PixlrUser +hibernate.tables.tl_lapixl10_user.columns.first_name.java-name=firstName +hibernate.tables.tl_lapixl10_user.columns.first_name.java-type=java.lang.String +hibernate.tables.tl_lapixl10_user.columns.last_name.columnspecialty=property +hibernate.tables.tl_lapixl10_user.columns.last_name.java-name=lastName +hibernate.tables.tl_lapixl10_user.columns.last_name.java-type=java.lang.String +hibernate.tables.tl_lapixl10_user.columns.session_id.inctostring=true +hibernate.tables.tl_lapixl10_user.columns.session_id.java-name=sessionId +hibernate.tables.tl_lapixl10_user.columns.session_id.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_user.columns.uid.columnspecialty=key +hibernate.tables.tl_lapixl10_user.columns.uid.incequals=true +hibernate.tables.tl_lapixl10_user.columns.uid.inctostring=true +hibernate.tables.tl_lapixl10_user.columns.uid.java-name=uid +hibernate.tables.tl_lapixl10_user.columns.uid.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_user.columns.user_id.inctostring=true +hibernate.tables.tl_lapixl10_user.columns.user_id.java-name=userId +hibernate.tables.tl_lapixl10_user.columns.user_id.java-type=java.lang.Long +hibernate.tables.tl_lapixl10_user.equalshashcode=true +hibernate.tables.tl_lapixl10_user.keygenerator=sequence +relations.tl_lapixl10_pixlr-tl_lapixl10_attachment.tl_lapixl10_attachment-has-tl_lapixl10_pixlr.enabled=true +relations.tl_lapixl10_pixlr-tl_lapixl10_attachment.tl_lapixl10_attachment-has-tl_lapixl10_pixlr.target-many=false +relations.tl_lapixl10_pixlr-tl_lapixl10_attachment.tl_lapixl10_pixlr-has-tl_lapixl10_attachment.enabled=true +relations.tl_lapixl10_pixlr-tl_lapixl10_attachment.tl_lapixl10_pixlr-has-tl_lapixl10_attachment.target-many=true +relations.tl_lapixl10_pixlr-tl_lapixl10_session.tl_lapixl10_pixlr-has-tl_lapixl10_session.enabled=true +relations.tl_lapixl10_pixlr-tl_lapixl10_session.tl_lapixl10_pixlr-has-tl_lapixl10_session.target-many=true +relations.tl_lapixl10_pixlr-tl_lapixl10_session.tl_lapixl10_session-has-tl_lapixl10_pixlr.enabled=true +relations.tl_lapixl10_pixlr-tl_lapixl10_session.tl_lapixl10_session-has-tl_lapixl10_pixlr.target-many=false +relations.tl_lapixl10_session-tl_lapixl10_user.tl_lapixl10_session-has-tl_lapixl10_user.enabled=true +relations.tl_lapixl10_session-tl_lapixl10_user.tl_lapixl10_session-has-tl_lapixl10_user.target-many=true +relations.tl_lapixl10_session-tl_lapixl10_user.tl_lapixl10_user-has-tl_lapixl10_session.enabled=true +relations.tl_lapixl10_session-tl_lapixl10_user.tl_lapixl10_user-has-tl_lapixl10_session.target-many=false +tables.tl_lapixl10_attachment.x=566 +tables.tl_lapixl10_attachment.y=173 +tables.tl_lapixl10_pixlr.x=308 +tables.tl_lapixl10_pixlr.y=176 +tables.tl_lapixl10_session.x=70 +tables.tl_lapixl10_session.y=70 +tables.tl_lapixl10_user.x=460 +tables.tl_lapixl10_user.y=28 Index: lams_tool_pixlr/conf/war/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_pixlr/conf/war/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_pixlr/conf/war/META-INF/MANIFEST.MF (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,4 @@ +Implementation-Title: LAMS - Pixlr Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: ./lams.jar ./lams-tool-lapixl10.jar ./lams-contentrepository.jar ./lams-learning.jar Index: lams_tool_pixlr/conf/xdoclet/error-pages.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/error-pages.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/error-pages.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,13 @@ + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + Index: lams_tool_pixlr/conf/xdoclet/filter-mappings.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/filter-mappings.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/filter-mappings.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,14 @@ + + SystemSessionFilter + /* + + + + hibernateFilter + /* + + + + LocaleFilter + /* + Index: lams_tool_pixlr/conf/xdoclet/filters.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/filters.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/filters.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,24 @@ + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + pixlrSessionFactory + + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + Index: lams_tool_pixlr/conf/xdoclet/global-forwards.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/global-forwards.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/global-forwards.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,3 @@ + + + Index: lams_tool_pixlr/conf/xdoclet/listeners.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/listeners.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/listeners.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,11 @@ + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + Index: lams_tool_pixlr/conf/xdoclet/servlet-mappings.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/servlet-mappings.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/servlet-mappings.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,20 @@ + + action + *.do + + + + + Connector + /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + Index: lams_tool_pixlr/conf/xdoclet/servlets.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/servlets.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/servlets.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,56 @@ + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + + + Connector + com.fredck.FCKeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Attachment Download + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + pixlrToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.pixlr.web.servlets.ExportServlet + + Index: lams_tool_pixlr/conf/xdoclet/struts-actions.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/struts-actions.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/struts-actions.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/conf/xdoclet/struts-forms.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/struts-forms.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/struts-forms.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_pixlr/conf/xdoclet/struts-message-resources.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/struts-message-resources.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/struts-message-resources.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1 @@ + Index: lams_tool_pixlr/conf/xdoclet/struts-plugins.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/struts-plugins.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/struts-plugins.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,9 @@ + + + + Index: lams_tool_pixlr/conf/xdoclet/taglibs.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/taglibs.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/taglibs.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,77 @@ + + + + + + + tags-bean + /WEB-INF/struts/tlds/struts-bean.tld + + + + tags-html + /WEB-INF/struts/tlds/struts-html.tld + + + + tags-logic + /WEB-INF/struts/tlds/struts-logic.tld + + + + tags-tiles + /WEB-INF/struts/tlds/struts-tiles.tld + + + + + + + + tags-fmt + /WEB-INF/jstl/tlds/fmt.tld + + + + tags-core + /WEB-INF/jstl/tlds/c.tld + + + + tags-function + /WEB-INF/jstl/tlds/fn.tld + + + + tags-xml + /WEB-INF/jstl/tlds/x.tld + + + + + + + tags-permittedTaglibs + /WEB-INF/jstl/tlds/permittedTaglibs.tld + + + + tags-scriptfree + /WEB-INF/jstl/tlds/scriptfree.tld + + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + + tags-lams + /WEB-INF/lams.tld + + + + Index: lams_tool_pixlr/conf/xdoclet/web-security.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/web-security.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/web-security.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,103 @@ + + + + Secure Content + *.jsp + *.html + *.do + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of users for sessions + SYSADMIN + + + + Can create/modify a learning design and edit default tool content + AUTHOR ADMIN + Index: lams_tool_pixlr/conf/xdoclet/web-settings.xml =================================================================== diff -u --- lams_tool_pixlr/conf/xdoclet/web-settings.xml (revision 0) +++ lams_tool_pixlr/conf/xdoclet/web-settings.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,20 @@ + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.pixlr.ApplicationResources + + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/tool/pixlr/pixlrApplicationContext.xml + classpath:/org/lamsfoundation/lams/tool/pixlr/dbupdates/autopatchContext.xml + + + Index: lams_tool_pixlr/db/sql/activity_insert.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/activity_insert.sql (revision 0) +++ lams_tool_pixlr/db/sql/activity_insert.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,80 @@ +-- CVS ID: $Id$ + +INSERT INTO lams_learning_activity +( +activity_ui_id +, description +, title +, help_text +, xcoord +, ycoord +, parent_activity_id +, parent_ui_id +, learning_activity_type_id +, grouping_support_type_id +, apply_grouping_flag +, grouping_id +, grouping_ui_id +, order_id +, define_later_flag +, learning_design_id +, learning_library_id +, create_date_time +, run_offline_flag +, max_number_of_options +, min_number_of_options +, options_instructions +, tool_id +, tool_content_id +, activity_category_id +, gate_activity_level_id +, gate_open_flag +, gate_start_time_offset +, gate_end_time_offset +, gate_start_date_time +, gate_end_date_time +, library_activity_ui_image +, create_grouping_id +, create_grouping_ui_id +, library_activity_id +, language_file +) +VALUES +( +NULL +, 'Pixlr Tool' +, 'Pixlr Tool' +, 'Put some help text here.' +, NULL +, NULL +, NULL +, NULL +, 1 +, 2 +, 0 +, NULL +, NULL +, NULL +, 0 +, NULL +, ${learning_library_id} +, NOW() +, 0 +, NULL +, NULL +, NULL +, ${tool_id} +, NULL +, 6 +, NULL +, NULL +, NULL +, NULL +, NULL +, NULL +, 'tool/lapixl10/images/icon_pixlr.swf' +, NULL +, NULL +, NULL +, 'org.lamsfoundation.lams.tool.pixlr.ApplicationResources' +) Index: lams_tool_pixlr/db/sql/create_lams_tool_pixlr.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/create_lams_tool_pixlr.sql (revision 0) +++ lams_tool_pixlr/db/sql/create_lams_tool_pixlr.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,45 @@ +-- CVS ID: $Id$ + +SET FOREIGN_KEY_CHECKS=0; +drop table if exists tl_lapixl10_attachment; +drop table if exists tl_lapixl10_pixlr; +drop table if exists tl_lapixl10_session; +drop table if exists tl_lapixl10_user; +create table tl_lapixl10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, pixlr_uid bigint, primary key (uid)); +create table tl_lapixl10_pixlr (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, reflect_on_activity bit, allow_view_others_images bit, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, image_file_name text, image_width bigint, image_height bigint, reflect_instructions text, primary key (uid)); +create table tl_lapixl10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), pixlr_uid bigint, primary key (uid)); +create table tl_lapixl10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, pixlr_session_uid bigint, entry_uid bigint, image_file_name text, imageHeight bigint, imageWidth bigint, imageHidden bit, primary key (uid)); +alter table tl_lapixl10_attachment add index FK951F889ACB8ADA74 (pixlr_uid), add constraint FK951F889ACB8ADA74 foreign key (pixlr_uid) references tl_lapixl10_pixlr (uid); +alter table tl_lapixl10_session add index FKE5C05E7FCB8ADA74 (pixlr_uid), add constraint FKE5C05E7FCB8ADA74 foreign key (pixlr_uid) references tl_lapixl10_pixlr (uid); +alter table tl_lapixl10_user add index FK9A39C08236E23005 (pixlr_session_uid), add constraint FK9A39C08236E23005 foreign key (pixlr_session_uid) references tl_lapixl10_session (uid); + +INSERT INTO tl_lapixl10_pixlr ( + title, + instructions, + online_instructions, + offline_instructions, + tool_content_id, + run_offline, + lock_on_finished, + content_in_use, + define_later, + reflect_on_activity, + allow_view_others_images, + image_width, + image_height) +VALUES( + "Pixlr", + "Instructions", + "", + "", + ${default_content_id}, + 0, + 0, + 0, + 0, + 0, + 1, + 200, + 200 +); + Index: lams_tool_pixlr/db/sql/db_version_insert.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/db_version_insert.sql (revision 0) +++ lams_tool_pixlr/db/sql/db_version_insert.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,2 @@ +-- $Id$ +INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F'); Index: lams_tool_pixlr/db/sql/drop_lams_tool_pixlr.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/drop_lams_tool_pixlr.sql (revision 0) +++ lams_tool_pixlr/db/sql/drop_lams_tool_pixlr.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,13 @@ +-- CVS ID: $Id$ + +SET FOREIGN_KEY_CHECKS=0; +DROP TABLE IF EXISTS tl_lapixl10_user; +DROP TABLE IF EXISTS tl_lapixl10_attachment; +DROP TABLE IF EXISTS tl_lapixl10_session; +DROP TABLE IF EXISTS tl_lapixl10_pixlr; +SET FOREIGN_KEY_CHECKS=1; + + + + + Index: lams_tool_pixlr/db/sql/library_insert.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/library_insert.sql (revision 0) +++ lams_tool_pixlr/db/sql/library_insert.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,16 @@ +-- CVS ID: $Id$ + +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'Pixlr Tool', +'Pixlr', +0, +NOW() +) Index: lams_tool_pixlr/db/sql/table-schema.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/table-schema.sql (revision 0) +++ lams_tool_pixlr/db/sql/table-schema.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,14 @@ +alter table tl_lapixl10_attachment drop foreign key FK951F889ACB8ADA74; +alter table tl_lapixl10_session drop foreign key FKE5C05E7FCB8ADA74; +alter table tl_lapixl10_user drop foreign key FK9A39C08236E23005; +drop table if exists tl_lapixl10_attachment; +drop table if exists tl_lapixl10_pixlr; +drop table if exists tl_lapixl10_session; +drop table if exists tl_lapixl10_user; +create table tl_lapixl10_attachment (uid bigint not null auto_increment, file_version_id bigint, file_type varchar(255), file_name varchar(255), file_uuid bigint, create_date datetime, pixlr_uid bigint, primary key (uid)); +create table tl_lapixl10_pixlr (uid bigint not null auto_increment, create_date datetime, update_date datetime, create_by bigint, title varchar(255), instructions text, run_offline bit, lock_on_finished bit, reflect_on_activity bit, allow_view_others_images bit, online_instructions text, offline_instructions text, content_in_use bit, define_later bit, tool_content_id bigint, image_file_name text, image_width bigint, image_height bigint, reflect_instructions text, primary key (uid)); +create table tl_lapixl10_session (uid bigint not null auto_increment, session_end_date datetime, session_start_date datetime, status integer, session_id bigint, session_name varchar(250), pixlr_uid bigint, primary key (uid)); +create table tl_lapixl10_user (uid bigint not null auto_increment, user_id bigint, last_name varchar(255), login_name varchar(255), first_name varchar(255), finishedActivity bit, pixlr_session_uid bigint, entry_uid bigint, image_file_name text, imageHeight bigint, imageWidth bigint, imageHidden bit, primary key (uid)); +alter table tl_lapixl10_attachment add index FK951F889ACB8ADA74 (pixlr_uid), add constraint FK951F889ACB8ADA74 foreign key (pixlr_uid) references tl_lapixl10_pixlr (uid); +alter table tl_lapixl10_session add index FKE5C05E7FCB8ADA74 (pixlr_uid), add constraint FKE5C05E7FCB8ADA74 foreign key (pixlr_uid) references tl_lapixl10_pixlr (uid); +alter table tl_lapixl10_user add index FK9A39C08236E23005 (pixlr_session_uid), add constraint FK9A39C08236E23005 foreign key (pixlr_session_uid) references tl_lapixl10_session (uid); Index: lams_tool_pixlr/db/sql/tool_insert.sql =================================================================== diff -u --- lams_tool_pixlr/db/sql/tool_insert.sql (revision 0) +++ lams_tool_pixlr/db/sql/tool_insert.sql (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,64 @@ +-- CVS ID: $Id$ + +INSERT INTO lams_tool +( +tool_signature, +service_name, +tool_display_name, +description, +tool_identifier, +tool_version, +learning_library_id, +default_tool_content_id, +valid_flag, +grouping_support_type_id, +supports_run_offline_flag, +learner_url, +learner_preview_url, +learner_progress_url, +author_url, +monitor_url, +define_later_url, +export_pfolio_learner_url, +export_pfolio_class_url, +contribute_url, +moderation_url, +help_url, +language_file, +classpath_addition, +context_file, +create_date_time, +modified_date_time, +supports_outputs +) +VALUES +( +'lapixl10', +'pixlrService', +'Pixlr', +'Pixlr', +'pixlr', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/lapixl10/learning.do?mode=learner', +'tool/lapixl10/learning.do?mode=author', +'tool/lapixl10/learning.do?mode=teacher', +'tool/lapixl10/authoring.do', +'tool/lapixl10/monitoring.do', +'tool/lapixl10/authoring.do?mode=teacher', +'tool/lapixl10/exportPortfolio?mode=learner', +'tool/lapixl10/exportPortfolio?mode=teacher', +'tool/lapixl10/contribute.do', +'tool/lapixl10/moderate.do', +'http://wiki.lamsfoundation.org/display/lamsdocs/lapixl10', +'org.lamsfoundation.lams.tool.pixlr.ApplicationResources', +'lams-tool-lapixl10.jar', +'/org/lamsfoundation/lams/tool/pixlr/pixlrApplicationContext.xml', +NOW(), +NOW(), +0 +) Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrAttachmentDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrAttachmentDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrAttachmentDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; + +/** + * DAO for accessing the PixlrAttachment objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IPixlrAttachmentDAO extends IBaseDAO { + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,44 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; + +/** + * DAO for accessing the Pixlr objects - interface defining methods to be implemented by the Hibernate or other + * implementation. + */ +public interface IPixlrDAO extends IBaseDAO { + + Pixlr getByContentId(Long toolContentId); + + void saveOrUpdate(Pixlr toContent); + + void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type); + + void releaseFromCache(Object o); + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrSessionDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrSessionDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrSessionDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,41 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; + +/** + * DAO for accessing the PixlrSession objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IPixlrSessionDAO extends IBaseDAO{ + + void saveOrUpdate(PixlrSession session); + + PixlrSession getBySessionId(Long toolSessionId); + + void deleteBySessionID(Long toolSessionID); +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrUserDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrUserDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/IPixlrUserDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,60 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao; + +import org.lamsfoundation.lams.dao.IBaseDAO; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; + +/** + * DAO for accessing the PixlrUser objects - interface defining + * methods to be implemented by the Hibernate or other implementation. + */ +public interface IPixlrUserDAO extends IBaseDAO{ + /** + * + * @param userId + * @param toolSessionId + * @return + */ + PixlrUser getByUserIdAndSessionId(Long userId, Long toolSessionId); + + void saveOrUpdate(PixlrUser pixlrUser); + + /** + * + * @param loginName + * @param sessionID + * @return + */ + PixlrUser getByLoginNameAndSessionId(String loginName, Long toolSessionId); + + + /** + * + * @param uid + * @return + */ + PixlrUser getByUID(Long uid); +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrAttachmentDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrAttachmentDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrAttachmentDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,35 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao.hibernate; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrAttachmentDAO; + +/** + * DAO for accessing the PixlrAttachment objects - Hibernate specific code. + */ +public class PixlrAttachmentDAO extends BaseDAO implements IPixlrAttachmentDAO { + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao.hibernate; + +import java.util.List; + +import org.hibernate.FlushMode; +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrDAO; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment; +import org.springframework.orm.hibernate3.HibernateTemplate; + +/** + * DAO for accessing the Pixlr objects - Hibernate specific code. + */ +public class PixlrDAO extends BaseDAO implements IPixlrDAO { + + private static final String FIND_FORUM_BY_CONTENTID = "from Pixlr pixlr where pixlr.toolContentId=?"; + + private static final String FIND_INSTRUCTION_FILE = "from " + PixlrAttachment.class.getName() + + " as i where tool_content_id=? and i.file_uuid=? and i.file_version_id=? and i.file_type=?"; + + @SuppressWarnings("unchecked") + public Pixlr getByContentId(Long toolContentId) { + List list = getHibernateTemplate().find(PixlrDAO.FIND_FORUM_BY_CONTENTID, toolContentId); + if (list != null && list.size() > 0) { + return (Pixlr) list.get(0); + } else { + return null; + } + } + + public void saveOrUpdate(Pixlr pixlr) { + this.getHibernateTemplate().saveOrUpdate(pixlr); + this.getHibernateTemplate().flush(); + } + + @SuppressWarnings("unchecked") + public void deleteInstructionFile(Long toolContentId, Long uuid, Long versionId, String type) { + HibernateTemplate templ = this.getHibernateTemplate(); + if (toolContentId != null && uuid != null && versionId != null) { + List list = getSession().createQuery(PixlrDAO.FIND_INSTRUCTION_FILE).setLong(0, + toolContentId.longValue()).setLong(1, uuid.longValue()).setLong(2, versionId.longValue()) + .setString(3, type).list(); + if (list != null && list.size() > 0) { + PixlrAttachment file = (PixlrAttachment) list.get(0); + this.getSession().setFlushMode(FlushMode.AUTO); + templ.delete(file); + templ.flush(); + } + } + + } + + public void releaseFromCache(Object o) { + getSession().evict(o); + + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrSessionDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrSessionDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrSessionDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,62 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrSessionDAO; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; + +/** + * DAO for accessing the PixlrSession objects - Hibernate specific code. + */ +public class PixlrSessionDAO extends BaseDAO implements IPixlrSessionDAO { + + public static final String SQL_QUERY_FIND_BY_SESSION_ID = "from " + + PixlrSession.class.getName() + " where session_id=?"; + + public void saveOrUpdate(PixlrSession session) { + this.getHibernateTemplate().saveOrUpdate(session); + this.getHibernateTemplate().flush(); + } + + @SuppressWarnings("unchecked") + public PixlrSession getBySessionId(Long toolSessionId) { + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_SESSION_ID, toolSessionId); + if (list == null || list.isEmpty()) + return null; + return (PixlrSession) list.get(0); + } + + public void deleteBySessionID(Long toolSessionID) { + PixlrSession session = getBySessionId(toolSessionID); + if(session != null){ + this.getHibernateTemplate().delete(session); + this.getHibernateTemplate().flush(); + } + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrUserDAO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrUserDAO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dao/hibernate/PixlrUserDAO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,91 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.dao.hibernate.BaseDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrUserDAO; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; + +/** + * DAO for accessing the PixlrUser objects - Hibernate specific code. + */ +public class PixlrUserDAO extends BaseDAO implements IPixlrUserDAO { + + public static final String SQL_QUERY_FIND_BY_USER_ID_SESSION_ID = "from " + + PixlrUser.class.getName() + " as f" + + " where user_id=? and f.pixlrSession.sessionId=?"; + + public static final String SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID = "from " + + PixlrUser.class.getName() + + " as f where login_name=? and f.pixlrSession.sessionId=?"; + + private static final String SQL_QUERY_FIND_BY_UID = "from " + + PixlrUser.class.getName() + " where uid=?"; + + @SuppressWarnings("unchecked") + public PixlrUser getByUserIdAndSessionId(Long userId, Long toolSessionId) { + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_USER_ID_SESSION_ID, + new Object[] { userId, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (PixlrUser) list.get(0); + } + + @SuppressWarnings("unchecked") + public PixlrUser getByLoginNameAndSessionId(String loginName, + Long toolSessionId) { + + List list = this.getHibernateTemplate().find( + SQL_QUERY_FIND_BY_LOGIN_NAME_SESSION_ID, + new Object[] { loginName, toolSessionId }); + + if (list == null || list.isEmpty()) + return null; + + return (PixlrUser) list.get(0); + + } + + public void saveOrUpdate(PixlrUser pixlrUser) { + this.getHibernateTemplate().saveOrUpdate(pixlrUser); + this.getHibernateTemplate().flush(); + } + + @SuppressWarnings("unchecked") + public PixlrUser getByUID(Long uid) { + List list = this.getHibernateTemplate().find(SQL_QUERY_FIND_BY_UID, + new Object[] { uid }); + + if (list == null || list.isEmpty()) + return null; + + return (PixlrUser) list.get(0); + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dbupdates/autopatchContext.xml =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dbupdates/autopatchContext.xml (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dbupdates/autopatchContext.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,11 @@ + + + + + + + + + + + Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/NotebookEntryDTO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/NotebookEntryDTO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/NotebookEntryDTO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,56 @@ +package org.lamsfoundation.lams.tool.pixlr.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; + +public class NotebookEntryDTO { + + private Long uid; + + private String entry; + + private Date createDate; + + private Date lastModified; + + public NotebookEntryDTO(NotebookEntry entry) { + this.uid = entry.getUid(); + this.entry = entry.getEntry(); + this.createDate = entry.getCreateDate(); + this.lastModified = entry.getLastModified(); + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public String getEntry() { + return entry; + } + + public void setEntry(String entry) { + this.entry = entry; + } + + public Date getLastModified() { + return lastModified; + } + + public void setLastModified(Date lastModified) { + this.lastModified = lastModified; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrAttachmentDTO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrAttachmentDTO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrAttachmentDTO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,102 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment; + +public class PixlrAttachmentDTO implements Comparable { + + public PixlrAttachmentDTO(PixlrAttachment att) { + this.fileUuid = att.getFileUuid(); + this.fileName = att.getFileName(); + this.fileVersionId = att.getFileVersionId(); + this.createDate = att.getCreateDate(); + this.uid = att.getUid(); + } + + Long uid; + + Long fileUuid; + + Long fileVersionId; + + String fileName; + + Date createDate; + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public Long getFileUuid() { + return fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + public Long getFileVersionId() { + return fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public int compareTo(Object o) { + PixlrAttachmentDTO toAttachment = (PixlrAttachmentDTO) o; + int returnValue = this.createDate.compareTo(((PixlrAttachmentDTO) o) + .getCreateDate()); + + if (returnValue == 0) { + returnValue = this.uid.compareTo(toAttachment.getUid()); + } + return returnValue; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrDTO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrDTO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrDTO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,260 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; + +public class PixlrDTO { + + private static Logger logger = Logger.getLogger(PixlrDTO.class); + + public Long toolContentId; + + public String title; + + public String instructions; + + public String onlineInstructions; + + public String offlineInstructions; + + public boolean defineLater; + + public boolean contentInUse; + + public boolean reflectOnActivity; + + public boolean lockOnFinish; + + public Set onlineInstructionsFiles; + + public Set offlineInstructionsFiles; + + public Set sessionDTOs = new TreeSet(); + + public Long currentTab; + + private String imageFileName; + + private String reflectInstructions; + + boolean allowViewOthersImages; + + private Long imageWidth; + + private Long imageHeight; + + /* Constructors */ + public PixlrDTO() { + } + + public PixlrDTO(Pixlr pixlr) { + this.toolContentId = pixlr.getToolContentId(); + this.title = pixlr.getTitle(); + this.instructions = pixlr.getInstructions(); + this.onlineInstructions = pixlr.getOnlineInstructions(); + this.offlineInstructions = pixlr.getOfflineInstructions(); + this.contentInUse = pixlr.isContentInUse(); + this.reflectOnActivity = pixlr.isReflectOnActivity(); + this.lockOnFinish = pixlr.isLockOnFinished(); + this.imageFileName = pixlr.getImageFileName(); + this.reflectInstructions = pixlr.getReflectInstructions(); + this.allowViewOthersImages = pixlr.isAllowViewOthersImages(); + + this.onlineInstructionsFiles = new TreeSet(); + this.offlineInstructionsFiles = new TreeSet(); + + for (Iterator i = pixlr.getPixlrAttachments().iterator(); i.hasNext();) { + PixlrAttachment att = (PixlrAttachment) i.next(); + if (att.getFileType().equals(IToolContentHandler.TYPE_OFFLINE)) { + PixlrAttachmentDTO attDTO = new PixlrAttachmentDTO(att); + offlineInstructionsFiles.add(attDTO); + } else if (att.getFileType().equals(IToolContentHandler.TYPE_ONLINE)) { + PixlrAttachmentDTO attDTO = new PixlrAttachmentDTO(att); + onlineInstructionsFiles.add(attDTO); + } else { + // something is wrong. Ignore file, log error + logger.error("File with uid " + att.getFileUuid() + " contains invalid fileType: " + att.getFileType()); + } + } + + for (Iterator iter = pixlr.getPixlrSessions().iterator(); iter.hasNext();) { + PixlrSession session = (PixlrSession) iter.next(); + PixlrSessionDTO sessionDTO = new PixlrSessionDTO(session); + + sessionDTOs.add(sessionDTO); + } + } + + /* Getters / Setters */ + public Set getSessionDTOs() { + return sessionDTOs; + } + + public void setSessionDTOs(Set sessionDTOs) { + this.sessionDTOs = sessionDTOs; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + public Set getOfflineInstructionsFiles() { + return offlineInstructionsFiles; + } + + public void setOfflineInstructionsFiles(Set offlineInstructionsFiles) { + this.offlineInstructionsFiles = offlineInstructionsFiles; + } + + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + public Set getOnlineInstructionsFiles() { + return onlineInstructionsFiles; + } + + public void setOnlineInstructionsFiles(Set onlineInstructionsFiles) { + this.onlineInstructionsFiles = onlineInstructionsFiles; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentID) { + this.toolContentId = toolContentID; + } + + public Boolean getContentInUse() { + return contentInUse; + } + + public void setContentInUse(Boolean contentInUse) { + this.contentInUse = contentInUse; + } + + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + public boolean isLockOnFinish() { + return lockOnFinish; + } + + public void setLockOnFinish(boolean lockOnFinish) { + this.lockOnFinish = lockOnFinish; + } + + public Long getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(Long currentTab) { + this.currentTab = currentTab; + } + + public String getImageFileName() { + return imageFileName; + } + + public void getImageFileName(String imageFileName) { + this.imageFileName = imageFileName; + } + + public void setImageFileName(String imageFileName) { + this.imageFileName = imageFileName; + } + + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + public boolean isAllowViewOthersImages() { + return allowViewOthersImages; + } + + public void setAllowViewOthersImages(boolean allowViewOthersImages) { + this.allowViewOthersImages = allowViewOthersImages; + } + + public Long getImageWidth() { + return imageWidth; + } + + public void setImageWidth(Long imageWidth) { + this.imageWidth = imageWidth; + } + + public Long getImageHeight() { + return imageHeight; + } + + public void setImageHeight(Long imageHeight) { + this.imageHeight = imageHeight; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrSessionDTO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrSessionDTO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrSessionDTO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,116 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.dto; + +import java.util.Iterator; +import java.util.Set; +import java.util.TreeSet; + +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; + +public class PixlrSessionDTO implements Comparable { + + Long sessionID; + + String sessionName; + + Set userDTOs = new TreeSet(); + + int numberOfLearners; + + int numberOfFinishedLearners;; + + public PixlrSessionDTO(PixlrSession session) { + this.sessionID = session.getSessionId(); + this.sessionName = session.getSessionName(); + + numberOfFinishedLearners = 0; + for (Iterator iterator = session.getPixlrUsers().iterator(); iterator.hasNext();) { + PixlrUser user = (PixlrUser) iterator.next(); + PixlrUserDTO userDTO = new PixlrUserDTO(user); + if (userDTO.getEntryUID() != null) { + numberOfFinishedLearners++; + } + userDTOs.add(userDTO); + } + + numberOfLearners = userDTOs.size(); + + } + + public PixlrSessionDTO() {} + + public Long getSessionID() { + return sessionID; + } + + public void setSessionID(Long sessionID) { + this.sessionID = sessionID; + } + + public String getSessionName() { + return sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + public int compareTo(Object o) { + int returnValue; + PixlrSessionDTO toSession = (PixlrSessionDTO)o; + returnValue = this.sessionName.compareTo(toSession.sessionName); + if (returnValue == 0) { + returnValue = this.sessionID.compareTo(toSession.sessionID); + } + return returnValue; + } + + public Set getUserDTOs() { + return userDTOs; + } + + public void setUserDTOs(Set pixlrUsers) { + this.userDTOs = pixlrUsers; + } + + public int getNumberOfLearners() { + return numberOfLearners; + } + + public void setNumberOfLearners(int numberOfLearners) { + this.numberOfLearners = numberOfLearners; + } + + public int getNumberOfFinishedLearners() { + return numberOfFinishedLearners; + } + + public void setNumberOfFinishedLearners(int numberOfFinishedLearners) { + this.numberOfFinishedLearners = numberOfFinishedLearners; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrUserDTO.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrUserDTO.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/dto/PixlrUserDTO.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,226 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.dto; + +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; + +public class PixlrUserDTO implements Comparable{ + + public Long uid; + + public Long userId; + + public String loginName; + + public String firstName; + + public String lastName; + + public boolean finishedActivity; + + public String notebookEntry; + + public Long entryUID; + + public String imageFileName; + + public boolean finishedReflection; + + private Long imageHeight; + + private Long imageWidth; + + private long imageThumbnailWidth; + + private long imageThumbnailHeight; + + private boolean imageHidden; + + public PixlrUserDTO(PixlrUser user) { + this.uid = user.getUid(); + this.loginName = user.getLoginName(); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.finishedActivity = user.isFinishedActivity(); + this.entryUID = user.getEntryUID(); + this.imageFileName = user.getImageFileName(); + this.userId = user.getUserId(); + this.imageHeight = user.getImageHeight(); + this.imageWidth = user.getImageWidth(); + this.imageHidden = user.isImageHidden(); + setThumbnailDimensions(); + } + + public int compareTo(Object o) { + int returnValue; + PixlrUserDTO toUser = (PixlrUserDTO)o; + returnValue = this.lastName.compareTo(toUser.lastName); + if (returnValue == 0) { + returnValue = this.uid.compareTo(toUser.uid); + } + return returnValue; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public String getNotebookEntry() { + return notebookEntry; + } + + public void setNotebookEntry(String notebookEntry) { + this.notebookEntry = notebookEntry; + } + + public Long getEntryUID() { + return entryUID; + } + + public void setEntryUID(Long entryUID) { + this.entryUID = entryUID; + } + + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } + + public String getImageFileName() { + return imageFileName; + } + + public void setImageFileName(String imageFileName) { + this.imageFileName = imageFileName; + } + + public boolean isFinishedReflection() { + return finishedReflection; + } + + public void setFinishedReflection(boolean finishedReflection) { + this.finishedReflection = finishedReflection; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getImageHeight() { + return imageHeight; + } + + public void setImageHeight(Long imageHeight) { + this.imageHeight = imageHeight; + } + + public Long getImageWidth() { + return imageWidth; + } + + public void setImageWidth(Long imageWidth) { + this.imageWidth = imageWidth; + } + + public long getImageThumbnailWidth() { + return imageThumbnailWidth; + } + + public void setImageThumbnailWidth(long imageThumbnailWidth) { + this.imageThumbnailWidth = imageThumbnailWidth; + } + + public long getImageThumbnailHeight() { + return imageThumbnailHeight; + } + + public void setImageThumbnailHeight(long imageThumbnailHeight) { + this.imageThumbnailHeight = imageThumbnailHeight; + } + + public boolean isImageHidden() { + return imageHidden; + } + + public void setImageHidden(boolean imageHidden) { + this.imageHidden = imageHidden; + } + + // set thumbnail dimentions with a maximum of 100 width or height + public void setThumbnailDimensions() + { + if (imageWidth != null && imageHeight != null) + if (imageWidth >= imageHeight) + { + this.imageThumbnailWidth = 100; + double temp = 100.0 / imageWidth.longValue(); + this.imageThumbnailHeight = (new Double(imageHeight.longValue() * temp)).longValue(); + + } + else + { + this.imageThumbnailHeight = 100; + double temp = 100.0 / imageHeight.longValue(); + this.imageThumbnailWidth = (new Double(imageWidth.longValue() * temp)).longValue(); + } + + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/Pixlr.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,491 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.pixlr.service.PixlrService; + +/** + * @hibernate.class table="tl_lapixl10_pixlr" + */ + +public class Pixlr implements java.io.Serializable, Cloneable { + + /** + * + */ + private static final long serialVersionUID = 579733009969321015L; + + static Logger log = Logger.getLogger(PixlrService.class.getName()); + + // Fields + /** + * + */ + private Long uid; + + private Date createDate; + + private Date updateDate; + + private Long createBy; + + private String title; + + private String instructions; + + private boolean runOffline; + + private boolean lockOnFinished; + + private boolean reflectOnActivity; + + private boolean allowViewOthersImages; + + private String reflectInstructions; + + private String onlineInstructions; + + private String offlineInstructions; + + private boolean contentInUse; + + private boolean defineLater; + + private Long toolContentId; + + private String imageFileName; // Image uploaded for pixlr + + private Long imageWidth; + + private Long imageHeight; + + private Set pixlrAttachments; + + private Set pixlrSessions; + + // *********** NON Persisit fields + private IToolContentHandler toolContentHandler; + + // Constructors + + /** default constructor */ + public Pixlr() { + } + + /** full constructor */ + public Pixlr(Date createDate, Date updateDate, Long createBy, String title, String instructions, + boolean runOffline, boolean lockOnFinished, boolean filteringEnabled, String filterKeywords, + String onlineInstructions, String offlineInstructions, boolean contentInUse, boolean defineLater, + Long toolContentId, String reflectInstructions, Set pixlrAttachments, + Set pixlrSessions, String imageFileName, Long imageWidth, Long imageHeight, boolean allowViewOthersImages) { + this.createDate = createDate; + this.updateDate = updateDate; + this.createBy = createBy; + this.title = title; + this.instructions = instructions; + this.runOffline = runOffline; + this.lockOnFinished = lockOnFinished; + this.onlineInstructions = onlineInstructions; + this.offlineInstructions = offlineInstructions; + this.contentInUse = contentInUse; + this.defineLater = defineLater; + this.toolContentId = toolContentId; + this.pixlrAttachments = pixlrAttachments; + this.pixlrSessions = pixlrSessions; + this.imageFileName = imageFileName; + this.reflectInstructions = reflectInstructions; + this.imageHeight = imageHeight; + this.imageWidth = imageWidth; + this.allowViewOthersImages = allowViewOthersImages; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="create_date" + * + */ + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.property column="update_date" + * + */ + + public Date getUpdateDate() { + return updateDate; + } + + public void setUpdateDate(Date updateDate) { + this.updateDate = updateDate; + } + + /** + * @hibernate.property column="create_by" length="20" + * + */ + + public Long getCreateBy() { + return createBy; + } + + public void setCreateBy(Long createBy) { + this.createBy = createBy; + } + + /** + * @hibernate.property column="title" length="255" + * + */ + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * @hibernate.property column="instructions" length="65535" + * + */ + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @hibernate.property column="run_offline" length="1" + * + */ + + public boolean isRunOffline() { + return runOffline; + } + + public void setRunOffline(boolean runOffline) { + this.runOffline = runOffline; + } + + /** + * @hibernate.property column="lock_on_finished" length="1" + * + */ + + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + /** + * @hibernate.property column="reflect_on_activity" length="1" + */ + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + /** + * @hibernate.property column="allow_view_others_images" length="1" + */ + public boolean isAllowViewOthersImages() { + return allowViewOthersImages; + } + + public void setAllowViewOthersImages(boolean allowViewOthersImages) { + this.allowViewOthersImages = allowViewOthersImages; + } + + /** + * @hibernate.property column="online_instructions" length="65535" + * + */ + public String getOnlineInstructions() { + return onlineInstructions; + } + + public void setOnlineInstructions(String onlineInstructions) { + this.onlineInstructions = onlineInstructions; + } + + /** + * @hibernate.property column="offline_instructions" length="65535" + * + */ + + public String getOfflineInstructions() { + return offlineInstructions; + } + + public void setOfflineInstructions(String offlineInstructions) { + this.offlineInstructions = offlineInstructions; + } + + /** + * @hibernate.property column="content_in_use" length="1" + * + */ + + public boolean isContentInUse() { + return contentInUse; + } + + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @hibernate.property column="define_later" length="1" + * + */ + + public boolean isDefineLater() { + return defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + /** + * @hibernate.property column="tool_content_id" length="20" + * + */ + + public Long getToolContentId() { + return toolContentId; + } + + public void setToolContentId(Long toolContentId) { + this.toolContentId = toolContentId; + } + + + + /** + * @hibernate.set lazy="true" inverse="false" cascade="all-delete-orphan" + * @hibernate.collection-key column="pixlr_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment" + * + */ + + public Set getPixlrAttachments() { + return pixlrAttachments; + } + + public void setPixlrAttachments(Set pixlrAttachments) { + this.pixlrAttachments = pixlrAttachments; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="pixlr_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.pixlr.model.PixlrSession" + * + */ + + public Set getPixlrSessions() { + return pixlrSessions; + } + + public void setPixlrSessions(Set pixlrSessions) { + this.pixlrSessions = pixlrSessions; + } + + /** + * toString + * + * @return String + */ + @Override + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("title").append("='").append(getTitle()).append("' "); + buffer.append("instructions").append("='").append(getInstructions()).append("' "); + buffer.append("toolContentId").append("='").append(getToolContentId()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + @Override + public boolean equals(Object other) { + if (this == other) { + return true; + } + if (other == null) { + return false; + } + if (!(other instanceof Pixlr)) { + return false; + } + Pixlr castOther = (Pixlr) other; + + return this.getUid() == castOther.getUid() || this.getUid() != null && castOther.getUid() != null + && this.getUid().equals(castOther.getUid()); + } + + @Override + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public static Pixlr newInstance(Pixlr fromContent, Long toContentId, IToolContentHandler pixlrToolContentHandler) { + Pixlr toContent = new Pixlr(); + fromContent.toolContentHandler = pixlrToolContentHandler; + toContent = (Pixlr) fromContent.clone(); + toContent.setToolContentId(toContentId); + toContent.setCreateDate(new Date()); + return toContent; + } + + @Override + protected Object clone() { + + Pixlr pixlr = null; + try { + pixlr = (Pixlr) super.clone(); + pixlr.setUid(null); + + if (pixlrAttachments != null) { + // create a copy of the attachments + Iterator iter = pixlrAttachments.iterator(); + Set set = new HashSet(); + while (iter.hasNext()) { + PixlrAttachment originalFile = (PixlrAttachment) iter.next(); + PixlrAttachment newFile = (PixlrAttachment) originalFile.clone(); + set.add(newFile); + } + pixlr.pixlrAttachments = set; + } + // create an empty set for the pixlrSession + pixlr.pixlrSessions = new HashSet(); + + } catch (CloneNotSupportedException cnse) { + Pixlr.log.error("Error cloning " + Pixlr.class); + } + return pixlr; + } + + public IToolContentHandler getToolContentHandler() { + return toolContentHandler; + } + + public void setToolContentHandler(IToolContentHandler toolContentHandler) { + this.toolContentHandler = toolContentHandler; + } + + /** + * @hibernate.property column="image_file_name" length="511" + * + */ + + public String getImageFileName() { + return imageFileName; + } + + public void setImageFileName(String imageFileName) { + this.imageFileName = imageFileName; + } + + /** + * @hibernate.property column="image_width" + * + */ + + public Long getImageWidth() { + return imageWidth; + } + + public void setImageWidth(Long imageWidth) { + this.imageWidth = imageWidth; + } + + /** + * @hibernate.property column="image_height" + * + */ + + public Long getImageHeight() { + return imageHeight; + } + + public void setImageHeight(Long imageHeight) { + this.imageHeight = imageHeight; + } + + /** + * @hibernate.property column="reflect_instructions" length="65535" + */ + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,222 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.log4j.Logger; + +/** + * + * The details of files attached to the tool. In most cases this will be the + * online/offline instruction files. + * + * @hibernate.class table="tl_lapixl10_attachment" + * + */ + +public class PixlrAttachment implements java.io.Serializable, Cloneable { + + /** + * + */ + private static final long serialVersionUID = 47452859888067500L; + + private static final Logger log = Logger.getLogger(PixlrAttachment.class); + + /** + * + */ + private Long uid; + + private Long fileVersionId; + + private String fileType; + + private String fileName; + + private Long fileUuid; + + private Date createDate; + + private Pixlr pixlr; + + // Constructors + + /** default constructor */ + public PixlrAttachment() { + } + + /** Constructor setting up all the properties except for pixlr one */ + public PixlrAttachment(Long fileVersionId, String fileType, String fileName, Long fileUuid, Date createDate) { + this.fileVersionId = fileVersionId; + this.fileType = fileType; + this.fileName = fileName; + this.fileUuid = fileUuid; + this.createDate = createDate; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="file_version_id" length="20" + * + */ + + public Long getFileVersionId() { + return this.fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + /** + * @hibernate.property column="file_type" length="255" + * + */ + + public String getFileType() { + return this.fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + /** + * @hibernate.property column="file_name" length="255" + * + */ + + public String getFileName() { + return this.fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + /** + * @hibernate.property column="file_uuid" length="20" + * + */ + + public Long getFileUuid() { + return this.fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + /** + * @hibernate.property column="create_date" + * + */ + + public Date getCreateDate() { + return this.createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="pixlr_uid" + * + */ + + public Pixlr getPixlr() { + return this.pixlr; + } + + public void setPixlr(Pixlr pixlr) { + this.pixlr = pixlr; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("fileVersionId").append("='").append(getFileVersionId()).append("' "); + buffer.append("fileName").append("='").append(getFileName()).append("' "); + buffer.append("fileUuid").append("='").append(getFileUuid()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object o) { + if (this == o) + return true; + if (!(o instanceof PixlrAttachment)) + return false; + + final PixlrAttachment genericEntity = (PixlrAttachment) o; + + return new EqualsBuilder().append(this.uid, genericEntity.uid).append(this.fileVersionId, + genericEntity.fileVersionId).append(this.fileName, genericEntity.fileName).append(this.fileType, + genericEntity.fileType).append(this.createDate, genericEntity.createDate).isEquals(); + } + + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone() { + Object obj = null; + try { + obj = super.clone(); + ((PixlrAttachment) obj).setUid(null); + } catch (CloneNotSupportedException e) { + log.error("Failed to clone " + PixlrAttachment.class); + } + + return obj; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,249 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.model; + +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; + +/** + * + * Represents the tool session. + * + * @hibernate.class table="tl_lapixl10_session" + */ + +public class PixlrSession implements java.io.Serializable { + + private static Logger log = Logger.getLogger(PixlrSession.class); + /** + * + */ + private static final long serialVersionUID = 4407078136514639026L; + + // Fields + private Long uid; + + private Date sessionEndDate; + + private Date sessionStartDate; + + private Integer status; + + private Long sessionId; + + private String sessionName; + + private Pixlr pixlr; + + private Set pixlrUsers; + + // Constructors + + /** default constructor */ + public PixlrSession() { + } + + /** full constructor */ + public PixlrSession(Date sessionEndDate, Date sessionStartDate, + Integer status, Long sessionId, String sessionName, Pixlr pixlr, + Set pixlrUsers) { + this.sessionEndDate = sessionEndDate; + this.sessionStartDate = sessionStartDate; + this.status = status; + this.sessionId = sessionId; + this.sessionName = sessionName; + this.pixlr = pixlr; + this.pixlrUsers = pixlrUsers; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * + */ + + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="session_end_date" + * + */ + + public Date getSessionEndDate() { + return this.sessionEndDate; + } + + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + + /** + * @hibernate.property column="session_start_date" + * + */ + + public Date getSessionStartDate() { + return this.sessionStartDate; + } + + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + + /** + * @hibernate.property column="status" length="11" + * + */ + + public Integer getStatus() { + return this.status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + /** + * @hibernate.property column="session_id" length="20" + * + */ + + public Long getSessionId() { + return this.sessionId; + } + + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + + /** + * @hibernate.property column="session_name" length="250" + * + */ + + public String getSessionName() { + return this.sessionName; + } + + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="pixlr_uid" + * + */ + + public Pixlr getPixlr() { + return this.pixlr; + } + + public void setPixlr(Pixlr pixlr) { + this.pixlr = pixlr; + } + + /** + * @hibernate.set lazy="true" inverse="true" cascade="none" + * @hibernate.collection-key column="pixlr_session_uid" + * @hibernate.collection-one-to-many class="org.lamsfoundation.lams.tool.pixlr.model.PixlrUser" + * + */ + + public Set getPixlrUsers() { + return this.pixlrUsers; + } + + public void setPixlrUsers(Set pixlrUsers) { + this.pixlrUsers = pixlrUsers; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append( + Integer.toHexString(hashCode())).append(" ["); + buffer.append("sessionEndDate").append("='") + .append(getSessionEndDate()).append("' "); + buffer.append("sessionStartDate").append("='").append( + getSessionStartDate()).append("' "); + buffer.append("status").append("='").append(getStatus()).append("' "); + buffer.append("sessionID").append("='").append(getSessionId()).append( + "' "); + buffer.append("sessionName").append("='").append(getSessionName()) + .append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof PixlrSession)) + return false; + PixlrSession castOther = (PixlrSession) other; + + return ((this.getUid() == castOther.getUid()) || (this.getUid() != null + && castOther.getUid() != null && this.getUid().equals( + castOther.getUid()))); + } + + public int hashCode() { + int result = 17; + result = 37 * result + + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } + + public Object clone(){ + + PixlrSession session = null; + try{ + session = (PixlrSession) super.clone(); + session.pixlrUsers = new HashSet(); + } catch (CloneNotSupportedException e) { + log.error("When clone " + PixlrSession.class + " failed"); + } + return session; + } + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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 as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.model; + +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * + * Caches the user details. This allows the tool to be more efficient at + * displaying user names but means that when people's names change, they won't + * change in the "old" tool data. + * + * @hibernate.class table="tl_lapixl10_user" + */ + +public class PixlrUser implements java.io.Serializable { + + /** + * + */ + private static final long serialVersionUID = -3701664859818409197L; + + // Fields + private Long uid; + + private Long userId; + + private String lastName; + + private String firstName; + + private String loginName; + + private PixlrSession pixlrSession; + + private boolean finishedActivity; + + private Long entryUID; + + private String imageFileName; + + private Long imageHeight; + + private Long imageWidth; + + private boolean imageHidden; + + // Constructors + + /** default constructor */ + public PixlrUser() { + } + + public PixlrUser(UserDTO user, PixlrSession pixlrSession) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.pixlrSession = pixlrSession; + this.finishedActivity = false; + } + + /** full constructor */ + public PixlrUser(Long userId, String lastName, String firstName, PixlrSession pixlrSession) { + this.userId = userId; + this.lastName = lastName; + this.firstName = firstName; + this.pixlrSession = pixlrSession; + } + + // Property accessors + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + */ + public Long getUid() { + return this.uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @hibernate.property column="user_id" length="20" + * + */ + public Long getUserId() { + return this.userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + /** + * @hibernate.property column="last_name" length="255" + * + */ + public String getLastName() { + return this.lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * @hibernate.property column="login_name" length="255" + * + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + /** + * @hibernate.property column="first_name" length="255" + * + */ + public String getFirstName() { + return this.firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @hibernate.property column="finishedActivity" + */ + public boolean isFinishedActivity() { + return finishedActivity; + } + + public void setFinishedActivity(boolean finishedActivity) { + this.finishedActivity = finishedActivity; + } + + /** + * @hibernate.many-to-one not-null="true" + * @hibernate.column name="pixlr_session_uid" + * + */ + public PixlrSession getPixlrSession() { + return this.pixlrSession; + } + + public void setPixlrSession(PixlrSession pixlrSession) { + this.pixlrSession = pixlrSession; + } + + /** + * @hibernate.property column="entry_uid" + */ + public Long getEntryUID() { + return entryUID; + } + + public void setEntryUID(Long entryUID) { + this.entryUID = entryUID; + } + + /** + * @hibernate.property column="image_file_name" length="511" + * + */ + + public String getImageFileName() { + return imageFileName; + } + + public void setImageFileName(String imageFileName) { + this.imageFileName = imageFileName; + } + + /** + * @hibernate.property column="image_height + * + */ + public Long getImageHeight() { + return imageHeight; + } + + public void setImageHeight(Long imageHeight) { + this.imageHeight = imageHeight; + } + + /** + * @hibernate.property column="image_width + * + */ + public Long getImageWidth() { + return imageWidth; + } + + public void setImageWidth(Long imageWidth) { + this.imageWidth = imageWidth; + } + + + /** + * @hibernate.property column="image_hidden + * + */ + public boolean isImageHidden() { + return imageHidden; + } + + public void setImageHidden(boolean imageHidden) { + this.imageHidden = imageHidden; + } + + /** + * toString + * + * @return String + */ + public String toString() { + StringBuffer buffer = new StringBuffer(); + + buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" ["); + buffer.append("userId").append("='").append(getUserId()).append("' "); + buffer.append("]"); + + return buffer.toString(); + } + + public boolean equals(Object other) { + if ((this == other)) + return true; + if ((other == null)) + return false; + if (!(other instanceof PixlrUser)) + return false; + PixlrUser castOther = (PixlrUser) other; + + return ((this.getUid() == castOther.getUid()) || (this.getUid() != null && castOther.getUid() != null && this + .getUid().equals(castOther.getUid()))); + } + + public int hashCode() { + int result = 17; + result = 37 * result + (getUid() == null ? 0 : this.getUid().hashCode()); + return result; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/pixlrApplicationContext.xml =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/pixlrApplicationContext.xml (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/pixlrApplicationContext.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + org.lamsfoundation.lams.tool.pixlr.ApplicationResources + + + + + + + + + org/lamsfoundation/lams/tool/pixlr/model/Pixlr.hbm.xml + org/lamsfoundation/lams/tool/pixlr/model/PixlrSession.hbm.xml + org/lamsfoundation/lams/tool/pixlr/model/PixlrUser.hbm.xml + org/lamsfoundation/lams/tool/pixlr/model/PixlrAttachment.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_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/IPixlrService.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/IPixlrService.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/IPixlrService.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,157 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.service; + +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrException; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * Defines the services available to the web layer from the Pixlr Service + */ +public interface IPixlrService { + /** + * Makes a copy of the default content and assigns it a newContentID + * + * @params newContentID + * @return + */ + public Pixlr copyDefaultContent(Long newContentID); + + /** + * Returns an instance of the Pixlr tools default content. + * + * @return + */ + public Pixlr getDefaultContent(); + + /** + * @param toolSignature + * @return + */ + public Long getDefaultContentIdBySignature(String toolSignature); + + /** + * @param toolContentID + * @return + */ + public Pixlr getPixlrByContentId(Long toolContentID); + + /** + * @param toolContentId + * @param file + * @param type + * @return + */ + public PixlrAttachment uploadFileToContent(Long toolContentId, FormFile file, String type); + + /** + * @param uuid + * @param versionID + */ + public void deleteFromRepository(Long uuid, Long versionID) throws PixlrException; + + /** + * @param contentID + * @param uuid + * @param versionID + * @param type + */ + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type); + + /** + * @param pixlr + */ + public void saveOrUpdatePixlr(Pixlr pixlr); + + /** + * @param toolSessionId + * @return + */ + public PixlrSession getSessionBySessionId(Long toolSessionId); + + /** + * @param pixlrSession + */ + public void saveOrUpdatePixlrSession(PixlrSession pixlrSession); + + /** + * + * @param userId + * @param toolSessionId + * @return + */ + public PixlrUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId); + + /** + * + * @param uid + * @return + */ + public PixlrUser getUserByUID(Long uid); + + /** + * + * @param pixlrUser + */ + public void saveOrUpdatePixlrUser(PixlrUser pixlrUser); + + /** + * + * @param user + * @param pixlrSession + * @return + */ + public PixlrUser createPixlrUser(UserDTO user, PixlrSession pixlrSession); + + /** + * Creates a core notebook entry + * + * @param id + * @param idType + * @param signature + * @param userID + * @param entry + * @return + */ + Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry); + + /** + * Gets the entry from the database + * + */ + NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID); + + /** + * Updates an existing notebook entry + * + */ + void updateEntry(NotebookEntry notebookEntry); +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrOutputFactory.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrOutputFactory.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrOutputFactory.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,72 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.pixlr.service; + +import java.util.List; +import java.util.SortedMap; +import java.util.TreeMap; + +import org.lamsfoundation.lams.tool.OutputFactory; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.exception.ToolException; + +/** + * Output factory for Pixlr tool. Currently it provides only one type of output - the entry that user provided. + * + * @author lfoxton + */ +public class PixlrOutputFactory extends OutputFactory { + + /** + * {@inheritDoc} + */ + @Override + public SortedMap getToolOutputDefinitions(Object toolContentObject) + throws ToolException { + SortedMap definitionMap = new TreeMap(); + + return definitionMap; + } + + /** + * Follows {@link PixlrService#getToolOutput(List, Long, Long)}. + * + */ + public SortedMap getToolOutput(List names, IPixlrService pixlrService, + Long toolSessionId, Long learnerId) { + + TreeMap outputs = new TreeMap(); + return outputs; + + } + + public ToolOutput getToolOutput(String name, IPixlrService chatService, Long toolSessionId, Long learnerId) { + return null; + } + + + + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrService.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrService.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrService.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,668 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.service; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.Date; +import java.util.Hashtable; +import java.util.List; +import java.util.Set; +import java.util.SortedMap; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.contentrepository.AccessDeniedException; +import org.lamsfoundation.lams.contentrepository.ICredentials; +import org.lamsfoundation.lams.contentrepository.ITicket; +import org.lamsfoundation.lams.contentrepository.InvalidParameterException; +import org.lamsfoundation.lams.contentrepository.LoginException; +import org.lamsfoundation.lams.contentrepository.NodeKey; +import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException; +import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.contentrepository.service.IRepositoryService; +import org.lamsfoundation.lams.contentrepository.service.RepositoryProxy; +import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials; +import org.lamsfoundation.lams.learning.service.ILearnerService; +import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; +import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; +import org.lamsfoundation.lams.learningdesign.service.ImportToolContentException; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; +import org.lamsfoundation.lams.tool.ToolContentImport102Manager; +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolOutput; +import org.lamsfoundation.lams.tool.ToolOutputDefinition; +import org.lamsfoundation.lams.tool.ToolSessionExportOutputData; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.SessionDataExistsException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrAttachmentDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrSessionDAO; +import org.lamsfoundation.lams.tool.pixlr.dao.IPixlrUserDAO; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrException; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrToolContentHandler; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.FileUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.util.audit.IAuditService; + +/** + * An implementation of the IPixlrService interface. + * + * As a requirement, all LAMS tool's service bean must implement + * ToolContentManager and ToolSessionManager. + */ + +public class PixlrService implements ToolSessionManager, ToolContentManager, IPixlrService, ToolContentImport102Manager { + + static Logger logger = Logger.getLogger(PixlrService.class.getName()); + + private IPixlrDAO pixlrDAO = null; + + private IPixlrSessionDAO pixlrSessionDAO = null; + + private IPixlrUserDAO pixlrUserDAO = null; + + private IPixlrAttachmentDAO pixlrAttachmentDAO = null; + + private ILearnerService learnerService; + + private ILamsToolService toolService; + + private IToolContentHandler pixlrToolContentHandler = null; + + private IRepositoryService repositoryService = null; + + private IAuditService auditService = null; + + private IExportToolContentService exportContentService; + + private ICoreNotebookService coreNotebookService; + + private PixlrOutputFactory pixlrOutputFactory; + + public PixlrService() { + super(); + // TODO Auto-generated constructor stub + } + + /* ************ Methods from ToolSessionManager ************* */ + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { + if (PixlrService.logger.isDebugEnabled()) { + PixlrService.logger.debug("entering method createToolSession:" + " toolSessionId = " + toolSessionId + + " toolSessionName = " + toolSessionName + " toolContentId = " + toolContentId); + } + + PixlrSession session = new PixlrSession(); + session.setSessionId(toolSessionId); + session.setSessionName(toolSessionName); + // learner starts + // TODO need to also set other fields. + Pixlr pixlr = pixlrDAO.getByContentId(toolContentId); + session.setPixlr(pixlr); + pixlrSessionDAO.saveOrUpdate(session); + } + + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + return learnerService.completeToolSession(toolSessionId, learnerId); + } + + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { + // TODO Auto-generated method stub + return null; + } + + + @SuppressWarnings("unchecked") + public ToolSessionExportOutputData exportToolSession(List ToolSessionIds) throws DataMissingException, + ToolException { + // TODO Auto-generated method stub + return null; + } + + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { + pixlrSessionDAO.deleteBySessionID(toolSessionId); + // TODO check if cascade worked + } + + /** + * Get the tool output for the given tool output names. + * + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.util.List, + * java.lang.Long, java.lang.Long) + */ + public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { + return getPixlrOutputFactory().getToolOutput(names, this, toolSessionId, learnerId); + } + + /** + * Get the tool output for the given tool output name. + * + * @see org.lamsfoundation.lams.tool.ToolSessionManager#getToolOutput(java.lang.String, + * java.lang.Long, java.lang.Long) + */ + public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { + return getPixlrOutputFactory().getToolOutput(name, this, toolSessionId, learnerId); + } + + /* ************ Methods from ToolContentManager ************************* */ + + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + + if (PixlrService.logger.isDebugEnabled()) { + PixlrService.logger.debug("entering method copyToolContent:" + " fromContentId=" + fromContentId + + " toContentId=" + toContentId); + } + + if (toContentId == null) { + String error = "Failed to copy tool content: toContentID is null"; + throw new ToolException(error); + } + + Pixlr fromContent = null; + if (fromContentId != null) { + fromContent = pixlrDAO.getByContentId(fromContentId); + } + if (fromContent == null) { + // create the fromContent using the default tool content + fromContent = getDefaultContent(); + } + Pixlr toContent = Pixlr.newInstance(fromContent, toContentId, pixlrToolContentHandler); + + try { + toContent.setImageFileName(copyImage(toContent)); + } catch (Exception e) { + logger.error("Could not copy image for tool content copy", e); + throw new ToolException(e); + } + + pixlrDAO.saveOrUpdate(toContent); + } + + public String copyImage(Pixlr toContent) throws Exception { + String newFileName = FileUtil.generateUniqueContentFolderID() + ".jpg"; + + String realBaseDir = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) + File.separator + FileUtil.LAMS_WWW_DIR + + File.separator + "images" + File.separator + "pixlr"; + + File existingFile = new File(realBaseDir + File.separator + toContent.getImageFileName()); + File newFile = new File(realBaseDir + File.separator + newFileName); + FileOutputStream out = new FileOutputStream(newFile); + FileInputStream in = new FileInputStream(existingFile); + + byte[] buf = new byte[1024]; + int len; + while ((len = in.read(buf)) > 0) { + out.write(buf, 0, len); + } + return newFileName; + } + + public void setAsDefineLater(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Pixlr pixlr = pixlrDAO.getByContentId(toolContentId); + if (pixlr == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + pixlr.setDefineLater(value); + pixlrDAO.saveOrUpdate(pixlr); + } + + public void setAsRunOffline(Long toolContentId, boolean value) throws DataMissingException, ToolException { + Pixlr pixlr = pixlrDAO.getByContentId(toolContentId); + if (pixlr == null) { + throw new ToolException("Could not find tool with toolContentID: " + toolContentId); + } + pixlr.setRunOffline(value); + pixlrDAO.saveOrUpdate(pixlr); + } + + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, + ToolException { + // TODO Auto-generated method stub + } + + /** + * Export the XML fragment for the tool's content, along with any files + * needed for the content. + * + * @throws DataMissingException + * if no tool content matches the toolSessionId + * @throws ToolException + * if any other error occurs + */ + + public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { + Pixlr pixlr = pixlrDAO.getByContentId(toolContentId); + if (pixlr == null) { + pixlr = getDefaultContent(); + } + if (pixlr == null) { + throw new DataMissingException("Unable to find default content for the pixlr tool"); + } + + // set ResourceToolContentHandler as null to avoid copy file node in + // repository again. + pixlr = Pixlr.newInstance(pixlr, toolContentId, null); + pixlr.setToolContentHandler(null); + pixlr.setPixlrSessions(null); + Set atts = pixlr.getPixlrAttachments(); + for (PixlrAttachment att : atts) { + att.setPixlr(null); + } + try { + exportContentService.registerFileClassForExport(PixlrAttachment.class.getName(), "fileUuid", + "fileVersionId"); + exportContentService.exportToolContent(toolContentId, pixlr, pixlrToolContentHandler, rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } + } + + /** + * Import the XML fragment for the tool's content, along with any files + * needed for the content. + * + * @throws ToolException + * if any other error occurs + */ + public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion, + String toVersion) throws ToolException { + try { + exportContentService.registerFileClassForImport(PixlrAttachment.class.getName(), "fileUuid", + "fileVersionId", "fileName", "fileType", null, null); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath, pixlrToolContentHandler, + fromVersion, toVersion); + if (!(toolPOJO instanceof Pixlr)) { + throw new ImportToolContentException("Import Pixlr tool content failed. Deserialized object is " + + toolPOJO); + } + Pixlr pixlr = (Pixlr) toolPOJO; + + // reset it to new toolContentId + pixlr.setToolContentId(toolContentId); + pixlr.setCreateBy(new Long(newUserUid.longValue())); + + pixlrDAO.saveOrUpdate(pixlr); + } 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 { + Pixlr pixlr = getPixlrDAO().getByContentId(toolContentId); + if (pixlr == null) { + pixlr = getDefaultContent(); + } + return getPixlrOutputFactory().getToolOutputDefinitions(pixlr); + } + + /* ********** IPixlrService Methods ********************************* */ + + public Long createNotebookEntry(Long id, Integer idType, String signature, Integer userID, String entry) { + return coreNotebookService.createNotebookEntry(id, idType, signature, userID, "", entry); + } + + public NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID) { + List list = coreNotebookService.getEntry(sessionId, idType, signature, userID); + if (list == null || list.isEmpty()) { + return null; + } else { + return list.get(0); + } + } + + /** + * @param notebookEntry + */ + public void updateEntry(NotebookEntry notebookEntry) { + coreNotebookService.updateEntry(notebookEntry); + } + + public Long getDefaultContentIdBySignature(String toolSignature) { + Long toolContentId = null; + toolContentId = new Long(toolService.getToolDefaultContentIdBySignature(toolSignature)); + if (toolContentId == null) { + String error = "Could not retrieve default content id for this tool"; + PixlrService.logger.error(error); + throw new PixlrException(error); + } + return toolContentId; + } + + public Pixlr getDefaultContent() { + Long defaultContentID = getDefaultContentIdBySignature(PixlrConstants.TOOL_SIGNATURE); + Pixlr defaultContent = getPixlrByContentId(defaultContentID); + if (defaultContent == null) { + String error = "Could not retrieve default content record for this tool"; + PixlrService.logger.error(error); + throw new PixlrException(error); + } + return defaultContent; + } + + public Pixlr copyDefaultContent(Long newContentID) { + + if (newContentID == null) { + String error = "Cannot copy the Pixlr tools default content: + " + "newContentID is null"; + PixlrService.logger.error(error); + throw new PixlrException(error); + } + + Pixlr defaultContent = getDefaultContent(); + // create new pixlr using the newContentID + Pixlr newContent = new Pixlr(); + newContent = Pixlr.newInstance(defaultContent, newContentID, pixlrToolContentHandler); + pixlrDAO.saveOrUpdate(newContent); + return newContent; + } + + public Pixlr getPixlrByContentId(Long toolContentID) { + Pixlr pixlr = pixlrDAO.getByContentId(toolContentID); + if (pixlr == null) { + PixlrService.logger.debug("Could not find the content with toolContentID:" + toolContentID); + } + return pixlr; + } + + public PixlrSession getSessionBySessionId(Long toolSessionId) { + PixlrSession pixlrSession = pixlrSessionDAO.getBySessionId(toolSessionId); + if (pixlrSession == null) { + PixlrService.logger.debug("Could not find the pixlr session with toolSessionID:" + toolSessionId); + } + return pixlrSession; + } + + public PixlrUser getUserByUserIdAndSessionId(Long userId, Long toolSessionId) { + return pixlrUserDAO.getByUserIdAndSessionId(userId, toolSessionId); + } + + public PixlrUser getUserByLoginNameAndSessionId(String loginName, Long toolSessionId) { + return pixlrUserDAO.getByLoginNameAndSessionId(loginName, toolSessionId); + } + + public PixlrUser getUserByUID(Long uid) { + return pixlrUserDAO.getByUID(uid); + } + + public PixlrAttachment uploadFileToContent(Long toolContentId, FormFile file, String type) { + if (file == null || StringUtils.isEmpty(file.getFileName())) { + throw new PixlrException("Could not find upload file: " + file); + } + + NodeKey nodeKey = processFile(file, type); + + PixlrAttachment attachment = new PixlrAttachment(nodeKey.getVersion(), type, file.getFileName(), nodeKey + .getUuid(), new Date()); + return attachment; + } + + public void deleteFromRepository(Long uuid, Long versionID) throws PixlrException { + ITicket ticket = getRepositoryLoginTicket(); + try { + repositoryService.deleteVersion(ticket, uuid, versionID); + } catch (Exception e) { + throw new PixlrException("Exception occured while deleting files from" + " the repository " + + e.getMessage()); + } + } + + public void deleteInstructionFile(Long contentID, Long uuid, Long versionID, String type) { + pixlrDAO.deleteInstructionFile(contentID, uuid, versionID, type); + + } + + public void saveOrUpdatePixlr(Pixlr pixlr) { + pixlrDAO.saveOrUpdate(pixlr); + } + + public void saveOrUpdatePixlrSession(PixlrSession pixlrSession) { + pixlrSessionDAO.saveOrUpdate(pixlrSession); + } + + public void saveOrUpdatePixlrUser(PixlrUser pixlrUser) { + pixlrUserDAO.saveOrUpdate(pixlrUser); + } + + public PixlrUser createPixlrUser(UserDTO user, PixlrSession pixlrSession) { + PixlrUser pixlrUser = new PixlrUser(user, pixlrSession); + saveOrUpdatePixlrUser(pixlrUser); + return pixlrUser; + } + + public IAuditService getAuditService() { + return auditService; + } + + public void setAuditService(IAuditService auditService) { + this.auditService = auditService; + } + + private NodeKey processFile(FormFile file, String type) { + NodeKey node = null; + if (file != null && !StringUtils.isEmpty(file.getFileName())) { + String fileName = file.getFileName(); + try { + node = getPixlrToolContentHandler().uploadFile(file.getInputStream(), fileName, file.getContentType(), + type); + } catch (InvalidParameterException e) { + throw new PixlrException("InvalidParameterException occured while trying to upload File" + + e.getMessage()); + } catch (FileNotFoundException e) { + throw new PixlrException("FileNotFoundException occured while trying to upload File" + e.getMessage()); + } catch (RepositoryCheckedException e) { + throw new PixlrException("RepositoryCheckedException occured while trying to upload File" + + e.getMessage()); + } catch (IOException e) { + throw new PixlrException("IOException occured while trying to upload File" + e.getMessage()); + } + } + return node; + } + + /** + * This method verifies the credentials of the SubmitFiles Tool and gives it + * the Ticket to login and access the Content Repository. + * + * A valid ticket is needed in order to access the content from the + * repository. This method would be called evertime the tool needs to + * upload/download files from the content repository. + * + * @return ITicket The ticket for repostory access + * @throws SubmitFilesException + */ + private ITicket getRepositoryLoginTicket() throws PixlrException { + repositoryService = RepositoryProxy.getRepositoryService(); + ICredentials credentials = new SimpleCredentials(PixlrToolContentHandler.repositoryUser, + PixlrToolContentHandler.repositoryId); + try { + ITicket ticket = repositoryService.login(credentials, PixlrToolContentHandler.repositoryWorkspaceName); + return ticket; + } catch (AccessDeniedException ae) { + throw new PixlrException("Access Denied to repository." + ae.getMessage()); + } catch (WorkspaceNotFoundException we) { + throw new PixlrException("Workspace not found." + we.getMessage()); + } catch (LoginException e) { + throw new PixlrException("Login failed." + e.getMessage()); + } + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + + /** + * Import the data for a 1.0.2 Pixlr + */ + @SuppressWarnings("unchecked") + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) { + Date now = new Date(); + Pixlr pixlr = new Pixlr(); + pixlr.setContentInUse(Boolean.FALSE); + pixlr.setCreateBy(new Long(user.getUserID().longValue())); + pixlr.setCreateDate(now); + pixlr.setDefineLater(Boolean.FALSE); + pixlr.setInstructions(WebUtil.convertNewlines((String) importValues + .get(ToolContentImport102Manager.CONTENT_BODY))); + pixlr.setLockOnFinished(Boolean.TRUE); + pixlr.setOfflineInstructions(null); + pixlr.setOnlineInstructions(null); + pixlr.setRunOffline(Boolean.FALSE); + pixlr.setTitle((String) importValues.get(ToolContentImport102Manager.CONTENT_TITLE)); + pixlr.setToolContentId(toolContentId); + pixlr.setUpdateDate(now); + pixlr.setReflectOnActivity(Boolean.FALSE); + // leave as empty, no need to set them to anything. + // setPixlrAttachments(Set pixlrAttachments); + // setPixlrSessions(Set pixlrSessions); + pixlrDAO.saveOrUpdate(pixlr); + } + + /** + * 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 { + + PixlrService.logger + .warn("Setting the reflective field on a pixlr. This doesn't make sense as the pixlr is for reflection and we don't reflect on reflection!"); + Pixlr pixlr = getPixlrByContentId(toolContentId); + if (pixlr == null) { + throw new DataMissingException("Unable to set reflective data titled " + title + + " on activity toolContentId " + toolContentId + " as the tool content does not exist."); + } + + pixlr.setInstructions(description); + } + + // ========================================================================================= + /* ********** Used by Spring to "inject" the linked objects ************* */ + + public IPixlrAttachmentDAO getPixlrAttachmentDAO() { + return pixlrAttachmentDAO; + } + + public void setPixlrAttachmentDAO(IPixlrAttachmentDAO attachmentDAO) { + pixlrAttachmentDAO = attachmentDAO; + } + + public IPixlrDAO getPixlrDAO() { + return pixlrDAO; + } + + public void setPixlrDAO(IPixlrDAO pixlrDAO) { + this.pixlrDAO = pixlrDAO; + } + + public IToolContentHandler getPixlrToolContentHandler() { + return pixlrToolContentHandler; + } + + public void setPixlrToolContentHandler(IToolContentHandler pixlrToolContentHandler) { + this.pixlrToolContentHandler = pixlrToolContentHandler; + } + + public IPixlrSessionDAO getPixlrSessionDAO() { + return pixlrSessionDAO; + } + + public void setPixlrSessionDAO(IPixlrSessionDAO sessionDAO) { + pixlrSessionDAO = sessionDAO; + } + + public ILamsToolService getToolService() { + return toolService; + } + + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + + public IPixlrUserDAO getPixlrUserDAO() { + return pixlrUserDAO; + } + + public void setPixlrUserDAO(IPixlrUserDAO userDAO) { + pixlrUserDAO = userDAO; + } + + public ILearnerService getLearnerService() { + return learnerService; + } + + public void setLearnerService(ILearnerService learnerService) { + this.learnerService = learnerService; + } + + public IExportToolContentService getExportContentService() { + return exportContentService; + } + + public void setExportContentService(IExportToolContentService exportContentService) { + this.exportContentService = exportContentService; + } + + public ICoreNotebookService getCoreNotebookService() { + return coreNotebookService; + } + + public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { + this.coreNotebookService = coreNotebookService; + } + + public PixlrOutputFactory getPixlrOutputFactory() { + return pixlrOutputFactory; + } + + public void setPixlrOutputFactory(PixlrOutputFactory pixlrOutputFactory) { + this.pixlrOutputFactory = pixlrOutputFactory; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrServiceProxy.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrServiceProxy.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/service/PixlrServiceProxy.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,79 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + + +/** + *

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

+ */ + +public class PixlrServiceProxy { + + public static final IPixlrService getPixlrService(ServletContext servletContext) + { + return (IPixlrService)getPixlrDomainService(servletContext); + } + + private static Object getPixlrDomainService(ServletContext servletContext) + { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean("pixlrService"); + } + + /* + * Return the pixlr tool version of tool session manager implementation. + * It will delegate to the Spring helper method to retrieve the proper + * bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return noticeboard service object.*/ + public static final ToolSessionManager getPixlrSessionManager(ServletContext servletContext) + { + return (ToolSessionManager)getPixlrDomainService(servletContext); + } + + + /* + * Return the pixlr tool version of tool content manager implementation. + * It will delegate to the Spring helper method to retrieve the proper + * bean from Spring bean factory. + * @param servletContext the servletContext for current application + * @return noticeboard service object. */ + public static final ToolContentManager getPixlrContentManager(ServletContext servletContext) + { + return (ToolContentManager)getPixlrDomainService(servletContext); + } + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrConstants.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrConstants.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrConstants.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,65 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.util; + +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; + +public interface PixlrConstants { + public static final String TOOL_SIGNATURE = "lapixl10"; + + // Pixlr session status + public static final Integer SESSION_NOT_STARTED = new Integer(0); + public static final Integer SESSION_IN_PROGRESS = new Integer(1); + public static final Integer SESSION_COMPLETED = new Integer(2); + + public static final String AUTHORING_DEFAULT_TAB = "1"; + public static final String ATTACHMENT_LIST = "attachmentList"; + public static final String DELETED_ATTACHMENT_LIST = "deletedAttachmentList"; + public static final String AUTH_SESSION_ID_COUNTER = "authoringSessionIdCounter"; + public static final String AUTH_SESSION_ID = "authoringSessionId"; + + public static final int MONITORING_SUMMARY_MAX_MESSAGES = 5; + + // Attribute names + public static final String ATTR_MESSAGE = "message"; + public static final String ATTR_SESSION_MAP = "sessionMap"; + + // Parameter names + public static final String PARAM_PARENT_PAGE = "parentPage"; + + static final String FILTER_REPLACE_TEXT = "***"; + + public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; + + public static final String DEFAULT_IMAGE_FILE_NAME = "blank.jpg"; + + // error message keys + public static final String ERROR_MSG_NOT_ALLOWED_FORMAT = "error.resource.image.not.alowed.format"; + public static final String ERROR_MSG_FILE_BLANK = "error.resource.item.file.blank"; + public static final String ERROR_MSG_FILE_UPLOAD = "error.file.upload.failed"; + + public static final String LAMS_WWW_PIXLR_FOLDER_URL = Configuration.get(ConfigurationKeys.SERVER_URL) + "/www/images/pixlr/"; +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrException.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrException.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrException.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,57 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.util; + +/** + * + * @author Anthony Sukkar + * + */ +public class PixlrException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = -5518806968051758859L; + + public PixlrException(String message) { + super(message); + } + + public PixlrException(String message, Throwable cause) { + super(message, cause); + } + + public PixlrException() { + super(); + + } + + public PixlrException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrToolContentHandler.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrToolContentHandler.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/util/PixlrToolContentHandler.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,76 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + */ +public class PixlrToolContentHandler extends ToolContentHandler { + + // TODO these three fields were changed to public, since accessor methods + // cannot be made static. Check if we can do this a better way. + public static String repositoryWorkspaceName = "pixlrworkspace"; + + public static String repositoryUser = "pixlr"; + + public static char[] repositoryId = { 'l', 'a', 'm', 's', '-', 'e', 'x' }; + + /** + * + */ + public PixlrToolContentHandler() { + 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_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/AuthoringAction.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/AuthoringAction.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/AuthoringAction.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,638 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.actions; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileOutputStream; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +import javax.imageio.ImageIO; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.authoring.web.AuthoringConstants; +import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrAttachment; +import org.lamsfoundation.lams.tool.pixlr.service.IPixlrService; +import org.lamsfoundation.lams.tool.pixlr.service.PixlrServiceProxy; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrException; +import org.lamsfoundation.lams.tool.pixlr.web.forms.AuthoringForm; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.FileUtil; +import org.lamsfoundation.lams.util.FileValidatorUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @author + * @version + * + * @struts.action path="/authoring" name="authoringForm" parameter="dispatch" + * scope="request" validate="false" + * + * @struts.action-forward name="success" path="tiles:/authoring/main" + * @struts.action-forward name="message_page" path="tiles:/generic/message" + */ +public class AuthoringAction extends LamsDispatchAction { + + private static Logger logger = Logger.getLogger(AuthoringAction.class); + + public IPixlrService pixlrService; + + // Authoring SessionMap key names + private static final String KEY_TOOL_CONTENT_ID = "toolContentID"; + private static final String KEY_CONTENT_FOLDER_ID = "contentFolderID"; + private static final String KEY_MODE = "mode"; + private static final String KEY_ONLINE_FILES = "onlineFiles"; + private static final String KEY_OFFLINE_FILES = "offlineFiles"; + private static final String KEY_UNSAVED_ONLINE_FILES = "unsavedOnlineFiles"; + private static final String KEY_UNSAVED_OFFLINE_FILES = "unsavedOfflineFiles"; + private static final String KEY_DELETED_FILES = "deletedFiles"; + + private static final String LAMS_PIXLR_BASE_DIR = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) + File.separator + FileUtil.LAMS_WWW_DIR + + File.separator + "images" + File.separator + "pixlr"; + + /** + * Default method when no dispatch parameter is specified. It is expected + * that the parameter toolContentID will be passed in. This + * will be used to retrieve content for this tool. + * + */ + @Override + protected ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // Extract toolContentID from parameters. + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + AuthoringForm authForm = (AuthoringForm) form; + + ToolAccessMode mode = null; + String modeStr = WebUtil.readStrParam(request, "mode", true); + if (modeStr != null && !modeStr.trim().equals("")) { + mode = WebUtil.readToolAccessModeParam(request, "mode", true); + } + + // set up pixlrService + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(this.getServlet().getServletContext()); + } + + // retrieving Pixlr with given toolContentID + Pixlr pixlr = pixlrService.getPixlrByContentId(toolContentID); + if (pixlr == null) { + pixlr = pixlrService.copyDefaultContent(toolContentID); + pixlr.setCreateDate(new Date()); + pixlrService.saveOrUpdatePixlr(pixlr); + // TODO NOTE: this causes DB orphans when LD not saved. + } + + if (mode != null && mode.isTeacher()) { + // Set the defineLater flag so that learners cannot use content + // while we + // are editing. This flag is released when updateContent is called. + pixlr.setDefineLater(true); + pixlrService.saveOrUpdatePixlr(pixlr); + } + + String imageUrl = PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL; + Boolean imageExists = false; + if ((pixlr.getImageFileName() != null && !pixlr.getImageFileName().equals(""))) { + imageUrl += pixlr.getImageFileName(); + if (!pixlr.getImageFileName().equals(PixlrConstants.DEFAULT_IMAGE_FILE_NAME)) { + imageExists = true; + } + } else { + imageUrl += PixlrConstants.DEFAULT_IMAGE_FILE_NAME; + } + request.setAttribute("imageURL", imageUrl); + request.setAttribute("imageExists", imageExists); + + // Set up the authForm. + updateAuthForm(authForm, pixlr); + authForm.setToolContentID(toolContentID); + if (mode != null) { + authForm.setMode(mode.toString()); + } else { + authForm.setMode(""); + } + authForm.setContentFolderID(contentFolderID); + + // Set up sessionMap + SessionMap map = createSessionMap(pixlr, getAccessMode(request), contentFolderID, toolContentID); + authForm.setSessionMapID(map.getSessionID()); + + // add the sessionMap to HTTPSession. + request.getSession().setAttribute(map.getSessionID(), map); + request.setAttribute(PixlrConstants.ATTR_SESSION_MAP, map); + + return mapping.findForward("success"); + } + + public ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws PixlrException{ + // TODO need error checking. + + // get authForm and session map. + AuthoringForm authForm = (AuthoringForm) form; + SessionMap map = getSessionMap(request, authForm); + ToolAccessMode mode = (ToolAccessMode) map.get(AuthoringAction.KEY_MODE); + + // get pixlr content. + Pixlr pixlr = pixlrService.getPixlrByContentId((Long) map.get(AuthoringAction.KEY_TOOL_CONTENT_ID)); + ActionErrors errors = new ActionErrors();; + + try { + // TODO: Need to check if this is an edit, if so, delete the old image + if (authForm.getExistingImageFileName().equals(PixlrConstants.DEFAULT_IMAGE_FILE_NAME) + || authForm.getExistingImageFileName().trim().equals("")) { + errors = validateImageFile(authForm); + + if (!errors.isEmpty()) { + this.addErrors(request, errors); + updateAuthForm(authForm, pixlr); + if (mode != null) { + authForm.setMode(mode.toString()); + } else { + authForm.setMode(""); + } + return mapping.findForward("success"); + } + uploadFormImage(authForm, pixlr); + } + } catch (Exception e) { + logger.error("Problem uploading image", e); + errors.add(ActionMessages.GLOBAL_MESSAGE, + new ActionMessage(PixlrConstants.ERROR_MSG_FILE_UPLOAD)); + //throw new PixlrException("Problem uploading image", e); + } + + // update pixlr content using form inputs. + updatePixlr(pixlr, authForm, mode); + + + + // remove attachments marked for deletion. + Set attachments = pixlr.getPixlrAttachments(); + if (attachments == null) { + attachments = new HashSet(); + } + + for (PixlrAttachment att : getAttList(AuthoringAction.KEY_DELETED_FILES, map)) { + // remove from db, leave in repository + attachments.remove(att); + } + + // add unsaved attachments + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map)); + attachments.addAll(getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map)); + + // set attachments in case it didn't exist + pixlr.setPixlrAttachments(attachments); + + // set the update date + pixlr.setUpdateDate(new Date()); + + // releasing defineLater flag so that learner can start using the tool. + pixlr.setDefineLater(false); + + pixlrService.saveOrUpdatePixlr(pixlr); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); + + // add the sessionMapID to form + authForm.setSessionMapID(map.getSessionID()); + + request.setAttribute(PixlrConstants.ATTR_SESSION_MAP, map); + + updateAuthForm(authForm, pixlr); + if (mode != null) { + authForm.setMode(mode.toString()); + } else { + authForm.setMode(""); + } + + return mapping.findForward("success"); + } + + public ActionForward uploadOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward uploadOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return uploadFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward deleteOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward deleteOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return deleteFile(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + public ActionForward removeUnsavedOnline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_ONLINE, request); + } + + public ActionForward removeUnsavedOffline(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + return removeUnsaved(mapping, (AuthoringForm) form, IToolContentHandler.TYPE_OFFLINE, request); + } + + /* ========== Private Methods ********** */ + + private ActionForward uploadFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + FormFile file; + List unsavedFiles; + List savedFiles; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + file = authForm.getOfflineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + file = authForm.getOnlineFile(); + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + + savedFiles = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + // validate file max size + ActionMessages errors = new ActionMessages(); + FileValidatorUtil.validateFileSize(file, true, errors); + if (!errors.isEmpty()) { + request.setAttribute(PixlrConstants.ATTR_SESSION_MAP, map); + this.saveErrors(request, errors); + return mapping.findForward("success"); + } + + if (file.getFileName().length() != 0) { + + // upload file to repository + PixlrAttachment newAtt = pixlrService.uploadFileToContent((Long) map + .get(AuthoringAction.KEY_TOOL_CONTENT_ID), file, type); + + // Add attachment to unsavedFiles + // check to see if file with same name exists + PixlrAttachment currAtt; + Iterator iter = savedFiles.iterator(); + while (iter.hasNext()) { + currAtt = (PixlrAttachment) iter.next(); + if (StringUtils.equals(currAtt.getFileName(), newAtt.getFileName()) + && StringUtils.equals(currAtt.getFileType(), newAtt.getFileType())) { + // move from this this list to deleted list. + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(currAtt); + iter.remove(); + break; + } + } + unsavedFiles.add(newAtt); + + request.setAttribute(PixlrConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + } + return mapping.findForward("success"); + } + + private ActionForward deleteFile(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List fileList; + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + fileList = getAttList(AuthoringAction.KEY_OFFLINE_FILES, map); + } else { + fileList = getAttList(AuthoringAction.KEY_ONLINE_FILES, map); + } + + Iterator iter = fileList.iterator(); + + while (iter.hasNext()) { + PixlrAttachment att = (PixlrAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // move to delete file list, deleted at next updateContent + getAttList(AuthoringAction.KEY_DELETED_FILES, map).add(att); + + // remove from this list + iter.remove(); + break; + } + } + + request.setAttribute(PixlrConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + private ActionForward removeUnsaved(ActionMapping mapping, AuthoringForm authForm, String type, + HttpServletRequest request) { + SessionMap map = getSessionMap(request, authForm); + + List unsavedFiles; + + if (StringUtils.equals(IToolContentHandler.TYPE_OFFLINE, type)) { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, map); + } else { + unsavedFiles = getAttList(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, map); + } + + Iterator iter = unsavedFiles.iterator(); + while (iter.hasNext()) { + PixlrAttachment att = (PixlrAttachment) iter.next(); + + if (att.getFileUuid().equals(authForm.getDeleteFileUuid())) { + // delete from repository and list + pixlrService.deleteFromRepository(att.getFileUuid(), att.getFileVersionId()); + iter.remove(); + break; + } + } + + request.setAttribute(PixlrConstants.ATTR_SESSION_MAP, map); + request.setAttribute("unsavedChanges", new Boolean(true)); + + return mapping.findForward("success"); + } + + /** + * Updates Pixlr content using AuthoringForm inputs. + * + * @param authForm + * @param mode + * @return + */ + private void updatePixlr(Pixlr pixlr, AuthoringForm authForm, ToolAccessMode mode){ + pixlr.setTitle(authForm.getTitle()); + pixlr.setInstructions(authForm.getInstructions()); + if (mode.isAuthor()) { // Teacher cannot modify following + pixlr.setOfflineInstructions(authForm.getOnlineInstruction()); + pixlr.setOnlineInstructions(authForm.getOfflineInstruction()); + pixlr.setLockOnFinished(authForm.isLockOnFinished()); + pixlr.setReflectOnActivity(authForm.isReflectOnActivity()); + pixlr.setReflectInstructions(authForm.getReflectInstructions()); + pixlr.setAllowViewOthersImages(authForm.isAllowViewOthersImages()); + } + } + + /** + * Updates AuthoringForm using Pixlr content. + * + * @param pixlr + * @param authForm + * @return + */ + private void updateAuthForm(AuthoringForm authForm, Pixlr pixlr) { + authForm.setTitle(pixlr.getTitle()); + authForm.setInstructions(pixlr.getInstructions()); + authForm.setOnlineInstruction(pixlr.getOnlineInstructions()); + authForm.setOfflineInstruction(pixlr.getOfflineInstructions()); + authForm.setLockOnFinished(pixlr.isLockOnFinished()); + authForm.setReflectOnActivity(pixlr.isReflectOnActivity()); + authForm.setExistingImageFileName(pixlr.getImageFileName()); + authForm.setReflectInstructions(pixlr.getReflectInstructions()); + authForm.setAllowViewOthersImages(pixlr.isAllowViewOthersImages()); + + if (pixlr.getImageFileName() == null || pixlr.getImageFileName().trim().equals("")) { + authForm.setFileName(PixlrConstants.DEFAULT_IMAGE_FILE_NAME); + } else { + authForm.setFileName(pixlr.getImageFileName()); + } + } + + /** + * Updates SessionMap using Pixlr content. + * + * @param pixlr + * @param mode + */ + private SessionMap createSessionMap(Pixlr pixlr, ToolAccessMode mode, String contentFolderID, + Long toolContentID) { + + SessionMap map = new SessionMap(); + + map.put(AuthoringAction.KEY_MODE, mode); + map.put(AuthoringAction.KEY_CONTENT_FOLDER_ID, contentFolderID); + map.put(AuthoringAction.KEY_TOOL_CONTENT_ID, toolContentID); + map.put(AuthoringAction.KEY_ONLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_OFFLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_UNSAVED_ONLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_UNSAVED_OFFLINE_FILES, new LinkedList()); + map.put(AuthoringAction.KEY_DELETED_FILES, new LinkedList()); + + Iterator iter = pixlr.getPixlrAttachments().iterator(); + while (iter.hasNext()) { + PixlrAttachment attachment = (PixlrAttachment) iter.next(); + String type = attachment.getFileType(); + if (type.equals(IToolContentHandler.TYPE_OFFLINE)) { + getAttList(AuthoringAction.KEY_OFFLINE_FILES, map).add(attachment); + } + if (type.equals(IToolContentHandler.TYPE_ONLINE)) { + getAttList(AuthoringAction.KEY_ONLINE_FILES, map).add(attachment); + } + } + + return map; + } + + /** + * Get ToolAccessMode from HttpRequest parameters. Default value is AUTHOR + * mode. + * + * @param request + * @return + */ + private ToolAccessMode getAccessMode(HttpServletRequest request) { + ToolAccessMode mode; + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if (StringUtils.equalsIgnoreCase(modeStr, ToolAccessMode.TEACHER.toString())) { + mode = ToolAccessMode.TEACHER; + } else { + mode = ToolAccessMode.AUTHOR; + } + return mode; + } + + /** + * Retrieves a List of attachments from the map using the key. + * + * @param key + * @param map + * @return + */ + @SuppressWarnings("unchecked") + private List getAttList(String key, SessionMap map) { + List list = (List) map.get(key); + return list; + } + + /** + * Retrieve the SessionMap from the HttpSession. + * + * @param request + * @param authForm + * @return + */ + @SuppressWarnings("unchecked") + private SessionMap getSessionMap(HttpServletRequest request, AuthoringForm authForm) { + return (SessionMap) request.getSession().getAttribute(authForm.getSessionMapID()); + } + + /** + * Validate imageGallery item. + * + * @param itemForm + * @return + */ + private ActionErrors validateImageFile(AuthoringForm itemForm) { + ActionErrors errors = new ActionErrors(); + + // validate file size + FileValidatorUtil.validateFileSize(itemForm.getFile(), true, errors); + // for edit validate: file already exist + if (!itemForm.isHasFile() + && ((itemForm.getFile() == null) || StringUtils.isEmpty(itemForm.getFile().getFileName()))) { + errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(PixlrConstants.ERROR_MSG_FILE_BLANK)); + } + + // check for allowed format : gif, png, jpg + if (itemForm.getFile() != null) { + String contentType = itemForm.getFile().getContentType(); + if (StringUtils.isEmpty(contentType) + || !(contentType.equals("image/gif") || contentType.equals("image/png") + || contentType.equals("image/jpg") || contentType.equals("image/jpeg") || contentType + .equals("image/pjpeg"))) { + errors.add(ActionMessages.GLOBAL_MESSAGE, + new ActionMessage(PixlrConstants.ERROR_MSG_NOT_ALLOWED_FORMAT)); + } + } + + return errors; + } + + /** + * Upload the image to the open www/images/pixlr folder + * + * @param request + * @param imageForm + * @throws ImageGalleryException + */ + private void uploadFormImage(AuthoringForm imageForm, Pixlr pixlr) throws Exception { + + String filename = PixlrConstants.DEFAULT_IMAGE_FILE_NAME; + + if (imageForm.getFile() != null) { + + // check the directory exists, then create it if it doesnt + File pixlrDir = new File(LAMS_PIXLR_BASE_DIR); + if (!pixlrDir.exists()) { + pixlrDir.mkdirs(); + } + + filename = FileUtil.generateUniqueContentFolderID() + ".jpg"; + String fileWriteName = LAMS_PIXLR_BASE_DIR + File.separator + filename; + File uploadFile = new File(fileWriteName); + FileOutputStream out = new FileOutputStream(uploadFile); + FormFile formFile = imageForm.getFile(); + out.write(formFile.getFileData()); + + // Now save the image size + BufferedImage imageFile = ImageIO.read(uploadFile); + int width = imageFile.getWidth(); + int height = imageFile.getHeight(); + + pixlr.setImageFileName(filename); + pixlr.setImageHeight(new Long(height)); + pixlr.setImageWidth(new Long(width)); + } + + } + + public ActionForward deleteImage(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + ; + + // set up pixlrService + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(this.getServlet().getServletContext()); + } + + // retrieving Pixlr with given toolContentID + Pixlr pixlr = pixlrService.getPixlrByContentId(toolContentID); + if (pixlr != null && !pixlr.getImageFileName().equals(PixlrConstants.DEFAULT_IMAGE_FILE_NAME)) { + String realBaseDir = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) + File.separator + + FileUtil.LAMS_WWW_DIR + File.separator + "images" + File.separator + "pixlr"; + String fileName = WebUtil.readStrParam(request, "existingImageFileName"); + + String imageFileName = realBaseDir + File.separator + fileName; + + File imageFile = new File(imageFileName); + + if (imageFile.exists()) { + imageFile.delete(); + } + + pixlr.setImageFileName(PixlrConstants.DEFAULT_IMAGE_FILE_NAME); + pixlrService.saveOrUpdatePixlr(pixlr); + } + + return unspecified(mapping, form, request, response); + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/ClearSessionAction.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/ClearSessionAction.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/ClearSessionAction.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,51 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.pixlr.web.actions; + +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction; +import org.lamsfoundation.lams.tool.ToolAccessMode; + +/** + * This class give a chance to clear HttpSession when user save/close authoring page. + * @author Steve.Ni + * ----------------XDoclet Tags-------------------- + * + * @struts:action path="/clearsession" validate="false" + * + * @version $Revision$ + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(String customiseSessionID,HttpSession session, ToolAccessMode mode) { + if(mode.isAuthor()){ + session.removeAttribute(customiseSessionID); + } + } + + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/LearningAction.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/LearningAction.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/LearningAction.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,455 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.actions; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; +import java.util.Map.Entry; + +import javax.imageio.ImageIO; +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.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.exception.DataMissingException; +import org.lamsfoundation.lams.tool.exception.ToolException; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrDTO; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrUserDTO; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; +import org.lamsfoundation.lams.tool.pixlr.service.IPixlrService; +import org.lamsfoundation.lams.tool.pixlr.service.PixlrServiceProxy; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrException; +import org.lamsfoundation.lams.tool.pixlr.web.forms.LearningForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.Configuration; +import org.lamsfoundation.lams.util.ConfigurationKeys; +import org.lamsfoundation.lams.util.FileUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** + * @author + * @version + * + * @struts.action path="/learning" parameter="dispatch" scope="request" + * name="learningForm" + * @struts.action-forward name="pixlr" path="tiles:/learning/main" + * @struts.action-forward name="runOffline" path="tiles:/learning/runOffline" + * @struts.action-forward name="defineLater" path="tiles:/learning/defineLater" + * @struts.action-forward name="success" path="/pages/learning/success.jsp" + * @struts.action-forward name="notebook" path="/pages/learning/notebook.jsp" + * @struts.action-forward name="viewAll" path="/pages/learning/viewAll.jsp" + */ +public class LearningAction extends LamsDispatchAction { + + private static Logger log = Logger.getLogger(LearningAction.class); + + private static final boolean MODE_OPTIONAL = false; + private static final String PIXLR_UTL = "http://www.pixlr.com/editor/"; + + + private IPixlrService pixlrService; + + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws Exception { + + LearningForm learningForm = (LearningForm) form; + + // 'toolSessionID' and 'mode' paramters are expected to be present. + // TODO need to catch exceptions and handle errors. + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, MODE_OPTIONAL); + + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + + String redoQuestion = request.getParameter("redoQuestion"); + boolean isRedo = false; + if (redoQuestion != null && redoQuestion.equals("true")) { + isRedo = true; + } + + // set up pixlrService + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(this.getServlet().getServletContext()); + } + + // Retrieve the session and content. + PixlrSession pixlrSession = pixlrService.getSessionBySessionId(toolSessionID); + if (pixlrSession == null) { + throw new PixlrException("Cannot retreive session with toolSessionID" + toolSessionID); + } + + Pixlr pixlr = pixlrSession.getPixlr(); + + // check defineLater + if (pixlr.isDefineLater()) { + return mapping.findForward("defineLater"); + } + + // set mode, toolSessionID and PixlrDTO + request.setAttribute("mode", mode.toString()); + request.setAttribute("toolSessionID", toolSessionID); + learningForm.setToolSessionID(toolSessionID); + + PixlrDTO pixlrDTO = new PixlrDTO(pixlr); + request.setAttribute("pixlrDTO", pixlrDTO); + + // Set the content in use flag. + if (!pixlr.isContentInUse()) { + pixlr.setContentInUse(new Boolean(true)); + pixlrService.saveOrUpdatePixlr(pixlr); + } + + // check runOffline + if (pixlr.isRunOffline()) { + return mapping.findForward("runOffline"); + } + + // get the user + PixlrUser pixlrUser; + if (mode.equals(ToolAccessMode.TEACHER)) { + Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + pixlrUser = pixlrService.getUserByUserIdAndSessionId(userID, toolSessionID); + } else { + pixlrUser = getCurrentUser(toolSessionID); + } + + // return to the viewAll images page if the user has already clicked it + if (pixlrUser.isFinishedActivity() && pixlr.isAllowViewOthersImages() && !isRedo) { + return viewAllImages(mapping, learningForm, request, response); + } + + // set up the user dto + PixlrUserDTO pixlrUserDTO = new PixlrUserDTO(pixlrUser); + if (pixlrUser.isFinishedActivity()) { + // get the notebook entry. + NotebookEntry notebookEntry = pixlrService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, pixlrUser.getUserId().intValue()); + if (notebookEntry != null) { + pixlrUserDTO.notebookEntry = notebookEntry.getEntry(); + pixlrUserDTO.setFinishedReflection(true); + } + } + request.setAttribute("pixlrUserDTO", pixlrUserDTO); + + String returnURL = Configuration.get(ConfigurationKeys.SERVER_URL) + "/tool/lapixl10/learning.do?"; + returnURL += "dispatch=updatePixlrImage"; + returnURL += "&toolSessionID=" + pixlrSession.getSessionId(); + + String url = PIXLR_UTL + "?"; + url += "&title=" + URLEncoder.encode(pixlr.getTitle(), "UTF8"); + url += "&referrer=LAMS"; + + String currentImageURL; + + if (pixlrUser.getImageFileName() != null && !pixlrUser.getImageFileName().equals("")) { + currentImageURL = PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL + pixlrUser.getImageFileName(); + returnURL += "&existingImage=" + URLEncoder.encode(pixlrUser.getImageFileName(), "UTF8"); + } else { + returnURL += "&existingImage="; + currentImageURL = PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL + pixlr.getImageFileName(); + } + + request.setAttribute("currentImageURL", currentImageURL); + request.setAttribute("pixlrURL", url); + request.setAttribute("returnURL", returnURL); + + // set readOnly flag. + if (mode.equals(ToolAccessMode.TEACHER) || (pixlr.isLockOnFinished() && pixlrUser.isFinishedActivity())) { + request.setAttribute("contentEditable", false); + } else { + request.setAttribute("contentEditable", true); + } + request.setAttribute("finishedActivity", pixlrUser.isFinishedActivity()); + return mapping.findForward("pixlr"); + } + + public ActionForward updatePixlrImage(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + Boolean success; + + log.debug("Saving image from pixlr"); + + // set up pixlrService + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(this.getServlet().getServletContext()); + } + + String imageURL = WebUtil.readStrParam(request, "image"); + Long toolSessionID = WebUtil.readLongParam(request, "toolSessionID"); + + PixlrUser pixlrUser = getCurrentUser(toolSessionID); + + String imageName = WebUtil.readStrParam(request, "existingImage", true); + + if (imageName == null || imageName.equals("")) { + imageName = FileUtil.generateUniqueContentFolderID() + ".jpg"; + pixlrUser.setImageFileName(imageName); + pixlrService.saveOrUpdatePixlrUser(pixlrUser); + } + + try { + InputStream is = getResponseInputStreamFromExternalServer(imageURL, new HashMap()); + + String realBaseDir = Configuration.get(ConfigurationKeys.LAMS_EAR_DIR) + File.separator + + FileUtil.LAMS_WWW_DIR + File.separator + "images" + File.separator + "pixlr"; + + File imageFile = new File(realBaseDir + File.separator + imageName); + + FileOutputStream out = new FileOutputStream(imageFile); + + byte[] buf = new byte[1024]; + int len; + while ((len = is.read(buf)) > 0) { + out.write(buf, 0, len); + } + + // Now save the image size + BufferedImage imageBufferedFile = ImageIO.read(imageFile); + int width = imageBufferedFile.getWidth(); + int height = imageBufferedFile.getHeight(); + pixlrUser.setImageHeight(new Long(height)); + pixlrUser.setImageWidth(new Long(width)); + pixlrService.saveOrUpdatePixlrUser(pixlrUser); + success = true; + } catch (Exception e) { + log.error("Failed to copy pixlr image from pixlr server with URL: " + imageURL, e); + success = false; + } + + request.setAttribute("success", success); + return mapping.findForward("success"); + } + + private PixlrUser getCurrentUser(Long toolSessionId) { + UserDTO user = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + // attempt to retrieve user using userId and toolSessionId + PixlrUser pixlrUser = pixlrService.getUserByUserIdAndSessionId(new Long(user.getUserID().intValue()), + toolSessionId); + + if (pixlrUser == null) { + PixlrSession pixlrSession = pixlrService.getSessionBySessionId(toolSessionId); + pixlrUser = pixlrService.createPixlrUser(user, pixlrSession); + } + + return pixlrUser; + } + + public ActionForward finishActivity(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long toolSessionID = WebUtil.readLongParam(request, "toolSessionID"); + + PixlrUser pixlrUser = getCurrentUser(toolSessionID); + + if (pixlrUser != null) { + pixlrUser.setFinishedActivity(true); + pixlrService.saveOrUpdatePixlrUser(pixlrUser); + } else { + log.error("finishActivity(): couldn't find PixlrUser with id: " + pixlrUser.getUserId() + + "and toolSessionID: " + toolSessionID); + } + + ToolSessionManager sessionMgrService = PixlrServiceProxy.getPixlrSessionManager(getServlet() + .getServletContext()); + + String nextActivityUrl; + try { + nextActivityUrl = sessionMgrService.leaveToolSession(toolSessionID, pixlrUser.getUserId()); + response.sendRedirect(nextActivityUrl); + } catch (DataMissingException e) { + throw new PixlrException(e); + } catch (ToolException e) { + throw new PixlrException(e); + } catch (IOException e) { + throw new PixlrException(e); + } + + return null; // TODO need to return proper page. + } + + public static InputStream getResponseInputStreamFromExternalServer(String urlStr, HashMap params) + throws ToolException, IOException { + if (!urlStr.endsWith("?")) + urlStr += "?"; + + for (Entry entry : params.entrySet()) { + urlStr += "&" + entry.getKey() + "=" + entry.getValue(); + } + + log.debug("Making request to external servlet: " + urlStr); + + URL url = new URL(urlStr); + URLConnection conn = url.openConnection(); + if (!(conn instanceof HttpURLConnection)) { + log.error("Fail to connect to external server though url: " + urlStr); + throw new ToolException("Fail to connect to external server though url: " + urlStr); + } + + HttpURLConnection httpConn = (HttpURLConnection) conn; + if (httpConn.getResponseCode() != HttpURLConnection.HTTP_OK) { + log.error("Fail to fetch data from external server, response code: " + httpConn.getResponseCode() + + " Url: " + urlStr); + throw new ToolException("Fail to fetch data from external server, response code: " + + httpConn.getResponseCode() + " Url: " + urlStr); + } + + InputStream is = url.openConnection().getInputStream(); + if (is == null) { + log.error("Fail to fetch data from external server, return InputStream null: " + urlStr); + throw new ToolException("Fail to fetch data from external server, return inputStream null: " + urlStr); + } + + return is; + } + + public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + LearningForm lrnForm = (LearningForm) form; + + // set the finished flag + PixlrUser pixlrUser = this.getCurrentUser(lrnForm.getToolSessionID()); + PixlrDTO pixlrDTO = new PixlrDTO(pixlrUser.getPixlrSession().getPixlr()); + + request.setAttribute("pixlrDTO", pixlrDTO); + + NotebookEntry notebookEntry = pixlrService.getEntry(pixlrUser.getPixlrSession().getSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, PixlrConstants.TOOL_SIGNATURE, pixlrUser.getUserId().intValue()); + + if (notebookEntry != null) { + lrnForm.setEntryText(notebookEntry.getEntry()); + } + + return mapping.findForward("notebook"); + } + + public ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // save the reflection entry and call the notebook. + + LearningForm lrnForm = (LearningForm) form; + + PixlrUser pixlrUser = this.getCurrentUser(lrnForm.getToolSessionID()); + Long toolSessionID = pixlrUser.getPixlrSession().getSessionId(); + Integer userID = pixlrUser.getUserId().intValue(); + + // check for existing notebook entry + NotebookEntry entry = pixlrService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, userID); + + if (entry == null) { + // create new entry + pixlrService.createNotebookEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, userID, lrnForm.getEntryText()); + } else { + // update existing entry + entry.setEntry(lrnForm.getEntryText()); + entry.setLastModified(new Date()); + pixlrService.updateEntry(entry); + } + + return finishActivity(mapping, form, request, response); + } + + public ActionForward viewAllImages(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long toolSessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, MODE_OPTIONAL); + + // set up pixlrService + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(this.getServlet().getServletContext()); + } + + // Retrieve the session and content. + PixlrSession pixlrSession = pixlrService.getSessionBySessionId(toolSessionID); + if (pixlrSession == null) { + throw new PixlrException("Cannot retreive session with toolSessionID" + toolSessionID); + } + + Pixlr pixlr = pixlrSession.getPixlr(); + + // get the user + PixlrUser pixlrUser; + if (mode.equals(ToolAccessMode.TEACHER)) { + Long userID = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID, false); + pixlrUser = pixlrService.getUserByUserIdAndSessionId(userID, toolSessionID); + } else { + pixlrUser = getCurrentUser(toolSessionID); + } + + // set completed + pixlrUser.setFinishedActivity(true); + pixlrService.saveOrUpdatePixlrUser(pixlrUser); + + // set up the of images learner set + Set learnerSet = new HashSet(); + for (PixlrUser learner : pixlrSession.getPixlrUsers()) { + if (learner.getImageFileName() != null && !learner.getImageFileName().equals("") + && !learner.getImageFileName().equals(pixlr.getImageFileName())) { + + PixlrUserDTO userDTO = new PixlrUserDTO(learner); + if (userDTO.getImageFileName() == null || userDTO.getImageFileName().equals("")) { + userDTO.setImageFileName(pixlr.getImageFileName()); + userDTO.setImageHeight(pixlr.getImageHeight()); + userDTO.setImageWidth(pixlr.getImageWidth()); + } + learnerSet.add(userDTO); + } + } + request.setAttribute("learnerDTOs", learnerSet); + request.setAttribute("pixlrDTO", new PixlrDTO(pixlr)); + request.setAttribute("mode", mode); + request.setAttribute("pixlrImageFolderURL", PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL); + return mapping.findForward("viewAll"); + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/MonitoringAction.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/MonitoringAction.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/actions/MonitoringAction.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,187 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.actions; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrDTO; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrSessionDTO; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrUserDTO; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; +import org.lamsfoundation.lams.tool.pixlr.service.IPixlrService; +import org.lamsfoundation.lams.tool.pixlr.service.PixlrServiceProxy; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants; +import org.lamsfoundation.lams.tool.pixlr.web.forms.MonitoringForm; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.action.LamsDispatchAction; +import org.lamsfoundation.lams.web.util.AttributeNames; + +/** + * @author + * @version + * + * @struts.action path="/monitoring" parameter="dispatch" scope="request" + * name="monitoringForm" validate="false" + * + * @struts.action-forward name="success" path="tiles:/monitoring/main" + * @struts.action-forward name="pixlr_display" + * path="tiles:/monitoring/pixlr_display" + * + */ +public class MonitoringAction extends LamsDispatchAction { + + public IPixlrService pixlrService; + + public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long toolContentID = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + + Pixlr pixlr = pixlrService.getPixlrByContentId(toolContentID); + + if (pixlr == null) { + // TODO error page. + } + + PixlrDTO pixlrDT0 = new PixlrDTO(pixlr); + + for (PixlrSessionDTO sessionDTO : pixlrDT0.getSessionDTOs()) { + Long toolSessionID = sessionDTO.getSessionID(); + + for (PixlrUserDTO userDTO : sessionDTO.getUserDTOs()) { + // get the notebook entry. + NotebookEntry notebookEntry = pixlrService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, userDTO.getUserId().intValue()); + if (notebookEntry != null) { + userDTO.notebookEntry = notebookEntry.getEntry(); + userDTO.setFinishedReflection(true); + } + + } + } + + Long currentTab = WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true); + pixlrDT0.setCurrentTab(currentTab); + + request.setAttribute("pixlrDTO", pixlrDT0); + request.setAttribute("contentFolderID", contentFolderID); + request.setAttribute("toolContentID", toolContentID); + request.setAttribute("pixlrImageFolderURL", PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL); + return mapping.findForward("success"); + } + + public ActionForward showPixlr(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + + Long uid = new Long(WebUtil.readLongParam(request, "userUID")); + + PixlrUser user = pixlrService.getUserByUID(uid); + + PixlrUserDTO userDTO = new PixlrUserDTO(user); + + request.setAttribute("userDTO", userDTO); + + return mapping.findForward("pixlr_display"); + } + + /** + * set up pixlrService + */ + private void setupService() { + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(this.getServlet().getServletContext()); + } + } + + /** + * Opens a user's reflection + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward openNotebook(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + //MonitoringForm monitorForm = (MonitoringForm) form; + Long toolSessionId = WebUtil.readLongParam(request, "toolSessionID", false); + Long userID = WebUtil.readLongParam(request, "userID", false); + + PixlrUser pixlrUser = pixlrService.getUserByUserIdAndSessionId(userID, toolSessionId); + + NotebookEntry notebookEntry = pixlrService.getEntry(toolSessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, userID.intValue()); + + PixlrUserDTO pixlrUserDTO = new PixlrUserDTO(pixlrUser); + pixlrUserDTO.setNotebookEntry(notebookEntry.getEntry()); + + request.setAttribute("pixlrUserDTO", pixlrUserDTO); + + return mapping.findForward("notebook"); + } + + /** + * Opens a user's reflection + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + public ActionForward toggleHideImage(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + setupService(); + MonitoringForm monitorForm = (MonitoringForm) form; + PixlrUser pixlrUser = pixlrService.getUserByUID(monitorForm.getHideUserImageUid()); + + if (pixlrUser.isImageHidden()) + { + pixlrUser.setImageHidden(false); + } + else + { + pixlrUser.setImageHidden(true); + } + pixlrService.saveOrUpdatePixlrUser(pixlrUser); + return unspecified(mapping, monitorForm, request, response); + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/AuthoringForm.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/AuthoringForm.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/AuthoringForm.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,294 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.forms; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.struts.action.ActionErrors; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessage; +import org.apache.struts.action.ActionMessages; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.web.util.SessionMap; + +/** + * @struts.form name="authoringForm" + */ +@SuppressWarnings("unchecked") +public class AuthoringForm extends ActionForm { + + private static final long serialVersionUID = 3950453134542135495L; + + // Properties + + String title; + + String instructions; + + String offlineInstruction; + + String onlineInstruction; + + boolean lockOnFinished; + + boolean reflectOnActivity; + + boolean allowViewOthersImages; + + String reflectInstructions; + + FormFile onlineFile; + + FormFile offlineFile; + + String currentTab; + + String dispatch; + + String sessionMapID; + + Long deleteFileUuid; + + SessionMap sessionMap; + + String contentFolderID; + + Long toolContentID; + + String existingImageFileName; + + String mode; + + // flag of this item has attachment or not + private boolean hasFile; + private Long fileUuid; + private Long fileVersionId; + private String fileName; + private FormFile file; + + + @Override + public ActionErrors validate(ActionMapping arg0, HttpServletRequest arg1) { + ActionErrors ac = new ActionErrors(); + ac.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("this is an error")); + + return ac; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + + public String getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(String currentTab) { + this.currentTab = currentTab; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public boolean isLockOnFinished() { + return lockOnFinished; + } + + public void setLockOnFinished(boolean lockOnFinished) { + this.lockOnFinished = lockOnFinished; + } + + public FormFile getOfflineFile() { + return offlineFile; + } + + public void setOfflineFile(FormFile offlineFile) { + this.offlineFile = offlineFile; + } + + public String getOfflineInstruction() { + return offlineInstruction; + } + + public void setOfflineInstruction(String offlineInstruction) { + this.offlineInstruction = offlineInstruction; + } + + public FormFile getOnlineFile() { + return onlineFile; + } + + public void setOnlineFile(FormFile onlineFile) { + this.onlineFile = onlineFile; + } + + public String getOnlineInstruction() { + return onlineInstruction; + } + + public void setOnlineInstruction(String onlineInstruction) { + this.onlineInstruction = onlineInstruction; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setSessionMap(SessionMap sessionMap) { + this.sessionMap = sessionMap; + } + + public SessionMap getSessionMap() { + return sessionMap; + } + + public Long getDeleteFileUuid() { + return deleteFileUuid; + } + + public void setDeleteFileUuid(Long deleteFile) { + this.deleteFileUuid = deleteFile; + } + + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } + + public boolean isHasFile() { + return hasFile; + } + + public void setHasFile(boolean hasFile) { + this.hasFile = hasFile; + } + + public Long getFileUuid() { + return fileUuid; + } + + public void setFileUuid(Long fileUuid) { + this.fileUuid = fileUuid; + } + + public Long getFileVersionId() { + return fileVersionId; + } + + public void setFileVersionId(Long fileVersionId) { + this.fileVersionId = fileVersionId; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public FormFile getFile() { + return file; + } + + public void setFile(FormFile file) { + this.file = file; + } + + public String getContentFolderID() { + return contentFolderID; + } + + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + + public Long getToolContentID() { + return toolContentID; + } + + public void setToolContentID(Long toolContentID) { + this.toolContentID = toolContentID; + } + + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public String getExistingImageFileName() { + return existingImageFileName; + } + + public void setExistingImageFileName(String existingImageFileName) { + this.existingImageFileName = existingImageFileName; + } + + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + public boolean isAllowViewOthersImages() { + return allowViewOthersImages; + } + + public void setAllowViewOthersImages(boolean allowViewOthersImages) { + this.allowViewOthersImages = allowViewOthersImages; + } + +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/LearningForm.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/LearningForm.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/LearningForm.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,96 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.forms; + +import org.apache.struts.action.ActionForm; + +/** + * + * @author lfoxton + * + * @struts.form name="learningForm" + */ +public class LearningForm extends ActionForm { + + private static final long serialVersionUID = -4728946254882237144L; + + String title; + String instructions; + + String dispatch; + Long toolSessionID; + String mode; + + String entryText; + + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public String getDispatch() { + return dispatch; + } + + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + + public Long getToolSessionID() { + return toolSessionID; + } + + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getEntryText() { + return entryText; + } + + public void setEntryText(String entryText) { + this.entryText = entryText; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/MonitoringForm.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/MonitoringForm.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/forms/MonitoringForm.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,104 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.forms; + +import org.apache.struts.action.ActionForm; + +/** + * @struts.form name="monitoringForm" + */ +public class MonitoringForm extends ActionForm { + + private static final long serialVersionUID = 9096908688391850595L; + + String dispatch; + boolean teacherVisible; + Long toolSessionID; + String contentFolderID; + Long toolContentID; + + Long hideUserImageUid; + + // editing message page. + Long messageUID; + String messageBody; + boolean messageHidden; + + public String getMessageBody() { + return messageBody; + } + public void setMessageBody(String messageBody) { + this.messageBody = messageBody; + } + public Long getMessageUID() { + return messageUID; + } + public void setMessageUID(Long messageUID) { + this.messageUID = messageUID; + } + public String getDispatch() { + return dispatch; + } + public void setDispatch(String dispatch) { + this.dispatch = dispatch; + } + public Long getToolSessionID() { + return toolSessionID; + } + public void setToolSessionID(Long toolSessionID) { + this.toolSessionID = toolSessionID; + } + public boolean isTeacherVisible() { + return teacherVisible; + } + public void setTeacherVisible(boolean visible) { + this.teacherVisible = visible; + } + public boolean isMessageHidden() { + return messageHidden; + } + public void setMessageHidden(boolean messageHidden) { + this.messageHidden = messageHidden; + } + public String getContentFolderID() { + return contentFolderID; + } + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + public Long getToolContentID() { + return toolContentID; + } + public void setToolContentID(Long toolContentID) { + this.toolContentID = toolContentID; + } + public Long getHideUserImageUid() { + return hideUserImageUid; + } + public void setHideUserImageUid(Long hideUserImageUid) { + this.hideUserImageUid = hideUserImageUid; + } +} Index: lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/servlets/ExportServlet.java =================================================================== diff -u --- lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/servlets/ExportServlet.java (revision 0) +++ lams_tool_pixlr/src/java/org/lamsfoundation/lams/tool/pixlr/web/servlets/ExportServlet.java (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,238 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ + +package org.lamsfoundation.lams.tool.pixlr.web.servlets; + +import java.util.ArrayList; + +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.learning.export.web.action.CustomToolImageBundler; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrDTO; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrSessionDTO; +import org.lamsfoundation.lams.tool.pixlr.dto.PixlrUserDTO; +import org.lamsfoundation.lams.tool.pixlr.model.Pixlr; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrSession; +import org.lamsfoundation.lams.tool.pixlr.model.PixlrUser; +import org.lamsfoundation.lams.tool.pixlr.service.IPixlrService; +import org.lamsfoundation.lams.tool.pixlr.service.PixlrServiceProxy; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants; +import org.lamsfoundation.lams.tool.pixlr.util.PixlrException; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; + +public class ExportServlet extends AbstractExportPortfolioServlet { + + private static final long serialVersionUID = -2829707715037631881L; + + private static Logger logger = Logger.getLogger(ExportServlet.class); + + private final String FILENAME = "pixlr_main.html"; + + private IPixlrService pixlrService; + + protected String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(getServletContext()); + } + + try { + if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.LEARNER); + doLearnerExport(request, response, directoryName, cookies); + } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) { + request.getSession().setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER); + doTeacherExport(request, response, directoryName, cookies); + } + } catch (PixlrException e) { + logger.error("Cannot perform export for pixlr tool."); + } + + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + request.getContextPath(); + writeResponseToFile(basePath + "/pages/export/exportPortfolio.jsp", directoryName, FILENAME, cookies); + + return FILENAME; + } + + protected String doOfflineExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + if (toolContentID == null && toolSessionID == null) { + logger.error("Tool content Id or and session Id are null. Unable to activity title"); + } else { + if (pixlrService == null) { + pixlrService = PixlrServiceProxy.getPixlrService(getServletContext()); + } + + Pixlr content = null; + if (toolContentID != null) { + content = pixlrService.getPixlrByContentId(toolContentID); + } else { + PixlrSession session = pixlrService.getSessionBySessionId(toolSessionID); + if (session != null) + content = session.getPixlr(); + } + if (content != null) { + activityTitle = content.getTitle(); + } + } + return super.doOfflineExport(request, response, directoryName, cookies); + } + + private void doLearnerExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) throws PixlrException { + + logger.debug("doExportLearner: toolContentID:" + toolSessionID); + + // check if toolContentID available + if (toolSessionID == null) { + String error = "Tool Session ID is missing. Unable to continue"; + logger.error(error); + throw new PixlrException(error); + } + + PixlrSession pixlrSession = pixlrService.getSessionBySessionId(toolSessionID); + + Pixlr pixlr = pixlrSession.getPixlr(); + + UserDTO lamsUserDTO = (UserDTO) SessionManager.getSession().getAttribute(AttributeNames.USER); + + PixlrUser pixlrUser = pixlrService + .getUserByUserIdAndSessionId(new Long(lamsUserDTO.getUserID()), toolSessionID); + + //NotebookEntry pixlrEntry = pixlrService.getEntry(pixlrUser.getEntryUID()); + + // construct dto's + PixlrDTO pixlrDTO = new PixlrDTO(pixlr); + + PixlrSessionDTO sessionDTO = new PixlrSessionDTO(); + sessionDTO.setSessionName(pixlrSession.getSessionName()); + sessionDTO.setSessionID(pixlrSession.getSessionId()); + + // If the user hasn't put in their entry yet, pixlrEntry will be null; + PixlrUserDTO userDTO = new PixlrUserDTO(pixlrUser); + + sessionDTO.getUserDTOs().add(userDTO); + pixlrDTO.getSessionDTOs().add(sessionDTO); + + NotebookEntry notebookEntry = pixlrService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, userDTO.getUserId().intValue()); + + if (notebookEntry != null) + { + userDTO.setNotebookEntry(notebookEntry.getEntry()); + userDTO.setFinishedReflection(true); + } + + String imageFileArray[] = new String[2]; + imageFileArray[0] = pixlrDTO.getImageFileName(); + + if (userDTO.getImageFileName() != null) + { + imageFileArray[1] = userDTO.getImageFileName(); + } + + // bundling the images in export + try { + CustomToolImageBundler imageBundler = new CustomToolImageBundler(); + imageBundler.bundle(request, cookies, directoryName, PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL, imageFileArray); + } catch (Exception e) { + logger.error("Could not export gmap images, some images may be missing in export portfolio", e); + } + + request.getSession().setAttribute("userDTO", userDTO); + request.getSession().setAttribute("pixlrDTO", pixlrDTO); + } + + private void doTeacherExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) throws PixlrException { + + logger.debug("doExportTeacher: toolContentID:" + toolContentID); + + // check if toolContentID available + if (toolContentID == null) { + String error = "Tool Content ID is missing. Unable to continue"; + logger.error(error); + throw new PixlrException(error); + } + + Pixlr pixlr = pixlrService.getPixlrByContentId(toolContentID); + + PixlrDTO pixlrDTO = new PixlrDTO(pixlr); + + // Creating a list of image files to copy for export + ArrayList imageFiles = new ArrayList(); + imageFiles.add(pixlr.getImageFileName()); + + for (PixlrSessionDTO sessionDTO : pixlrDTO.getSessionDTOs()) { + Long toolSessionID = sessionDTO.getSessionID(); + + for (PixlrUserDTO userDTO : sessionDTO.getUserDTOs()) { + // get the notebook entry. + NotebookEntry notebookEntry = pixlrService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PixlrConstants.TOOL_SIGNATURE, userDTO.getUserId().intValue()); + if (notebookEntry != null) { + userDTO.notebookEntry = notebookEntry.getEntry(); + userDTO.setFinishedReflection(true); + if (userDTO.getImageFileName() != null && !userDTO.getImageFileName().equals(pixlrDTO.getImageFileName())) + { + imageFiles.add(userDTO.getImageFileName()); + } + } + + } + } + + String[] imageFileArray = new String[imageFiles.size()]; + int i=0; + for (String image : imageFiles) + { + imageFileArray[i] = image; + i++; + } + + // bundling the images in export + try { + CustomToolImageBundler imageBundler = new CustomToolImageBundler(); + imageBundler.bundle(request, cookies, directoryName, PixlrConstants.LAMS_WWW_PIXLR_FOLDER_URL, imageFileArray); + } catch (Exception e) { + logger.error("Could not export gmap images, some images may be missing in export portfolio", e); + } + + request.getSession().setAttribute("pixlrDTO", pixlrDTO); + } + +} Index: lams_tool_pixlr/web/403.jsp =================================================================== diff -u --- lams_tool_pixlr/web/403.jsp (revision 0) +++ lams_tool_pixlr/web/403.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,25 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + Index: lams_tool_pixlr/web/404.jsp =================================================================== diff -u --- lams_tool_pixlr/web/404.jsp (revision 0) +++ lams_tool_pixlr/web/404.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,27 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + Index: lams_tool_pixlr/web/META-INF/MANIFEST.MF =================================================================== diff -u --- lams_tool_pixlr/web/META-INF/MANIFEST.MF (revision 0) +++ lams_tool_pixlr/web/META-INF/MANIFEST.MF (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,5 @@ +Implementation-Title: LAMS - Pixlr Tool +Implementation-Version: 2.1 +Implementation-Vendor: LAMS Foundation (http://lamsfoundation.org) +Class-Path: + Index: lams_tool_pixlr/web/WEB-INF/fckeditor/tlds/FCKeditor.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/fckeditor/tlds/FCKeditor.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/jstl/tlds/c.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/jstl/tlds/c.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/jstl/tlds/c.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/jstl/tlds/fmt.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/jstl/tlds/fmt.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/jstl/tlds/fmt.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/jstl/tlds/fn.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/jstl/tlds/fn.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/jstl/tlds/fn.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/jstl/tlds/permittedTaglibs.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/jstl/tlds/permittedTaglibs.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/jstl/tlds/permittedTaglibs.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,34 @@ + + + + + Restricts JSP pages to the JSTL tag libraries + + permittedTaglibs + 1.1 + permittedTaglibs + http://jakarta.apache.org/taglibs/standard/permittedTaglibs + + + + javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV + + + + Whitespace-separated list of taglib URIs to permit. This example + TLD for the Standard Taglib allows only JSTL 'el' taglibs to be + imported. + + permittedTaglibs + + http://java.sun.com/jsp/jstl/core + http://java.sun.com/jsp/jstl/fmt + http://java.sun.com/jsp/jstl/sql + http://java.sun.com/jsp/jstl/xml + + + + Index: lams_tool_pixlr/web/WEB-INF/jstl/tlds/scriptfree.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/jstl/tlds/scriptfree.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/jstl/tlds/scriptfree.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,51 @@ + + + + + Validates JSP pages to prohibit use of scripting elements. + + 1.1 + scriptfree + http://jakarta.apache.org/taglibs/standard/scriptfree + + + + Validates prohibitions against scripting elements. + + + javax.servlet.jsp.jstl.tlv.ScriptFreeTLV + + + + Controls whether or not declarations are considered valid. + + allowDeclarations + false + + + + Controls whether or not scriptlets are considered valid. + + allowScriptlets + false + + + + Controls whether or not top-level expressions are considered valid. + + allowExpressions + false + + + + Controls whether or not expressions used to supply request-time + attribute values are considered valid. + + allowRTExpressions + false + + + Index: lams_tool_pixlr/web/WEB-INF/jstl/tlds/x.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/jstl/tlds/x.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/jstl/tlds/x.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/lams.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/lams.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/lams.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,517 @@ + + + + + 1.0 + lams + + LAMSTags + + + + + Output the basic URL for the current webapp. e.g. http://server/lams/tool/nb11/ + Base URL for the current web app + + + WebAppURL + org.lamsfoundation.lams.web.tag.WebAppURLTag + empty + + + + + Output a random number for the learner and passon flash movies to communicate directly. + generate unique ID + + + generateID + org.lamsfoundation.lams.web.tag.GenerateIDTag + empty + + + Output a random number for the learner and passon flash movies to communicate directly. + id + false + + true + + + + + + + Get the configuration value for the specified key + Configuration value + + + Configuration + org.lamsfoundation.lams.web.tag.ConfigurationTag + empty + + + Get the configuration value for the specified key + key + false + + true + + + + + + + Output the Server URL as defined in the lams.xml configuration file. + LAMS URL + + + LAMSURL + org.lamsfoundation.lams.web.tag.LAMSURLTag + empty + + + + + Render html tag with direction and language + Render html tag with direction and language + + + html + org.lamsfoundation.lams.web.tag.HtmlTag + JSP + + + Render html tag with direction and language + xhtml + false + + true + + + + + + + Converts text from \n or \r\n to <BR> before rendering + Converts text from \n or \r\n to <BR> before rendering + + + out + org.lamsfoundation.lams.web.tag.MultiLinesOutputTag + empty + + + Converts text from \n or \r\n to <BR> before rendering + value + true + + true + + + + Converts text from \n or \r\n to <BR> before rendering + escapeHtml + false + + true + + + + + + + Help tag + Help tag + + + help + org.lamsfoundation.lams.web.tag.HelpTag + empty + + + Help tag + module + false + + true + + + + Help tag + toolSignature + false + + true + + + + Help tag + page + false + + true + + + + Help tag + style + false + + true + + + + + + + Converts role name into form usable as message resources key + Converts role name into form usable as message resources key + + + role + org.lamsfoundation.lams.web.tag.RoleTag + empty + + + Converts role name into form usable as message resources key + role + true + + true + + + + + + + Output stylesheet based on the user preferences. + User's chosen stylesheet + + + css + org.lamsfoundation.lams.web.tag.CssTag + empty + + + Output stylesheet based on the user preferences. + localLinkPath + false + + true + + + + Output stylesheet based on the user preferences. + style + false + + true + + + + + + + Output details from the shared session UserDTO object + user details + + + user + org.lamsfoundation.lams.web.tag.UserTag + empty + + + Output details from the shared session UserDTO object + property + true + + true + + + + + + + STRUTS-textarea + org.lamsfoundation.lams.web.tag.MultiLinesTextareaTag + empty + + accesskey + false + true + + + alt + false + true + + + altKey + false + true + + + bundle + false + true + + + cols + false + true + + + disabled + false + true + + + errorKey + false + true + + + errorStyle + false + true + + + errorStyleClass + false + true + + + errorStyleId + false + true + + + index + false + true + + + indexed + false + true + + + name + false + true + + + onblur + false + true + + + onchange + false + true + + + onclick + false + true + + + ondblclick + false + true + + + onfocus + false + true + + + onkeydown + false + true + + + onkeypress + false + true + + + onkeyup + false + true + + + onmousedown + false + true + + + onmousemove + false + true + + + onmouseout + false + true + + + onmouseover + false + true + + + onmouseup + false + true + + + property + true + true + + + readonly + false + true + + + rows + false + true + + + style + false + true + + + styleClass + false + true + + + styleId + false + true + + + tabindex + false + true + + + title + false + true + + + titleKey + false + true + + + value + false + true + + + + Tab + /WEB-INF/tags/Tab.tag + + + Tabs + /WEB-INF/tags/Tabs.tag + + + TabBody + /WEB-INF/tags/TabBody.tag + + + TabName + /WEB-INF/tags/TabName.tag + + + FCKEditor + /WEB-INF/tags/FCKEditor.tag + + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + + + headItems + /WEB-INF/tags/headItems.tag + + + Passon + /WEB-INF/tags/Passon.tag + + + ExportPortOutput + /WEB-INF/tags/ExportPortOutput.tag + + + Date + /WEB-INF/tags/Date.tag + + + DefineLater + /WEB-INF/tags/DefineLater.tag + + + ImgButtonWrapper + /WEB-INF/tags/ImgButtonWrapper.tag + + + TextSearch + /WEB-INF/tags/TextSearch.tag + + + textarea + org.lamsfoundation.lams.web.tag.LAMSMultiLinesTextareaTag + JSP + true + + Render text exactly same as original input, which even won't escape the input HTML tag. + + + + + name + true + true + + + + + id + false + true + + + + + onchange + false + true + + + + head + /WEB-INF/tags/Head.tag + + + ProgressOutput + /WEB-INF/tags/ProgressOutput.tag + + + LearnerFlashEnabled + /WEB-INF/tags/LearnerFlashEnabled.tag + + + Index: lams_tool_pixlr/web/WEB-INF/struts/struts-config.xml =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/struts-config.xml (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/struts-config.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/web/WEB-INF/struts/tiles-defs.xml =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/tiles-defs.xml (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/tiles-defs.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-bean.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-bean.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-bean.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/struts/tlds/struts-html.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-html.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-html.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html + +base +org.apache.struts.taglib.html.BaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.struts.taglib.html.ButtonTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +cancel +org.apache.struts.taglib.html.CancelTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +checkbox +org.apache.struts.taglib.html.CheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.html.ErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.html.FileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.html.FormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +frame +org.apache.struts.taglib.html.FrameTag + +bundle +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +frameborder +false +true + + +frameName +false +true + + +href +false +true + + +longdesc +false +true + + +marginheight +false +true + + +marginwidth +false +true + + +name +false +true + + +noresize +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +scrolling +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + + +hidden +org.apache.struts.taglib.html.HiddenTag +empty + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + +write +false +true + + + +html +org.apache.struts.taglib.html.HtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.struts.taglib.html.ImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.html.ImgTag +empty + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +contextRelative +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +javascript +org.apache.struts.taglib.html.JavascriptValidatorTag +empty + +cdata +false +true + + +dynamicJavascript +false +false + + +formName +false +true + + +method +false +true + + +page +false +true + + +scriptLanguage +false +true + + +src +false +true + + +staticJavascript +false +false + + +htmlComment +false +true + + +bundle +false +true + + + +link +org.apache.struts.taglib.html.LinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.html.MessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +false + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.html.MultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +option +org.apache.struts.taglib.html.OptionTag + +bundle +false +true + + +disabled +false +true + + +key +false +true + + +locale +false +true + + +style +false +true + + +styleId +false +true + + +styleClass +false +true + + +value +true +true + + + +options +org.apache.struts.taglib.html.OptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.html.OptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.html.PasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.html.RadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +reset +org.apache.struts.taglib.html.ResetTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +rewrite +org.apache.struts.taglib.html.RewriteTag +empty + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +name +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +select +org.apache.struts.taglib.html.SelectTag +JSP + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.html.SubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.html.TextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.html.TextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +xhtml +org.apache.struts.taglib.html.XhtmlTag +empty + + + Index: lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-logic.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-logic.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-logic.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/struts/tlds/struts-nested.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-nested.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-nested.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,3171 @@ + + + + + + + + + +1.2 +1.1 +nested +http://struts.apache.org/tags-nested + +nest +org.apache.struts.taglib.nested.NestedPropertyTag +JSP + +property +false +true + + + +writeNesting +org.apache.struts.taglib.nested.NestedWriteNestingTag +org.apache.struts.taglib.nested.NestedWriteNestingTei +JSP + +property +false +true + + +id +false +true + + +filter +false +true + + + +root +org.apache.struts.taglib.nested.NestedRootTag +JSP + +name +false +true + + + +define +org.apache.struts.taglib.nested.bean.NestedDefineTag +org.apache.struts.taglib.nested.bean.NestedDefineTei +empty + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + +toScope +false +true + + +type +false +true + + +value +false +true + + + +message +org.apache.struts.taglib.nested.bean.NestedMessageTag +empty + +arg0 +false +true + + +arg1 +false +true + + +arg2 +false +true + + +arg3 +false +true + + +arg4 +false +true + + +bundle +false +true + + +key +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +size +org.apache.struts.taglib.nested.bean.NestedSizeTag +org.apache.struts.taglib.bean.SizeTei +empty + +collection +false +true + + +id +true +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +write +org.apache.struts.taglib.nested.bean.NestedWriteTag +empty + +bundle +false +true + + +filter +false +true + + +format +false +true + + +formatKey +false +true + + +ignore +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +scope +false +true + + + +checkbox +org.apache.struts.taglib.nested.html.NestedCheckboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +errors +org.apache.struts.taglib.nested.html.NestedErrorsTag +empty + +bundle +false +true + + +footer +false +true + + +header +false +true + + +locale +false +true + + +name +false +true + + +prefix +false +true + + +property +false +true + + +suffix +false +true + + + +file +org.apache.struts.taglib.nested.html.NestedFileTag + +accesskey +false +true + + +accept +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +form +org.apache.struts.taglib.nested.html.NestedFormTag +JSP + +action +true +true + + +acceptCharset +false +true + + +disabled +false +true + + +enctype +false +true + + +focus +false +true + + +focusIndex +false +true + + +method +false +true + + +onreset +false +true + + +onsubmit +false +true + + +readonly +false +true + + +scriptLanguage +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +target +false +true + + + +hidden +org.apache.struts.taglib.nested.html.NestedHiddenTag + +alt +false +true + + +altKey +false +true + + +indexed +false +true + + +name +false +true + + +property +true +true + + +title +false +true + + +titleKey +false +true + + +styleClass +false +true + + +styleId +false +true + + +value +false +true + + +write +false +true + + + +image +org.apache.struts.taglib.nested.html.NestedImageTag + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +locale +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +pageKey +false +true + + +property +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +img +org.apache.struts.taglib.nested.html.NestedImgTag +empty + +accesskey +false +true + + +align +false +true + + +alt +false +true + + +altKey +false +true + + +border +false +true + + +bundle +false +true + + +height +false +true + + +hspace +false +true + + +imageName +false +true + + +ismap +false +true + + +locale +false +true + + +lowsrc +false +true + + +name +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +paramId +false +true + + +page +false +true + + +pageKey +false +true + + +action +false +true + + +module +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +src +false +true + + +srcKey +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +title +false +true + + +titleKey +false +true + + +useLocalEncoding +false +true + + +usemap +false +true + + +vspace +false +true + + +width +false +true + + + +link +org.apache.struts.taglib.nested.html.NestedLinkTag + +accesskey +false +true + + +action +false +true + + +module +false +true + + +anchor +false +true + + +forward +false +true + + +href +false +true + + +indexed +false +true + + +indexId +false +true + + +bundle +false +true + + +linkName +false +true + + +name +false +true + + +onblur +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +page +false +true + + +paramId +false +true + + +paramName +false +true + + +paramProperty +false +true + + +paramScope +false +true + + +property +false +true + + +scope +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +target +false +true + + +title +false +true + + +titleKey +false +true + + +transaction +false +true + + +useLocalEncoding +false +true + + + +messages +org.apache.struts.taglib.nested.html.NestedMessagesTag +org.apache.struts.taglib.html.MessagesTei +JSP + +id +true +true + + +bundle +false +true + + +locale +false +true + + +name +false +true + + +property +false +true + + +header +false +true + + +footer +false +true + + +message +false +true + + + +multibox +org.apache.struts.taglib.nested.html.NestedMultiboxTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +options +org.apache.struts.taglib.nested.html.NestedOptionsTag +empty + +collection +false +true + + +filter +false +true + + +labelName +false +true + + +labelProperty +false +true + + +name +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + + +optionsCollection +org.apache.struts.taglib.nested.html.NestedOptionsCollectionTag +empty + +filter +false +true + + +label +false +true + + +name +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +value +false +true + + + +password +org.apache.struts.taglib.nested.html.NestedPasswordTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +redisplay +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +size +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +radio +org.apache.struts.taglib.nested.html.NestedRadioTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +property +true +true + + +onmousedown +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +true +true + + +idName +false +true + + + +select +org.apache.struts.taglib.nested.html.NestedSelectTag +JSP + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +multiple +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +size +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +submit +org.apache.struts.taglib.nested.html.NestedSubmitTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +indexed +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +text +org.apache.struts.taglib.nested.html.NestedTextTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +maxlength +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +size +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +textarea +org.apache.struts.taglib.nested.html.NestedTextareaTag + +accesskey +false +true + + +alt +false +true + + +altKey +false +true + + +bundle +false +true + + +cols +false +true + + +disabled +false +true + + +errorKey +false +true + + +errorStyle +false +true + + +errorStyleClass +false +true + + +errorStyleId +false +true + + +indexed +false +true + + +name +false +true + + +onblur +false +true + + +onchange +false +true + + +onclick +false +true + + +ondblclick +false +true + + +onfocus +false +true + + +onkeydown +false +true + + +onkeypress +false +true + + +onkeyup +false +true + + +onmousedown +false +true + + +onmousemove +false +true + + +onmouseout +false +true + + +onmouseover +false +true + + +onmouseup +false +true + + +property +true +true + + +readonly +false +true + + +rows +false +true + + +style +false +true + + +styleClass +false +true + + +styleId +false +true + + +tabindex +false +true + + +title +false +true + + +titleKey +false +true + + +value +false +true + + + +empty +org.apache.struts.taglib.nested.logic.NestedEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +equal +org.apache.struts.taglib.nested.logic.NestedEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterEqual +org.apache.struts.taglib.nested.logic.NestedGreaterEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +greaterThan +org.apache.struts.taglib.nested.logic.NestedGreaterThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +iterate +org.apache.struts.taglib.nested.logic.NestedIterateTag +org.apache.struts.taglib.nested.logic.NestedIterateTei +JSP + +collection +false +true + + +id +false +true + + +indexId +false +true + + +length +false +true + + +name +false +true + + +offset +false +true + + +property +false +true + + +scope +false +true + + +type +false +true + + + +lessEqual +org.apache.struts.taglib.nested.logic.NestedLessEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +lessThan +org.apache.struts.taglib.nested.logic.NestedLessThanTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +match +org.apache.struts.taglib.nested.logic.NestedMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +messagesNotPresent +org.apache.struts.taglib.nested.logic.NestedMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.struts.taglib.nested.logic.NestedMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notEmpty +org.apache.struts.taglib.nested.logic.NestedNotEmptyTag +JSP + +name +false +true + + +property +false +true + + +scope +false +true + + + +notEqual +org.apache.struts.taglib.nested.logic.NestedNotEqualTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notMatch +org.apache.struts.taglib.nested.logic.NestedNotMatchTag +JSP + +cookie +false +true + + +header +false +true + + +location +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +scope +false +true + + +value +true +true + + + +notPresent +org.apache.struts.taglib.nested.logic.NestedNotPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + +present +org.apache.struts.taglib.nested.logic.NestedPresentTag +JSP + +cookie +false +true + + +header +false +true + + +name +false +true + + +parameter +false +true + + +property +false +true + + +role +false +true + + +scope +false +true + + +user +false +true + + + + + + Index: lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-tiles.tld =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-tiles.tld (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/tlds/struts-tiles.tld (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/struts/validator-rules.xml =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/struts/validator-rules.xml (revision 0) +++ lams_tool_pixlr/web/WEB-INF/struts/validator-rules.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,313 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_pixlr/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/AuthoringButton.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/Date.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/Date.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/Date.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/DefineLater.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/DefineLater.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/DefineLater.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/ExportPortOutput.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/ExportPortOutput.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/ExportPortOutput.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/FCKEditor.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/FCKEditor.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/FCKEditor.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/Head.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/Head.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/Head.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/ImgButtonWrapper.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/LearnerFlashEnabled.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/LearnerFlashEnabled.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/Passon.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/Passon.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/Passon.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/ProgressOutput.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/ProgressOutput.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/ProgressOutput.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/Tab.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/Tab.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/Tab.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/TabBody.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/TabBody.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/TabName.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/TabName.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/TabName.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/Tabs.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/Tabs.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/Tabs.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/tags/TextSearch.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/TextSearch.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/TextSearch.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,136 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * TextSearch.tag + * Author: Marcin Cieslak + * Description: Displays form for creating text search conditions. + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + +<%-- Required attributes --%> +<%@ attribute name="sessionMapID" required="true" rtexprvalue="true" %> +<%@ attribute name="wrapInFormTag" required="true" rtexprvalue="true" %> + +<%-- Optional attributes --%> +<%@ attribute name="action" required="false" rtexprvalue="true" %> +<%@ attribute name="formID" required="false" rtexprvalue="true" %> +<%@ attribute name="headingLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="allWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="phraseLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="anyWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="excludedWordsLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelAction" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +

    + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + + + + + + + + Index: lams_tool_pixlr/web/WEB-INF/tags/headItems.tag =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/tags/headItems.tag (revision 0) +++ lams_tool_pixlr/web/WEB-INF/tags/headItems.tag (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/WEB-INF/web.xml =================================================================== diff -u --- lams_tool_pixlr/web/WEB-INF/web.xml (revision 0) +++ lams_tool_pixlr/web/WEB-INF/web.xml (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,339 @@ + + + + + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.pixlr.ApplicationResources + + + + contextConfigLocation + + classpath:/org/lamsfoundation/lams/applicationContext.xml + classpath:/org/lamsfoundation/lams/lesson/lessonApplicationContext.xml + classpath:/org/lamsfoundation/lams/toolApplicationContext.xml + classpath:/org/lamsfoundation/lams/learning/learningApplicationContext.xml + classpath:/org/lamsfoundation/lams/contentrepository/applicationContext.xml + classpath:/org/lamsfoundation/lams/tool/pixlr/pixlrApplicationContext.xml + classpath:/org/lamsfoundation/lams/tool/pixlr/dbupdates/autopatchContext.xml + + + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + hibernateFilter + + org.lamsfoundation.lams.util.CustomizedOpenSessionInViewFilter + + + sessionFactoryBeanName + pixlrSessionFactory + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + + + SystemSessionFilter + /* + + + hibernateFilter + /* + + + LocaleFilter + /* + + + + + org.springframework.web.context.ContextLoaderListener + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts/struts-config.xml + + + debug + 999 + + + detail + 2 + + + validate + true + + 1 + + + + + + Connector + com.fredck.FCKeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Attachment Download + Attachment Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + pixlrToolContentHandler + + 3 + + + + exportPortfolio + org.lamsfoundation.lams.tool.pixlr.web.servlets.ExportServlet + + + + action + *.do + + + + + Connector + /fckeditor/editor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + + + + 120 + + + + + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + + + + + + + + tags-bean + /WEB-INF/struts/tlds/struts-bean.tld + + + tags-html + /WEB-INF/struts/tlds/struts-html.tld + + + tags-logic + /WEB-INF/struts/tlds/struts-logic.tld + + + tags-tiles + /WEB-INF/struts/tlds/struts-tiles.tld + + + + + + tags-fmt + /WEB-INF/jstl/tlds/fmt.tld + + + tags-core + /WEB-INF/jstl/tlds/c.tld + + + tags-function + /WEB-INF/jstl/tlds/fn.tld + + + tags-xml + /WEB-INF/jstl/tlds/x.tld + + + + + + tags-permittedTaglibs + /WEB-INF/jstl/tlds/permittedTaglibs.tld + + + tags-scriptfree + /WEB-INF/jstl/tlds/scriptfree.tld + + + + + + fck-editor + /WEB-INF/fckeditor/tlds/FCKeditor.tld + + + tags-lams + /WEB-INF/lams.tld + + + + + + + + Secure Content + *.jsp + *.html + *.do + + + LEARNER + TEACHER + MONITOR + AUTHOR + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + Authoring Update + /authoring.do + + + AUTHOR + AUTHOR ADMIN + SYSADMIN + + + + + Staff Content + /monitoring.do + + + MONITOR + TEACHER + + + + + + + Download Files + /download/ + + + AUTHOR + MONITOR + TEACHER + ADMIN + SYSADMIN + AUTHOR ADMIN + + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + + + Student + LEARNER + + + Student + TEACHER + + + + Can create/modify a learning design + AUTHOR + + + + Can running and monitoring a learning session + MONITOR + + + + Can add/remove users to the system, set up classes of users for sessions + ADMIN + + + + Can add/remove users to the system, set up classes of users for sessions + SYSADMIN + + + Can create/modify a learning design and edit default tool content + AUTHOR ADMIN + + + Index: lams_tool_pixlr/web/common/empty.jsp =================================================================== diff -u --- lams_tool_pixlr/web/common/empty.jsp (revision 0) +++ lams_tool_pixlr/web/common/empty.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_pixlr/web/common/footer.jsp =================================================================== diff -u --- lams_tool_pixlr/web/common/footer.jsp (revision 0) +++ lams_tool_pixlr/web/common/footer.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1 @@ +

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

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

    + ${requestScope.message}; +

    Index: lams_tool_pixlr/web/common/messages.jsp =================================================================== diff -u --- lams_tool_pixlr/web/common/messages.jsp (revision 0) +++ lams_tool_pixlr/web/common/messages.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,20 @@ +<%-- Error Messages --%> + +
    + +    +   
    +
    +
    +
    + +<%-- Success Messages --%> + +
    + +    +   
    +
    +
    +
    Index: lams_tool_pixlr/web/common/taglibs.jsp =================================================================== diff -u --- lams_tool_pixlr/web/common/taglibs.jsp (revision 0) +++ lams_tool_pixlr/web/common/taglibs.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -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_pixlr/web/error.jsp =================================================================== diff -u --- lams_tool_pixlr/web/error.jsp (revision 0) +++ lams_tool_pixlr/web/error.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,91 @@ +<%-- +Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) +License Information: http://lamsfoundation.org/licensing/lams/2.0/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + http://www.gnu.org/licenses/gpl.txt +--%> + + + +<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + + + +<%-- Catch JSP Servlet Exception --%> +<% +if (exception != null) { +%> + + <%=exception.getMessage()%> + + + <%=exception.getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + exception.printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { +%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() + .getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} +%> + +
    + + + +
    + + + +
    Index: lams_tool_pixlr/web/images/cross.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/down.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/down_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/edit.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/icon_pixlr.swf =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/success.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/up.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/images/up_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_pixlr/web/includes/javascript/authoring.js =================================================================== diff -u --- lams_tool_pixlr/web/includes/javascript/authoring.js (revision 0) +++ lams_tool_pixlr/web/includes/javascript/authoring.js (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,46 @@ + +function init() { + // open the current tab + var tag = document.getElementById("currentTab"); + if (tag.value != "") { + selectTab(tag.value); + } else { + selectTab(1); + } + + image = document.getElementById("image"); + if (image != null) + { + origImageHeight = image.height; + origImageWidth = image.width; + + if (image.height >= image.width) + { + if (image.height > 300) + { + image.height = 300; + } + } + else + { + if (image.width > 300) + { + image.width = 300; + } + } + } +} +function doSelectTab(tabId) { + var tag = document.getElementById("currentTab"); + tag.value = tabId; + selectTab(tabId); +} +function doSubmit(method) { + document.authoringForm.dispatch.value = method; + document.authoringForm.submit(); +} +function deleteAttachment(dispatch, uuid) { + document.authoringForm.dispatch.value = dispatch; + document.authoringForm.deleteFileUuid.value = uuid; + document.authoringForm.submit(); +} Index: lams_tool_pixlr/web/includes/javascript/common.js =================================================================== diff -u --- lams_tool_pixlr/web/includes/javascript/common.js (revision 0) +++ lams_tool_pixlr/web/includes/javascript/common.js (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,10 @@ + +var popupWindow = null; +function openPopup(url, height, width) +{ + if(popupWindow && popupWindow.open && !popupWindow.closed){ + popupWindow.close(); + } + popupWindow = window.open(url,'popupWindow','resizable,width=' +width+ ',height=' +height+ ',scrollbars'); + popupWindow.window.focus(); +} \ No newline at end of file Index: lams_tool_pixlr/web/includes/javascript/monitoring.js =================================================================== diff -u --- lams_tool_pixlr/web/includes/javascript/monitoring.js (revision 0) +++ lams_tool_pixlr/web/includes/javascript/monitoring.js (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,16 @@ + +function init() { + if (initialTabId) { + selectTab(initialTabId); + } else { + selectTab(1); + } +} +function doSelectTab(tabId) { + selectTab(tabId); +} +function doSubmit(method, tabId) { + document.monitoringForm.method.value = method; + document.monitoringForm.submit(); +} + Index: lams_tool_pixlr/web/layouts/defaultLayout.jsp =================================================================== diff -u --- lams_tool_pixlr/web/layouts/defaultLayout.jsp (revision 0) +++ lams_tool_pixlr/web/layouts/defaultLayout.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,22 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + +
    + + +

    + +

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

    + +

    + +
    + +
    Index: lams_tool_pixlr/web/pages/authoring/advanced.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/authoring/advanced.jsp (revision 0) +++ lams_tool_pixlr/web/pages/authoring/advanced.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,51 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +

    + + +

    + +

    + + +

    + +

    + + + +

    +

    + +

    + + + Index: lams_tool_pixlr/web/pages/authoring/authoring.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/authoring/authoring.jsp (revision 0) +++ lams_tool_pixlr/web/pages/authoring/authoring.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,77 @@ +<%@ include file="/common/taglibs.jsp"%> + +<%@ page + import="org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants"%> + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + +

    + +
    +
    +

    +
    +
    + + + + <%-- Page tabs --%> + + + + + + + +
    +
    + + + Index: lams_tool_pixlr/web/pages/authoring/basic.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/authoring/basic.jsp (revision 0) +++ lams_tool_pixlr/web/pages/authoring/basic.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,70 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + +
    +
    + +
    + +
    + + + +
    + +

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

    + +

    + +
    + +

    + +
    +         + +
    + + + + +

    + + +
    + +
    + +
    + + +
    +

    ${session.sessionName}

    + + + + + + + + + + + + + + + + + + + + +
    + ${user.firstName} ${user.lastName} + + + + + + + + + ${user.notebookEntry} + + + + +
    +
    +
    + +
    + +
    +

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

    + + + + + +

    + +

    +
    +
    +
    +
    + + + + + + + + Index: lams_tool_pixlr/web/pages/learning/defineLater.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/defineLater.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/defineLater.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,11 @@ +<%@ include file="/common/taglibs.jsp"%> + +
    +

    + +

    + +
    + + + Index: lams_tool_pixlr/web/pages/learning/headItems.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/headItems.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/headItems.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_pixlr/web/pages/learning/image.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/image.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/image.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,28 @@ + +<%@ include file="/common/taglibs.jsp"%> + +<% +String imageURL = request.getParameter("imageURL"); +%> + + + + + + + + + + + + + Index: lams_tool_pixlr/web/pages/learning/notebook.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/notebook.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/notebook.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,65 @@ + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + <fmt:message>pageTitle.monitoring.notebook</fmt:message> + + + + + + + + + + + + + + + + +
    + +

    + ${pixlrDTO.title} +

    + + + + + +

    + +

    + + + +
    + + + button.finish + +
    +
    + +
    + + +
    Index: lams_tool_pixlr/web/pages/learning/parts/finishButton.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/parts/finishButton.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/parts/finishButton.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,76 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + +
    +

    + ${pixlrDTO.reflectInstructions} +

    + +

    + + + + + + + + + +

    + + + + +
    +
    +
    + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + Index: lams_tool_pixlr/web/pages/learning/pixlr.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/pixlr.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/pixlr.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,117 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + +
    +

    + ${pixlrDTO.title} +

    + +

    + ${pixlrDTO.instructions} +

    + + +
    + + + + + + + + + + + + + + + +
    +
    +
    + +   + + + +
    +
    + + +
    +
    + + + + + +
    + + + <%@ include file="parts/finishButton.jsp"%> + + + +
    + + Index: lams_tool_pixlr/web/pages/learning/runOffline.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/runOffline.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/runOffline.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,31 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +
    +

    + ${pixlrDTO.title} +

    + +

    + +

    + + + + + + +
    + + button.finish + +
    +
    +
    +
    + Index: lams_tool_pixlr/web/pages/learning/success.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/success.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/success.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,43 @@ + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + +
    + + + +

    + +

    + + +

    + +

    + +
    +
    + + + +
    +
    + + +
    + + Index: lams_tool_pixlr/web/pages/learning/viewAll.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/learning/viewAll.jsp (revision 0) +++ lams_tool_pixlr/web/pages/learning/viewAll.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,123 @@ + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + <fmt:message>learner.title.viewAll</fmt:message> + + + + + + + + + + + +
    + +

    + ${pixlrDTO.title} +

    + + + + + + + + +
    +
    +
    + + + + + + + +
    + + ${learner.firstName} ${learner.lastName} + + + + + + + + + + +
    + +
    +
    +
    +
    +
    + +

    + +

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

    + +

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

    + + + + + + + + +

    + + Index: lams_tool_pixlr/web/pages/monitoring/headItems.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/headItems.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/headItems.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,8 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + \ No newline at end of file Index: lams_tool_pixlr/web/pages/monitoring/image.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/image.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/image.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,28 @@ + +<%@ include file="/common/taglibs.jsp"%> + +<% +String imageURL = request.getParameter("imageURL"); +%> + + + + + + + + + + + + + Index: lams_tool_pixlr/web/pages/monitoring/instructions.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/instructions.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/instructions.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,95 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    + + + + + +   + + + + + +
    Index: lams_tool_pixlr/web/pages/monitoring/monitoring.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/monitoring.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/monitoring.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,25 @@ +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.pixlr.util.PixlrConstants"%> + + + +
    + + + + + + +
    + + Index: lams_tool_pixlr/web/pages/monitoring/notebook.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/notebook.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/notebook.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,58 @@ + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + <fmt:message>pageTitle.monitoring.notebook</fmt:message> + + + + + + + + + + + + + +
    + +

    + pageTitle.monitoring.notebook +

    + + + + + + + + +
    +

    + ${pixlrUserDTO.firstName} ${pixlrUserDTO.lastName} +

    +
    +

    + +

    +
    + +
    + + +
    + + + Index: lams_tool_pixlr/web/pages/monitoring/pixlrDisplay.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/pixlrDisplay.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/pixlrDisplay.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,37 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + + + + + +
    +

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

    +
    + + + + +
    + + + +
    + + + +
    Index: lams_tool_pixlr/web/pages/monitoring/statistics.jsp =================================================================== diff -u --- lams_tool_pixlr/web/pages/monitoring/statistics.jsp (revision 0) +++ lams_tool_pixlr/web/pages/monitoring/statistics.jsp (revision b703d43cf69269e0afcc716321fd5ef42c249a43) @@ -0,0 +1,34 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + +
    +

    + ${session.sessionName} +

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

    + + + + + +

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

    + ${session.sessionName} +

    + + + + + + +
    + + + ${session.numberOfLearners} +
    + + + + + + + + + + + + + + + + + + + + +
    + + ${user.firstName} ${user.lastName} + + + + + + +
    + + + + + + + + + + +
    +
    + + + +
    +
    + + + ${user.notebookEntry} + + + + + +
    + +
    + +