Index: lams_tool_preview/.classpath =================================================================== diff -u --- lams_tool_preview/.classpath (revision 0) +++ lams_tool_preview/.classpath (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_preview/.cvsignore =================================================================== diff -u --- lams_tool_preview/.cvsignore (revision 0) +++ lams_tool_preview/.cvsignore (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,2 @@ +build +bin Index: lams_tool_preview/conf/hibernate/mappings/hibernate.cfg.xml =================================================================== diff -u --- lams_tool_preview/conf/hibernate/mappings/hibernate.cfg.xml (revision 0) +++ lams_tool_preview/conf/hibernate/mappings/hibernate.cfg.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,12 @@ + + + + + @db.username@ + @db.password@ + @db.url.run@ + @db.driver@ + org.hibernate.dialect.MySQLDialect + + Index: lams_tool_preview/conf/hibernate/mappings/org/lamsfoundation/lams/tool/peerreview/model/Peerreview.hbm.xml =================================================================== diff -u --- lams_tool_preview/conf/hibernate/mappings/org/lamsfoundation/lams/tool/peerreview/model/Peerreview.hbm.xml (revision 0) +++ lams_tool_preview/conf/hibernate/mappings/org/lamsfoundation/lams/tool/peerreview/model/Peerreview.hbm.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_preview/conf/language/lams/ApplicationResources.properties =================================================================== diff -u --- lams_tool_preview/conf/language/lams/ApplicationResources.properties (revision 0) +++ lams_tool_preview/conf/language/lams/ApplicationResources.properties (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,179 @@ +appName = shareresources +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Tue Jun 02 10:51:09 CST 2015 + +#=================== labels for ShareResources =================# + +activity.title =Peerreview +activity.description =Sharing resources with others. +activity.helptext =Uploading your resources to share with others. +tool.display.name =Share Resources Tool +tool.description =Tool for sharing resources. +appName =Share Resources +errorPage.title =Error page +errorPage.heading =Some error occurs when handling your request +label.authoring.heading =Share Resources Authoring +label.author.title =Share Resources +label.authoring.heading.basic =Basic +label.authoring.heading.advance =Advanced +label.authoring.heading.basic.desc =Basic input information for shared resources +label.authoring.heading.advance.desc =Please input advance options for shared resources +label.authoring.basic.title =Title +label.authoring.basic.instruction =Instruction +label.authoring.basic.add.url =Add URL +label.authoring.basic.add.file =Add Single File +label.authoring.basic.add.website =Add Zipped Website +label.authoring.basic.add.learning.object =Add IMS Content Package +label.authoring.basic.resource.list.title =Resource list +label.authoring.basic.resource.url =URL +label.authoring.basic.resource.file =File +label.authoring.basic.resource.website =Website +label.authoring.basic.resource.learning.object =IMS CP +label.authoring.basic.resource.verify.url =Verify URL +label.authoring.basic.resource.preview =Preview +label.authoring.basic.resource.edit =Edit +label.authoring.basic.resource.delete =Delete +label.authoring.basic.resource.add.instruction =Add Instruction +label.authoring.basic.resource.instructions =Instructions +label.authoring.basic.resource.title.input =Title +label.authoring.basic.resource.url.input =URL +label.authoring.basic.resource.file.input =File +label.authoring.basic.resource.description.input =Description +label.authoring.basic.resource.zip.file.input =Zip file: +label.authoring.online.filelist =Online file list +label.authoring.offline.filelist =Offline file list +label.authoring.advance.lock.on.finished =Lock when finished +label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource) +label.authoring.advance.mini.number.resources.view =Minimum number of resources to view +label.authoring.advance.allow.learner.add.urls =Allow learners to add URLs +label.authoring.advance.allow.learner.add.files =Allow learners to add files +label.next.instruction =Next Instruction +label.authoring.save.button =Save +label.authoring.cancel.button =Cancel +label.description =Description: +authoring.exception =There is a problem in shared resources authoring page, the reason is {0} +error.resource.item.title.blank =Title can not be blank. +error.resource.item.url.blank =URL can not be blank. +error.resource.item.file.blank =File can not be blank. +error.resource.item.desc.blank =Comment/Instruction can not be blank +error.resource.item.invalid.url =Invalid URL format. +error.upload.failed =Upload file failed: {0} +error.msg.upload.file.not.found =Could not find upload file {0}. +error.msg.zip.file.exception =Could not handle zip file when uploading file. +error.msg.file.not.found =File not found exception occurs when uploading file. +error.msg.ims.package =Invalid IMS CP format. +error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file. +error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html). +error.msg.io.exception =IOException occurs when uploading file. +error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. +error.msg.repository =A repository error occurred while trying to upload the file. +error.msg.default.content.not.find =Could not retrieve default content record for this tool. +msg.no.instruction =No instruction available. +authoring.msg.cancel.save =Do you want to close this window without saving? +label.learning.title =Share Resource Learning +label.learning.heading =Share Resources +label.resoruce.to.review =Resources to view +label.learning.minimum.review =You must view at least {0} of the resources. +lable.learning.minimum.view.number.less =You must view at least another {0} of the resources. +label.check.for.new =Check for new +label.suggest.new =Suggest a new +label.learning.new.file =New file details: +label.learning.new.url =New URL details: +label.learning.comment.or.instruction =Comment/Instruction +monitoring.tab.summary =Summary +monitoring.tab.statistics =Statistic +monitoring.tab.edit.activity =Edit Activity +monitoring.label.group =Group +monitoring.summary.note =Note: number of learners is the number of learners who have viewed the resource. +monitoring.label.type =Type +monitoring.label.title =Title +monitoring.label.suggest =Suggested By +monitoring.label.number.learners =Number of Learners +monitoring.label.hide =Hide +monitoring.label.show =Show +monitoring.label.user.loginname =Login name +monitoring.label.user.name =Name +monitoring.label.hidden =Hidden +label.monitoring.edit.activity.cancel =Cancel +label.monitoring.edit.activity.update =Update +label.monitoring.edit.activity.edit =Edit +message.monitoring.edit.activity.not.editable =This Activity is no longer editable +export.label.resource =Resource +export.label.no.learning.object =No offline package available +export.title =Export portfolio of Share Resource +export.init.resource =Initial Resources +errors.header = +errors.footer = +error.valueReqd =Value Required +error.inputFileTooLarge =Input File size is too large! +error.uploading =error uploading +error.title.empty =Title can not be blank +message.msg.maxFileSize =Max 250K +label.open =Open +label.delete =Delete +label.download =Download +label.view =View +label.edit =Edit +label.finished =Next Activity +label.completed =Completed +label.finish =Finished +button.upload =Upload +button.add =Add +button.cancel =Cancel +message.monitoring.summary.no.session =No Session Available +label.show =Show +label.hide =Hide +label.save =Save +label.cancel =Cancel +monitoring.label.access.time =Started on +define.later.message =Please wait for the instructor to complete the contents of this activity. +message.monitoring.summary.no.resource.for.group =No resource available for this group. +button.try.again =Try again +open.in.new.window =Open URL in pop-up +label.up =Move Up +label.down =Move down +label.monitoring.heading.access =Learners list +label.authoring.advanced.reflectOnActivity =Add a notebook at end of Shared Resources with the following instructions: +error.reflection.emtpy =Please input Notebook Entry +title.reflection =Notebook Entry +label.continue =Continue +monitoring.user.fullname =Name +monitoring.user.reflection =Notebook Entry +page.title.monitoring.view.reflection =View Notebook Entries +button.close =Close +message.step.of =Step {0} of {1} +message.no.reflection.available =No notebook available +button.edit =Edit +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.attachment.executable =The uploaded file is executable, please zip it before uploading. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources. +message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it. +label.export.reflection =Notebook Entries +monitoring.label.instructions =Instructions +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced settings +monitor.summary.td.addNotebook =Add a notebook at end of Shared Resources +monitor.summary.td.notebookInstructions =Notebook instructions +label.authoring.advanced.notify.onassigmentsubmit =Notify instructors when a learner submits a resource +event.assigment.submit.subject =LAMS: A learner submitted an assignment in a Shared Resources tool +event.assigment.submit.body =The learner {0} submitted an assignment in a Shared Resources tool.\n\nThis message was sent automatically, following the tool''s advanced settings. +error.planner.no.resource.save =There has to be at least one resource to save. +error.planner.url.blank =In resource {0} URL can not be blank. +error.planner.file.blank =In resource {0} file can not be blank. +label.authoring.up =Move up +label.authoring.down =Move down +monitoring.label.complete.time =Finished on +monitoring.label.time.taken =Time taken +output.desc.shared.items.output.definition.rsrc =Share Resources: Uploaded URLs and paths to files +label.submit =Finish +monitoring.label.actions =Actions +monitoring.label.views =Views +label.monitoring.heading =Share Resources Monitoring +open.file.in.new.window =Open file in a new window + + +#======= End labels: Exported 168 labels for en AU ===== Index: lams_tool_preview/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== diff -u --- lams_tool_preview/conf/language/lams/ApplicationResources_en_AU.properties (revision 0) +++ lams_tool_preview/conf/language/lams/ApplicationResources_en_AU.properties (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,208 @@ +appName = shareresources +#language code: en +#locale code: AU + + # CVS ID: $Id$ Exported from the LAMS Community by Ernie Ghiglione on Tue Jun 02 10:51:09 CST 2015 + +#=================== labels for PeerReview =================# + +activity.title =Peer Review +activity.description =Individual peer review. +activity.helptext =Individual peer review. +tool.display.name =Peer Review Tool +tool.description =Tool for individual peer review. +appName =Peer Review +errorPage.title =Error page +errorPage.heading =Some error occurs when handling your request +label.authoring.heading =Peer Review Authoring +label.author.title =Peer Review +label.authoring.heading.basic =Basic +label.authoring.heading.advance =Advanced +label.authoring.heading.basic.desc =Basic input information for peer review +label.authoring.heading.advance.desc =Please input advance options for peer review +label.authoring.basic.title =Title +label.authoring.basic.instruction =Instruction +label.authoring.basic.add.url =Add URL +label.authoring.basic.add.file =Add Single File +label.authoring.basic.add.website =Add Zipped Website +label.authoring.basic.add.learning.object =Add IMS Content Package +label.authoring.basic.resource.list.title =Resource list +label.authoring.basic.resource.url =URL +label.authoring.basic.resource.file =File +label.authoring.basic.resource.website =Website +label.authoring.basic.resource.learning.object =IMS CP +label.authoring.basic.resource.verify.url =Verify URL +label.authoring.basic.resource.preview =Preview +label.authoring.basic.resource.edit =Edit +label.authoring.basic.resource.delete =Delete +label.authoring.basic.resource.add.instruction =Add Instruction +label.authoring.basic.resource.instructions =Instructions +label.authoring.basic.resource.title.input =Title +label.authoring.basic.resource.url.input =URL +label.authoring.basic.resource.file.input =File +label.authoring.basic.resource.description.input =Description +label.authoring.basic.resource.zip.file.input =Zip file: +label.authoring.online.filelist =Online file list +label.authoring.offline.filelist =Offline file list +label.authoring.advance.lock.on.finished =Lock when finished +label.authoring.advance.run.content.auto =Run content automatically (only available if there is exactly one resource) +label.authoring.advance.mini.number.resources.view =Minimum number of resources to view +label.authoring.advance.allow.learner.add.urls =Allow learners to add URLs +label.authoring.advance.allow.learner.add.files =Allow learners to add files +label.next.instruction =Next Instruction +label.authoring.save.button =Save +label.authoring.cancel.button =Cancel +label.description =Description: +authoring.exception =There is a problem in peer review authoring page, the reason is {0} +error.resource.item.title.blank =Title can not be blank. +error.resource.item.url.blank =URL can not be blank. +error.resource.item.file.blank =File can not be blank. +error.resource.item.desc.blank =Comment/Instruction can not be blank +error.resource.item.invalid.url =Invalid URL format. +error.upload.failed =Upload file failed: {0} +error.msg.upload.file.not.found =Could not find upload file {0}. +error.msg.zip.file.exception =Could not handle zip file when uploading file. +error.msg.file.not.found =File not found exception occurs when uploading file. +error.msg.ims.package =Invalid IMS CP format. +error.msg.ims.application =ImscpApplicationException occurs when uploading resource item file. +error.msg.website.no.initial.file =Website zip can not find out initial file (index.htm/html or default.htm/html). +error.msg.io.exception =IOException occurs when uploading file. +error.msg.invaid.param.upload =InvalidParameterException occured while trying to upload File. +error.msg.repository =A repository error occurred while trying to upload the file. +error.msg.default.content.not.find =Could not retrieve default content record for this tool. +msg.no.instruction =No instruction available. +authoring.msg.cancel.save =Do you want to close this window without saving? +label.learning.title =Share Resource Learning +label.learning.heading =Peer Review +label.resoruce.to.review =Resources to view +label.learning.minimum.review =You must view at least {0} of the resources. +lable.learning.minimum.view.number.less =You must view at least another {0} of the resources. +label.check.for.new =Check for new +label.suggest.new =Suggest a new +label.learning.new.file =New file details: +label.learning.new.url =New URL details: +label.learning.comment.or.instruction =Comment/Instruction +monitoring.tab.summary =Summary +monitoring.tab.statistics =Statistic +monitoring.tab.edit.activity =Edit Activity +monitoring.label.group =Group +monitoring.summary.note =Note: number of learners is the number of learners who have viewed the resource. +monitoring.label.type =Type +monitoring.label.title =Title +monitoring.label.suggest =Suggested By +monitoring.label.number.learners =Number of Learners +monitoring.label.hide =Hide +monitoring.label.show =Show +monitoring.label.user.loginname =Login name +monitoring.label.user.name =Name +monitoring.label.hidden =Hidden +label.monitoring.edit.activity.cancel =Cancel +label.monitoring.edit.activity.update =Update +label.monitoring.edit.activity.edit =Edit +message.monitoring.edit.activity.not.editable =This Activity is no longer editable +export.label.resource =Resource +export.label.no.learning.object =No offline package available +export.title =Export portfolio of Share Resource +export.init.resource =Initial Resources +errors.header = +errors.footer = +error.valueReqd =Value Required +error.inputFileTooLarge =Input File size is too large! +error.uploading =error uploading +error.title.empty =Title can not be blank +message.msg.maxFileSize =Max 250K +label.open =Open +label.delete =Delete +label.download =Download +label.view =View +label.edit =Edit +label.finished =Next Activity +label.completed =Completed +label.finish =Finished +button.upload =Upload +button.add =Add +button.cancel =Cancel +message.monitoring.summary.no.session =No Session Available +label.show =Show +label.hide =Hide +label.save =Save +label.cancel =Cancel +monitoring.label.access.time =Started on +define.later.message =Please wait for the instructor to complete the contents of this activity. +message.monitoring.summary.no.resource.for.group =No resource available for this group. +button.try.again =Try again +open.in.new.window =Open URL in pop-up +label.up =Move Up +label.down =Move down +label.monitoring.heading.access =Learners list +label.authoring.advanced.reflectOnActivity =Add a notebook at end of Peer Review with the following instructions: +error.reflection.emtpy =Please input Notebook Entry +title.reflection =Notebook Entry +label.continue =Continue +monitoring.user.fullname =Name +monitoring.user.reflection =Notebook Entry +page.title.monitoring.view.reflection =View Notebook Entries +button.close =Close +message.step.of =Step {0} of {1} +message.no.reflection.available =No notebook available +button.edit =Edit +errors.maxfilesize =The uploaded file has exceeded the maximum file size limit of {0} bytes +error.attachment.executable =The uploaded file is executable, please zip it before uploading. +message.alertContentEdit =Warning: One of more learners have accessed this activity. Changing this content will result in learners getting different information. +message.warnLockOnFinish =Note: After you click on "Next Activity\u201d, if you come back to this Share Resource, you won\u2019t be able to share new resources. +message.activityLocked =The instructor has set this activity not to allow you to view or share any more resources after you have finished it. +label.export.reflection =Notebook Entries +monitoring.label.instructions =Instructions +label.on =On +label.off =Off +monitor.summary.th.advancedSettings =Advanced settings +monitor.summary.td.addNotebook =Add a notebook at end of Peer Review +monitor.summary.td.notebookInstructions =Notebook instructions +label.authoring.advanced.notify.onassigmentsubmit =Notify instructors when a learner submits a resource +event.assigment.submit.subject =LAMS: A learner submitted an assignment in a Peer Review tool +event.assigment.submit.body =The learner {0} submitted an assignment in a Peer Review tool.\n\nThis message was sent automatically, following the tool''s advanced settings. +error.planner.no.resource.save =There has to be at least one resource to save. +error.planner.url.blank =In resource {0} URL can not be blank. +error.planner.file.blank =In resource {0} file can not be blank. +label.authoring.up =Move up +label.authoring.down =Move down +monitoring.label.complete.time =Finished on +monitoring.label.time.taken =Time taken +output.desc.shared.items.output.definition.rsrc =peer review: Uploaded URLs and paths to files +label.submit =Finish +monitoring.label.actions =Actions +monitoring.label.views =Views +label.monitoring.heading =Peer Review Monitoring +open.file.in.new.window =Open file in a new window + +label.average.rating =Average rating {0}/{1} votes +label.redo =Redo ratings +label.rating.criterias =Rating criterias +label.add.criteria =Add Criteria +label.your.rating =Your rating is {0}
Avg rating {1} out of {2} votes +label.rate.limits.reminder =Rating limitation: Minimum {0} and Maximum {1}. +label.rate.limits.topic.reminder =You have rated {0} users already. +label.rate.limits.reminder.min = You must rate at least {0} users. +label.rate.limits.reminder.max = You can only rate up to {0} users. +js.warning.max.min.limit = There is an error with the minimum and/or maximum set for ratings. Please check and try again. +label.minimum =Minimum: +label.maximum =Maximum: +label.no.minimum =No minimum +label.no.maximum =No maximum +label.minimum.number.words =Minimum number of words in a comment {0} +warning.minimum.number.words =There is a minimum required number of words in a comment: {0}. So far you've entered {1} word(s). +label.comment.textarea.tip =Please, provide some comment here... +label.max.number.marks.each.user =Max number of marks for a each user. +label.move.up =Move Up +label.move.down =Move Down +label.allow.comments =Allow learners to comment on other learners +label.sort.by.user.name =Sort by user name +label.user.name =User name +label.rating =Rating +label.comment =Comment +label.show.ratings.left.for.user =After completion, show feedback left for student +label.ratings.by.others =Ratings by other users +label.comment.minimum.number.words =Minimum number of words in a comment{0} +label.no.users =There is no users available for rating. + +#======= End labels: Exported 168 labels for en AU ===== Index: lams_tool_preview/conf/xdoclet/global-exceptions.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/global-exceptions.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/global-exceptions.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,8 @@ + + + Index: lams_tool_preview/conf/xdoclet/global-forwards.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/global-forwards.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/global-forwards.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,6 @@ + + + + + + Index: lams_tool_preview/conf/xdoclet/struts-actions.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/struts-actions.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/struts-actions.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_preview/conf/xdoclet/struts-forms.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/struts-forms.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/struts-forms.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1 @@ + Index: lams_tool_preview/conf/xdoclet/struts-message-resources.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/struts-message-resources.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/struts-message-resources.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1 @@ + Index: lams_tool_preview/conf/xdoclet/struts-plugins.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/struts-plugins.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/struts-plugins.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1 @@ + Index: lams_tool_preview/conf/xdoclet/validation-forms.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/validation-forms.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/validation-forms.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,29 @@ + Index: lams_tool_preview/conf/xdoclet/validation-global.xml =================================================================== diff -u --- lams_tool_preview/conf/xdoclet/validation-global.xml (revision 0) +++ lams_tool_preview/conf/xdoclet/validation-global.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,6 @@ + + + datePattern + yyyy-MM-dd + + Index: lams_tool_preview/db/model/peerreview.clay =================================================================== diff -u --- lams_tool_preview/db/model/peerreview.clay (revision 0) +++ lams_tool_preview/db/model/peerreview.clay (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,873 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+
Index: lams_tool_preview/db/sql/activity_insert.sql =================================================================== diff -u --- lams_tool_preview/db/sql/activity_insert.sql (revision 0) +++ lams_tool_preview/db/sql/activity_insert.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,78 @@ +# Connection: ROOT LOCAL +# Host: localhost +# Saved: 2005-04-07 11:08:32 +# +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 +, library_activity_ui_image +, create_grouping_id +, create_grouping_ui_id +, library_activity_id +, language_file +) +VALUES +( +NULL +, 'Peerreview' +, 'Peerreview' +, 'Put some help text here.' +, NULL +, NULL +, NULL +, NULL +, 1 +, 2 +, 0 +, NULL +, NULL +, NULL +, 0 +, NULL +, ${learning_library_id} +, NOW() +, 0 +, NULL +, NULL +, NULL +, ${tool_id} +, NULL +, 4 +, NULL +, NULL +, NULL +, NULL +, 'tool/laprev11/images/icon_peerreview.swf' +, NULL +, NULL +, NULL +, 'org.lamsfoundation.lams.tool.peerreview.ApplicationResources' +) Index: lams_tool_preview/db/sql/create_lams_tool_peerreview.sql =================================================================== diff -u --- lams_tool_preview/db/sql/create_lams_tool_peerreview.sql (revision 0) +++ lams_tool_preview/db/sql/create_lams_tool_peerreview.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,54 @@ +SET FOREIGN_KEY_CHECKS=0; +drop table if exists tl_laprev11_peerreview; +drop table if exists tl_laprev11_session; +drop table if exists tl_laprev11_user; +create table tl_laprev11_peerreview ( + uid bigint not null auto_increment, + create_date datetime, + update_date datetime, + create_by bigint, + title varchar(255), + lock_on_finished tinyint, + show_ratings_left_for_user tinyint DEFAULT 1, + instructions text, + content_in_use tinyint, + define_later tinyint, + content_id bigint unique, + reflect_instructions text, + reflect_on_activity smallint, + minimum_rates integer DEFAULT 0, + maximum_rates integer DEFAULT 0, + maximum_rates_per_user integer DEFAULT 0, + primary key (uid) +)ENGINE=InnoDB; +create table tl_laprev11_session ( + uid bigint not null auto_increment, + session_end_date datetime, + session_start_date datetime, + status integer, + peerreview_uid bigint, + session_id bigint, + session_name varchar(250), + primary key (uid) +)ENGINE=InnoDB; +create table tl_laprev11_user ( + uid bigint not null auto_increment, + user_id bigint, + last_name varchar(255), + first_name varchar(255), + login_name varchar(255), + session_finished smallint, + session_uid bigint, + peerreview_uid bigint, + primary key (uid) +)ENGINE=InnoDB; +alter table tl_laprev11_peerreview add index FK_NEW_1661738138_89093BF758092FB (create_by), add constraint FK_NEW_1661738138_89093BF758092FB foreign key (create_by) references tl_laprev11_user (uid); +alter table tl_laprev11_session add index FK_NEW_1661738138_24AA78C530E79035 (peerreview_uid), add constraint FK_NEW_1661738138_24AA78C530E79035 foreign key (peerreview_uid) references tl_laprev11_peerreview (uid); +alter table tl_laprev11_user add index FK_NEW_1661738138_30113BFCEC0D3147 (session_uid), add constraint FK_NEW_1661738138_30113BFCEC0D3147 foreign key (session_uid) references tl_laprev11_session (uid); +alter table tl_laprev11_user add index FK_NEW_1661738138_30113BFC309ED320 (peerreview_uid), add constraint FK_NEW_1661738138_30113BFC309ED320 foreign key (peerreview_uid) references tl_laprev11_peerreview (uid); + +INSERT INTO `tl_laprev11_peerreview` (`uid`, `create_date`, `update_date`, `create_by`, `title`, `lock_on_finished`, + `instructions`, `content_in_use`, `define_later`, `content_id`, `reflect_on_activity`, `show_ratings_left_for_user`) VALUES + (1,NULL,NULL,NULL,'Peer review','0','Instructions ',0,0,${default_content_id},0, 1); + +SET FOREIGN_KEY_CHECKS=1; Index: lams_tool_preview/db/sql/db_version_insert.sql =================================================================== diff -u --- lams_tool_preview/db/sql/db_version_insert.sql (revision 0) +++ lams_tool_preview/db/sql/db_version_insert.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,2 @@ +-- $Id$ +INSERT INTO patches VALUES ('@signature@', '@tool_version@', NOW(), 'F'); Index: lams_tool_preview/db/sql/drop_lams_tool_peerreview.sql =================================================================== diff -u --- lams_tool_preview/db/sql/drop_lams_tool_peerreview.sql (revision 0) +++ lams_tool_preview/db/sql/drop_lams_tool_peerreview.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,10 @@ +SET FOREIGN_KEY_CHECKS=0; +drop table if exists tl_laprev11_peerreview; +drop table if exists tl_laprev11_session; +drop table if exists tl_laprev11_user; +SET FOREIGN_KEY_CHECKS=1; + + + + + Index: lams_tool_preview/db/sql/library_insert.sql =================================================================== diff -u --- lams_tool_preview/db/sql/library_insert.sql (revision 0) +++ lams_tool_preview/db/sql/library_insert.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,18 @@ +# Connection: ROOT LOCAL +# Host: localhost +# Saved: 2005-04-07 10:50:55 +# +INSERT INTO lams_learning_library +( +description, +title, +valid_flag, +create_date_time +) +VALUES +( +'Peerreview', +'Peerreview', +0, +NOW() +) Index: lams_tool_preview/db/sql/table-schema.sql =================================================================== diff -u --- lams_tool_preview/db/sql/table-schema.sql (revision 0) +++ lams_tool_preview/db/sql/table-schema.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1 @@ \ No newline at end of file Index: lams_tool_preview/db/sql/tool_insert.sql =================================================================== diff -u --- lams_tool_preview/db/sql/tool_insert.sql (revision 0) +++ lams_tool_preview/db/sql/tool_insert.sql (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,56 @@ +# Connection: ROOT LOCAL +# Host: localhost +# Saved: 2005-04-07 10:42:43 +# +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, +help_url, +language_file, +create_date_time, +modified_date_time +) +VALUES +( +'laprev11', +'peerreviewService', +'Peerreview', +'Peerreview', +'peerreview', +'@tool_version@', +NULL, +NULL, +0, +2, +1, +'tool/laprev11/learning/start.do?mode=learner', +'tool/laprev11/learning/start.do?mode=author', +'tool/laprev11/learning/start.do?mode=teacher', +'tool/laprev11/authoring/start.do', +'tool/laprev11/monitoring/summary.do', +'tool/laprev11/definelater.do', +'tool/laprev11/exportPortfolio?mode=learner', +'tool/laprev11/exportPortfolio?mode=teacher', +'http://wiki.lamsfoundation.org/display/lamsdocs/laprev11', +'org.lamsfoundation.lams.tool.peerreview.ApplicationResources', +NOW(), +NOW() +) Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/PeerreviewConstants.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/PeerreviewConstants.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/PeerreviewConstants.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,133 @@ +/**************************************************************** + * 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.peerreview; + +public class PeerreviewConstants { + public static final String TOOL_SIGNATURE = "laprev11"; + + public static final String PEERREVIEW_SERVICE = "peerreviewService"; + + public static final String TOOL_CONTENT_HANDLER_NAME = "peerreviewToolContentHandler"; + + public static final int COMPLETED = 1; + + public static final int SORT_BY_NO = 0; + public static final int SORT_BY_USERNAME_ASC = 1; + public static final int SORT_BY_USERNAME_DESC = 2; + + // for action forward name + public static final String SUCCESS = "success"; + + public static final String ERROR = "error"; + + public static final String DEFINE_LATER = "definelater"; + + public static final String PARAM_PAGE = "page"; + public static final String PARAM_ROWS = "rows"; + public static final String PARAM_SIDX = "sidx"; + public static final String PARAM_SORD = "sord"; + public static final String PARAM_METHOD = "method"; + public static final String PARAM_DISPATCH = "dispatch"; + public static final String PARAM_LOGIN = "login"; + public static final String PARAM_ID = "id"; + public static final String PARAM_MARK = "mark"; + public static final String PARAM_FEEDBACK = "feedback"; + public static final String PARAM_USERID = "userID"; + public static final String PARAM_SEARCH = "_search"; + public static final String PARAM_SEARCH_FIELD = "searchField"; + public static final String PARAM_SEARCH_OPERATION = "searchOper"; + public static final String PARAM_SEARCH_STRING = "searchString"; + public static final String PARAM_ROW_NAME = "rowName"; + public static final String PARAM_TIME_TAKEN = "timeTaken"; + public static final String PARAM_AVG_TIME_TAKEN = "avgTimeTaken"; + public static final String PARAM_AVG_MARK = "avgMark"; + public static final String PARAM_VIEW = "view"; + public static final String PARAM_START_DATE = "startDate"; + public static final String PARAM_GROUP_ID = "groupId"; + // Sort + public static final String SORT_DESC = "desc"; + public static final String SORT_ASC = "asc"; + + // for parameters' name + public static final String PARAM_TOOL_CONTENT_ID = "toolContentID"; + + public static final String PARAM_TOOL_SESSION_ID = "toolSessionId"; + + public static final String PARAM_TITLE = "title"; + + // for request attribute name + public static final String ATTR_TOOL_CONTENT_ID = "toolContentID"; + + public static final String ATTR_TOOL_SESSION_ID = "toolSessionID"; + + public static final String ATTR_PEERREVIEW = "peerreview"; + + public static final String ATTR_NEXT_ACTIVITY_URL = "nextActivityUrl"; + + public static final String ATTR_SUMMARY_LIST = "summaryList"; + + public static final String ATTR_USER_LIST = "userList"; + + public static final String ATTR_RESOURCE_INSTRUCTION = "instructions"; + + public static final String ATTR_FINISH_LOCK = "finishedLock"; + + public static final String ATTR_LOCK_ON_FINISH = "lockOnFinish"; + + public static final String ATTR_SESSION_MAP_ID = "sessionMapID"; + + public static final String ATTR_PEERREVIEW_FORM = "peerreviewForm"; + + public static final String ATTR_TITLE = "title"; + + public static final String ATTR_INSTRUCTIONS = "instructions"; + + public static final String ATTR_USER_FINISHED = "userFinished"; + + public static final String ATTR_USER = "user"; + + public static final String ATTR_IS_GROUPED_ACTIVITY = "isGroupedActivity"; + + public static final String ATTR_IS_URL_ITEM_TYPE = "isUrlItemType"; + + // error message keys + + public static final String ERROR_MSG_UPLOAD_FAILED = "error.upload.failed"; + + public static final String PAGE_EDITABLE = "isPageEditable"; + + public static final String MODE_AUTHOR_SESSION = "author_session"; + + public static final String ATTR_REFLECTION_ON = "reflectOn"; + + public static final String ATTR_REFLECTION_INSTRUCTION = "reflectInstructions"; + + public static final String ATTR_REFLECTION_ENTRY = "reflectEntry"; + + public static final String ATTR_REFLECT_LIST = "reflectList"; + + public static final String ATTR_USER_UID = "userUid"; + + public static final String SHARED_ITEMS_DEFINITION_NAME = "shared.items.output.definition.peerreview"; +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/DAO.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/DAO.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/DAO.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,70 @@ +/**************************************************************** + * 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.peerreview.dao; + +import java.io.Serializable; +import java.util.List; + + +/** + * Data Access Object (DAO) interface. This is an interface + * used to tag our DAO classes and to provide common methods to all DAOs. + * + * @author Dapeng.Ni + */ +public interface DAO { + + /** + * Generic method used to get all objects of a particular type. This + * is the same as lookup up all rows in a table. + * @param clazz the type of objects (a.k.a. while table) to get data from + * @return List of populated objects + */ + public List getObjects(Class clazz); + + /** + * Generic method to get an object based on class and identifier. An + * ObjectRetrievalFailureException Runtime Exception is thrown if + * nothing is found. + * + * @param clazz model class to lookup + * @param id the identifier (primary key) of the class + * @return a populated object + * @see org.springframework.orm.ObjectRetrievalFailureException + */ + public Object getObject(Class clazz, Serializable id); + + /** + * Generic method to save an object - handles both update and insert. + * @param o the object to save + */ + public void saveObject(Object o); + + /** + * Generic method to delete an object based on class and id + * @param clazz model class to lookup + * @param id the identifier (primary key) of the class + */ + public void removeObject(Class clazz, Serializable id); +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewDAO.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewDAO.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewDAO.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,36 @@ +/**************************************************************** + * 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.peerreview.dao; + +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; + +public interface PeerreviewDAO extends DAO { + + Peerreview getByContentId(Long contentId); + + Peerreview getByUid(Long peerreviewUid); + + void delete(Peerreview peerreview); + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewSessionDAO.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewSessionDAO.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewSessionDAO.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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.peerreview.dao; + +import java.util.List; + +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession; + +public interface PeerreviewSessionDAO extends DAO { + + PeerreviewSession getSessionBySessionId(Long sessionId); + + List getByContentId(Long toolContentId); + + void delete(PeerreviewSession session); + + void deleteBySessionId(Long toolSessionId); + + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewUserDAO.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewUserDAO.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/PeerreviewUserDAO.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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.peerreview.dao; + +import java.util.List; + +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; + +public interface PeerreviewUserDAO extends DAO { + + PeerreviewUser getUserByUserIDAndSessionID(Long userID, Long sessionId); + + PeerreviewUser getUserByUserIDAndContentID(Long userId, Long contentId); + + List getBySessionID(Long sessionId); + + List getByContentId(Long toolContentId); + + int getCountUsersBySession(final Long toolSessionId, final Long excludeUserId); + + List getUsersForTablesorter(final Long toolSessionId, final Long excludeUserId, int page, int size, + int sorting); +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/BaseDAOHibernate.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/BaseDAOHibernate.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/BaseDAOHibernate.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,72 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.peerreview.dao.hibernate; + +import java.io.Serializable; +import java.util.List; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.lamsfoundation.lams.tool.peerreview.dao.DAO; +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; + +/** + * This class serves as the Base class for all other DAOs - namely to hold + * common methods that they might all use. Can be used for standard CRUD + * operations.

+ * + * @author Dapeng.Ni + */ +public class BaseDAOHibernate extends HibernateDaoSupport implements DAO { + protected final Log log = LogFactory.getLog(getClass()); + + /** + * @see com.edgenius.paradise.dao.DAO#saveObject(java.lang.Object) + */ + public void saveObject(Object o) { + getHibernateTemplate().saveOrUpdate(o); + } + + /** + * @see com.edgenius.paradise.dao.DAO#getObject(java.lang.Class, java.io.Serializable) + */ + public Object getObject(Class clazz, Serializable id) { + Object o = getHibernateTemplate().get(clazz, id); + return o; + } + + /** + * @see com.edgenius.paradise.dao.DAO#getObjects(java.lang.Class) + */ + public List getObjects(Class clazz) { + return getHibernateTemplate().loadAll(clazz); + } + + /** + * @see com.edgenius.paradise.dao.DAO#removeObject(java.lang.Class, java.io.Serializable) + */ + public void removeObject(Class clazz, Serializable id) { + getHibernateTemplate().delete(getObject(clazz, id)); + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewDAOHibernate.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewDAOHibernate.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewDAOHibernate.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,56 @@ +/**************************************************************** + * 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.peerreview.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.tool.peerreview.dao.PeerreviewDAO; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; + +/** + * + * @author Steve.Ni + * + * @version $Revision$ + */ +public class PeerreviewDAOHibernate extends BaseDAOHibernate implements PeerreviewDAO{ + private static final String GET_RESOURCE_BY_CONTENTID = "from "+Peerreview.class.getName()+" as r where r.contentId=?"; + + public Peerreview getByContentId(Long contentId) { + List list = getHibernateTemplate().find(GET_RESOURCE_BY_CONTENTID,contentId); + if(list.size() > 0) + return (Peerreview) list.get(0); + else + return null; + } + + public Peerreview getByUid(Long peerreviewUid) { + return (Peerreview) getObject(Peerreview.class,peerreviewUid); + } + + public void delete(Peerreview peerreview) { + this.getHibernateTemplate().delete(peerreview); + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewSessionDAOHibernate.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewSessionDAOHibernate.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewSessionDAOHibernate.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,54 @@ +/**************************************************************** + * 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.peerreview.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.tool.peerreview.dao.PeerreviewSessionDAO; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession; + + +public class PeerreviewSessionDAOHibernate extends BaseDAOHibernate implements PeerreviewSessionDAO{ + + private static final String FIND_BY_SESSION_ID = "from " + PeerreviewSession.class.getName() + " as p where p.sessionId=?"; + private static final String FIND_BY_CONTENT_ID = "from " + PeerreviewSession.class.getName() + " as p where p.peerreview.contentId=?"; + + public PeerreviewSession getSessionBySessionId(Long sessionId) { + List list = getHibernateTemplate().find(FIND_BY_SESSION_ID,sessionId); + if(list == null || list.size() == 0) + return null; + return (PeerreviewSession) list.get(0); + } + public List getByContentId(Long toolContentId) { + return getHibernateTemplate().find(FIND_BY_CONTENT_ID,toolContentId); + } + + public void delete(PeerreviewSession session) { + this.getHibernateTemplate().delete(session); + } + public void deleteBySessionId(Long toolSessionId) { + this.removeObject(PeerreviewSession.class,toolSessionId); + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewUserDAOHibernate.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewUserDAOHibernate.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dao/hibernate/PeerreviewUserDAOHibernate.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,109 @@ +/**************************************************************** + * 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.peerreview.dao.hibernate; + +import java.util.List; + +import org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants; +import org.lamsfoundation.lams.tool.peerreview.dao.PeerreviewUserDAO; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; + +public class PeerreviewUserDAOHibernate extends BaseDAOHibernate implements PeerreviewUserDAO { + + private static final String FIND_BY_USER_ID_CONTENT_ID = "FROM " + PeerreviewUser.class.getName() + + " AS u WHERE u.userId =? AND u.peerreview.contentId=?"; + private static final String FIND_BY_USER_ID_SESSION_ID = "FROM " + PeerreviewUser.class.getName() + + " AS u WHERE u.userId =? AND u.session.sessionId=?"; + private static final String FIND_BY_SESSION_ID = "FROM " + PeerreviewUser.class.getName() + + " AS u WHERE u.session.sessionId=?"; + + private static final String FIND_BY_CONTENT_ID = "FROM " + PeerreviewUser.class.getName() + + " AS u WHERE u.session.peerreview.contentId=?"; + + private static final String GET_COUNT_USERS_FOR_SESSION = "SELECT COUNT(*) FROM " + PeerreviewUser.class.getName() + + " AS r WHERE r.session.sessionId=? AND r.userId!=?"; + + private static final String LOAD_USERS_FOR_SESSION_LIMIT = "FROM user in class PeerreviewUser " + + "WHERE user.session.sessionId=:toolSessionId AND user.userId!=:excludeUserId order by "; + + @Override + public PeerreviewUser getUserByUserIDAndSessionID(Long userID, Long sessionId) { + List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_SESSION_ID, new Object[] { userID, sessionId }); + if (list == null || list.size() == 0) + return null; + return (PeerreviewUser) list.get(0); + } + + @Override + public PeerreviewUser getUserByUserIDAndContentID(Long userId, Long contentId) { + List list = this.getHibernateTemplate().find(FIND_BY_USER_ID_CONTENT_ID, new Object[] { userId, contentId }); + if (list == null || list.size() == 0) + return null; + return (PeerreviewUser) list.get(0); + } + + @Override + public List getBySessionID(Long sessionId) { + return this.getHibernateTemplate().find(FIND_BY_SESSION_ID, sessionId); + } + + @Override + public List getByContentId(Long toolContentId) { + return this.getHibernateTemplate().find(FIND_BY_CONTENT_ID, toolContentId); + } + + @Override + public int getCountUsersBySession(final Long toolSessionId, final Long excludeUserId) { + + List list = getHibernateTemplate().find(GET_COUNT_USERS_FOR_SESSION, + new Object[] { toolSessionId, excludeUserId }); + if (list == null || list.size() == 0) { + return 0; + } + return ((Number) list.get(0)).intValue(); + } + + @Override + public List getUsersForTablesorter(final Long toolSessionId, final Long excludeUserId, + int page, int size, int sorting) { + String sortingOrder = ""; + switch (sorting) { + case PeerreviewConstants.SORT_BY_NO: + sortingOrder = "user.userId"; + break; + case PeerreviewConstants.SORT_BY_USERNAME_ASC: + sortingOrder = "user.firstName ASC"; + break; + case PeerreviewConstants.SORT_BY_USERNAME_DESC: + sortingOrder = "user.firstName DESC"; + break; + } + + return getSession().createQuery(LOAD_USERS_FOR_SESSION_LIMIT + sortingOrder) + .setLong("toolSessionId", toolSessionId.longValue()) + .setLong("excludeUserId", excludeUserId.longValue()).setFirstResult(page * size).setMaxResults(size) + .list(); + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dbupdates/autopatchContext.xml =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dbupdates/autopatchContext.xml (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dbupdates/autopatchContext.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,11 @@ + + + + + + + + + + + Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dto/GroupSummary.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dto/GroupSummary.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dto/GroupSummary.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,50 @@ +/**************************************************************** + * 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.peerreview.dto; + +import java.util.LinkedList; +import java.util.List; + +public class GroupSummary { + + private Long sessionId; + private String sessionName; + + 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; + } +} + Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dto/ReflectDTO.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dto/ReflectDTO.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/dto/ReflectDTO.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,80 @@ +package org.lamsfoundation.lams.tool.peerreview.dto; + +import java.util.Date; + +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; + +/** + * @author Dapeng Ni + */ +public class ReflectDTO { + private Long userUid; + private String fullName; + private String loginName; + private String reflectInstrctions; + private boolean finishReflection; + private String reflect; + private Date date; + + public ReflectDTO(PeerreviewUser user) { + this.setLoginName(user.getLoginName()); + this.setFullName(user.getFirstName() + " " + user.getLastName()); + this.setUserUid(user.getUid()); + } + + public boolean isFinishReflection() { + return finishReflection; + } + + public void setFinishReflection(boolean finishReflection) { + this.finishReflection = finishReflection; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } + + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + public String getReflect() { + return reflect; + } + + public void setReflect(String reflect) { + this.reflect = reflect; + } + + public String getReflectInstrctions() { + return reflectInstrctions; + } + + public void setReflectInstrctions(String reflectInstrctions) { + this.reflectInstrctions = reflectInstrctions; + } + + public Long getUserUid() { + return userUid; + } + + public void setUserUid(Long userUid) { + this.userUid = userUid; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/IContentPackageConverter.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/IContentPackageConverter.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/IContentPackageConverter.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,64 @@ +/**************************************************************** + * 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.peerreview.ims; + +/** + * A ContentPackageConverter converts an IMS Content Package into the + * data needed for our tool. The only implementation initially done was + * SimpleContentPackageCoverter. + * + * The creation method of the converter (which is unique to each converter) + * will need to parse the package and have the data ready for the "get" + * calls. + * + * Note: Classes that implement this interface should be normal POJOS, + * not singletons. This allows them to have instance data. + */ +public interface IContentPackageConverter { + + /** + * @return Returns the defaultItem. + */ + public abstract String getDefaultItem(); + + /** + * @return Returns the description. + */ + public abstract String getDescription(); + + /** + * @return Returns the organzationXML. + */ + public abstract String getOrganzationXML(); + + /** + * @return Returns the schema. + */ + public abstract String getSchema(); + + /** + * @return Returns the title. + */ + public abstract String getTitle(); +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/IMSManifestException.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/IMSManifestException.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/IMSManifestException.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,64 @@ +/**************************************************************** + * 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.peerreview.ims; + +/** + * This exception is thrown when an error occurs that may be related to + * the formatting of the IMS content package. e.g. the manifest file + * is missing. + * + * @author Fiona Malikoff + */ +public class IMSManifestException extends ImscpApplicationException { + + /** + * + */ + public IMSManifestException() { + super(); + } + + /** + * @param arg0 + */ + public IMSManifestException(String arg0) { + super(arg0); + } + + /** + * @param arg0 + */ + public IMSManifestException(Throwable arg0) { + super(arg0); + } + + /** + * @param arg0 + * @param arg1 + */ + public IMSManifestException(String arg0, Throwable arg1) { + super(arg0, arg1); + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/ImscpApplicationException.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/ImscpApplicationException.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/ImscpApplicationException.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,61 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.peerreview.ims; + +/** + * Generic exception for the imscr tool. + * @author Fiona Malikoff + */ +public class ImscpApplicationException extends Exception { + + /** + * + */ + public ImscpApplicationException() { + super(); + } + + /** + * @param arg0 + */ + public ImscpApplicationException(String arg0) { + super(arg0); + } + + /** + * @param arg0 + */ + public ImscpApplicationException(Throwable arg0) { + super(arg0); + } + + /** + * @param arg0 + * @param arg1 + */ + public ImscpApplicationException(String arg0, Throwable arg1) { + super(arg0, arg1); + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/OrganizationXMLDef.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/OrganizationXMLDef.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/OrganizationXMLDef.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,42 @@ +/**************************************************************** + * 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.peerreview.ims; + +/** + * This contains the "tag" of items in the organization xml. May be used + * by JSP pages to get the tag names right! + * + * @author Fiona Malikoff + */ +public final class OrganizationXMLDef { + + public static final String DEFAULT = "default"; + public static final String ITEM = "item"; + public static final String PARAMETERS = "parameters"; + public static final String HREF = "href"; + public static final String IDENTIFIER = "identifier"; + public static final String RESOURCE = "peerreview"; + public static final String TITLE = "title"; + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/SimpleContentPackageConverter.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/SimpleContentPackageConverter.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/ims/SimpleContentPackageConverter.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,492 @@ +/**************************************************************** + * 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.peerreview.ims; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Iterator; +import java.util.List; + +import org.apache.log4j.Logger; +import org.jdom.Document; +import org.jdom.Element; +import org.jdom.JDOMException; +import org.jdom.Namespace; + +import uk.ac.reload.jdom.XMLDocument; +import uk.ac.reload.jdom.XMLPath; +import uk.ac.reload.jdom.XMLUtils; +import uk.ac.reload.moonunit.contentpackaging.CP_Core; + +/** + * SimpleContentPackageConverter contains the code required for + * parsing the IMS Content Package and converting the info into our + * own structures. + * + * Note: this class has instance data, so do not use it as a singleton. + * + * @author Fiona Malikoff + */ +public class SimpleContentPackageConverter implements IContentPackageConverter { + + private Logger log = Logger.getLogger(SimpleContentPackageConverter.class); + + // manifestDoc and cpCore are set up in the constructor. They are then used + // to generate the rest of the values + private XMLDocument manifestDoc = null; + private CP_Core cpCore = null; + + private String schema=null; + private String title=null; + private String description=null; + private String defaultItem=null; + private String organzationXML=null; + + // cachedPeerreviewList is used to avoid building up the list + // every time an item is parsed - otherwise there is a lot + // of processing done by the reload code time and time again. + private Element[] cachedPeerreviewList = null; + + /** Set up a package converter, using the supplied directory as the package. + * The package should be parsed automatically and the values readied for calls + * to getSchema(), getTitle(), etc. + * + * @param directoryName: directory containing an expanded IMS content package. + * @throws IMSManifestException if there is an error in parsing the manifest file + * due to an error in the file or an unexpected value. + * @throws ImscpApplicationException if there is any other error + */ + public SimpleContentPackageConverter(String directoryName) + throws IMSManifestException, ImscpApplicationException { + + this.manifestDoc = getDocument(directoryName); + this.cpCore = new CP_Core(manifestDoc); + + // initialise the property file required for the reload code. Needed to make + // the metadata call work. If we remove the metadata call, then this constructor + // may be removed. + System.setProperty("editor.properties.file", "uk.ac.reload.editor.properties.rb"); + + parsePackage(); + } + + /** Parse IMS content package expanded out + * into the supplied directory. Note: the manifest file is expected to be in the + * root of the supplied directory. + * + * @throws ImscpApplicationException + * @throws IMSManifestException + */ + private void parsePackage( ) throws IMSManifestException, ImscpApplicationException { + + String schemaText = getText(manifestDoc, "//metadata/schema"); + String schemaVersion = getText(manifestDoc, "//metadata/schemaversion"); + this.schema = ( schemaText != null ? schemaText : "unknown" ) + + " " + ( schemaVersion != null ? schemaVersion : "unknown") ; + + Document orgs = buildOrganisationList(); + if ( orgs == null ) { + String error = "Unable to convert organizations from manifest file to our own structure. Reason unknown - buildOrganisationList returned null"; + log.error(error); + throw new ImscpApplicationException(error); + } + + try { + this.organzationXML = XMLUtils.write2XMLString(orgs); + } catch ( IOException ioe ) { + String error = "Exception thrown converting organization structure (as document) to an XML string."+ioe.getMessage(); + log.error(error,ioe); + throw new ImscpApplicationException(error,ioe); + } + + XMLPath xmlPath = new XMLPath("//metadata/*:lom/*:general/*:title/*:langstring"); + this.title = getMetaValue(xmlPath); + if ( this.title == null ) { + // try the old root name - untested + xmlPath = new XMLPath("//metadata/*:record/*:general/*:title/*:langstring"); + this.title = getMetaValue(xmlPath); + } + + xmlPath = new XMLPath("//metadata/*:lom/*:general/*:description/*:langstring"); + this.description = getMetaValue(xmlPath); + if ( this.description == null ) { + // try the old root name - untested + xmlPath = new XMLPath("//metadata/*:record/*:general/*:description/*:langstring"); + this.description = getMetaValue(xmlPath); + } + + } + + + /** + * Finds a value at the given xmlPath. If only one element, uses that value. + * If more than one element, tries to find an English value. + * @param xmlPath + * @return Value of the element found at xmlPath. + */ + private String getMetaValue(XMLPath xmlPath) { + Element[] elList = manifestDoc.getElements(xmlPath); + String value = null; + if ( elList != null ) { + if ( elList.length == 0 ) { + value="Unknown"; + } else if ( elList.length == 1 ) { + value=elList[0].getTextTrim(); + } else { + value = null; + // TODO check if it is really testing for english + for ( int i=0; value == null && i < elList.length; i++ ) { + // grab the first English one + Element el = elList[i]; + String attrValue = el.getAttributeValue("lang", Namespace.XML_NAMESPACE ); + if ( attrValue != null && attrValue.startsWith("en") ) { + value = el.getTextTrim(); + } + } + if ( value == null ) { + // can't seem to find an English one, just pick the first + value=elList[0].getTextTrim(); + } + } + } + return value; + } + + /* Get the text for this element - expect only 1 */ + private String getText(XMLDocument document, String xmlPathString ) { + XMLPath xmlPath = new XMLPath(xmlPathString); + Element el = document.getElement(xmlPath); + return el != null ? el.getTextTrim() : null; + } + + private String debug(XMLDocument document, String param, String xmlPathString ) { + XMLPath xmlPath = new XMLPath(xmlPathString); + Element[]elList = document.getElements(xmlPath); + if ( elList != null ) { + log.error(param+" xp: length "+elList.length+" el "+elList); + if ( elList.length >= 1 ) { + log.error("text is "+elList[0].getTextTrim()); + return elList[0].getTextTrim(); + } + } else { + log.error(param+" xp: el is null"); + } + return null; + } + + /** + * @param directoryName + * @return + * @throws JDOMException + * @throws IOException + */ + private XMLDocument getDocument(String directoryName) throws IMSManifestException { + try { + XMLDocument doc = new XMLDocument(); + doc.loadDocument(new File(directoryName, "imsmanifest.xml")); + return doc; + } catch (JDOMException je) { + String error = "Parsing error occured while loading imsmanifest.xml file. Contents of file may be invalid. "+je.getMessage(); + log.error(error, je); + throw new IMSManifestException(error, je); + } catch (FileNotFoundException e) { + String error = "Unable to find imsmanifest file in the package."+e.getMessage(); + log.error(error, e); + throw new IMSManifestException(error, e); + } catch (IOException ioe) { + String error = "IOException occured while loading imsmanifest file. "+ioe.getMessage(); + log.error(error, ioe); + throw new IMSManifestException(error, ioe); + } + } + + /** Built an XML document which is a list of organisations/peerreview. + */ + private Document buildOrganisationList( ) throws IMSManifestException { + + Namespace nm = cpCore.getRootManifestElement().getNamespace(); + + Element rootElement = cpCore.getRootManifestElement(); + Element orgsElement = rootElement.getChild(CP_Core.ORGANIZATIONS, nm); + + // set up a list of all the peerreview + + // now get all the organizations and set up the new XML document, combining + // the organization and the peerreview. + Element defaultOrg = cpCore.getDefaultOrganization(orgsElement); + String defaultOrgIdentifier = null; + if ( defaultOrg != null ) + defaultOrgIdentifier = defaultOrg.getAttributeValue("identifier"); + + log.debug("cpCore default org id: "+defaultOrgIdentifier); + + Element newRootElement = new Element("organizations"); + setAttribute(newRootElement, "version", "imscp1"); + Document doc = new Document(newRootElement); + + Element[] orgs = cpCore.getOrganizationsAllowed(orgsElement); + Element initOrganizationElement =null; + for ( int i=0; i ratingCriterias; + + // advance + + private boolean lockWhenFinished; + + private boolean defineLater; + + private boolean contentInUse; + + // general infomation + private Date created; + + private Date updated; + + private PeerreviewUser createdBy; + + private int maximumRatesPerUser; + + private boolean showRatingsLeftForUser; + + private boolean reflectOnActivity; + + private String reflectInstructions; + + // ********************************************************** + // Function method for Peerreview + // ********************************************************** + public static Peerreview newInstance(Peerreview defaultContent, Long contentId) { + Peerreview toContent = new Peerreview(); + toContent = (Peerreview) defaultContent.clone(); + toContent.setContentId(contentId); + + // reset contentId + if (toContent.getRatingCriterias() != null) { + Set criterias = toContent.getRatingCriterias(); + for (LearnerItemRatingCriteria criteria : criterias) { + criteria.setToolContentId(contentId); + } + } + + return toContent; + } + + @Override + public Object clone() { + + Peerreview peerreview = null; + try { + peerreview = (Peerreview) super.clone(); + peerreview.setUid(null); + + // clone ReourceUser as well + if (createdBy != null) { + peerreview.setCreatedBy((PeerreviewUser) createdBy.clone()); + } + + // clone ratingCriterias as well + if (ratingCriterias != null) { + Set newCriterias = new HashSet(); + for (LearnerItemRatingCriteria criteria : (Set) ratingCriterias) { + LearnerItemRatingCriteria newCriteria = (LearnerItemRatingCriteria) criteria.clone(); + // just clone old file without duplicate it in repository + newCriterias.add(newCriteria); + } + peerreview.ratingCriterias = newCriterias; + } + + } catch (CloneNotSupportedException e) { + Peerreview.log.error("When clone " + Peerreview.class + " failed"); + } + + return peerreview; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Peerreview)) { + return false; + } + + final Peerreview genericEntity = (Peerreview) o; + + return new EqualsBuilder().append(uid, genericEntity.uid).append(title, genericEntity.title) + .append(instructions, genericEntity.instructions).append(created, genericEntity.created) + .append(updated, genericEntity.updated).append(createdBy, genericEntity.createdBy).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(uid).append(title).append(instructions).append(created).append(updated) + .append(createdBy).toHashCode(); + } + + /** + * Updates the modification data for this entity. + */ + public void updateModificationData() { + + long now = System.currentTimeMillis(); + if (created == null) { + this.setCreated(new Date(now)); + } + this.setUpdated(new Date(now)); + } + + // ********************************************************** + // get/set methods + // ********************************************************** + /** + * Returns the object's creation date + * + * @return date + */ + public Date getCreated() { + return created; + } + + /** + * Sets the object's creation date + * + * @param created + */ + public void setCreated(Date created) { + this.created = created; + } + + /** + * Returns the object's date of last update + * + * @return date updated + */ + public Date getUpdated() { + return updated; + } + + /** + * Sets the object's date of last update + * + * @param updated + */ + public void setUpdated(Date updated) { + this.updated = updated; + } + + /** + * @return Returns the userid of the user who created the Share peerreview. + * + */ + public PeerreviewUser getCreatedBy() { + return createdBy; + } + + /** + * @param createdBy + * The userid of the user who created this Share peerreview. + */ + public void setCreatedBy(PeerreviewUser createdBy) { + this.createdBy = createdBy; + } + + /** + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + /** + * @return Returns the title. + * + */ + public String getTitle() { + return title; + } + + /** + * @param title + * The title to set. + */ + public void setTitle(String title) { + this.title = title; + } + + /** + * @return Returns the lockWhenFinish. + * + */ + public boolean getLockWhenFinished() { + return lockWhenFinished; + } + + /** + * @param lockWhenFinished + * Set to true to lock the peerreview for finished users. + */ + public void setLockWhenFinished(boolean lockWhenFinished) { + this.lockWhenFinished = lockWhenFinished; + } + + /** + * @return Returns the instructions set by the teacher. + */ + public String getInstructions() { + return instructions; + } + + public void setInstructions(String instructions) { + this.instructions = instructions; + } + + /** + * @return + */ + public int getMaximumRates() { + return maximumRates; + } + + public void setMaximumRates(int maximumRate) { + this.maximumRates = maximumRate; + } + + /** + * @return + */ + public int getMinimumRates() { + return minimumRates; + } + + public void setMinimumRates(int minimumRates) { + this.minimumRates = minimumRates; + } + + /** + * + * @return + */ + public Set getRatingCriterias() { + return ratingCriterias; + } + + public void setRatingCriterias(Set ratingCriterias) { + this.ratingCriterias = ratingCriterias; + } + + /** + * @return + */ + public boolean isContentInUse() { + return contentInUse; + } + + public void setContentInUse(boolean contentInUse) { + this.contentInUse = contentInUse; + } + + /** + * @return + */ + public boolean isDefineLater() { + return defineLater; + } + + public void setDefineLater(boolean defineLater) { + this.defineLater = defineLater; + } + + /** + * @return + */ + public Long getContentId() { + return contentId; + } + + public void setContentId(Long contentId) { + this.contentId = contentId; + } + + /** + * @return + */ + public int getMaximumRatesPerUser() { + return maximumRatesPerUser; + } + + public void setMaximumRatesPerUser(int maximumRatesPerUser) { + this.maximumRatesPerUser = maximumRatesPerUser; + } + + /** + * @return + */ + public boolean isShowRatingsLeftForUser() { + return showRatingsLeftForUser; + } + + public void setShowRatingsLeftForUser(boolean showRatingsLeftForUser) { + this.showRatingsLeftForUser = showRatingsLeftForUser; + } + + /** + * @return + */ + public String getReflectInstructions() { + return reflectInstructions; + } + + public void setReflectInstructions(String reflectInstructions) { + this.reflectInstructions = reflectInstructions; + } + + /** + * @return + */ + public boolean isReflectOnActivity() { + return reflectOnActivity; + } + + public void setReflectOnActivity(boolean reflectOnActivity) { + this.reflectOnActivity = reflectOnActivity; + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/model/PeerreviewSession.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/model/PeerreviewSession.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/model/PeerreviewSession.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,145 @@ +/**************************************************************** + * 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.peerreview.model; + +import java.util.Date; +import java.util.Set; + +import org.apache.log4j.Logger; + +/** + * Peerreview Session + * + * @author Dapeng Ni + * + * @hibernate.class table="tl_laprev11_session" + * + */ +public class PeerreviewSession { + + private static Logger log = Logger.getLogger(PeerreviewSession.class); + + private Long uid; + private Long sessionId; + private String sessionName; + private Peerreview peerreview; + private Date sessionStartDate; + private Date sessionEndDate; + // finish or not + private int status; + + // ********************************************************** + // Get/Set methods + // ********************************************************** + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the learnerID. + */ + public Long getUid() { + return uid; + } + + public void setUid(Long uuid) { + this.uid = uuid; + } + + /** + * @hibernate.property column="session_end_date" + * @return + */ + public Date getSessionEndDate() { + return sessionEndDate; + } + + public void setSessionEndDate(Date sessionEndDate) { + this.sessionEndDate = sessionEndDate; + } + + /** + * @hibernate.property column="session_start_date" + * + * @return + */ + public Date getSessionStartDate() { + return sessionStartDate; + } + + public void setSessionStartDate(Date sessionStartDate) { + this.sessionStartDate = sessionStartDate; + } + + /** + * @hibernate.property + * @return + */ + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + /** + * @hibernate.many-to-one column="peerreview_uid" cascade="none" + * @return + */ + public Peerreview getPeerreview() { + return peerreview; + } + + public void setPeerreview(Peerreview peerreview) { + this.peerreview = peerreview; + } + + /** + * @hibernate.property column="session_id" + * @return + */ + public Long getSessionId() { + return sessionId; + } + + public void setSessionId(Long sessionId) { + this.sessionId = sessionId; + } + + /** + * @hibernate.property column="session_name" length="250" + * @return Returns the session name + */ + public String getSessionName() { + return sessionName; + } + + /** + * + * @param sessionName + * The session name to set. + */ + public void setSessionName(String sessionName) { + this.sessionName = sessionName; + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/model/PeerreviewUser.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/model/PeerreviewUser.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/model/PeerreviewUser.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,252 @@ +/**************************************************************** + * 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.peerreview.model; + +import java.util.Date; + +import org.apache.commons.lang.builder.EqualsBuilder; +import org.apache.commons.lang.builder.HashCodeBuilder; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; + +/** + * Peerreview User + * + * @author Dapeng Ni + * + * @hibernate.class table="tl_laprev11_user" + * + */ +public class PeerreviewUser implements Cloneable { + private static final long serialVersionUID = -7043502180037866257L; + private static Logger log = Logger.getLogger(PeerreviewUser.class); + + private Long uid; + private Long userId; + private String firstName; + private String lastName; + private String loginName; + private boolean sessionFinished; + + private PeerreviewSession session; + private Peerreview peerreview; + + // =============== NON Persisit value: for display use =========== + // the user access some reousrce item date time. Use in monitoring summary page + private Date accessDate; + // peerreview item complete date. Use in monitoring summary page + private Date completeDate; + // difference between completeDate and accessDate + private Date timeTaken; + + public PeerreviewUser() { + } + + public PeerreviewUser(UserDTO user, PeerreviewSession session) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = session; + this.peerreview = null; + this.sessionFinished = false; + } + + public PeerreviewUser(UserDTO user, Peerreview content) { + this.userId = new Long(user.getUserID().intValue()); + this.firstName = user.getFirstName(); + this.lastName = user.getLastName(); + this.loginName = user.getLogin(); + this.session = null; + this.peerreview = content; + this.sessionFinished = false; + } + + /** + * Clone method from java.lang.Object + */ + public Object clone() { + + PeerreviewUser user = null; + try { + user = (PeerreviewUser) super.clone(); + user.setUid(null); + // never clone session + user.setSession(null); + } catch (CloneNotSupportedException e) { + log.error("When clone " + PeerreviewUser.class + " failed"); + } + + return user; + } + + // ********************************************************** + // Get/Set methods + // ********************************************************** + /** + * @hibernate.id generator-class="native" type="java.lang.Long" column="uid" + * @return Returns the uid. + */ + public Long getUid() { + return uid; + } + + /** + * @param uid + * The uid to set. + */ + public void setUid(Long userID) { + this.uid = userID; + } + + /** + * @hibernate.property column="user_id" length="20" + * @return Returns the userId. + */ + public Long getUserId() { + return userId; + } + + /** + * @param userId + * The userId to set. + */ + public void setUserId(Long userID) { + this.userId = userID; + } + + /** + * @hibernate.property length="255" column="last_name" + * @return + */ + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * @hibernate.property length="255" column="first_name" + * @return + */ + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * @hibernate.property column="login_name" + * @return + */ + public String getLoginName() { + return loginName; + } + + public void setLoginName(String loginName) { + this.loginName = loginName; + } + + /** + * @hibernate.many-to-one column="session_uid" cascade="none" + * @return + */ + public PeerreviewSession getSession() { + return session; + } + + public void setSession(PeerreviewSession session) { + this.session = session; + } + + /** + * @hibernate.many-to-one column="peerreview_uid" cascade="none" + * @return + */ + public Peerreview getPeerreview() { + return peerreview; + } + + public void setPeerreview(Peerreview content) { + this.peerreview = content; + } + + /** + * @hibernate.property column="session_finished" + * @return + */ + public boolean isSessionFinished() { + return sessionFinished; + } + + public void setSessionFinished(boolean sessionFinished) { + this.sessionFinished = sessionFinished; + } + + public boolean equals(Object obj) { + if (this == obj) + return true; + if (!(obj instanceof PeerreviewUser)) + return false; + + final PeerreviewUser user = (PeerreviewUser) obj; + + return new EqualsBuilder().append(this.uid, user.uid).append(this.firstName, user.firstName) + .append(this.lastName, user.lastName).append(this.loginName, user.loginName).isEquals(); + + } + + public int hashCode() { + return new HashCodeBuilder().append(uid).append(firstName).append(lastName).append(loginName).toHashCode(); + } + + public Date getAccessDate() { + return accessDate; + } + + public void setAccessDate(Date accessDate) { + this.accessDate = accessDate; + } + + public Date getCompleteDate() { + return completeDate; + } + + public void setCompleteDate(Date completeDate) { + this.completeDate = completeDate; + } + + public Date getTimeTaken() { + return timeTaken; + } + + public void setTimeTaken(Date timeTaken) { + this.timeTaken = timeTaken; + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/peerreviewApplicationContext.xml =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/peerreviewApplicationContext.xml (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/peerreviewApplicationContext.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,96 @@ + + + + + + + + + org.lamsfoundation.lams.tool.peerreview.ApplicationResources + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,-java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + PROPAGATION_REQUIRED,+java.lang.Exception + + + + Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/IPeerreviewService.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/IPeerreviewService.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/IPeerreviewService.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,217 @@ +/**************************************************************** + * 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.peerreview.service; + +import java.util.List; + +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.rating.ToolRatingManager; +import org.lamsfoundation.lams.rating.dto.ItemRatingDTO; +import org.lamsfoundation.lams.tool.peerreview.dto.GroupSummary; +import org.lamsfoundation.lams.tool.peerreview.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; + +/** + * Interface that defines the contract that all Peerreview service provider must follow. + * + * @author Andrey Balan + */ +public interface IPeerreviewService extends ToolRatingManager { + + /** + * Get Peerreview by toolContentID. + * + * @param contentId + * @return + */ + Peerreview getPeerreviewByContentId(Long contentId); + + /** + * Get a cloned copy of tool default tool content (Peerreview) and assign the toolContentId of that copy as the + * given contentId + * + * @param contentId + * @return + * @throws PeerreviewApplicationException + */ + Peerreview getDefaultContent(Long contentId) throws PeerreviewApplicationException; + + // ********** for user methods ************* + /** + * Create a new user in database. + */ + void createUser(PeerreviewUser peerreviewUser); + + List getUsersBySession(Long toolSessionId); + + List getUsersByContent(Long toolContentId); + + /** + * Get user by given userID and toolContentID. + * + * @param long1 + * @return + */ + PeerreviewUser getUserByIDAndContent(Long userID, Long contentId); + + /** + * Get user by sessionID and UserID + * + * @param long1 + * @param sessionId + * @return + */ + PeerreviewUser getUserByIDAndSession(Long long1, Long sessionId); + + /** + * Save or update peerreview into database. + * + * @param Peerreview + */ + void saveOrUpdatePeerreview(Peerreview Peerreview); + + /** + * Get peerreview which is relative with the special toolSession. + * + * @param sessionId + * @return + */ + Peerreview getPeerreviewBySessionId(Long sessionId); + + /** + * Get peerreview toolSession by toolSessionId + * + * @param sessionId + * @return + */ + PeerreviewSession getPeerreviewSessionBySessionId(Long sessionId); + + /** + * Save or update peerreview session. + * + * @param resSession + */ + void saveOrUpdatePeerreviewSession(PeerreviewSession resSession); + + /** + * Sets user.setSessionFinished(true) + * + * @param toolSessionId + * @param userId + */ + void markUserFinished(Long toolSessionId, Long userId); + + /** + * If success return next activity's url, otherwise return null. + * + * @param toolSessionId + * @param userId + * @return + */ + String finishToolSession(Long toolSessionId, Long userId) throws PeerreviewApplicationException; + + /** + * Return monitoring summary list. The return value is list of peerreview summaries for each groups. + * + * @param contentId + * @return + */ + List getGroupSummaries(Long contentId); + + List getUsersForTablesorter(final Long qaSessionId, final Long excludeUserId, + int page, int size, int sorting); + + int getCountUsersBySession(final Long qaSessionId, final Long excludeUserId); + + /** + * Create refection entry into notebook tool. + * + * @param sessionId + * @param notebook_tool + * @param tool_signature + * @param userId + * @param entryText + */ + Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId, + String entryText); + + /** + * Get reflection entry from notebook tool. + * + * @param sessionId + * @param idType + * @param signature + * @param userID + * @return + */ + NotebookEntry getEntry(Long sessionId, Integer idType, String signature, Integer userID); + + /** + * @param notebookEntry + */ + void updateEntry(NotebookEntry notebookEntry); + + /** + * Get Reflect DTO list. + * + * @param contentId + * @return + */ + List getReflectList(Long contentId); + + /** + * Get user by UID + * + * @param uid + * @return + */ + PeerreviewUser getUser(Long uid); + + /** + * @param toolSessionId + * @return + */ + List fetchUsersFromLesson(Long toolSessionId); + + /** + * Returns whether activity is grouped and therefore it is expected more than one tool session. + * + * @param toolContentID + * @return + */ + boolean isGroupedActivity(long toolContentID); + + int getCommentsMinWordsLimit(Long toolContentId); + + /** + * Returns item DTO with all corresponding ratings and comments. Doesn't contain average and total amount of rates. + * + * @param contentId + * @param itemId + * @return + */ + ItemRatingDTO getRatingCriteriaDtoWithActualRatings(Long contentId, Long itemId); +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewApplicationException.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewApplicationException.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewApplicationException.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,48 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.peerreview.service; + +public class PeerreviewApplicationException extends Exception{ + + public PeerreviewApplicationException() { + super(); + + } + + public PeerreviewApplicationException(String message, Throwable cause) { + super(message, cause); + + } + + public PeerreviewApplicationException(String message) { + super(message); + + } + + public PeerreviewApplicationException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewImportContentVersionFilter.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewImportContentVersionFilter.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewImportContentVersionFilter.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,43 @@ +/**************************************************************** + * 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.peerreview.service; + +import org.lamsfoundation.lams.learningdesign.service.ToolContentVersionFilter; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; + +/** + * Import filter class for different version of Peerreview content. + */ +public class PeerreviewImportContentVersionFilter extends ToolContentVersionFilter { + + /** + * Import 20131128 version content to 20140102 version tool server. + */ + public void up20131128To20140102() { + this.removeField(Peerreview.class, "runOffline"); + this.removeField(Peerreview.class, "onlineInstructions"); + this.removeField(Peerreview.class, "offlineInstructions"); + this.removeField(Peerreview.class, "attachments"); + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewServiceImpl.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewServiceImpl.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewServiceImpl.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,732 @@ +/**************************************************************** + * 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.peerreview.service; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.Hashtable; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; +import java.util.SortedMap; +import java.util.TreeMap; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.log4j.Logger; +import org.apache.tomcat.util.json.JSONException; +import org.apache.tomcat.util.json.JSONObject; +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.CoreNotebookConstants; +import org.lamsfoundation.lams.notebook.service.ICoreNotebookService; +import org.lamsfoundation.lams.rating.dto.ItemRatingDTO; +import org.lamsfoundation.lams.rating.model.RatingCriteria; +import org.lamsfoundation.lams.rating.service.IRatingService; +import org.lamsfoundation.lams.rest.RestTags; +import org.lamsfoundation.lams.rest.ToolRestManager; +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.peerreview.PeerreviewConstants; +import org.lamsfoundation.lams.tool.peerreview.dao.PeerreviewDAO; +import org.lamsfoundation.lams.tool.peerreview.dao.PeerreviewSessionDAO; +import org.lamsfoundation.lams.tool.peerreview.dao.PeerreviewUserDAO; +import org.lamsfoundation.lams.tool.peerreview.dto.GroupSummary; +import org.lamsfoundation.lams.tool.peerreview.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; +import org.lamsfoundation.lams.tool.peerreview.util.PeerreviewToolContentHandler; +import org.lamsfoundation.lams.tool.service.ILamsToolService; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; +import org.lamsfoundation.lams.util.JsonUtil; +import org.lamsfoundation.lams.util.MessageService; + +/** + * @author Andrey Balan + */ +public class PeerreviewServiceImpl implements IPeerreviewService, ToolContentManager, ToolSessionManager, + ToolContentImport102Manager, ToolRestManager { + private static Logger log = Logger.getLogger(PeerreviewServiceImpl.class.getName()); + + private PeerreviewDAO peerreviewDao; + + private PeerreviewUserDAO peerreviewUserDao; + + private PeerreviewSessionDAO peerreviewSessionDao; + + // tool service + private PeerreviewToolContentHandler peerreviewToolContentHandler; + + private MessageService messageService; + + // system services + + private ILamsToolService toolService; + + private ILearnerService learnerService; + + private IUserManagementService userManagementService; + + private IExportToolContentService exportContentService; + + private ICoreNotebookService coreNotebookService; + + private IRatingService ratingService; + + // ******************************************************************************* + // Service method + // ******************************************************************************* + + @Override + public Peerreview getPeerreviewByContentId(Long contentId) { + Peerreview rs = peerreviewDao.getByContentId(contentId); + if (rs == null) { + PeerreviewServiceImpl.log.debug("Could not find the content by given ID:" + contentId); + } + return rs; + } + + @Override + public Peerreview getDefaultContent(Long contentId) throws PeerreviewApplicationException { + if (contentId == null) { + String error = messageService.getMessage("error.msg.default.content.not.find"); + PeerreviewServiceImpl.log.error(error); + throw new PeerreviewApplicationException(error); + } + + Peerreview defaultContent = getDefaultPeerreview(); + // save default content by given ID. + Peerreview content = new Peerreview(); + content = Peerreview.newInstance(defaultContent, contentId); + return content; + } + + @Override + public void createUser(PeerreviewUser peerreviewUser) { + peerreviewUserDao.saveObject(peerreviewUser); + } + + @Override + public PeerreviewUser getUserByIDAndContent(Long userId, Long contentId) { + return peerreviewUserDao.getUserByUserIDAndContentID(userId, contentId); + } + + @Override + public PeerreviewUser getUserByIDAndSession(Long userId, Long sessionId) { + return peerreviewUserDao.getUserByUserIDAndSessionID(userId, sessionId); + } + + @Override + public void saveOrUpdatePeerreview(Peerreview peerreview) { + peerreviewDao.saveObject(peerreview); + } + + @Override + public Peerreview getPeerreviewBySessionId(Long sessionId) { + PeerreviewSession session = peerreviewSessionDao.getSessionBySessionId(sessionId); + // to skip CGLib problem + Long contentId = session.getPeerreview().getContentId(); + Peerreview res = peerreviewDao.getByContentId(contentId); + return res; + } + + @Override + public PeerreviewSession getPeerreviewSessionBySessionId(Long sessionId) { + return peerreviewSessionDao.getSessionBySessionId(sessionId); + } + + @Override + public void saveOrUpdatePeerreviewSession(PeerreviewSession resSession) { + peerreviewSessionDao.saveObject(resSession); + } + + @Override + public void markUserFinished(Long toolSessionId, Long userId) { + PeerreviewUser user = peerreviewUserDao.getUserByUserIDAndSessionID(userId, toolSessionId); + user.setSessionFinished(true); + peerreviewUserDao.saveObject(user); + } + + @Override + public String finishToolSession(Long toolSessionId, Long userId) throws PeerreviewApplicationException { + markUserFinished(toolSessionId, userId); + + // PeerreviewSession session = peerreviewSessionDao.getSessionBySessionId(toolSessionId); + // session.setStatus(PeerreviewConstants.COMPLETED); + // peerreviewSessionDao.saveObject(session); + + String nextUrl = null; + try { + nextUrl = this.leaveToolSession(toolSessionId, userId); + } catch (DataMissingException e) { + throw new PeerreviewApplicationException(e); + } catch (ToolException e) { + throw new PeerreviewApplicationException(e); + } + return nextUrl; + } + + @Override + public List getGroupSummaries(Long contentId) { + List groupList = new ArrayList(); + + // get all sessions in a peerreview and retrieve all peerreview items under this session + // plus initial peerreview items by author creating (resItemList) + List sessionList = peerreviewSessionDao.getByContentId(contentId); + + for (PeerreviewSession session : sessionList) { + // one new group for one session. + GroupSummary group = new GroupSummary(); + group.setSessionId(session.getSessionId()); + group.setSessionName(session.getSessionName()); + + groupList.add(group); + } + + return groupList; + } + + @Override + public List getReflectList(Long contentId) { + List reflections = new LinkedList(); + + List sessionList = peerreviewSessionDao.getByContentId(contentId); + for (PeerreviewSession session : sessionList) { + Long sessionId = session.getSessionId(); + // get all users in this session + List users = peerreviewUserDao.getBySessionID(sessionId); + for (PeerreviewUser user : users) { + + NotebookEntry entry = getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, user.getUserId().intValue()); + if (entry != null) { + ReflectDTO ref = new ReflectDTO(user); + ref.setReflect(entry.getEntry()); + Date postedDate = (entry.getLastModified() != null) ? entry.getLastModified() : entry + .getCreateDate(); + ref.setDate(postedDate); + reflections.add(ref); + } + + } + + } + + return reflections; + } + + @Override + public List getUsersForTablesorter(final Long toolSessionId, final Long excludeUserId, + int page, int size, int sorting) { + return peerreviewUserDao.getUsersForTablesorter(toolSessionId, excludeUserId, page, size, sorting); + } + + @Override + public int getCountUsersBySession(final Long toolSessionId, final Long excludeUserId) { + return peerreviewUserDao.getCountUsersBySession(toolSessionId, excludeUserId); + } + + @Override + public Long createNotebookEntry(Long sessionId, Integer notebookToolType, String toolSignature, Integer userId, + String entryText) { + return coreNotebookService.createNotebookEntry(sessionId, notebookToolType, toolSignature, userId, "", + entryText); + } + + @Override + 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); + } + } + + @Override + public void updateEntry(NotebookEntry notebookEntry) { + coreNotebookService.updateEntry(notebookEntry); + } + + @Override + public PeerreviewUser getUser(Long uid) { + return (PeerreviewUser) peerreviewUserDao.getObject(PeerreviewUser.class, uid); + } + + @Override + public List getUsersBySession(Long toolSessionId) { + return peerreviewUserDao.getBySessionID(toolSessionId); + } + + @Override + public List getUsersByContent(Long toolContentId) { + return peerreviewUserDao.getByContentId(toolContentId); + } + + @Override + public List fetchUsersFromLesson(Long toolSessionId) { + //can we change lesson's class? + //boolean isGroupedActivity = isGroupedActivity(toolContentId); + + PeerreviewSession session = getPeerreviewSessionBySessionId(toolSessionId); + Set lessonUsers = toolService.getUsersFromGroupingActivity(toolSessionId); + List sessionUsers = peerreviewUserDao.getBySessionID(toolSessionId); + + //create all new users + for (User lessonUser: lessonUsers) { + + boolean isCorrespondingUserExist = false; + for (PeerreviewUser sessionUser: sessionUsers) { + if (lessonUser.getUserId().longValue() == sessionUser.getUserId().longValue()) { + isCorrespondingUserExist = true; + break; + } + } + + if (!isCorrespondingUserExist) { + PeerreviewUser newUser = new PeerreviewUser(lessonUser.getUserDTO(), session); + createUser(newUser); + } + + } + + return sessionUsers; + } + + // ***************************************************************************** + // private methods + // ***************************************************************************** + private Peerreview getDefaultPeerreview() throws PeerreviewApplicationException { + Long defaultPeerreviewId = getToolDefaultContentIdBySignature(PeerreviewConstants.TOOL_SIGNATURE); + Peerreview defaultPeerreview = getPeerreviewByContentId(defaultPeerreviewId); + if (defaultPeerreview == null) { + String error = messageService.getMessage("error.msg.default.content.not.find"); + PeerreviewServiceImpl.log.error(error); + throw new PeerreviewApplicationException(error); + } + + return defaultPeerreview; + } + + private Long getToolDefaultContentIdBySignature(String toolSignature) throws PeerreviewApplicationException { + Long contentId = null; + contentId = new Long(toolService.getToolDefaultContentIdBySignature(toolSignature)); + if (contentId == null) { + String error = messageService.getMessage("error.msg.default.content.not.find"); + PeerreviewServiceImpl.log.error(error); + throw new PeerreviewApplicationException(error); + } + return contentId; + } + + @Override + public boolean isGroupedActivity(long toolContentID) { + return toolService.isGroupedActivity(toolContentID); + } + + // ******************************************************************************* + // ToolContentManager, ToolSessionManager methods + // ******************************************************************************* + + @Override + public void exportToolContent(Long toolContentId, String rootPath) throws DataMissingException, ToolException { + Peerreview toolContentObj = peerreviewDao.getByContentId(toolContentId); + if (toolContentObj == null) { + try { + toolContentObj = getDefaultPeerreview(); + } catch (PeerreviewApplicationException e) { + throw new DataMissingException(e.getMessage()); + } + } + if (toolContentObj == null) { + throw new DataMissingException("Unable to find default content for the peerreview tool"); + } + + // set PeerreviewToolContentHandler as null to avoid copy file node in repository again. + toolContentObj = Peerreview.newInstance(toolContentObj, toolContentId); + try { + exportContentService.exportToolContent(toolContentId, toolContentObj, peerreviewToolContentHandler, + rootPath); + } catch (ExportToolContentException e) { + throw new ToolException(e); + } + } + + @Override + public void importToolContent(Long toolContentId, Integer newUserUid, String toolContentPath, String fromVersion, + String toVersion) throws ToolException { + + try { + // register version filter class + exportContentService.registerImportVersionFilterClass(PeerreviewImportContentVersionFilter.class); + + Object toolPOJO = exportContentService.importToolContent(toolContentPath, peerreviewToolContentHandler, + fromVersion, toVersion); + if (!(toolPOJO instanceof Peerreview)) { + throw new ImportToolContentException( + "Import Share peerreview tool content failed. Deserialized object is " + toolPOJO); + } + Peerreview toolContentObj = (Peerreview) toolPOJO; + + // reset it to new toolContentId + toolContentObj.setContentId(toolContentId); + PeerreviewUser user = peerreviewUserDao.getUserByUserIDAndContentID(new Long(newUserUid.longValue()), + toolContentId); + if (user == null) { + user = new PeerreviewUser(); + UserDTO sysUser = ((User) userManagementService.findById(User.class, newUserUid)).getUserDTO(); + user.setFirstName(sysUser.getFirstName()); + user.setLastName(sysUser.getLastName()); + user.setLoginName(sysUser.getLogin()); + user.setUserId(new Long(newUserUid.longValue())); + user.setPeerreview(toolContentObj); + } + toolContentObj.setCreatedBy(user); + + peerreviewDao.saveObject(toolContentObj); + } catch (ImportToolContentException e) { + throw new ToolException(e); + } + } + + @Override + public SortedMap getToolOutputDefinitions(Long toolContentId, int definitionType) + throws ToolException { + return new TreeMap(); + } + + @Override + public void copyToolContent(Long fromContentId, Long toContentId) throws ToolException { + if (toContentId == null) { + throw new ToolException("Failed to create the PeerreviewFiles tool seession"); + } + + Peerreview peerreview = null; + if (fromContentId != null) { + peerreview = peerreviewDao.getByContentId(fromContentId); + } + if (peerreview == null) { + try { + peerreview = getDefaultPeerreview(); + } catch (PeerreviewApplicationException e) { + throw new ToolException(e); + } + } + + Peerreview toContent = Peerreview.newInstance(peerreview, toContentId); + peerreviewDao.saveObject(toContent); + } + + @Override + public String getToolContentTitle(Long toolContentId) { + return getPeerreviewByContentId(toolContentId).getTitle(); + } + + @Override + public void resetDefineLater(Long toolContentId) throws DataMissingException, ToolException { + Peerreview peerreview = peerreviewDao.getByContentId(toolContentId); + if (peerreview == null) { + throw new ToolException("No found tool content by given content ID:" + toolContentId); + } + peerreview.setDefineLater(false); + } + + @Override + public boolean isContentEdited(Long toolContentId) { + return getPeerreviewByContentId(toolContentId).isDefineLater(); + } + + @Override + public void removeToolContent(Long toolContentId, boolean removeSessionData) throws SessionDataExistsException, + ToolException { + Peerreview peerreview = peerreviewDao.getByContentId(toolContentId); + if (removeSessionData) { + List list = peerreviewSessionDao.getByContentId(toolContentId); + Iterator iter = list.iterator(); + while (iter.hasNext()) { + PeerreviewSession session = (PeerreviewSession) iter.next(); + peerreviewSessionDao.delete(session); + } + } + peerreviewDao.delete(peerreview); + } + + @Override + @SuppressWarnings("unchecked") + public void removeLearnerContent(Long toolContentId, Integer userId) throws ToolException { + if (log.isDebugEnabled()) { + log.debug("Removing Peerreview content for user ID " + userId + " and toolContentId " + toolContentId); + } + + Peerreview peerreview = peerreviewDao.getByContentId(toolContentId); + if (peerreview == null) { + log.warn("Did not find activity with toolContentId: " + toolContentId + " to remove learner content"); + return; + } + + List sessions = peerreviewSessionDao.getByContentId(toolContentId); + for (PeerreviewSession session : sessions) { + PeerreviewUser user = peerreviewUserDao.getUserByUserIDAndSessionID(userId.longValue(), + session.getSessionId()); + if (user != null) { + NotebookEntry entry = getEntry(session.getSessionId(), CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, userId); + if (entry != null) { + peerreviewDao.removeObject(NotebookEntry.class, entry.getUid()); + } + + peerreviewUserDao.removeObject(PeerreviewUser.class, user.getUid()); + } + } + } + + @Override + public void createToolSession(Long toolSessionId, String toolSessionName, Long toolContentId) throws ToolException { + PeerreviewSession session = new PeerreviewSession(); + session.setSessionId(toolSessionId); + session.setSessionName(toolSessionName); + Peerreview peerreview = peerreviewDao.getByContentId(toolContentId); + session.setPeerreview(peerreview); + peerreviewSessionDao.saveObject(session); + } + + @Override + public String leaveToolSession(Long toolSessionId, Long learnerId) throws DataMissingException, ToolException { + if (toolSessionId == null) { + PeerreviewServiceImpl.log.error("Fail to leave tool Session based on null tool session id."); + throw new ToolException("Fail to remove tool Session based on null tool session id."); + } + if (learnerId == null) { + PeerreviewServiceImpl.log.error("Fail to leave tool Session based on null learner."); + throw new ToolException("Fail to remove tool Session based on null learner."); + } + + PeerreviewSession session = peerreviewSessionDao.getSessionBySessionId(toolSessionId); + if (session != null) { + session.setStatus(PeerreviewConstants.COMPLETED); + peerreviewSessionDao.saveObject(session); + } else { + PeerreviewServiceImpl.log.error("Fail to leave tool Session.Could not find peerreview " + + "session by given session id: " + toolSessionId); + throw new DataMissingException("Fail to leave tool Session." + + "Could not find peerreview session by given session id: " + toolSessionId); + } + return learnerService.completeToolSession(toolSessionId, learnerId); + } + + @Override + public List getRatingCriterias(Long toolContentId) { + return ratingService.getCriteriasByToolContentId(toolContentId); + } + + @Override + public void saveRatingCriterias(HttpServletRequest request, Collection oldCriterias, Long toolContentId) { + ratingService.saveRatingCriterias(request, oldCriterias, toolContentId); + } + + @Override + public boolean isCommentsEnabled(Long toolContentId) { + return ratingService.isCommentsEnabled(toolContentId); + } + + @Override + public int getCommentsMinWordsLimit(Long toolContentId) { + return ratingService.getCommentsMinWordsLimit(toolContentId); + } + + @Override + public List getRatingCriteriaDtos(Long contentId, Collection itemIds, boolean isCommentsByOtherUsersRequired, Long userId) { + return ratingService.getRatingCriteriaDtos(contentId, itemIds, isCommentsByOtherUsersRequired, userId); + } + + @Override + public ItemRatingDTO getRatingCriteriaDtoWithActualRatings(Long contentId, Long itemId) { + return ratingService.getRatingCriteriaDtoWithActualRatings(contentId, itemId); + } + + @Override + public int getCountItemsRatedByUser(Long toolContentId, Integer userId) { + return ratingService.getCountItemsRatedByUser(toolContentId, userId); + } + + @Override + public ToolSessionExportOutputData exportToolSession(Long toolSessionId) throws DataMissingException, ToolException { + return null; + } + + @Override + public ToolSessionExportOutputData exportToolSession(List toolSessionIds) throws DataMissingException, + ToolException { + return null; + } + + @Override + public void removeToolSession(Long toolSessionId) throws DataMissingException, ToolException { + peerreviewSessionDao.deleteBySessionId(toolSessionId); + } + + @Override + public SortedMap getToolOutput(List names, Long toolSessionId, Long learnerId) { + return new TreeMap(); + } + + @Override + public ToolOutput getToolOutput(String name, Long toolSessionId, Long learnerId) { + return null; + } + + @Override + public void forceCompleteUser(Long toolSessionId, User user) { + // no actions required + } + + /* ===============Methods implemented from ToolContentImport102Manager =============== */ + + @Override + public void import102ToolContent(Long toolContentId, UserDTO user, Hashtable importValues) { + } + + /** 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 { + + Peerreview toolContentObj = getPeerreviewByContentId(toolContentId); + if (toolContentObj == null) { + throw new DataMissingException("Unable to set reflective data titled " + title + + " on activity toolContentId " + toolContentId + " as the tool content does not exist."); + } + + toolContentObj.setReflectOnActivity(Boolean.TRUE); + toolContentObj.setReflectInstructions(description); + } + + public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) { + return null; + } + + // ***************************************************************************** + // set methods for Spring Bean + // ***************************************************************************** + + public void setLearnerService(ILearnerService learnerService) { + this.learnerService = learnerService; + } + + public void setMessageService(MessageService messageService) { + this.messageService = messageService; + } + + public void setPeerreviewDao(PeerreviewDAO peerreviewDao) { + this.peerreviewDao = peerreviewDao; + } + + public void setPeerreviewSessionDao(PeerreviewSessionDAO peerreviewSessionDao) { + this.peerreviewSessionDao = peerreviewSessionDao; + } + + public void setPeerreviewToolContentHandler(PeerreviewToolContentHandler peerreviewToolContentHandler) { + this.peerreviewToolContentHandler = peerreviewToolContentHandler; + } + + public void setPeerreviewUserDao(PeerreviewUserDAO peerreviewUserDao) { + this.peerreviewUserDao = peerreviewUserDao; + } + + public void setToolService(ILamsToolService toolService) { + this.toolService = toolService; + } + + public void setExportContentService(IExportToolContentService exportContentService) { + this.exportContentService = exportContentService; + } + + public void setUserManagementService(IUserManagementService userManagementService) { + this.userManagementService = userManagementService; + } + + public void setCoreNotebookService(ICoreNotebookService coreNotebookService) { + this.coreNotebookService = coreNotebookService; + } + + public void setRatingService(IRatingService ratingService) { + this.ratingService = ratingService; + } + + // ****************** REST methods ************************* + + /** + * Used by the Rest calls to create content. Mandatory fields in toolContentJSON: title, instructions, peerreview, + * user fields firstName, lastName and loginName Peerreview must contain a JSONArray of JSONObject objects, which + * have the following mandatory fields: title, description, type. If there are instructions for a peerreview, the + * instructions are a JSONArray of Strings. There should be at least one peerreview object in the peerreview array. + */ + @Override + public void createRestToolContent(Integer userID, Long toolContentID, JSONObject toolContentJSON) + throws JSONException { + + Date updateDate = new Date(); + + Peerreview peerreview = new Peerreview(); + peerreview.setContentId(toolContentID); + peerreview.setTitle(toolContentJSON.getString(RestTags.TITLE)); + peerreview.setInstructions(toolContentJSON.getString(RestTags.INSTRUCTIONS)); + peerreview.setCreated(updateDate); + + peerreview.setLockWhenFinished(JsonUtil.opt(toolContentJSON, RestTags.LOCK_WHEN_FINISHED, Boolean.FALSE)); + peerreview.setReflectOnActivity(JsonUtil.opt(toolContentJSON, RestTags.REFLECT_ON_ACTIVITY, Boolean.FALSE)); + peerreview.setReflectInstructions(JsonUtil.opt(toolContentJSON, RestTags.REFLECT_INSTRUCTIONS, (String) null)); + + peerreview.setContentInUse(false); + peerreview.setDefineLater(false); + + PeerreviewUser peerreviewUser = getUserByIDAndContent(userID.longValue(), toolContentID); + if (peerreviewUser == null) { + peerreviewUser = new PeerreviewUser(); + peerreviewUser.setFirstName(toolContentJSON.getString("firstName")); + peerreviewUser.setLastName(toolContentJSON.getString("lastName")); + peerreviewUser.setLoginName(toolContentJSON.getString("loginName")); + // peerreviewUser.setPeerreview(content); + } + + peerreview.setCreatedBy(peerreviewUser); + + saveOrUpdatePeerreview(peerreview); + + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewServiceProxy.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewServiceProxy.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/PeerreviewServiceProxy.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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 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.peerreview.service; + +import javax.servlet.ServletContext; + +import org.lamsfoundation.lams.tool.ToolContentManager; +import org.lamsfoundation.lams.tool.ToolSessionManager; +import org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + *

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

+ * + * @author Andrey Balan + */ +public class PeerreviewServiceProxy { + /** + * Return the domain service object. 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 Peerreview service object. + */ + public static final IPeerreviewService getPeerreviewService(ServletContext servletContext) { + return (IPeerreviewService) getPeerreviewDomainService(servletContext); + } + + public static final ToolSessionManager getSessionManager(ServletContext servletContext) { + return (ToolSessionManager) getPeerreviewDomainService(servletContext); + } + + public static final ToolContentManager getContentManager(ServletContext servletContext) { + return (ToolContentManager) getPeerreviewDomainService(servletContext); + } + + private static Object getPeerreviewDomainService(ServletContext servletContext) { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext); + return wac.getBean(PeerreviewConstants.PEERREVIEW_SERVICE); + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/UploadPeerreviewFileException.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/UploadPeerreviewFileException.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/service/UploadPeerreviewFileException.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,48 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.peerreview.service; + +public class UploadPeerreviewFileException extends Exception{ + + public UploadPeerreviewFileException() { + super(); + + } + + public UploadPeerreviewFileException(String message, Throwable cause) { + super(message, cause); + + } + + public UploadPeerreviewFileException(String message) { + super(message); + + } + + public UploadPeerreviewFileException(Throwable cause) { + super(cause); + + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/util/PeerreviewToolContentHandler.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/util/PeerreviewToolContentHandler.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/util/PeerreviewToolContentHandler.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,68 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License 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.peerreview.util; + +import org.lamsfoundation.lams.contentrepository.client.ToolContentHandler; + +/** + * Simple client for accessing the content repository. + * + * @author Fiona Malikoff + */ +public class PeerreviewToolContentHandler extends ToolContentHandler { + + private static String repositoryWorkspaceName = "peerreviewworkspace"; + private static String repositoryUser = "peerreview"; + //peerreview + private static char[] repositoryId = {'l','a','m','s','-','p','e','e','r','r','e','v','i','e','w'}; + + /** + * + */ + public PeerreviewToolContentHandler() { + 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_preview/src/java/org/lamsfoundation/lams/tool/peerreview/util/ReflectDTOComparator.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/util/ReflectDTOComparator.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/util/ReflectDTOComparator.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,38 @@ +/**************************************************************** + * 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 + * **************************************************************** + */ +package org.lamsfoundation.lams.tool.peerreview.util; + +import java.util.Comparator; + +import org.lamsfoundation.lams.tool.peerreview.dto.ReflectDTO; + +public class ReflectDTOComparator implements Comparator { + public int compare(ReflectDTO o1, ReflectDTO o2) { + if (o1 != null && o2 != null) { + return o1.getFullName().compareTo(o2.getFullName()); + } else if (o1 != null) + return 1; + else + return -1; + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/AuthoringAction.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/AuthoringAction.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/AuthoringAction.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,321 @@ +/**************************************************************** + * 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.peerreview.web.action; + +import java.sql.Timestamp; +import java.util.Date; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionMessages; +import org.lamsfoundation.lams.authoring.web.AuthoringConstants; +import org.lamsfoundation.lams.rating.model.RatingCriteria; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; +import org.lamsfoundation.lams.tool.peerreview.service.IPeerreviewService; +import org.lamsfoundation.lams.tool.peerreview.web.form.PeerreviewForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + * @author Steve.Ni + */ +public class AuthoringAction extends Action { + + private static Logger log = Logger.getLogger(AuthoringAction.class); + + @Override + public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { + + String param = mapping.getParameter(); + // -----------------------Peerreview Author function + // --------------------------- + if (param.equals("start")) { + ToolAccessMode mode = getAccessMode(request); + // teacher mode "check for new" button enter. + if (mode != null) { + request.setAttribute(AttributeNames.ATTR_MODE, mode.toString()); + } else { + request.setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.AUTHOR.toString()); + } + return start(mapping, form, request, response); + } + if (param.equals("definelater")) { + // update define later flag to true + Long contentId = new Long(WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID)); + IPeerreviewService service = getPeerreviewService(); + Peerreview peerreview = service.getPeerreviewByContentId(contentId); + + peerreview.setDefineLater(true); + service.saveOrUpdatePeerreview(peerreview); + + request.setAttribute(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER.toString()); + return start(mapping, form, request, response); + } + if (param.equals("initPage")) { + return initPage(mapping, form, request, response); + } + if (param.equals("updateContent")) { + return updateContent(mapping, form, request, response); + } + + return mapping.findForward(PeerreviewConstants.ERROR); + } + + /** + * Read peerreview data from database and put them into HttpSession. It will + * redirect to init.do directly after this method run successfully. + * + * This method will avoid read database again and lost un-saved resouce item + * lost when user "refresh page", + * + * @throws ServletException + * + */ + private ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { + + // save toolContentID into HTTPSession + Long contentId = new Long(WebUtil.readLongParam(request, PeerreviewConstants.PARAM_TOOL_CONTENT_ID)); + + // get back the peerreview and item list and display them on page + IPeerreviewService service = getPeerreviewService(); + + Peerreview peerreview = null; + PeerreviewForm peerreviewForm = (PeerreviewForm) form; + + // Get contentFolderID and save to form. + String contentFolderID = WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID); + peerreviewForm.setContentFolderID(contentFolderID); + + // initial Session Map + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + peerreviewForm.setSessionMapID(sessionMap.getSessionID()); + + try { + peerreview = service.getPeerreviewByContentId(contentId); + // if peerreview does not exist, try to use default content instead. + if (peerreview == null) { + peerreview = service.getDefaultContent(contentId); + } + + peerreviewForm.setPeerreview(peerreview); + } catch (Exception e) { + AuthoringAction.log.error(e); + throw new ServletException(e); + } + + // get rating criterias from DB + List ratingCriterias = service.getRatingCriterias(contentId); + sessionMap.put(AttributeNames.ATTR_RATING_CRITERIAS, ratingCriterias); + + sessionMap.put(PeerreviewConstants.ATTR_PEERREVIEW_FORM, peerreviewForm); + request.getSession().setAttribute(AttributeNames.PARAM_NOTIFY_CLOSE_URL, + request.getParameter(AttributeNames.PARAM_NOTIFY_CLOSE_URL)); + return mapping.findForward(PeerreviewConstants.SUCCESS); + } + + /** + * Display same entire authoring page content from HttpSession variable. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws ServletException + */ + private ActionForward initPage(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException { + String sessionMapID = WebUtil.readStrParam(request, PeerreviewConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(sessionMapID); + PeerreviewForm existForm = (PeerreviewForm) sessionMap.get(PeerreviewConstants.ATTR_PEERREVIEW_FORM); + + PeerreviewForm peerreviewForm = (PeerreviewForm) form; + try { + PropertyUtils.copyProperties(peerreviewForm, existForm); + } catch (Exception e) { + throw new ServletException(e); + } + + ToolAccessMode mode = getAccessMode(request); + if (mode.isAuthor()) { + return mapping.findForward(PeerreviewConstants.SUCCESS); + } else { + return mapping.findForward(PeerreviewConstants.DEFINE_LATER); + } + } + + /** + * This method will persist all inforamtion in this authoring page, include + * all peerreview item, information etc. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + * @throws ServletException + */ + private ActionForward updateContent(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { + PeerreviewForm peerreviewForm = (PeerreviewForm) form; + + // get back sessionMAP + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute(peerreviewForm.getSessionMapID()); + + ToolAccessMode mode = getAccessMode(request); + + ActionMessages errors = validate(peerreviewForm, mapping, request); + if (!errors.isEmpty()) { + saveErrors(request, errors); + if (mode.isAuthor()) { + return mapping.findForward("author"); + } else { + return mapping.findForward("monitor"); + } + } + + Peerreview peerreview = peerreviewForm.getPeerreview(); + IPeerreviewService service = getPeerreviewService(); + + // **********************************Get Peerreview + // PO********************* + Peerreview peerreviewPO = service.getPeerreviewByContentId(peerreviewForm.getPeerreview().getContentId()); + if (peerreviewPO == null) { + // new Peerreview, create it. + peerreviewPO = peerreview; + peerreviewPO.setCreated(new Timestamp(new Date().getTime())); + peerreviewPO.setUpdated(new Timestamp(new Date().getTime())); + } else { + if (mode.isAuthor()) { + Long uid = peerreviewPO.getUid(); + PropertyUtils.copyProperties(peerreviewPO, peerreview); + // get back UID + peerreviewPO.setUid(uid); + } else { // if it is Teacher, then just update basic tab content + // (definelater) + peerreviewPO.setInstructions(peerreview.getInstructions()); + peerreviewPO.setTitle(peerreview.getTitle()); + // change define later status + peerreviewPO.setDefineLater(false); + } + peerreviewPO.setUpdated(new Timestamp(new Date().getTime())); + } + + // *******************************Handle user******************* + // try to get form system session + HttpSession ss = SessionManager.getSession(); + // get back login user DTO + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + PeerreviewUser peerreviewUser = service.getUserByIDAndContent(new Long(user.getUserID().intValue()), peerreviewForm.getPeerreview().getContentId()); + if (peerreviewUser == null) { + peerreviewUser = new PeerreviewUser(user, peerreviewPO); + } + + peerreviewPO.setCreatedBy(peerreviewUser); + + // finally persist peerreviewPO + service.saveOrUpdatePeerreview(peerreviewPO); + + // ************************* Handle rating criterias ******************* + Long contentId = peerreview.getContentId(); + List oldCriterias = (List) sessionMap.get(AttributeNames.ATTR_RATING_CRITERIAS); + service.saveRatingCriterias(request, oldCriterias, contentId); + + peerreviewForm.setPeerreview(peerreviewPO); + + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG, Boolean.TRUE); + if (mode.isAuthor()) { + return mapping.findForward("author"); + } else { + return mapping.findForward("monitor"); + } + } + + // ************************************************************************************* + // Private method + // ************************************************************************************* + /** + * Return PeerreviewService bean. + */ + private IPeerreviewService getPeerreviewService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet().getServletContext()); + return (IPeerreviewService) wac.getBean(PeerreviewConstants.PEERREVIEW_SERVICE); + } + + /** + * 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; + } + + private ActionMessages validate(PeerreviewForm peerreviewForm, ActionMapping mapping, HttpServletRequest request) { + ActionMessages errors = new ActionMessages(); + // if (StringUtils.isBlank(peerreviewForm.getPeerreview().getTitle())) { + // ActionMessage error = new + // ActionMessage("error.resource.item.title.blank"); + // errors.add(ActionMessages.GLOBAL_MESSAGE, error); + // } + + // define it later mode(TEACHER) skip below validation. + String modeStr = request.getParameter(AttributeNames.ATTR_MODE); + if (StringUtils.equals(modeStr, ToolAccessMode.TEACHER.toString())) { + return errors; + } + + // Some other validation outside basic Tab. + + return errors; + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/ClearSessionAction.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/ClearSessionAction.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/ClearSessionAction.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,46 @@ +/**************************************************************** + * 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.peerreview.web.action; + +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 + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(String customiseSessionID, HttpSession session, ToolAccessMode mode) { + if (mode.isAuthor()) { + session.removeAttribute(customiseSessionID); + } + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/LearningAction.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/LearningAction.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/LearningAction.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,552 @@ +/**************************************************************** + * 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.peerreview.web.action; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionRedirect; +import org.apache.tomcat.util.json.JSONArray; +import org.apache.tomcat.util.json.JSONException; +import org.apache.tomcat.util.json.JSONObject; +import org.lamsfoundation.lams.learning.web.bean.ActivityPositionDTO; +import org.lamsfoundation.lams.learning.web.util.LearningWebUtil; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.rating.dto.ItemRatingCriteriaDTO; +import org.lamsfoundation.lams.rating.dto.ItemRatingDTO; +import org.lamsfoundation.lams.rating.dto.RatingCommentDTO; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; +import org.lamsfoundation.lams.tool.peerreview.service.IPeerreviewService; +import org.lamsfoundation.lams.tool.peerreview.service.PeerreviewApplicationException; +import org.lamsfoundation.lams.tool.peerreview.web.form.ReflectionForm; +import org.lamsfoundation.lams.usermanagement.dto.UserDTO; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.session.SessionManager; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + * @author Steve.Ni + */ +public class LearningAction extends Action { + + private static Logger log = Logger.getLogger(LearningAction.class); + + @Override + public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException, JSONException { + + String param = mapping.getParameter(); + // -----------------------Peerreview Learner function --------------------------- + if (param.equals("start")) { + return start(mapping, form, request, response); + } + if (param.equals("getUsers")) { + return getUsers(mapping, form, request, response); + } + if (param.equals("showResults")) { + return showResults(mapping, form, request, response); + } + if (param.equals("finish")) { + return finish(mapping, form, request, response); + } + + // ================ Reflection ======================= + if (param.equals("newReflection")) { + return newReflection(mapping, form, request, response); + } + if (param.equals("submitReflection")) { + return submitReflection(mapping, form, request, response); + } + + return mapping.findForward(PeerreviewConstants.ERROR); + } + + /** + * Read peerreview data from database and put them into HttpSession. It will redirect to init.do directly after this + * method run successfully. + * + * This method will avoid read database again and lost un-saved resouce item lost when user "refresh page", + * + */ + private ActionForward start(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + IPeerreviewService service = getPeerreviewService(); + + // initial Session Map + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + + // save toolContentID into HTTPSession + ToolAccessMode mode = WebUtil.readToolAccessModeParam(request, AttributeNames.PARAM_MODE, true); + + Long sessionId = new Long(request.getParameter(AttributeNames.PARAM_TOOL_SESSION_ID)); + + request.setAttribute(PeerreviewConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); + request.setAttribute(AttributeNames.ATTR_MODE, mode); + request.setAttribute(PeerreviewConstants.PARAM_TOOL_SESSION_ID, sessionId); + + // create user if needed + PeerreviewUser user = null; + if (mode != null && mode.isTeacher()) { + // monitoring mode - user is specified in URL + // peerreviewUser may be null if the user was force completed. + user = getSpecifiedUser(service, sessionId, + WebUtil.readIntParam(request, AttributeNames.PARAM_USER_ID, false)); + } else { + user = getCurrentUser(service, sessionId); + } + Long userId = user.getUserId(); + + Peerreview peerreview = service.getPeerreviewBySessionId(sessionId); + + // get notebook entry + String entryText = new String(); + NotebookEntry notebookEntry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, user.getUserId().intValue()); + if (notebookEntry != null) { + entryText = notebookEntry.getEntry(); + } + + // basic information + sessionMap.put(PeerreviewConstants.ATTR_PEERREVIEW, peerreview); + sessionMap.put(PeerreviewConstants.ATTR_TITLE, peerreview.getTitle()); + sessionMap.put(PeerreviewConstants.ATTR_RESOURCE_INSTRUCTION, peerreview.getInstructions()); + sessionMap.put(PeerreviewConstants.ATTR_LOCK_ON_FINISH, peerreview.getLockWhenFinished()); + sessionMap.put(PeerreviewConstants.ATTR_USER, user); + + sessionMap.put(PeerreviewConstants.PARAM_TOOL_SESSION_ID, sessionId); + sessionMap.put(AttributeNames.ATTR_MODE, mode); + // reflection information + sessionMap.put(PeerreviewConstants.ATTR_REFLECTION_ON, peerreview.isReflectOnActivity()); + sessionMap.put(PeerreviewConstants.ATTR_REFLECTION_INSTRUCTION, peerreview.getReflectInstructions()); + sessionMap.put(PeerreviewConstants.ATTR_REFLECTION_ENTRY, entryText); + + // add define later support + if (peerreview.isDefineLater()) { + return mapping.findForward("defineLater"); + } + + // handle rating criterias + service.fetchUsersFromLesson(sessionId); + + boolean isCommentsEnabled = service.isCommentsEnabled(peerreview.getContentId()); + sessionMap.put("isCommentsEnabled", isCommentsEnabled); + + int commentsMinWordsLimit = service.getCommentsMinWordsLimit(peerreview.getContentId()); + sessionMap.put("commentsMinWordsLimit", commentsMinWordsLimit); + + // store how many items are rated + int countRatedUsers = service.getCountItemsRatedByUser(peerreview.getContentId(), userId.intValue()); + sessionMap.put(AttributeNames.ATTR_COUNT_RATED_ITEMS, countRatedUsers); + + // set contentInUse flag to true! + peerreview.setContentInUse(true); + peerreview.setDefineLater(false); + service.saveOrUpdatePeerreview(peerreview); + + ActivityPositionDTO activityPosition = LearningWebUtil.putActivityPositionInRequestByToolSessionId(sessionId, + request, getServlet().getServletContext()); + sessionMap.put(AttributeNames.ATTR_ACTIVITY_POSITION, activityPosition); + + //markUser as not Finished if it's redo + boolean isRedo = WebUtil.readBooleanParam(request, "isRedo", false); + if (!mode.isTeacher() && !peerreview.getLockWhenFinished() && isRedo && user.isSessionFinished()) { + user.setSessionFinished(false); + service.createUser(user); + } + sessionMap.put("isDisabled", peerreview.getLockWhenFinished() && user.isSessionFinished() || (mode != null) + && mode.isTeacher()); + sessionMap.put(PeerreviewConstants.ATTR_USER_FINISHED, user.isSessionFinished()); + + // show results page + if (user.isSessionFinished() && peerreview.isShowRatingsLeftForUser()) { + + ActionRedirect redirect = new ActionRedirect(mapping.findForwardConfig("showResults")); + redirect.addParameter(PeerreviewConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); + return redirect; + + } else { + return mapping.findForward(PeerreviewConstants.SUCCESS); + } + + } + + /** + * Displays page with user's ratings left for others and ratings others left for him. + */ + private ActionForward showResults(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + IPeerreviewService service = getPeerreviewService(); + + // get back SessionMap + String sessionMapID = request.getParameter(PeerreviewConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute( + sessionMapID); + request.setAttribute(PeerreviewConstants.ATTR_SESSION_MAP_ID, sessionMapID); + + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); + Long sessionId = (Long) sessionMap.get(PeerreviewConstants.PARAM_TOOL_SESSION_ID); + Peerreview peerreview = (Peerreview) sessionMap.get(PeerreviewConstants.ATTR_PEERREVIEW); + PeerreviewUser user = (PeerreviewUser) sessionMap.get(PeerreviewConstants.ATTR_USER); + + //markUserFinished if it hasn't been done previously + if (!mode.isTeacher() && !user.isSessionFinished()) { + service.markUserFinished(sessionId, user.getUserId()); + } + + // ratings left by the user + List itemIds = new LinkedList(); + List sessionUsers = service.getUsersBySession(sessionId); + for (PeerreviewUser userIter : sessionUsers) { + //excempt user himself + if (!user.getUserId().equals(userIter.getUserId())) { + itemIds.add(userIter.getUserId()); + } + } + + //filter out not rated by user + List itemRatingDtos = service.getRatingCriteriaDtos(peerreview.getContentId(), itemIds, false, + user.getUserId()); + List ratedByUser = new ArrayList(); + for (ItemRatingDTO itemRatingDto: itemRatingDtos) { + boolean isRatedByUser = itemRatingDto.getCommentPostedByUser() != null; + + for (ItemRatingCriteriaDTO criteriaDto: itemRatingDto.getCriteriaDtos()) { + if (StringUtils.isNotBlank(criteriaDto.getUserRating())) { + isRatedByUser = true; + } + } + + if (isRatedByUser) { + ratedByUser.add(itemRatingDto); + } + } + request.setAttribute("itemRatingDtos", ratedByUser); + + // ratings left by others for this user + List userIdList = Collections.singletonList(user.getUserId()); + List userRatingDtos = service.getRatingCriteriaDtos(peerreview.getContentId(), userIdList, true, + user.getUserId()); + ItemRatingDTO userRatingDto = null; + if (userRatingDtos.size() == 1) { + userRatingDto = userRatingDtos.get(0); + } + request.setAttribute("itemRatingDto", userRatingDto); + + //user name map + HashMap userNameMap = new HashMap(); + for (PeerreviewUser userIter : sessionUsers) { + userNameMap.put(userIter.getUserId(), userIter.getFirstName() + " " + userIter.getLastName()); + } + request.setAttribute("userNameMap", userNameMap); + + // check whether finish lock is enabled + sessionMap.put(PeerreviewConstants.ATTR_FINISH_LOCK, peerreview.getLockWhenFinished()); + + // store how many items are rated + int countRatedUsers = service.getCountItemsRatedByUser(peerreview.getContentId(), user.getUserId().intValue()); + sessionMap.put(AttributeNames.ATTR_COUNT_RATED_ITEMS, countRatedUsers); + + return mapping.findForward(PeerreviewConstants.SUCCESS); + } + + /** + * Refreshes user list. + */ + public ActionForward getUsers(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse res) throws IOException, ServletException, JSONException { + IPeerreviewService service = getPeerreviewService(); + + Long toolContentId = WebUtil.readLongParam(request, "toolContentId"); + Long toolSessionId = WebUtil.readLongParam(request, "toolSessionId"); + + // in case of monitoring we show all results. in case of learning - don't show results from the current user + boolean isMonitoring = WebUtil.readBooleanParam(request, "isMonitoring", false); + Long userId = isMonitoring ? -1 : WebUtil.readLongParam(request, "userId"); + + // paging parameters of tablesorter + int size = WebUtil.readIntParam(request, "size"); + int page = WebUtil.readIntParam(request, "page"); + Integer isSort1 = WebUtil.readIntParam(request, "column[0]", true); + + int sorting = PeerreviewConstants.SORT_BY_NO; + if (isSort1 != null && isSort1.equals(0)) { + sorting = PeerreviewConstants.SORT_BY_USERNAME_ASC; + } else if (isSort1 != null && isSort1.equals(1)) { + sorting = PeerreviewConstants.SORT_BY_USERNAME_DESC; + } + + List users = service.getUsersForTablesorter(toolSessionId, userId, page, size, sorting); + + JSONObject responcedata = new JSONObject(); + JSONArray rows = new JSONArray(); + + responcedata.put("total_rows", service.getCountUsersBySession(toolSessionId, userId)); + + // handle rating criterias + List itemRatingDtos = null; + if (!users.isEmpty()) { + // create itemIds list + List itemIds = new LinkedList(); + for (PeerreviewUser user : users) { + itemIds.add(user.getUserId()); + } + + // all comments required only for monitoring + boolean isCommentsByOtherUsersRequired = isMonitoring; + itemRatingDtos = service.getRatingCriteriaDtos(toolContentId, itemIds, isCommentsByOtherUsersRequired, + userId); + + // store how many items are rated + int countRatedQuestions = service.getCountItemsRatedByUser(toolContentId, userId.intValue()); + responcedata.put(AttributeNames.ATTR_COUNT_RATED_ITEMS, countRatedQuestions); + } + + for (PeerreviewUser user : users) { + + JSONObject userRow = new JSONObject(); + userRow.put("userId", user.getUserId().toString()); + userRow.put("userName", StringEscapeUtils.escapeCsv(user.getFirstName() + " " + user.getLastName())); + + // find corresponding itemRatingDto + ItemRatingDTO itemRatingDto = null; + for (ItemRatingDTO itemRatingDtoIter : itemRatingDtos) { + if (user.getUserId().equals(itemRatingDtoIter.getItemId())) { + itemRatingDto = itemRatingDtoIter; + break; + } + } + + JSONArray criteriasRows = new JSONArray(); + for (ItemRatingCriteriaDTO criteriaDto : itemRatingDto.getCriteriaDtos()) { + JSONObject criteriasRow = new JSONObject(); + criteriasRow.put("ratingCriteriaId", criteriaDto.getRatingCriteria().getRatingCriteriaId()); + criteriasRow.put("title", criteriaDto.getRatingCriteria().getTitle()); + criteriasRow.put("averageRating", criteriaDto.getAverageRating()); + criteriasRow.put("numberOfVotes", criteriaDto.getNumberOfVotes()); + criteriasRow.put("userRating", criteriaDto.getUserRating()); + + criteriasRows.put(criteriasRow); + } + userRow.put("criteriaDtos", criteriasRows); + + // handle comments + userRow.put("commentsCriteriaId", itemRatingDto.getCommentsCriteriaId()); + String commentPostedByUser = itemRatingDto.getCommentPostedByUser() == null ? "" : itemRatingDto + .getCommentPostedByUser().getComment(); + userRow.put("commentPostedByUser", commentPostedByUser); + if (itemRatingDto.getCommentDtos() != null) { + JSONArray comments = new JSONArray(); + for (RatingCommentDTO commentDto : itemRatingDto.getCommentDtos()) { + comments.put(StringEscapeUtils.escapeCsv(commentDto.getComment())); + } + userRow.put("comments", comments); + } + + rows.put(userRow); + } + responcedata.put("rows", rows); + + res.setContentType("application/json;charset=utf-8"); + res.getWriter().print(new String(responcedata.toString())); + return null; + } + + /** + * Finish learning session. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward finish(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // get back SessionMap + String sessionMapID = request.getParameter(PeerreviewConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute( + sessionMapID); + + // get mode and ToolSessionID from sessionMAP + ToolAccessMode mode = (ToolAccessMode) sessionMap.get(AttributeNames.ATTR_MODE); + Long sessionId = (Long) sessionMap.get(PeerreviewConstants.PARAM_TOOL_SESSION_ID); + + IPeerreviewService service = getPeerreviewService(); + // get sessionId from HttpServletRequest + String nextActivityUrl = null; + try { + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + Long userID = new Long(user.getUserID().longValue()); + + nextActivityUrl = service.finishToolSession(sessionId, userID); + request.setAttribute(PeerreviewConstants.ATTR_NEXT_ACTIVITY_URL, nextActivityUrl); + } catch (PeerreviewApplicationException e) { + LearningAction.log.error("Failed get next activity url:" + e.getMessage()); + } + + return mapping.findForward(PeerreviewConstants.SUCCESS); + } + + /** + * Display empty reflection form. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward newReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + // get session value + String sessionMapID = WebUtil.readStrParam(request, PeerreviewConstants.ATTR_SESSION_MAP_ID); + + ReflectionForm refForm = (ReflectionForm) form; + HttpSession ss = SessionManager.getSession(); + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + + refForm.setUserID(user.getUserID()); + refForm.setSessionMapID(sessionMapID); + + // get the existing reflection entry + IPeerreviewService submitFilesService = getPeerreviewService(); + + SessionMap map = (SessionMap) request.getSession().getAttribute(sessionMapID); + Long toolSessionID = (Long) map.get(PeerreviewConstants.PARAM_TOOL_SESSION_ID); + NotebookEntry entry = submitFilesService.getEntry(toolSessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, user.getUserID()); + + if (entry != null) { + refForm.setEntryText(entry.getEntry()); + } + + return mapping.findForward(PeerreviewConstants.SUCCESS); + } + + /** + * Submit reflection form input database. + * + * @param mapping + * @param form + * @param request + * @param response + * @return + */ + private ActionForward submitReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + ReflectionForm refForm = (ReflectionForm) form; + Integer userId = refForm.getUserID(); + + String sessionMapID = WebUtil.readStrParam(request, PeerreviewConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute( + sessionMapID); + Long sessionId = (Long) sessionMap.get(PeerreviewConstants.PARAM_TOOL_SESSION_ID); + + IPeerreviewService service = getPeerreviewService(); + + // check for existing notebook entry + NotebookEntry entry = service.getEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, userId); + + if (entry == null) { + // create new entry + service.createNotebookEntry(sessionId, CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, userId, refForm.getEntryText()); + } else { + // update existing entry + entry.setEntry(refForm.getEntryText()); + entry.setLastModified(new Date()); + service.updateEntry(entry); + } + + return finish(mapping, form, request, response); + } + + // ************************************************************************************* + // Private method + // ************************************************************************************* + + private IPeerreviewService getPeerreviewService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() + .getServletContext()); + return (IPeerreviewService) wac.getBean(PeerreviewConstants.PEERREVIEW_SERVICE); + } + + private PeerreviewUser getCurrentUser(IPeerreviewService service, Long sessionId) { + // try to get form system session + HttpSession ss = SessionManager.getSession(); + // get back login user DTO + UserDTO user = (UserDTO) ss.getAttribute(AttributeNames.USER); + PeerreviewUser peerreviewUser = service.getUserByIDAndSession(new Long(user.getUserID().intValue()), sessionId); + + if (peerreviewUser == null) { + PeerreviewSession session = service.getPeerreviewSessionBySessionId(sessionId); + peerreviewUser = new PeerreviewUser(user, session); + service.createUser(peerreviewUser); + } + return peerreviewUser; + } + + private PeerreviewUser getSpecifiedUser(IPeerreviewService service, Long sessionId, Integer userId) { + PeerreviewUser peerreviewUser = service.getUserByIDAndSession(new Long(userId.intValue()), sessionId); + if (peerreviewUser == null) { + LearningAction.log + .error("Unable to find specified user for peerreview activity. Screens are likely to fail. SessionId=" + + sessionId + " UserId=" + userId); + } + return peerreviewUser; + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/MonitoringAction.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/MonitoringAction.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/action/MonitoringAction.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,327 @@ +/**************************************************************** + * 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.peerreview.web.action; + +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.Action; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionForward; +import org.apache.struts.action.ActionMapping; +import org.apache.tomcat.util.json.JSONArray; +import org.apache.tomcat.util.json.JSONException; +import org.apache.tomcat.util.json.JSONObject; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.rating.dto.ItemRatingCriteriaDTO; +import org.lamsfoundation.lams.rating.dto.ItemRatingDTO; +import org.lamsfoundation.lams.rating.dto.RatingCommentDTO; +import org.lamsfoundation.lams.rating.dto.RatingDTO; +import org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants; +import org.lamsfoundation.lams.tool.peerreview.dto.GroupSummary; +import org.lamsfoundation.lams.tool.peerreview.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewSession; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; +import org.lamsfoundation.lams.tool.peerreview.service.IPeerreviewService; +import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +public class MonitoringAction extends Action { + public static Logger log = Logger.getLogger(MonitoringAction.class); + + @Override + public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws IOException, ServletException, JSONException { + String param = mapping.getParameter(); + + request.setAttribute("initialTabId", WebUtil.readLongParam(request, AttributeNames.PARAM_CURRENT_TAB, true)); + + if (param.equals("summary")) { + return summary(mapping, form, request, response); + } + if (param.equals("getUsers")) { + return getUsers(mapping, form, request, response); + } + if (param.equals("getSubgridData")) { + return getSubgridData(mapping, form, request, response); + } + if (param.equals("viewReflection")) { + return viewReflection(mapping, form, request, response); + } + + return mapping.findForward(PeerreviewConstants.ERROR); + } + + private ActionForward summary(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + // initial Session Map + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + request.setAttribute(PeerreviewConstants.ATTR_SESSION_MAP_ID, sessionMap.getSessionID()); + // save contentFolderID into session + sessionMap.put(AttributeNames.PARAM_CONTENT_FOLDER_ID, + WebUtil.readStrParam(request, AttributeNames.PARAM_CONTENT_FOLDER_ID)); + + Long contentId = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_CONTENT_ID); + IPeerreviewService service = getPeerreviewService(); + List groupList = service.getGroupSummaries(contentId); + + Peerreview peerreview = service.getPeerreviewByContentId(contentId); + + // Create reflectList if reflection is enabled. + if (peerreview.isReflectOnActivity()) { + List relectList = service.getReflectList(contentId); + sessionMap.put(PeerreviewConstants.ATTR_REFLECT_LIST, relectList); + } + + // user name map + List sessionUsers = service.getUsersByContent(contentId); + HashMap userNameMap = new HashMap(); + for (PeerreviewUser userIter : sessionUsers) { + userNameMap.put(userIter.getUserId(), userIter.getFirstName() + " " + userIter.getLastName()); + } + sessionMap.put("userNameMap", userNameMap); + + // cache into sessionMap + sessionMap.put(PeerreviewConstants.ATTR_SUMMARY_LIST, groupList); + sessionMap.put(PeerreviewConstants.PAGE_EDITABLE, peerreview.isContentInUse()); + sessionMap.put(PeerreviewConstants.ATTR_PEERREVIEW, peerreview); + sessionMap.put(PeerreviewConstants.ATTR_TOOL_CONTENT_ID, contentId); + sessionMap.put(PeerreviewConstants.ATTR_IS_GROUPED_ACTIVITY, service.isGroupedActivity(contentId)); + return mapping.findForward(PeerreviewConstants.SUCCESS); + } + + /** + * Refreshes user list. + */ + public ActionForward getUsers(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse res) throws IOException, ServletException, JSONException { + IPeerreviewService service = getPeerreviewService(); + + Long toolContentId = WebUtil.readLongParam(request, "toolContentId"); + Long toolSessionId = WebUtil.readLongParam(request, "toolSessionId"); + + // Getting the params passed in from the jqGrid + int page = WebUtil.readIntParam(request, PeerreviewConstants.PARAM_PAGE) - 1; + int size = WebUtil.readIntParam(request, PeerreviewConstants.PARAM_ROWS); + String sortOrder = WebUtil.readStrParam(request, PeerreviewConstants.PARAM_SORD); + String sortBy = WebUtil.readStrParam(request, PeerreviewConstants.PARAM_SIDX, true); + + int sorting = PeerreviewConstants.SORT_BY_NO; + if (sortBy != null && sortBy.equals(PeerreviewConstants.PARAM_ROW_NAME)) { + if (sortOrder != null && sortOrder.equals(PeerreviewConstants.SORT_DESC)) { + sorting = PeerreviewConstants.SORT_BY_USERNAME_ASC; + } else { + sorting = PeerreviewConstants.SORT_BY_USERNAME_DESC; + } + } + + // in case of monitoring we show all results. in case of learning - don't show results from the current user + Long userId = -1L; + List users = service.getUsersForTablesorter(toolSessionId, userId, page, size, sorting); + + JSONObject responcedata = new JSONObject(); + JSONArray rows = new JSONArray(); + + responcedata.put("total", "" + service.getCountUsersBySession(toolSessionId, userId)); + responcedata.put("page", "" + page); + responcedata.put("records", "" + size); + + // handle rating criterias + List itemRatingDtos = null; + if (!users.isEmpty()) { + // create itemIds list + List itemIds = new LinkedList(); + for (PeerreviewUser user : users) { + itemIds.add(user.getUserId()); + } + + boolean isCommentsByOtherUsersRequired = false; + itemRatingDtos = service.getRatingCriteriaDtos(toolContentId, itemIds, isCommentsByOtherUsersRequired, + userId); + } + + for (PeerreviewUser user : users) { + JSONArray rowData = new JSONArray(); + rowData.put(toolSessionId); + rowData.put(user.getUserId()); + rowData.put(StringEscapeUtils.escapeHtml(user.getFirstName()) + " " + + StringEscapeUtils.escapeHtml(user.getLastName())); + + // find corresponding itemRatingDto + ItemRatingDTO itemRatingDto = null; + for (ItemRatingDTO itemRatingDtoIter : itemRatingDtos) { + if (user.getUserId().equals(itemRatingDtoIter.getItemId())) { + itemRatingDto = itemRatingDtoIter; + break; + } + } + + String criteriasString = ""; + for (ItemRatingCriteriaDTO criteriaDto : itemRatingDto.getCriteriaDtos()) { + JSONObject criteriasRow = new JSONObject(); + criteriasRow.put("ratingCriteriaId", criteriaDto.getRatingCriteria().getRatingCriteriaId()); + criteriasRow.put("title", criteriaDto.getRatingCriteria().getTitle()); + criteriasRow.put("averageRating", criteriaDto.getAverageRating()); + criteriasRow.put("numberOfVotes", criteriaDto.getNumberOfVotes()); + criteriasRow.put("userRating", criteriaDto.getUserRating()); + + criteriasString += criteriaDto.getRatingCriteria().getTitle() + ": Avg rating " + criteriaDto.getAverageRating() + + " out of " + criteriaDto.getNumberOfVotes() + " votes
"; + } + rowData.put(criteriasString); + + JSONObject row = new JSONObject(); + row.put("id", "" + user.getUserId()); + row.put("cell", rowData); + rows.put(row); + } + + responcedata.put("rows", rows); + + res.setContentType("application/json;charset=utf-8"); + res.getWriter().print(new String(responcedata.toString())); + return null; + } + + private ActionForward getSubgridData(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) throws JSONException, IOException { + IPeerreviewService service = getPeerreviewService(); + String sessionMapID = request.getParameter(PeerreviewConstants.ATTR_SESSION_MAP_ID); + SessionMap sessionMap = (SessionMap) request.getSession().getAttribute( + sessionMapID); + HashMap userNameMap = (HashMap) sessionMap.get("userNameMap"); + + Long userId = WebUtil.readLongParam(request, AttributeNames.PARAM_USER_ID); + Long contentId = (Long) sessionMap.get(PeerreviewConstants.ATTR_TOOL_CONTENT_ID); + + // ratings left by others for this user + ItemRatingDTO userRatingDto = service.getRatingCriteriaDtoWithActualRatings(contentId, userId); +// request.setAttribute("itemRatingDto", userRatingDto); + + JSONArray rows = new JSONArray(); + DateFormat timeTakenFormatter = new SimpleDateFormat("H:mm:ss"); + DateFormat dateFormatter = new SimpleDateFormat("d-MMM-yyyy h:mm a"); + int i = 0; + for (ItemRatingCriteriaDTO criteriaDto : userRatingDto.getCriteriaDtos()) { + + for (RatingDTO ratingDto : criteriaDto.getRatingDtos()) { + JSONArray userData = new JSONArray(); + userData.put(i); + userData.put(ratingDto.getLearner().getFirstName() + " " + ratingDto.getLearner().getLastName()); + userData.put(ratingDto.getRating()); + String title = criteriaDto.getRatingCriteria().getTitle(); + userData.put(title); + + JSONObject userRow = new JSONObject(); + userRow.put("id", i++); + userRow.put("cell", userData); + + rows.put(userRow); + } + } + + // if comments are enabled display them too + if (userRatingDto.isCommentsEnabled()) { + for (RatingCommentDTO commentDto : userRatingDto.getCommentDtos()) { + JSONArray userData = new JSONArray(); + userData.put(i); + userData.put(userNameMap.get(commentDto.getUserId())); + userData.put(commentDto.getComment()); + userData.put("Comments"); + + JSONObject userRow = new JSONObject(); + userRow.put("id", i++); + userRow.put("cell", userData); + + rows.put(userRow); + } + } + + JSONObject responseJSON = new JSONObject(); + responseJSON.put("total", 1); + responseJSON.put("page", 1); + responseJSON.put("records", rows.length()); + responseJSON.put("rows", rows); + + response.setContentType("application/json;charset=utf-8"); + response.getWriter().write(responseJSON.toString()); + return null; + } + + private ActionForward viewReflection(ActionMapping mapping, ActionForm form, HttpServletRequest request, + HttpServletResponse response) { + + Long uid = WebUtil.readLongParam(request, PeerreviewConstants.ATTR_USER_UID); + Long sessionID = WebUtil.readLongParam(request, AttributeNames.PARAM_TOOL_SESSION_ID); + + IPeerreviewService service = getPeerreviewService(); + PeerreviewUser user = service.getUser(uid); + NotebookEntry notebookEntry = service.getEntry(sessionID, CoreNotebookConstants.NOTEBOOK_TOOL, + PeerreviewConstants.TOOL_SIGNATURE, user.getUserId().intValue()); + + PeerreviewSession session = service.getPeerreviewSessionBySessionId(sessionID); + + ReflectDTO refDTO = new ReflectDTO(user); + if (notebookEntry == null) { + refDTO.setFinishReflection(false); + refDTO.setReflect(null); + } else { + refDTO.setFinishReflection(true); + refDTO.setReflect(notebookEntry.getEntry()); + } + refDTO.setReflectInstrctions(session.getPeerreview().getReflectInstructions()); + + request.setAttribute("userDTO", refDTO); + return mapping.findForward("success"); + } + + // ************************************************************************************* + // Private method + // ************************************************************************************* + private IPeerreviewService getPeerreviewService() { + WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServlet() + .getServletContext()); + return (IPeerreviewService) wac.getBean(PeerreviewConstants.PEERREVIEW_SERVICE); + } +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/form/PeerreviewForm.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/form/PeerreviewForm.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/form/PeerreviewForm.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,108 @@ +/**************************************************************** + * 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.peerreview.web.form; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.apache.struts.action.ActionForm; +import org.apache.struts.action.ActionMapping; +import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; + +/** + * + * Peerreview Form. + * + * @struts.form name="peerreviewForm" + * + * User: Andrey Balan + */ +public class PeerreviewForm extends ActionForm { + private static final long serialVersionUID = 3599879328307492312L; + + private static Logger logger = Logger.getLogger(PeerreviewForm.class.getName()); + + // Forum fields + private String sessionMapID; + private String contentFolderID; + private int currentTab; + + private Peerreview peerreview; + + public PeerreviewForm() { + peerreview = new Peerreview(); + peerreview.setTitle("Peer Review"); + currentTab = 1; + } + + public void setPeerreview(Peerreview peerreview) { + this.peerreview = peerreview; + // set Form special varaible from given forum + if (peerreview == null) { + logger.error("Initial PeerreviewForum failed by null value of Peerreview."); + } + } + + public void reset(ActionMapping mapping, HttpServletRequest request) { + String param = mapping.getParameter(); + // if it is start page, all data read out from database or current session + // so need not reset checkbox to refresh value! + if (!StringUtils.equals(param, "start") && !StringUtils.equals(param, "initPage")) { + peerreview.setLockWhenFinished(false); + peerreview.setDefineLater(false); + peerreview.setReflectOnActivity(false); + } + } + + public int getCurrentTab() { + return currentTab; + } + + public void setCurrentTab(int currentTab) { + this.currentTab = currentTab; + } + + public Peerreview getPeerreview() { + return peerreview; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + + public String getContentFolderID() { + return contentFolderID; + } + + public void setContentFolderID(String contentFolderID) { + this.contentFolderID = contentFolderID; + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/form/ReflectionForm.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/form/ReflectionForm.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/form/ReflectionForm.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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 + * **************************************************************** + */ + +/* $$Id$$ */ +package org.lamsfoundation.lams.tool.peerreview.web.form; + +import org.apache.log4j.Logger; +import org.apache.struts.validator.ValidatorForm; + +/** + * + * Reflection Form. + * + * @struts.form name="reflectionForm" + * + */ +public class ReflectionForm extends ValidatorForm { + private static final long serialVersionUID = -9054365604649146735L; + private static Logger logger = Logger.getLogger(ReflectionForm.class.getName()); + + private Integer userID; + private String sessionMapID; + private String entryText; + + public String getEntryText() { + return entryText; + } + + public void setEntryText(String entryText) { + this.entryText = entryText; + } + + public Integer getUserID() { + return userID; + } + + public void setUserID(Integer userUid) { + this.userID = userUid; + } + + public String getSessionMapID() { + return sessionMapID; + } + + public void setSessionMapID(String sessionMapID) { + this.sessionMapID = sessionMapID; + } + +} Index: lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/servlet/ExportServlet.java =================================================================== diff -u --- lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/servlet/ExportServlet.java (revision 0) +++ lams_tool_preview/src/java/org/lamsfoundation/lams/tool/peerreview/web/servlet/ExportServlet.java (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,213 @@ +/**************************************************************** + * 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.peerreview.web.servlet; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.lamsfoundation.lams.notebook.model.NotebookEntry; +import org.lamsfoundation.lams.notebook.service.CoreNotebookConstants; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants; +import org.lamsfoundation.lams.tool.peerreview.dto.ReflectDTO; +import org.lamsfoundation.lams.tool.peerreview.model.Peerreview; +import org.lamsfoundation.lams.tool.peerreview.model.PeerreviewUser; +import org.lamsfoundation.lams.tool.peerreview.service.IPeerreviewService; +import org.lamsfoundation.lams.tool.peerreview.service.PeerreviewApplicationException; +import org.lamsfoundation.lams.tool.peerreview.service.PeerreviewServiceProxy; +import org.lamsfoundation.lams.tool.peerreview.util.PeerreviewToolContentHandler; +import org.lamsfoundation.lams.util.FileUtil; +import org.lamsfoundation.lams.util.WebUtil; +import org.lamsfoundation.lams.web.servlet.AbstractExportPortfolioServlet; +import org.lamsfoundation.lams.web.util.AttributeNames; +import org.lamsfoundation.lams.web.util.SessionMap; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +/** + * Export portfolio servlet to export all peerreview into offline HTML package. + * + * @author Steve.Ni + * + * @version $Revision$ + */ +public class ExportServlet extends AbstractExportPortfolioServlet { + private static final long serialVersionUID = -4529093489007108143L; + + private static Logger logger = Logger.getLogger(ExportServlet.class); + + private final String FILENAME = "peer_review_main.html"; + + private IPeerreviewService service; + + @Override + public void init() throws ServletException { + service = PeerreviewServiceProxy.getPeerreviewService(getServletContext()); + super.init(); + } + + public String doExport(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies) { + + // initial sessionMap + SessionMap sessionMap = new SessionMap(); + request.getSession().setAttribute(sessionMap.getSessionID(), sessionMap); + + try { + if (StringUtils.equals(mode, ToolAccessMode.LEARNER.toString())) { + sessionMap.put(AttributeNames.ATTR_MODE, ToolAccessMode.LEARNER); + learner(request, response, directoryName, cookies, sessionMap); + } else if (StringUtils.equals(mode, ToolAccessMode.TEACHER.toString())) { + sessionMap.put(AttributeNames.ATTR_MODE, ToolAccessMode.TEACHER); + teacher(request, response, directoryName, cookies, sessionMap); + } + } catch (PeerreviewApplicationException e) { + logger.error("Cannot perform export for peerreview tool."); + } + + String basePath = WebUtil.getBaseServerURL() + request.getContextPath(); + writeResponseToFile(basePath + "/pages/export/exportportfolio.jsp?sessionMapID=" + sessionMap.getSessionID(), + directoryName, FILENAME, cookies); + + return FILENAME; + } + + public void learner(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies, HashMap sessionMap) throws PeerreviewApplicationException { + + if (userID == null || toolSessionID == null) { + String error = "Tool session Id or user Id is null. Unable to continue"; + logger.error(error); + throw new PeerreviewApplicationException(error); + } + + PeerreviewUser learner = service.getUserByIDAndSession(userID, toolSessionID); + + if (learner == null) { + String error = "The user with user id " + userID + " does not exist."; + logger.error(error); + throw new PeerreviewApplicationException(error); + } + + Peerreview content = service.getPeerreviewBySessionId(toolSessionID); + + if (content == null) { + String error = "The content for this activity has not been defined yet."; + logger.error(error); + throw new PeerreviewApplicationException(error); + } + +// List group = service.exportBySessionId(toolSessionID, true); +// saveFileToLocal(group, directoryName); +// +// List> groupList = new ArrayList>(); +// if (group.size() > 0) +// groupList.add(group); + + // Add flag to indicate whether to render user notebook entries + sessionMap.put(PeerreviewConstants.ATTR_REFLECTION_ON, content.isReflectOnActivity()); + + // Create reflectList if reflection is enabled. + if (content.isReflectOnActivity()) { + List reflectList = new LinkedList(); + + // Create reflectList, need to follow same structure used in teacher + // see service.getReflectList(); + reflectList.add(getReflectionEntry(learner)); + + // Add reflectList to sessionMap + sessionMap.put(PeerreviewConstants.ATTR_REFLECT_LIST, reflectList); + } + + sessionMap.put(PeerreviewConstants.ATTR_TITLE, content.getTitle()); + sessionMap.put(PeerreviewConstants.ATTR_INSTRUCTIONS, content.getInstructions()); +// sessionMap.put(PeerreviewConstants.ATTR_SUMMARY_LIST, groupList); + } + + public void teacher(HttpServletRequest request, HttpServletResponse response, String directoryName, + Cookie[] cookies, HashMap sessionMap) throws PeerreviewApplicationException { + + // check if toolContentId exists in db or not + if (toolContentID == null) { + String error = "Tool Content Id is missing. Unable to continue"; + logger.error(error); + throw new PeerreviewApplicationException(error); + } + + Peerreview content = service.getPeerreviewByContentId(toolContentID); + + if (content == null) { + String error = "Data is missing from the database. Unable to Continue"; + logger.error(error); + throw new PeerreviewApplicationException(error); + } +// List> groupList = service.exportByContentId(toolContentID); +// if (groupList != null) { +// for (List list : groupList) { +// saveFileToLocal(list, directoryName); +// } +// } + + // Add flag to indicate whether to render user notebook entries + sessionMap.put(PeerreviewConstants.ATTR_REFLECTION_ON, content.isReflectOnActivity()); + + // Create reflectList if reflection is enabled. + if (content.isReflectOnActivity()) { + List reflectList = service.getReflectList(content.getContentId()); + // Add reflectList to sessionMap + sessionMap.put(PeerreviewConstants.ATTR_REFLECT_LIST, reflectList); + } + + // put it into HTTPSession + sessionMap.put(PeerreviewConstants.ATTR_TITLE, content.getTitle()); + sessionMap.put(PeerreviewConstants.ATTR_INSTRUCTIONS, content.getInstructions()); +// sessionMap.put(PeerreviewConstants.ATTR_SUMMARY_LIST, groupList); + } + + private ReflectDTO getReflectionEntry(PeerreviewUser peerreviewUser) { + ReflectDTO reflectDTO = new ReflectDTO(peerreviewUser); + NotebookEntry notebookEntry = service.getEntry(peerreviewUser.getSession().getSessionId(), + CoreNotebookConstants.NOTEBOOK_TOOL, PeerreviewConstants.TOOL_SIGNATURE, peerreviewUser.getUserId() + .intValue()); + + // check notebookEntry is not null + if (notebookEntry != null) { + reflectDTO.setReflect(notebookEntry.getEntry()); + logger.debug("Could not find notebookEntry for PeerreviewUser: " + peerreviewUser.getUid()); + } + return reflectDTO; + } +} Index: lams_tool_preview/web/403.jsp =================================================================== diff -u --- lams_tool_preview/web/403.jsp (revision 0) +++ lams_tool_preview/web/403.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,6 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + Index: lams_tool_preview/web/404.jsp =================================================================== diff -u --- lams_tool_preview/web/404.jsp (revision 0) +++ lams_tool_preview/web/404.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,8 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + + Index: lams_tool_preview/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/AuthoringButton.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,133 @@ +<% +/**************************************************************** + * 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" %> +<%@ taglib uri="tags-lams" prefix="lams"%> + +<%@ 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_preview/web/WEB-INF/tags/AuthoringRatingCriteria.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/AuthoringRatingCriteria.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/AuthoringRatingCriteria.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,352 @@ +<% + /** + * AuthoringRatingCriteria.tag + * Author: Andrey Balan + * Description: Creates list of rating criterias 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" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-function" prefix="fn" %> + + +<%@ attribute name="criterias" required="true" rtexprvalue="true" type="java.util.Collection" %> + +<%-- Optional attribute --%> +<%@ attribute name="hasRatingLimits" required="false" rtexprvalue="true" %> +<%@ attribute name="formContentPrefix" required="false" rtexprvalue="true" %> +<%@ attribute name="headerLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="addLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="deleteLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="upLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="downLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="minimumLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="maximumLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="noMinimumLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="noMaximumLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="jsWarningLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="allowCommentsLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="minNumberWordsLabel" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ +

+ + + + + + + + + + + + + + + + +
+ + + + +
">
+ +
">
+
+
+ + + +
">
+
+ +
">
+
+
+
" >
+
+ +
+ + + +
+ + +
+ + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + + + + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + +
+
+ +
+ checked="checked" + /> + + +
+ + +
+ +
+ +
+ \ No newline at end of file Index: lams_tool_preview/web/WEB-INF/tags/CKEditor.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/CKEditor.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/CKEditor.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,95 @@ +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-function" prefix="fn" %> + +<%@ attribute name="id" required="true" rtexprvalue="true"%> +<%@ attribute name="value" required="true" rtexprvalue="true"%> +<%@ attribute name="toolbarSet" required="false" rtexprvalue="true"%> +<%@ attribute name="height" required="false" rtexprvalue="true"%> +<%@ attribute name="width" required="false" rtexprvalue="true"%> +<%@ attribute name="contentFolderID" required="false" rtexprvalue="true"%> +<%@ attribute name="displayExpanded" required="false" rtexprvalue="true"%> +<%@ attribute name="resizeParentFrameName" required="false" rtexprvalue="true"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + ckeditor/ + + + + Index: lams_tool_preview/web/WEB-INF/tags/Date.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/Date.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/Date.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,55 @@ +<% +/**************************************************************** + * 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_preview/web/WEB-INF/tags/DefineLater.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/DefineLater.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/DefineLater.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tags/Head.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/Head.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/Head.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,42 @@ +<%/**************************************************************** + * 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_preview/web/WEB-INF/tags/ImgButtonWrapper.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/ImgButtonWrapper.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tags/Rating.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/Rating.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/Rating.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,177 @@ +<% + /** + * Rating.tag + * Author: Andrey Balan + * Description: Shows rating stars widget + */ + %> +<%@ 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"%> +<%@ taglib uri="tags-function" prefix="fn" %> + + +<%@ attribute name="itemRatingDto" required="true" rtexprvalue="true" type="org.lamsfoundation.lams.rating.dto.ItemRatingDTO" %> + +<%-- Optional attribute --%> +<%@ attribute name="disabled" required="false" rtexprvalue="true" %> +<%@ attribute name="isItemAuthoredByUser" required="false" rtexprvalue="true" %> +<%@ attribute name="maxRates" required="false" rtexprvalue="true" %> +<%@ attribute name="countRatedItems" required="false" rtexprvalue="true" %> +<%@ attribute name="yourRatingLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="averageRatingLabel" required="false" rtexprvalue="true" %> +<%@ attribute name="minNumberWordsLabel" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + + + + + + + + + +<%--Rating stars area---------------------------------------%> + +
+
+ + + + + + + + + + + + + +

+ ${criteriaDto.ratingCriteria.title} +

+ + + + + + + + + + +
+
+ + + +
+ + + + + + ${criteriaDto.numberOfVotes} + + +
+
+ + +
style="visibility: hidden;" + > + + + + + + + + + + + + + ${criteriaDto.numberOfVotes} + + +
+ +
+
+ +
+ +
+ +
+ +<%--Comments area---------------------------------------%> + +
+ + + + + + + + + + + +
+ +
+
+
+ + +
+ +
+
+ + +
+ + + + +
+ + : + +
+
+ + + +
+
+
+
+
+ +
+
\ No newline at end of file Index: lams_tool_preview/web/WEB-INF/tags/Tab.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/Tab.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/Tab.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tags/TabBody.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/TabBody.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/TabBody.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tags/TabName.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/TabName.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/TabName.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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 + * **************************************************************** + */ + +/** + * 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_preview/web/WEB-INF/tags/Tabs.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/Tabs.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/Tabs.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tags/TextSearch.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/TextSearch.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/TextSearch.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tags/headItems.tag =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tags/headItems.tag (revision 0) +++ lams_tool_preview/web/WEB-INF/tags/headItems.tag (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,47 @@ +<%/**************************************************************** + * 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_preview/web/WEB-INF/tlds/jstl/c.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/jstl/c.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/jstl/c.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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 peerreview to import. + + url + true + true + + + +Name of the exported scoped variable for the +peerreview'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 +peerreview's content. The type of the scoped +variable is Reader. + + varReader + false + false + + + +Name of the context when accessing a relative +URL peerreview that belongs to a foreign +context. + + context + false + true + + + +Character encoding of the content at the input +peerreview. + + 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 peerreview to redirect to. + + url + false + true + + + +Name of the context when redirecting to a relative URL +peerreview 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 +peerreview 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_preview/web/WEB-INF/tlds/jstl/fmt.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/jstl/fmt.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/jstl/fmt.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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 peerreview bundle to be used by its tag body + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + +Peerreview bundle base name. This is the bundle's +fully-qualified peerreview 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 peerreview bundle and stores it in the named scoped variable or + the bundle configuration variable + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + +Peerreview bundle base name. This is the bundle's +fully-qualified peerreview 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 peerreview +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_preview/web/WEB-INF/tlds/jstl/fn.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/jstl/fn.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/jstl/fn.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tlds/jstl/x.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/jstl/x.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/jstl/x.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tlds/lams/lams.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/lams/lams.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/lams/lams.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,493 @@ + + + + + 1.0 + lams + + LAMSTags + + + + org.lamsfoundation.lams.web.SessionListener + + + + + 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 + + + + + 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 + + + + + + + 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 + + + + + + + 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 + + + CKEditor + /WEB-INF/tags/CKEditor.tag + + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + + + AuthoringRatingCriteria + /WEB-INF/tags/AuthoringRatingCriteria.tag + + + Rating + /WEB-INF/tags/Rating.tag + + + headItems + /WEB-INF/tags/headItems.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 + + + Index: lams_tool_preview/web/WEB-INF/tlds/struts/struts-bean-el.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-bean-el.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-bean-el.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,212 @@ + + + + + + + + + + +1.2 +1.1 +bean +http://struts.apache.org/tags-bean-el + +include +org.apache.strutsel.taglib.bean.ELIncludeTag +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.strutsel.taglib.bean.ELMessageTag +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.strutsel.taglib.bean.ELPageTag +empty + +id +true +false + + +property +true +true + + + +resource +org.apache.strutsel.taglib.bean.ELPeerreviewTag +org.apache.struts.taglib.bean.ResourceTei +empty + +id +true +false + + +input +false +true + + +name +true +true + + + +size +org.apache.strutsel.taglib.bean.ELSizeTag +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.strutsel.taglib.bean.ELStrutsTag +org.apache.struts.taglib.bean.StrutsTei +empty + +id +true +false + + +formBean +false +true + + +forward +false +true + + +mapping +false +true + + + + + + Index: lams_tool_preview/web/WEB-INF/tlds/struts/struts-bean.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-bean.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-bean.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tlds/struts/struts-html-el.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-html-el.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-html-el.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,3302 @@ + + + + + + + + + + +1.2 +1.1 +html +http://struts.apache.org/tags-html-el + +base +org.apache.strutsel.taglib.html.ELBaseTag +empty + +target +false +true + + +server +false +true + + + +button +org.apache.strutsel.taglib.html.ELButtonTag + +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.strutsel.taglib.html.ELCancelTag + +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.strutsel.taglib.html.ELCheckboxTag + +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.strutsel.taglib.html.ELErrorsTag +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.strutsel.taglib.html.ELFileTag + +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.strutsel.taglib.html.ELFormTag +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.strutsel.taglib.html.ELFrameTag + +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.strutsel.taglib.html.ELHiddenTag +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.strutsel.taglib.html.ELHtmlTag +JSP + +lang +false +true + + +locale +false +true + + +xhtml +false +true + + + +image +org.apache.strutsel.taglib.html.ELImageTag + +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.strutsel.taglib.html.ELImgTag +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.strutsel.taglib.html.ELJavascriptValidatorTag +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.strutsel.taglib.html.ELLinkTag + +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.strutsel.taglib.html.ELMessagesTag +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.strutsel.taglib.html.ELMultiboxTag + +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.strutsel.taglib.html.ELOptionTag + +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.strutsel.taglib.html.ELOptionsTag +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.strutsel.taglib.html.ELOptionsCollectionTag +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.strutsel.taglib.html.ELPasswordTag + +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.strutsel.taglib.html.ELRadioTag + +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.strutsel.taglib.html.ELResetTag + +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.strutsel.taglib.html.ELRewriteTag +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.strutsel.taglib.html.ELSelectTag +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.strutsel.taglib.html.ELSubmitTag + +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.strutsel.taglib.html.ELTextTag + +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.strutsel.taglib.html.ELTextareaTag + +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_preview/web/WEB-INF/tlds/struts/struts-html.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-html.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-html.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tlds/struts/struts-logic-el.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-logic-el.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-logic-el.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,382 @@ + + + + + + + + + +1.2 +1.1 +logic +http://struts.apache.org/tags-logic-el + +forward +org.apache.strutsel.taglib.logic.ELForwardTag +empty + +name +true +true + + + +iterate +org.apache.strutsel.taglib.logic.ELIterateTag +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 + + + +match +org.apache.strutsel.taglib.logic.ELMatchTag +JSP + +cookie +false +true + + +expr +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.strutsel.taglib.logic.ELMessagesNotPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +messagesPresent +org.apache.strutsel.taglib.logic.ELMessagesPresentTag +JSP + +name +false +true + + +property +false +true + + +message +false +true + + + +notMatch +org.apache.strutsel.taglib.logic.ELNotMatchTag +JSP + +cookie +false +true + + +expr +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.strutsel.taglib.logic.ELNotPresentTag +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.strutsel.taglib.logic.ELPresentTag +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.strutsel.taglib.logic.ELRedirectTag + +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_preview/web/WEB-INF/tlds/struts/struts-logic.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-logic.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-logic.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tlds/struts/struts-nested.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-nested.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-nested.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/tlds/struts/struts-tiles-el.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-tiles-el.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-tiles-el.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,343 @@ + + + + + + + + + + +1.2 +1.1 +tiles +http://struts.apache.org/tags-tiles-el + +insert +org.apache.strutsel.taglib.tiles.ELInsertTag +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.strutsel.taglib.tiles.ELDefinitionTag +JSP + +id +true +false + + +scope +false +false + + +template +false +true + + +page +false +true + + +role +false +true + + +extends +false +true + + + +put +org.apache.strutsel.taglib.tiles.ELPutTag +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.strutsel.taglib.tiles.ELPutListTag +JSP + +name +true +false + + + +add +org.apache.strutsel.taglib.tiles.ELAddTag +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.strutsel.taglib.tiles.ELGetTag +empty + +name +true +true + + +ignore +false +true + + +flush +false +false + + +role +false +true + + + +getAsString +org.apache.strutsel.taglib.tiles.ELGetAttributeTag +empty + +name +true +true + + +ignore +false +true + + +role +false +true + + + +useAttribute +org.apache.strutsel.taglib.tiles.ELUseAttributeTag +empty + +id +false +false + + +classname +false +false + + +scope +false +false + + +name +true +true + + +ignore +false +true + + + +importAttribute +org.apache.strutsel.taglib.tiles.ELImportAttributeTag +empty + +name +false +true + + +scope +false +false + + +ignore +false +true + + + +initComponentDefinitions +org.apache.strutsel.taglib.tiles.ELInitDefinitionsTag +empty + +file +true +false + + +classname +false +false + + + + + + Index: lams_tool_preview/web/WEB-INF/tlds/struts/struts-tiles.tld =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/tlds/struts/struts-tiles.tld (revision 0) +++ lams_tool_preview/web/WEB-INF/tlds/struts/struts-tiles.tld (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -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_preview/web/WEB-INF/web.xml =================================================================== diff -u --- lams_tool_preview/web/WEB-INF/web.xml (revision 0) +++ lams_tool_preview/web/WEB-INF/web.xml (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,333 @@ + + + + Peer Review + + Peer Review tool + + + javax.servlet.jsp.jstl.fmt.localizationContext + org.lamsfoundation.lams.tool.peerreview.ApplicationResources + + + + contextClass + org.jboss.spring.factory.VFSXmlWebApplicationContext + + + contextConfigLocation + classpath:/org/lamsfoundation/lams/tool/peerreview/dbupdates/autopatchContext.xml + + + locatorFactorySelector + classpath:/org/lamsfoundation/lams/beanRefContext.xml + + + parentContextKey + context.central + + + + + org.springframework.web.context.ContextLoaderListener + + + + + + org.lamsfoundation.lams.web.session.SetMaxTimeoutListener + + + + + hibernateFilter + + org.springframework.orm.hibernate3.support.OpenSessionInViewFilter + + + sessionFactoryBeanName + coreSessionFactory + + + + + SystemSessionFilter + + org.lamsfoundation.lams.web.session.SystemSessionFilter + + + + LocaleFilter + + org.lamsfoundation.lams.web.filter.LocaleFilter + + + encoding + UTF-8 + + + + + hibernateFilter + /* + + + SystemSessionFilter + /* + + + LocaleFilter + /* + + + + + + exportPortfolio + org.lamsfoundation.lams.tool.peerreview.web.servlet.ExportServlet + + + + completeItem + org.lamsfoundation.lams.tool.peerreview.web.servlet.CompleteItemServlet + + + + action + org.apache.struts.action.ActionServlet + + config + /WEB-INF/struts-config.xml + + + debug + 999 + + + detail + 1 + + + validate + true + + 2 + + + + Connector + net.fckeditor.connector.ConnectorServlet + + baseDir + /UserFiles/ + + + debug + false + + 1 + + + + + Instructions Download + Instructions Download + download + org.lamsfoundation.lams.contentrepository.client.ToolDownload + + toolContentHandlerBeanName + peerreviewToolContentHandler + + 3 + + + + action + *.do + + + + Connector + /ckeditor/filemanager/browser/default/connectors/jsp/connector + + + + download + /download/* + + + + exportPortfolio + /exportPortfolio + + + + completeItem + /learning/completeItem + + + + + + + + tags-bean + /WEB-INF/tlds/struts/struts-bean.tld + + + tags-html + /WEB-INF/tlds/struts/struts-html.tld + + + tags-logic + /WEB-INF/tlds/struts/struts-logic.tld + + + tags-tiles + /WEB-INF/tlds/struts/struts-tiles.tld + + + + tags-bean-el + /WEB-INF/tlds/struts/struts-bean-el.tld + + + tags-html-el + /WEB-INF/tlds/struts/struts-html-el.tld + + + tags-logic-el + /WEB-INF/tlds/struts/struts-logic-el.tld + + + tags-tiles-el + /WEB-INF/tlds/struts/struts-tiles-el.tld + + + + + + tags-fmt + /WEB-INF/tlds/jstl/fmt.tld + + + tags-core + /WEB-INF/tlds/jstl/c.tld + + + tags-function + /WEB-INF/tlds/jstl/fn.tld + + + tags-xml + /WEB-INF/tlds/jstl/x.tld + + + + + + tags-lams + /WEB-INF/tlds/lams/lams.tld + + + + + + + + Secure content + /* + + + LEARNER + MONITOR + AUTHOR + SYSADMIN + + + + + + Authoring content + /authoring/* + /pages/authoring/* + + + AUTHOR + MONITOR + SYSADMIN + + + + + + Staff content + /monitoring/* + /pages/monitoring/* + /definelater.do + + + MONITOR + SYSADMIN + + + + + + Student + LEARNER + + + + Authors Learning Designs + AUTHOR + + + + Member of Staff + MONITOR + + + + Group Manager + GROUP MANAGER + + + + Group Administrator + GROUP ADMIN + + + + LAMS System Adminstrator + SYSADMIN + + + + + FORM + LAMS + + /login.jsp + /login.jsp?failed=y + + + + + 500 + /error.jsp + + + 403 + /403.jsp + + + 404 + /404.jsp + + + Index: lams_tool_preview/web/common/footer.jsp =================================================================== diff -u --- lams_tool_preview/web/common/footer.jsp (revision 0) +++ lams_tool_preview/web/common/footer.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1 @@ +
Index: lams_tool_preview/web/common/header.jsp =================================================================== diff -u --- lams_tool_preview/web/common/header.jsp (revision 0) +++ lams_tool_preview/web/common/header.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,15 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + Index: lams_tool_preview/web/common/messages.jsp =================================================================== diff -u --- lams_tool_preview/web/common/messages.jsp (revision 0) +++ lams_tool_preview/web/common/messages.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,8 @@ +<%-- Error Messages --%> + +

+ +
+
+

+
Index: lams_tool_preview/web/common/tabbedheader.jsp =================================================================== diff -u --- lams_tool_preview/web/common/tabbedheader.jsp (revision 0) +++ lams_tool_preview/web/common/tabbedheader.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,15 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + Index: lams_tool_preview/web/common/taglibs.jsp =================================================================== diff -u --- lams_tool_preview/web/common/taglibs.jsp (revision 0) +++ lams_tool_preview/web/common/taglibs.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,11 @@ +<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-bean" prefix="bean" %> +<%@ taglib uri="tags-html" prefix="html" %> +<%@ taglib uri="tags-logic" prefix="logic" %> +<%@ taglib uri="tags-function" prefix="fn" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-xml" prefix="x" %> +<%@ taglib uri="tags-lams" prefix="lams" %> + + Index: lams_tool_preview/web/error.jsp =================================================================== diff -u --- lams_tool_preview/web/error.jsp (revision 0) +++ lams_tool_preview/web/error.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,69 @@ + + +<%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c"%> +<%@ taglib uri="tags-fmt" prefix="fmt"%> + + + + +<%-- Catch JSP Servlet Exception --%> +<% +if (exception != null) { +%> + + <%=exception.getMessage()%> + + + <%=exception.getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + exception.printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} else if ((Exception) request.getAttribute("javax.servlet.error.exception") != null) { +%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage()%> + + + <%=((Exception) request.getAttribute("javax.servlet.error.exception")).getMessage() + .getClass().getName()%> + +<% + java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream(); + java.io.PrintStream os = new java.io.PrintStream(bos); + ((Exception) request.getAttribute("javax.servlet.error.exception")).printStackTrace(os); + String stack = new String(bos.toByteArray()); +%> + + <%=stack%> + +<% +} +%> + +
+ + + +
+ + + + Index: lams_tool_preview/web/images/icon_peerreview.png =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/images/icon_peerreview.svg =================================================================== diff -u --- lams_tool_preview/web/images/icon_peerreview.svg (revision 0) +++ lams_tool_preview/web/images/icon_peerreview.svg (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,114 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_preview/web/images/icon_peerreview.swf =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/images/icon_peerreview_16.svg =================================================================== diff -u --- lams_tool_preview/web/images/icon_peerreview_16.svg (revision 0) +++ lams_tool_preview/web/images/icon_peerreview_16.svg (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,114 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_preview/web/images/icon_sharedpeerreview.svg =================================================================== diff -u --- lams_tool_preview/web/images/icon_sharedpeerreview.svg (revision 0) +++ lams_tool_preview/web/images/icon_sharedpeerreview.svg (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,114 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: lams_tool_preview/web/includes/css/learning.css =================================================================== diff -u --- lams_tool_preview/web/includes/css/learning.css (revision 0) +++ lams_tool_preview/web/includes/css/learning.css (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,22 @@ + .rating-stars-div {margin-top: 8px;} + .user-answer {padding: 0 2px;} + tr.odd:hover .jStar {background-image: url(/lams/images/css/jquery.jRating-stars-grey.png)!important;} + tr.even:hover .jStar {background-image: url(/lams/images/css/jquery.jRating-stars-light-grey.png)!important;} + tr.odd .jStar {background-image: url(/lams/images/css/jquery.jRating-stars-light-blue.png)!important;} + .tablesorter-blue {margin-bottom: 5px;} + .pager {padding-bottom: 20px;} + .extra-controls-inner:after { + margin-top: -10px; + } + .rating-comment{ + background-image: none; + background-color: rgba(205, 205, 205, 0.1); + border: 1px solid rgba(205, 205, 205, 0.2); + } + textarea { + margin: 10px 0px; + width: 88%; + } + .add-comment { + margin-top: 60px; + } \ No newline at end of file Index: lams_tool_preview/web/includes/css/peerreview.css =================================================================== diff -u --- lams_tool_preview/web/includes/css/peerreview.css (revision 0) +++ lams_tool_preview/web/includes/css/peerreview.css (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,33 @@ +.innerforms { + border: 0px; + font-size: small; + font-style: normal; + width:100%; +} + +div.error, div.message { + background-color: #ffffcc; + border: 1px solid #000; + color: #000000; + font-family: Arial, Helvetica, sans-serif; + font-weight: normal; + margin: 10px auto; + padding: 3px; + text-align: left; + vertical-align: bottom; +} + +/* use a different color for the errors */ +div.error { + border: 2px solid red; +} + +img.validationWarning, div.errors img.icon, div.messages img.icon { + border: 0; + width: 14px; + height: 13px; + vertical-align: top; +} +div.message img.icon { + vertical-align: middle; +} Index: lams_tool_preview/web/includes/images/.cvsignore =================================================================== diff -u --- lams_tool_preview/web/includes/images/.cvsignore (revision 0) +++ lams_tool_preview/web/includes/images/.cvsignore (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1 @@ +Thumbs.db Index: lams_tool_preview/web/includes/images/cross.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/downarrow.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/downarrow_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/edit.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/indicator.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/spacer.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/tick.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/uparrow.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/includes/images/uparrow_disabled.gif =================================================================== diff -u Binary files differ Index: lams_tool_preview/web/login.jsp =================================================================== diff -u --- lams_tool_preview/web/login.jsp (revision 0) +++ lams_tool_preview/web/login.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,12 @@ +<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %> +<%@ taglib uri="tags-lams" prefix="lams"%> +<%@ taglib uri="tags-core" prefix="c" %> + + + + Index: lams_tool_preview/web/pages/authoring/advance.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/authoring/advance.jsp (revision 0) +++ lams_tool_preview/web/pages/authoring/advance.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,74 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +

+ + + + +

+ +

+ + + + + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + +

+ +

+ + + + +

+ +

+ + + +

+ +

+ +

+ + Index: lams_tool_preview/web/pages/authoring/authoring.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/authoring/authoring.jsp (revision 0) +++ lams_tool_preview/web/pages/authoring/authoring.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,93 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants"%> + + + + <fmt:message key="label.author.title" /> + + <%@ include file="/common/tabbedheader.jsp"%> + + + + + + + + +
+

+ +

+ + +
+ + + <%@ include file="/common/messages.jsp"%> + + + + + + + + + + + + + + + + + + + + + + <%-- Default value + cancelButtonLabelKey="label.authoring.cancel.button" + saveButtonLabelKey="label.authoring.save.button" + cancelConfirmMsgKey="authoring.msg.cancel.save" + accessMode="author" + --%> + + + +
+ + + +
+ + +
Index: lams_tool_preview/web/pages/authoring/basic.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/authoring/basic.jsp (revision 0) +++ lams_tool_preview/web/pages/authoring/basic.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,30 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + +
+
+ +
+ +
+
+ +
+ +
+ +
+ +
Index: lams_tool_preview/web/pages/authoring/definelater.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/authoring/definelater.jsp (revision 0) +++ lams_tool_preview/web/pages/authoring/definelater.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,85 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="java.util.HashSet"%> +<%@ page import="org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants"%> +<%@ page import="java.util.Set"%> +<%Set tabs = new HashSet(); + tabs.add("label.authoring.heading.basic"); + pageContext.setAttribute("tabs", tabs); + + %> + + + <fmt:message key="label.author.title" /> + + <%@ include file="/common/tabbedheader.jsp"%> + + + + + + + +
+ + + + + + + +

+ +

+ +
+ <%@ include file="/common/messages.jsp"%> + + + +
+ + + + + + + +
+ + + + +
+ +
+ +
Index: lams_tool_preview/web/pages/authoring/definelaterforbid.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/authoring/definelaterforbid.jsp (revision 0) +++ lams_tool_preview/web/pages/authoring/definelaterforbid.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,21 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + <fmt:message key="label.author.title" /> + + <%@ include file="/common/header.jsp"%> + + +
+
+

+ +

+ + +
+
+ +
Index: lams_tool_preview/web/pages/authoring/start.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/authoring/start.jsp (revision 0) +++ lams_tool_preview/web/pages/authoring/start.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,16 @@ + + +<%@ include file="/common/taglibs.jsp" %> + + + + + + + + + + Index: lams_tool_preview/web/pages/export/exportportfolio.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/export/exportportfolio.jsp (revision 0) +++ lams_tool_preview/web/pages/export/exportportfolio.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,213 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + <fmt:message key="export.title" /> + + + + + + + + + + + + +
+ +

+ +

+ +
+ +
+ + + +

+ + + + + + + ${group[0].sessionName} + + +

+ + + + + + + + + + + + + + + + + <%-- Bold styling is to indicate an item created by the author --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + +
    + +
  1. + +
  2. +
    +
+
+ +   + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + <%-- Display reflection entries --%> + +

+ +

+ +

+ +

+

+ +

+
+
+ +
+ + + + + + +
Index: lams_tool_preview/web/pages/learning/definelater.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/learning/definelater.jsp (revision 0) +++ lams_tool_preview/web/pages/learning/definelater.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,21 @@ + + +<%@include file="/common/taglibs.jsp"%> + + + + <%@ include file="/common/header.jsp"%> + + + + +
+

+ +

+ +
+ + +
Index: lams_tool_preview/web/pages/learning/finish.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/learning/finish.jsp (revision 0) +++ lams_tool_preview/web/pages/learning/finish.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,15 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%-- This page just for : redir finish page to parent rather that part of the frame --%> + + + + + + Index: lams_tool_preview/web/pages/learning/learning.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/learning/learning.jsp (revision 0) +++ lams_tool_preview/web/pages/learning/learning.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,388 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + <fmt:message key="label.learning.title" /> + + <%@ include file="/common/header.jsp"%> + + + + + + + + + + + + + + + + + +
+

+ +

+ +

+ +

+ + +
+ + + + + + + + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + +
+
+ + : ${sessionMap.commentsMinWordsLimit} + +
+
+ + + + + + + + + + + + + + +
+ + + + + +
+ + +
+
+ + + + + + +
+
+ +
+ +
+ + +
+

+ +

+ + + + + + + +

+ + + +

+
+ +

+ +

+
+
+ + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + + + + +
Index: lams_tool_preview/web/pages/learning/notebook.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/learning/notebook.jsp (revision 0) +++ lams_tool_preview/web/pages/learning/notebook.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,66 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + <fmt:message key="label.learning.title" /> + + <%@ include file="/common/header.jsp"%> + + + + + + + + + + + + +
+

+ +

+ + <%@ include file="/common/messages.jsp"%> + +

+ +

+ + + +
+ + + + + + + + + + + + +
+
+
+ + + + + +
Index: lams_tool_preview/web/pages/learning/results.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/learning/results.jsp (revision 0) +++ lams_tool_preview/web/pages/learning/results.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,202 @@ + + +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + + <fmt:message key="label.learning.title" /> + + <%@ include file="/common/header.jsp"%> + + + + + + + + + + + + + + + + + + +
+

+ +

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

+ +

+ + +
+ + +
+

+ + + + + + +

+ + +

+
+ +

+ +

+
+
+ + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + + + + +
Index: lams_tool_preview/web/pages/monitoring/advanceoptions.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/monitoring/advanceoptions.jsp (revision 0) +++ lams_tool_preview/web/pages/monitoring/advanceoptions.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,112 @@ +<%@ include file="/common/taglibs.jsp"%> + +

+ + + + + +

+
+ + Index: lams_tool_preview/web/pages/monitoring/editactivity.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/monitoring/editactivity.jsp (revision 0) +++ lams_tool_preview/web/pages/monitoring/editactivity.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,41 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + +
+ +
+
+ + + + + + + + + + + + + + + +
+ : + + +
+ : + + +
+ + + + + + + +
Index: lams_tool_preview/web/pages/monitoring/monitoring.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/monitoring/monitoring.jsp (revision 0) +++ lams_tool_preview/web/pages/monitoring/monitoring.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,65 @@ + + +<%@ include file="/common/taglibs.jsp"%> +<%@ page import="org.lamsfoundation.lams.tool.peerreview.PeerreviewConstants"%> + + + + <%@ include file="/common/tabbedheader.jsp" %> + + + + + +
+

+ +

+ +
+ + + + + +
+ + +
+ +
Index: lams_tool_preview/web/pages/monitoring/reflections.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/monitoring/reflections.jsp (revision 0) +++ lams_tool_preview/web/pages/monitoring/reflections.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,24 @@ +<%@ include file="/common/taglibs.jsp"%> + +

+ + + + + + + + + + + + + +
+ +
+ - +
+ +
+
Index: lams_tool_preview/web/pages/monitoring/statistic.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/monitoring/statistic.jsp (revision 0) +++ lams_tool_preview/web/pages/monitoring/statistic.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,89 @@ +<%@ include file="/common/taglibs.jsp"%> + + + +<%-- display group name on first row + + +
+ +
+
+ +
+ +
+
+
+ +
+ + + + + + + + +

${group.sessionName}

+
+ + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + ${item.viewNumber} + + + 0 + + +
+
+--%> \ No newline at end of file Index: lams_tool_preview/web/pages/monitoring/summary.jsp =================================================================== diff -u --- lams_tool_preview/web/pages/monitoring/summary.jsp (revision 0) +++ lams_tool_preview/web/pages/monitoring/summary.jsp (revision 9f2c1f957570c3885c34d8d162a1f14d82e3aba2) @@ -0,0 +1,147 @@ +<%@ include file="/common/taglibs.jsp"%> + + + + + + + + + + + + + +

+ +

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

+ ${groupSummary.sessionName} +

+
+
+ +
+
+ +
+ + + <%@ include file="reflections.jsp"%> + + +<%@ include file="advanceoptions.jsp"%>