Index: lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/ForumConfigItem.hbm.xml
===================================================================
diff -u
--- lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/ForumConfigItem.hbm.xml (revision 0)
+++ lams_tool_forum/conf/hibernate/mappings/org/lamsfoundation/lams/tool/forum/persistence/ForumConfigItem.hbm.xml (revision d71c8a085fb0ea3c341f2cf46df958c356d88ec7)
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
Index: lams_tool_forum/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -r51408ee6d48b84e64c4acbbf4d6e95ddb7ea3ddc -rd71c8a085fb0ea3c341f2cf46df958c356d88ec7
--- lams_tool_forum/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 51408ee6d48b84e64c4acbbf4d6e95ddb7ea3ddc)
+++ lams_tool_forum/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision d71c8a085fb0ea3c341f2cf46df958c356d88ec7)
@@ -1,249 +1,253 @@
-appName = forum
-#language code: en
-#locale code: AU
-
- # Exported from the LAMS Community by Ernie Ghiglione on Mon Mar 27 23:48:33 CST 2017
-
-#=================== labels for Forum =================#
-
-activity.title =Forum
-activity.description =Online threaded discussion tool (asynchronous).
-activity.helptext =Discussion tool useful for long running collaborations and situations where learners are not all on line at the same time.
-tool.display.name =Forum Tool
-tool.description =Tool for forums, also known as message boards.
-label.authoring.heading.basic =Forum
-label.authoring.create.new.topic =Create topic
-label.authoring.basic.title =Title
-label.authoring.basic.instruction =Instructions
-label.authoring.advance.lock.on.finished =Lock when finished
-label.authoring.save.button =Save
-label.authoring.cancel.button =Cancel
-label.authoring.advance.allow.edit =Allow learners to change their own postings
-label.authoring.advance.use.richeditor =Allow learners to use rich text editor
-label.authoring.advance.limited.input =Maximum number of characters per posting
-lable.topic.title.subject =Subject
-lable.topic.title.body =Body
-lable.topic.title.update =Last post
-lable.topic.title.author =Author
-lable.topic.title.startedby =Started by
-lable.topic.title.replies =Replies
-lable.topic.title.mark =Mark
-lable.topic.subject.by =By
-label.back.to.forum =Back to topics
-lable.topic.title.message.number =# of Msg
-lable.topic.title.average.mark =Aver mark
-page.title.monitoring.content.userlist =Summary
-page.title.monitoring.view.user.mark =View user mark
-page.title.monitoring.edit.user.mark =Edit user mark
-page.title.monitoring.view.activity =View Activity
-page.title.monitoring.edit.activity =Edit Activity
-page.title.monitoring.view.instructions =View instructions
-page.title.monitoring.view.topic =View topic
-page.title.monitoring.statistic =Statistic
-page.title.monitoring.definelater =Forum Tool Define
-label.monitoring.edit.activity.cancel =Cancel
-label.monitoring.edit.activity.update =Update
-label.monitoring.edit.activity.edit =Edit
-label.monitoring.statistic.average.mark =Average message mark
-lable.monitoring.statistic.total.message =# of total message
-error.valueReqd =Value Required
-error.mark.needNumber =Mark must be a number
-error.mark.invalid.number =Mark is invalid number format
-error.title.empty =Title can not be blank
-title.messageTopic.open =Topic Details
-title.message.add =Add Message
-title.message.open =View Message
-title.message.reply =Reply Message
-title.message.edit =Edit Message
-title.message.view =Message Board
-title.message.view.topic =View Message
-title.message.delete =Delete Message
-message.label.subject =Subject
-message.label.body =Body
-message.label.attachment =Attachment
-message.label.postedOn =Posted on:
-message.label.threadReplies =Thread replies
-message.link.reply =Reply
-label.open =Open
-label.delete =Delete
-label.view =View
-label.edit =Edit
-label.reply =Reply
-label.done =Done
-label.finish =Next Activity
-label.newtopic =New Topic
-label.refresh =Refresh
-lable.char.left =Characters left
-label.basic =Basic
-label.advanced =Advanced
-label.instructions =Instructions
-button.upload =Upload
-button.done =Done
-button.submit =Submit
-button.on =On
-button.off =Off
-button.add =Add
-button.cancel =Cancel
-js.error.invalid.number =The input is invalid number format
-js.error.min.number =The input must be greater than 0
-js.error.title =The following error(s) occurred:
-monitoring.tab.summary =Summary
-monitoring.tab.edit.activity =Edit Activity
-monitoring.user.post.topic =provides following posts:
-lable.topic.title.comment =Comment
-message.not.avaliable =Not Available
-lable.update.mark =Update mark
-message.assign.mark =Please assign a mark and a comment for the report by
-message.session.name =Session Name
-message.monitoring.summary.no.users =No users available
-message.view.all.marks =View all marks
-message.download.marks =Download marks
-label.monitoring.summary.view.forum =View forum
-message.monitoring.summary.no.session =No Session Available
-topic.message.subject.hidden =Message subject hidden
-topic.message.body.hidden =Message body hidden
-label.show =Show
-label.hide =Hide
-page.title.monitoring.init =Forum Monitoring
-monitoring.tab.statistics =Statistics
-label.save =Save
-label.cancel =Cancel
-authoring.tab.basic =Basic
-authoring.tab.advanced =Advanced
-page.title.authoring.init =Forum Authoring
-authoring.msg.cancel.save =Do you want to close this window without saving?
-define.later.message =Please wait for the instructor to complete the contents of this activity.
-button.try.again =Try again
-button.close =Close
-button.release.mark =Release marks
-msg.mark.released =Marks in {0} have been released.
-label.authoring.advance.allow.upload =Allow learners to add attachments
-label.authoring.advance.allow.new.topics =Allow learners to create new topics
-label.authoring.advance.number.reply =Number of posts per learner per thread.
-label.authoring.advance.minimum.reply =Minimum:
-label.authoring.advance.maximum.reply =Maximum:
-label.authoring.advance.no.minimum =No minimum
-label.authoring.advance.no.maximum =No maximum
-error.min.less.max =The maximum number of posts must be greater than or equal to the minimum number of posts.
-error.limit.char.less.zero =Limitation of input characters must be greater zero.
-error.less.mini.post =You must contribute at least {0} posts in each topic before finish.
-error.must.have.topic =Please add at least 1 topic when "allow learners to create new topics" option is off.
-topic.message.attachment.hidden =Message attachment hidden
-message.posting.limiting =Posting limits
-advanced.reflectOnActivity =Add a notebook at end of forum with the following instructions:
-error.reflection.emtpy =Please input notebook entry
-title.reflection =Notebook Entry
-label.continue =Continue
-monitoring.user.fullname =Name
-monitoring.user.loginname =Login
-monitoring.user.reflection =Notebook entry
-page.title.monitoring.view.reflection =View Notebook entries
-label.default.user.name =Instructor
-error.subject.required =Subject can not be blank.
-error.body.required =Body can not be blank.
-title.original.message.reply =Original message
-output.desc.learner.number.of.posts =Learner's number of postings in the forum
-label.download.marks.heading.date =Date
-label.download.marks.heading.marks =Marks
-label.download.marks.heading.comments =Comments
-label.responses.locked =Note: After you click on "Next Activity" and you come back to this Forum, you won't be able to continue posting.
-label.responses.locked.reminder =The instructor has set this activity not to allow postings after you have finished it. As you are returning to this Forum again, you are able to see all threads but not allow to post anymore.
-monitoring.marked.question =Marked?
-label.postingLimits.forum.reminder =Posting limitations for this forum: Minimum {0} and Maximum {1} per thread.
-label.postingLimits.topic.reminder =Posting for this thread: Minimum {0} and Maximum {1}. You have posted {2} message(s).
-label.export.reflection =Notebook Entries
-label.yes =Yes
-label.no =No
-label.on =On
-label.off =Off
-monitor.summary.th.advancedSettings =Advanced settings
-monitor.summary.td.addNotebook =Add a notebook at the end of Forum
-monitor.summary.td.notebookInstructions =Notebook instructions
-label.authoring.advanced.notify.mark.release =Notify learners when marks are released.
-event.mark.release.subject =LAMS: Marks were released
-event.mark.release.body =An instructor released marks in a Forum activity in LAMS.\nYour marks are:\n\n{0}\nThis message was sent automatically, please do not reply to it.
-event.mark.release.mark =For the message titled "{0}" posted on {1} the mark is {2}. \n
-authoring.tab.conditions =Conditions
-label.authoring.heading.conditions.desc =Please enter conditions for Forum
-label.authoring.heading.conditions =Conditions
-label.authoring.conditions.add.condition =Add condition
-label.authoring.conditions.list.title =Conditions
-label.authoring.conditions.order =Order
-label.authoring.conditions.empty.condition.list =There are no conditions
-label.authoring.conditions.condition.name =Name
-label.authoring.up =Up
-label.authoring.down =Down
-error.condition.name.blank =Condition name can not be blank.
-error.condition.duplicated.name =Duplicated name. Please choose unique one.
-error.condition.no.questions.selected =There are no questions selected. Please select at least one.
-error.condition =Error creating condition.
-output.desc.topic.name.to.answers.output.definition.forum =Posts contain certain words
-topic.name.to.answers.output.definition.forum.default.condition =Posts to the first topic contain word "LAMS"
-textsearch.heading =Posts that...
-textsearch.all.words =have all these words:
-textsearch.phrase =have this exact wording or phrase:
-textsearch.any.words =have one or more of these words:
-textsearch.excluded.words =have none of these unwanted words:
-textsearch.topics =Search in these topics:
-lable.topic.title.repliesnew =New
-label.postingLimits.forum.reminder.max =Maximum posting limitations for this forum is {0} per thread.
-label.postingLimits.forum.reminder.min =Minimum posting limitations for this forum is {0} per thread.
-label.postingLimits.topic.reminder.max =Maximum posting for this thread is {0}. You have posted {1} message(s).
-label.postingLimits.topic.reminder.min =Minimum posting for this thread is {0}. You have posted {1} message(s).
-label.authoring.advanced.send.emails.to =On new postings send email to:
-label.authoring.advanced.learners =learners
-label.authoring.advanced.teachers =instructors
-event.newposting.subject =Forum: {0}
-event.newposting.body ={0}:\n{1}\n\n-- email sent automatically by LAMS
-label.authoring.basic.do.you.want.to.delete =Do you really want to delete this topic?
-label.learning.number.of.votes ={0} / {1} votes
-label.authoring.advance.allow.rate.postings =Allow learners to rate each other's postings
-monitor.summary.date.restriction =Deadline
-monitor.summary.when.date.restriction.is.set =Learners will not be able to post messages after the set date and time.
-monitor.summary.after.date =Date/time:
-monitor.summary.set.restriction =Set restriction
-monitor.summary.unset.restriction =Remove restriction
-authoring.info.teacher.set.restriction =For this activity, the instructor fixed a deadline until {0}. After this time this activity will not be available.
-monitor.summary.notification =Notification
-monitor.summary.date.restriction.set =Deadline has been set
-monitor.summary.date.restriction.removed =Deadline has been removed
-errors.maxfilesize =Uploaded file exceeded maximum size: {0}
-error.attachment.executable =Uploaded file is executable
-label.upload.info =Uploaded file must not be executable and not exceed size of {0}
-output.desc.all.users.answers.definition.forum =Each learner's posts sent in the Forum
-label.submit =Finish
-label.rateLimits.forum.reminder =Rating limitation: minimum {0} and maximum {1}.
-label.rateLimits.forum.reminder.min =You must rate at least {0} postings.
-label.rateLimits.forum.reminder.max =You can only rate up to {0} postings.
-js.error.validate.number =There is an error with the minimum and/or maximum set for ratings. Please check and try again.
-label.rateLimits.topic.reminder =You have rated {0} postings already.
-info.minimum.number.characters =The minimum number of characters for your response is {0}.
-warn.minimum.number.characters =You need to enter {0} characters more to proceed.
-label.authoring.advance.min.limited.input =Minimum number of characters per posting
-label.char.required =Characters required
-label.number.of.posts =Posts
-label.latest.posting.date =Latest post on
-label.number.of.replies =Replies
-message.no.reflection.available =No notebook entry was added.
-label.show.more.messages =More posts
-label.loading.messages =Loading more posts
-label.search =Search...
-label.show.replies =Show replies
-label.hide.replies =Hide replies
-label.showhide.prompt =Show/Hide replies
-message.complete.or.cancel.reply =Please complete or cancel the current reply before starting a new reply.
-message.complete.or.cancel.edit =Please complete or cancel the current edit before starting a new edit.
-error.cannot.redisplay.please.refresh =Your changes have been saved but cannot be redisplayed. Please select refresh to reload the forum messages.
-label.posting.options =Posting options
-label.activity.completion =Activity completion
-label.notifications =Notifications
-error.min.post.char.less =The maximum number of characters per posting must be greater than minimum.
-error.min.rate.less.max =The maximum number of ratings must be greater than its minimum.
-js.error.validate.posting.number =There is an error with the minimum and/or maximum set for postings. Please check and try again.
-js.error.validate.reply.number =There is an error with the minimum and/or maximum number of posts per thread.
-label.topics =Topics
-label.authoring.basic.resource.file.input =File
-message.monitoring.edit.activity.not.editable =Activity cannot longer be editted
-
-
-#======= End labels: Exported 238 labels for en AU =====
+appName = forum
+#language code: en
+#locale code: AU
+
+ # Exported from the LAMS Community by Ernie Ghiglione on Mon Mar 27 23:48:33 CST 2017
+
+#=================== labels for Forum =================#
+
+activity.title =Forum
+activity.description =Online threaded discussion tool (asynchronous).
+activity.helptext =Discussion tool useful for long running collaborations and situations where learners are not all on line at the same time.
+tool.display.name =Forum Tool
+tool.description =Tool for forums, also known as message boards.
+label.authoring.heading.basic =Forum
+label.authoring.create.new.topic =Create topic
+label.authoring.basic.title =Title
+label.authoring.basic.instruction =Instructions
+label.authoring.advance.lock.on.finished =Lock when finished
+label.authoring.save.button =Save
+label.authoring.cancel.button =Cancel
+label.authoring.advance.allow.edit =Allow learners to change their own postings
+label.authoring.advance.use.richeditor =Allow learners to use rich text editor
+label.authoring.advance.limited.input =Maximum number of characters per posting
+lable.topic.title.subject =Subject
+lable.topic.title.body =Body
+lable.topic.title.update =Last post
+lable.topic.title.author =Author
+lable.topic.title.startedby =Started by
+lable.topic.title.replies =Replies
+lable.topic.title.mark =Mark
+lable.topic.subject.by =By
+label.back.to.forum =Back to topics
+lable.topic.title.message.number =# of Msg
+lable.topic.title.average.mark =Aver mark
+page.title.monitoring.content.userlist =Summary
+page.title.monitoring.view.user.mark =View user mark
+page.title.monitoring.edit.user.mark =Edit user mark
+page.title.monitoring.view.activity =View Activity
+page.title.monitoring.edit.activity =Edit Activity
+page.title.monitoring.view.instructions =View instructions
+page.title.monitoring.view.topic =View topic
+page.title.monitoring.statistic =Statistic
+page.title.monitoring.definelater =Forum Tool Define
+label.monitoring.edit.activity.cancel =Cancel
+label.monitoring.edit.activity.update =Update
+label.monitoring.edit.activity.edit =Edit
+label.monitoring.statistic.average.mark =Average message mark
+lable.monitoring.statistic.total.message =# of total message
+error.valueReqd =Value Required
+error.mark.needNumber =Mark must be a number
+error.mark.invalid.number =Mark is invalid number format
+error.title.empty =Title can not be blank
+title.messageTopic.open =Topic Details
+title.message.add =Add Message
+title.message.open =View Message
+title.message.reply =Reply Message
+title.message.edit =Edit Message
+title.message.view =Message Board
+title.message.view.topic =View Message
+title.message.delete =Delete Message
+message.label.subject =Subject
+message.label.body =Body
+message.label.attachment =Attachment
+message.label.postedOn =Posted on:
+message.label.threadReplies =Thread replies
+message.link.reply =Reply
+label.open =Open
+label.delete =Delete
+label.view =View
+label.edit =Edit
+label.reply =Reply
+label.done =Done
+label.finish =Next Activity
+label.newtopic =New Topic
+label.refresh =Refresh
+lable.char.left =Characters left
+label.basic =Basic
+label.advanced =Advanced
+label.instructions =Instructions
+button.upload =Upload
+button.done =Done
+button.submit =Submit
+button.on =On
+button.off =Off
+button.add =Add
+button.cancel =Cancel
+js.error.invalid.number =The input is invalid number format
+js.error.min.number =The input must be greater than 0
+js.error.title =The following error(s) occurred:
+monitoring.tab.summary =Summary
+monitoring.tab.edit.activity =Edit Activity
+monitoring.user.post.topic =provides following posts:
+lable.topic.title.comment =Comment
+message.not.avaliable =Not Available
+lable.update.mark =Update mark
+message.assign.mark =Please assign a mark and a comment for the report by
+message.session.name =Session Name
+message.monitoring.summary.no.users =No users available
+message.view.all.marks =View all marks
+message.download.marks =Download marks
+label.monitoring.summary.view.forum =View forum
+message.monitoring.summary.no.session =No Session Available
+topic.message.subject.hidden =Message subject hidden
+topic.message.body.hidden =Message body hidden
+label.show =Show
+label.hide =Hide
+page.title.monitoring.init =Forum Monitoring
+monitoring.tab.statistics =Statistics
+label.save =Save
+label.cancel =Cancel
+authoring.tab.basic =Basic
+authoring.tab.advanced =Advanced
+page.title.authoring.init =Forum Authoring
+authoring.msg.cancel.save =Do you want to close this window without saving?
+define.later.message =Please wait for the instructor to complete the contents of this activity.
+button.try.again =Try again
+button.close =Close
+button.release.mark =Release marks
+msg.mark.released =Marks in {0} have been released.
+label.authoring.advance.allow.upload =Allow learners to add attachments
+label.authoring.advance.allow.new.topics =Allow learners to create new topics
+label.authoring.advance.number.reply =Number of posts per learner per thread.
+label.authoring.advance.minimum.reply =Minimum:
+label.authoring.advance.maximum.reply =Maximum:
+label.authoring.advance.no.minimum =No minimum
+label.authoring.advance.no.maximum =No maximum
+error.min.less.max =The maximum number of posts must be greater than or equal to the minimum number of posts.
+error.limit.char.less.zero =Limitation of input characters must be greater zero.
+error.less.mini.post =You must contribute at least {0} posts in each topic before finish.
+error.must.have.topic =Please add at least 1 topic when "allow learners to create new topics" option is off.
+topic.message.attachment.hidden =Message attachment hidden
+message.posting.limiting =Posting limits
+advanced.reflectOnActivity =Add a notebook at end of forum with the following instructions:
+error.reflection.emtpy =Please input notebook entry
+title.reflection =Notebook Entry
+label.continue =Continue
+monitoring.user.fullname =Name
+monitoring.user.loginname =Login
+monitoring.user.reflection =Notebook entry
+page.title.monitoring.view.reflection =View Notebook entries
+label.default.user.name =Instructor
+error.subject.required =Subject can not be blank.
+error.body.required =Body can not be blank.
+title.original.message.reply =Original message
+output.desc.learner.number.of.posts =Learner's number of postings in the forum
+label.download.marks.heading.date =Date
+label.download.marks.heading.marks =Marks
+label.download.marks.heading.comments =Comments
+label.responses.locked =Note: After you click on "Next Activity" and you come back to this Forum, you won't be able to continue posting.
+label.responses.locked.reminder =The instructor has set this activity not to allow postings after you have finished it. As you are returning to this Forum again, you are able to see all threads but not allow to post anymore.
+monitoring.marked.question =Marked?
+label.postingLimits.forum.reminder =Posting limitations for this forum: Minimum {0} and Maximum {1} per thread.
+label.postingLimits.topic.reminder =Posting for this thread: Minimum {0} and Maximum {1}. You have posted {2} message(s).
+label.export.reflection =Notebook Entries
+label.yes =Yes
+label.no =No
+label.on =On
+label.off =Off
+monitor.summary.th.advancedSettings =Advanced settings
+monitor.summary.td.addNotebook =Add a notebook at the end of Forum
+monitor.summary.td.notebookInstructions =Notebook instructions
+label.authoring.advanced.notify.mark.release =Notify learners when marks are released.
+event.mark.release.subject =LAMS: Marks were released
+event.mark.release.body =An instructor released marks in a Forum activity in LAMS.\nYour marks are:\n\n{0}\nThis message was sent automatically, please do not reply to it.
+event.mark.release.mark =For the message titled "{0}" posted on {1} the mark is {2}. \n
+authoring.tab.conditions =Conditions
+label.authoring.heading.conditions.desc =Please enter conditions for Forum
+label.authoring.heading.conditions =Conditions
+label.authoring.conditions.add.condition =Add condition
+label.authoring.conditions.list.title =Conditions
+label.authoring.conditions.order =Order
+label.authoring.conditions.empty.condition.list =There are no conditions
+label.authoring.conditions.condition.name =Name
+label.authoring.up =Up
+label.authoring.down =Down
+error.condition.name.blank =Condition name can not be blank.
+error.condition.duplicated.name =Duplicated name. Please choose unique one.
+error.condition.no.questions.selected =There are no questions selected. Please select at least one.
+error.condition =Error creating condition.
+output.desc.topic.name.to.answers.output.definition.forum =Posts contain certain words
+topic.name.to.answers.output.definition.forum.default.condition =Posts to the first topic contain word "LAMS"
+textsearch.heading =Posts that...
+textsearch.all.words =have all these words:
+textsearch.phrase =have this exact wording or phrase:
+textsearch.any.words =have one or more of these words:
+textsearch.excluded.words =have none of these unwanted words:
+textsearch.topics =Search in these topics:
+lable.topic.title.repliesnew =New
+label.postingLimits.forum.reminder.max =Maximum posting limitations for this forum is {0} per thread.
+label.postingLimits.forum.reminder.min =Minimum posting limitations for this forum is {0} per thread.
+label.postingLimits.topic.reminder.max =Maximum posting for this thread is {0}. You have posted {1} message(s).
+label.postingLimits.topic.reminder.min =Minimum posting for this thread is {0}. You have posted {1} message(s).
+label.authoring.advanced.send.emails.to =On new postings send email to:
+label.authoring.advanced.learners =learners
+label.authoring.advanced.teachers =instructors
+event.newposting.subject =Forum: {0}
+event.newposting.body ={0}:\n{1}\n\n-- email sent automatically by LAMS
+label.authoring.basic.do.you.want.to.delete =Do you really want to delete this topic?
+label.learning.number.of.votes ={0} / {1} votes
+label.authoring.advance.allow.rate.postings =Allow learners to rate each other's postings
+monitor.summary.date.restriction =Deadline
+monitor.summary.when.date.restriction.is.set =Learners will not be able to post messages after the set date and time.
+monitor.summary.after.date =Date/time:
+monitor.summary.set.restriction =Set restriction
+monitor.summary.unset.restriction =Remove restriction
+authoring.info.teacher.set.restriction =For this activity, the instructor fixed a deadline until {0}. After this time this activity will not be available.
+monitor.summary.notification =Notification
+monitor.summary.date.restriction.set =Deadline has been set
+monitor.summary.date.restriction.removed =Deadline has been removed
+errors.maxfilesize =Uploaded file exceeded maximum size: {0}
+error.attachment.executable =Uploaded file is executable
+label.upload.info =Uploaded file must not be executable and not exceed size of {0}
+output.desc.all.users.answers.definition.forum =Each learner's posts sent in the Forum
+label.submit =Finish
+label.rateLimits.forum.reminder =Rating limitation: minimum {0} and maximum {1}.
+label.rateLimits.forum.reminder.min =You must rate at least {0} postings.
+label.rateLimits.forum.reminder.max =You can only rate up to {0} postings.
+js.error.validate.number =There is an error with the minimum and/or maximum set for ratings. Please check and try again.
+label.rateLimits.topic.reminder =You have rated {0} postings already.
+info.minimum.number.characters =The minimum number of characters for your response is {0}.
+warn.minimum.number.characters =You need to enter {0} characters more to proceed.
+label.authoring.advance.min.limited.input =Minimum number of characters per posting
+label.char.required =Characters required
+label.number.of.posts =Posts
+label.latest.posting.date =Latest post on
+label.number.of.replies =Replies
+message.no.reflection.available =No notebook entry was added.
+label.show.more.messages =More posts
+label.loading.messages =Loading more posts
+label.search =Search...
+label.show.replies =Show replies
+label.hide.replies =Hide replies
+label.showhide.prompt =Show/Hide replies
+message.complete.or.cancel.reply =Please complete or cancel the current reply before starting a new reply.
+message.complete.or.cancel.edit =Please complete or cancel the current edit before starting a new edit.
+error.cannot.redisplay.please.refresh =Your changes have been saved but cannot be redisplayed. Please select refresh to reload the forum messages.
+label.posting.options =Posting options
+label.activity.completion =Activity completion
+label.notifications =Notifications
+error.min.post.char.less =The maximum number of characters per posting must be greater than minimum.
+error.min.rate.less.max =The maximum number of ratings must be greater than its minimum.
+js.error.validate.posting.number =There is an error with the minimum and/or maximum set for postings. Please check and try again.
+js.error.validate.reply.number =There is an error with the minimum and/or maximum number of posts per thread.
+label.topics =Topics
+label.authoring.basic.resource.file.input =File
+message.monitoring.edit.activity.not.editable =Activity cannot longer be editted
+admin.page.title =Forum Settings
+admin.success =Configuration successfully saved.
+admin.return =Return to maintain LAMS
+admin.button.save =Save
+admin.keep.learner.content =Never delete learner added posts
+
+#======= End labels: Exported 238 labels for en AU =====
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20170707.sql
===================================================================
diff -u
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20170707.sql (revision 0)
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/dbupdates/patch20170707.sql (revision d71c8a085fb0ea3c341f2cf46df958c356d88ec7)
@@ -0,0 +1,24 @@
+-- Turn off autocommit, so nothing is committed if there is an error
+SET AUTOCOMMIT = 0;
+SET FOREIGN_KEY_CHECKS=0;
+----------------------Put all sql statements below here-------------------------
+
+-- LDEV-4371 Add Forum admin page
+CREATE TABLE tl_lafrum11_configuration (
+ uid bigint(20) NOT NULL AUTO_INCREMENT,
+ config_key VARCHAR(30),
+ config_value VARCHAR(255),
+ PRIMARY KEY (uid),
+ UNIQUE KEY config_key (config_key)
+);
+
+INSERT INTO tl_lafrum11_configuration (config_key, config_value) VALUES ('keepLearnerContent', 'false');
+
+UPDATE lams_tool SET admin_url='tool/lafrum11/admin/start.do' WHERE tool_signature='lafrum11';
+
+----------------------Put all sql statements above here-------------------------
+
+-- If there were no errors, commit and restore autocommit to on
+COMMIT;
+SET AUTOCOMMIT = 1;
+SET FOREIGN_KEY_CHECKS=1;
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/forumApplicationContext.xml
===================================================================
diff -u -ra6641bf9262a01d07740a517643f8fe187ec5b1f -rd71c8a085fb0ea3c341f2cf46df958c356d88ec7
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/forumApplicationContext.xml (.../forumApplicationContext.xml) (revision a6641bf9262a01d07740a517643f8fe187ec5b1f)
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/forumApplicationContext.xml (.../forumApplicationContext.xml) (revision d71c8a085fb0ea3c341f2cf46df958c356d88ec7)
@@ -1,201 +1,201 @@
-
-
-
-
-
-
-
- org.lamsfoundation.lams.tool.forum.ApplicationResources
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
- PROPAGATION_REQUIRED,readOnly,-java.lang.Exception
- PROPAGATION_REQUIRED,readOnly,-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
- 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
-
-
-
-
+
+
+
+
+
+
+
+ org.lamsfoundation.lams.tool.forum.ApplicationResources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+
+
+
+
+
+
+ PROPAGATION_REQUIRED,readOnly,-java.lang.Exception
+ PROPAGATION_REQUIRED,readOnly,-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
+ 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
+
+
+
+
\ No newline at end of file
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumConfigItem.java
===================================================================
diff -u
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumConfigItem.java (revision 0)
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/persistence/ForumConfigItem.java (revision d71c8a085fb0ea3c341f2cf46df958c356d88ec7)
@@ -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
+ * ****************************************************************
+ */
+
+package org.lamsfoundation.lams.tool.forum.persistence;
+
+public class ForumConfigItem implements java.io.Serializable {
+
+ private static final long serialVersionUID = 1618184711102211756L;
+
+ public static final String KEY_KEEP_LEARNER_CONTENT = "keepLearnerContent";
+
+ private Long id;
+ private String configKey;
+ private String configValue;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getConfigKey() {
+ return configKey;
+ }
+
+ public void setConfigKey(String configKey) {
+ this.configKey = configKey;
+ }
+
+ public String getConfigValue() {
+ return configValue;
+ }
+
+ public void setConfigValue(String configValue) {
+ this.configValue = configValue;
+ }
+}
\ No newline at end of file
Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java
===================================================================
diff -u -r2abc3485dc2d24ea02044a64271f3ee0d3b8c11b -rd71c8a085fb0ea3c341f2cf46df958c356d88ec7
--- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java (.../ForumService.java) (revision 2abc3485dc2d24ea02044a64271f3ee0d3b8c11b)
+++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/service/ForumService.java (.../ForumService.java) (revision d71c8a085fb0ea3c341f2cf46df958c356d88ec7)
@@ -1,1595 +1,1614 @@
-/****************************************************************
- * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org)
- * =============================================================
- * License Information: http://lamsfoundation.org/licensing/lams/2.0/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2.0
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
- * USA
- *
- * http://www.gnu.org/licenses/gpl.txt
- * ****************************************************************
- */
-
-
-package org.lamsfoundation.lams.tool.forum.service;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Random;
-import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.apache.struts.upload.FormFile;
-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.contentrepository.AccessDeniedException;
-import org.lamsfoundation.lams.contentrepository.ICredentials;
-import org.lamsfoundation.lams.contentrepository.ITicket;
-import org.lamsfoundation.lams.contentrepository.InvalidParameterException;
-import org.lamsfoundation.lams.contentrepository.LoginException;
-import org.lamsfoundation.lams.contentrepository.NodeKey;
-import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
-import org.lamsfoundation.lams.contentrepository.WorkspaceNotFoundException;
-import org.lamsfoundation.lams.contentrepository.service.IRepositoryService;
-import org.lamsfoundation.lams.contentrepository.service.SimpleCredentials;
-import org.lamsfoundation.lams.events.IEventNotificationService;
-import org.lamsfoundation.lams.gradebook.service.IGradebookService;
-import org.lamsfoundation.lams.learning.service.ILearnerService;
-import org.lamsfoundation.lams.learningdesign.ToolActivity;
-import org.lamsfoundation.lams.learningdesign.dao.IActivityDAO;
-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.lesson.service.ILessonService;
-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.rest.RestTags;
-import org.lamsfoundation.lams.rest.ToolRestManager;
-import org.lamsfoundation.lams.tool.ToolCompletionStatus;
-import org.lamsfoundation.lams.tool.ToolContentManager;
-import org.lamsfoundation.lams.tool.ToolOutput;
-import org.lamsfoundation.lams.tool.ToolOutputDefinition;
-import org.lamsfoundation.lams.tool.ToolSession;
-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.ToolException;
-import org.lamsfoundation.lams.tool.forum.dto.AverageRatingDTO;
-import org.lamsfoundation.lams.tool.forum.dto.MessageDTO;
-import org.lamsfoundation.lams.tool.forum.persistence.Attachment;
-import org.lamsfoundation.lams.tool.forum.persistence.Forum;
-import org.lamsfoundation.lams.tool.forum.persistence.ForumCondition;
-import org.lamsfoundation.lams.tool.forum.persistence.ForumException;
-import org.lamsfoundation.lams.tool.forum.persistence.ForumReport;
-import org.lamsfoundation.lams.tool.forum.persistence.ForumToolSession;
-import org.lamsfoundation.lams.tool.forum.persistence.ForumUser;
-import org.lamsfoundation.lams.tool.forum.persistence.IAttachmentDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.IForumDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.IForumToolSessionDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.IForumUserDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.IMessageDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.IMessageRatingDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.IMessageSeqDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.ITimestampDAO;
-import org.lamsfoundation.lams.tool.forum.persistence.Message;
-import org.lamsfoundation.lams.tool.forum.persistence.MessageRating;
-import org.lamsfoundation.lams.tool.forum.persistence.MessageSeq;
-import org.lamsfoundation.lams.tool.forum.persistence.PersistenceException;
-import org.lamsfoundation.lams.tool.forum.persistence.Timestamp;
-import org.lamsfoundation.lams.tool.forum.util.DateComparator;
-import org.lamsfoundation.lams.tool.forum.util.ForumConstants;
-import org.lamsfoundation.lams.tool.forum.util.ForumToolContentHandler;
-import org.lamsfoundation.lams.tool.forum.util.MessageDtoComparator;
-import org.lamsfoundation.lams.tool.forum.util.TopicComparator;
-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;
-import org.lamsfoundation.lams.util.audit.IAuditService;
-
-/**
- *
- * @author Steve.Ni
- *
- * @version $Revision$
- */
-public class ForumService implements IForumService, ToolContentManager, ToolSessionManager, ToolRestManager {
- private static final Logger log = Logger.getLogger(ForumService.class);
-
- // DAO variables
- private IForumDAO forumDao;
-
- private IAttachmentDAO attachmentDao;
-
- private IMessageDAO messageDao;
-
- private ITimestampDAO timestampDao;
-
- private IMessageSeqDAO messageSeqDao;
-
- private IMessageRatingDAO messageRatingDao;
-
- private IForumUserDAO forumUserDao;
-
- private IForumToolSessionDAO forumToolSessionDao;
-
- // system level handler and service
- private ILamsToolService toolService;
-
- private ForumToolContentHandler forumToolContentHandler;
-
- private IRepositoryService repositoryService;
-
- private ILearnerService learnerService;
-
- private IAuditService auditService;
-
- private MessageService messageService;
-
- private IExportToolContentService exportContentService;
-
- private IUserManagementService userManagementService;
-
- private ICoreNotebookService coreNotebookService;
-
- private ForumOutputFactory forumOutputFactory;
-
- private IGradebookService gradebookService;
-
- private IEventNotificationService eventNotificationService;
-
- private ILessonService lessonService;
-
- private IActivityDAO activityDAO;
-
- private Random generator = new Random();
-
- // ---------------------------------------------------------------------
- // Inversion of Control Methods - Method injection
- // ---------------------------------------------------------------------
- public void setAuditService(IAuditService auditService) {
- this.auditService = auditService;
- }
-
- @Override
- public IAuditService getAuditService() {
- return auditService;
- }
-
- public void setMessageService(MessageService messageService) {
- this.messageService = messageService;
- }
-
- public ForumOutputFactory getForumOutputFactory() {
- return forumOutputFactory;
- }
-
- public void setForumOutputFactory(ForumOutputFactory forumOutputFactory) {
- this.forumOutputFactory = forumOutputFactory;
- }
-
- @Override
- public Forum updateForum(Forum forum) throws PersistenceException {
- forumDao.saveOrUpdate(forum);
- return forum;
- }
-
- @Override
- public Forum getForum(Long forumUid) throws PersistenceException {
- return forumDao.getById(forumUid);
- }
-
- @Override
- public Forum getForumByContentId(Long contentID) throws PersistenceException {
- return forumDao.getByContentId(contentID);
- }
-
- public void deleteForumAttachment(Long attachmentId) throws PersistenceException {
- Attachment attachment = attachmentDao.getById(attachmentId);
- attachmentDao.delete(attachment);
- }
-
- @Override
- public Message createRootTopic(Long forumId, Long sessionId, Message message) throws PersistenceException {
- return createRootTopic(forumId, getSessionBySessionId(sessionId), message);
- }
-
- public Message createRootTopic(Long forumId, ForumToolSession session, Message message)
- throws PersistenceException {
- // get Forum and ForumToolSesion
- if (message.getForum() == null) {
- Forum forum = forumDao.getById(forumId);
- message.setForum(forum);
- }
- // if topic created by author, session will be null.
- if (session != null) {
- message.setToolSession(session);
- }
-
- if (message.getUid() == null) {
- // update message sequence
- MessageSeq msgSeq = new MessageSeq();
- msgSeq.setMessage(message);
- msgSeq.setMessageLevel((short) 0);
- // set itself as root
- msgSeq.setRootMessage(message);
- messageSeqDao.save(msgSeq);
- }
-
- // if this message had any cloned objects, they also need to be changed.
- // this will only happen if an authored topic is changed via monitoring
- if (message.getSessionClones().size() > 0) {
- Iterator iter = message.getSessionClones().iterator();
- while (iter.hasNext()) {
- Message clone = (Message) iter.next();
- message.updateClone(clone);
- clone.updateModificationData();
- messageDao.saveOrUpdate(clone);
- }
- }
-
- // create message in database
- message.updateModificationData();
- messageDao.saveOrUpdate(message);
-
- return message;
- }
-
- @Override
- public Message updateTopic(Message message) throws PersistenceException {
-
- // update message
- message.updateModificationData();
- messageDao.saveOrUpdate(message);
-
- // udate root message's lastReplyDate
- MessageSeq msgSeq = messageSeqDao.getByTopicId(message.getUid());
- Message root = msgSeq.getRootMessage();
- root.setLastReplyDate(new Date());
- messageDao.saveOrUpdate(root);
-
- return message;
- }
-
- @Override
- public List getMessageAsDTO(Long messageUid) throws PersistenceException {
-
- MessageSeq msgSeq = messageSeqDao.getByMessageId(messageUid);
- List msgDtoList = new ArrayList();
- msgDtoList.add(makeDTOSetRating(msgSeq, msgSeq.getMessage()));
- return msgDtoList;
- }
-
- @Override
- public void updateContainedReport(Message message) {
- messageDao.saveOrUpdate(message);
- }
-
- @Override
- public Message updateMessageHideFlag(Long messageId, boolean hideFlag) {
-
- Message message = getMessage(messageId);
- if (message != null) {
- Long userId = 0L;
- String loginName = "Default";
- if (message.getCreatedBy() != null) {
- userId = message.getCreatedBy().getUserId();
- loginName = message.getCreatedBy().getLoginName();
- }
- if (hideFlag) {
- auditService.logHideEntry(ForumConstants.TOOL_SIGNATURE, userId, loginName, message.toString());
- } else {
- auditService.logShowEntry(ForumConstants.TOOL_SIGNATURE, userId, loginName, message.toString());
- }
-
- message.setHideFlag(hideFlag);
-
- // update message
- messageDao.update(message);
- }
- return message;
- }
-
- private Message getMessageForUpdate(Long messageUid) throws PersistenceException {
- return messageDao.getByIdForUpdate(messageUid);
- }
-
- @Override
- public Message getMessage(Long messageUid) throws PersistenceException {
- return messageDao.getById(messageUid);
- }
-
- @Override
- public void deleteTopic(Long topicUid) throws PersistenceException {
- Message topic = messageDao.getById(topicUid);
-
- // cascade delete children topic by recursive
- List children = messageDao.getChildrenTopics(topicUid);
- if (children != null) {
- Iterator iter = children.iterator();
- while (iter.hasNext()) {
- Message msg = (Message) iter.next();
- this.deleteTopic(msg.getUid());
- }
- }
-
- // recursively delete clones
- for (Message clone : (Set) topic.getSessionClones()) {
- this.deleteTopic(clone.getUid());
- }
-
- messageSeqDao.deleteByTopicId(topicUid);
- messageDao.delete(topicUid);
- }
-
- @Override
- public void deleteCondition(ForumCondition condition) throws PersistenceException {
- forumDao.deleteCondition(condition);
- }
-
- @Override
- public MessageSeq replyTopic(Long parentId, Long sessionId, Message replyMessage) throws PersistenceException {
- // set parent
- Message parent = this.getMessageForUpdate(parentId);
- replyMessage.setParent(parent);
- replyMessage.setForum(parent.getForum());
- // parent sessionID maybe empty if created by author role. So given sessionId is exactly value.
- ForumToolSession session = getSessionBySessionId(sessionId);
- replyMessage.setToolSession(session);
- replyMessage.updateModificationData();
- messageDao.saveOrUpdate(replyMessage);
-
- // get root topic and create record in MessageSeq table
- MessageSeq parentSeq = messageSeqDao.getByTopicId(parent.getUid());
- if (parentSeq == null) {
- ForumService.log
- .error("Message Sequence table is broken becuase topic " + parent + " can not get Sequence Record");
- }
- Message root = parentSeq.getRootMessage();
- MessageSeq msgSeq = new MessageSeq();
- msgSeq.setMessage(replyMessage);
- msgSeq.setMessageLevel((short) (parentSeq.getMessageLevel() + 1));
- msgSeq.setRootMessage(root);
- // look back up through the parents to find the thread top - will be level 1
- if (msgSeq.getMessageLevel() == 1) {
- msgSeq.setThreadMessage(replyMessage);
- } else {
- MessageSeq threadSeq = parentSeq;
- while (threadSeq.getMessageLevel() > 1) {
- threadSeq = messageSeqDao.getByTopicId(threadSeq.getMessage().getParent().getUid());
- }
- msgSeq.setThreadMessage(threadSeq.getMessage());
- }
- messageSeqDao.save(msgSeq);
-
- // update last reply date for root message
- root.setLastReplyDate(new Date());
- // update reply message number for root
- root.setReplyNumber(root.getReplyNumber() + 1);
- messageDao.saveOrUpdate(root);
-
- return msgSeq;
- }
-
- @Override
- public Attachment uploadAttachment(FormFile uploadFile) throws PersistenceException {
- if ((uploadFile == null) || StringUtils.isEmpty(uploadFile.getFileName())) {
- throw new ForumException("Could not find upload file: " + uploadFile);
- }
-
- NodeKey nodeKey = processFile(uploadFile);
- Attachment file = new Attachment();
- file.setFileUuid(nodeKey.getUuid());
- file.setFileVersionId(nodeKey.getVersion());
- file.setFileName(uploadFile.getFileName());
-
- return file;
- }
-
- @Override
- public List getTopicThread(Long rootTopicId) {
- List unsortedThread = messageSeqDao.getCompleteTopic(rootTopicId);
- Iterator iter = unsortedThread.iterator();
- MessageSeq msgSeq;
- SortedMap map = new TreeMap(new TopicComparator());
- while (iter.hasNext()) {
- msgSeq = (MessageSeq) iter.next();
- map.put(msgSeq, msgSeq.getMessage());
- }
- return getSortedMessageDTO(map);
-
- }
-
- @Override
- public List getTopicThread(Long rootTopicId, Long afterSequenceId, Long pagingSize) {
-
- long lastThreadMessageUid = afterSequenceId != null ? afterSequenceId.longValue() : 0L;
- long usePagingSize = pagingSize != null ? pagingSize.longValue() : ForumConstants.DEFAULT_PAGE_SIZE;
- SortedMap map = new TreeMap(new TopicComparator());
-
- // first time through we need to include the top topic message (level 0)
- if (lastThreadMessageUid == 0) {
- MessageSeq msgSeq = messageSeqDao.getByTopicId(rootTopicId);
- map.put(msgSeq, msgSeq.getMessage());
- }
-
- long count = 0;
- boolean foundEnough = false;
- do {
-
- List msgSeqs = messageSeqDao.getNextThreadByThreadId(rootTopicId, lastThreadMessageUid);
- if (msgSeqs.size() == 0) {
- // no more to come from db
- foundEnough = true;
- } else {
-
- Iterator iter = msgSeqs.iterator();
- while (iter.hasNext()) {
- MessageSeq msgSeq = (MessageSeq) iter.next();
- if (msgSeq.getMessageLevel() == 1) {
- lastThreadMessageUid = msgSeq.getMessage().getUid().longValue();
- }
- map.put(msgSeq, msgSeq.getMessage());
- count++;
- }
- if ((usePagingSize >= 0) && (count >= usePagingSize)) {
- foundEnough = true;
- }
- }
- } while (!foundEnough);
-
- return getSortedMessageDTO(map);
- }
-
- @Override
- public List getThread(Long threadId) {
- List msgSeqs = messageSeqDao.getThreadByThreadId(threadId);
- SortedMap map = new TreeMap(new TopicComparator());
- Iterator iter = msgSeqs.iterator();
- while (iter.hasNext()) {
- MessageSeq msgSeq = (MessageSeq) iter.next();
- map.put(msgSeq, msgSeq.getMessage());
- }
- ;
- return getSortedMessageDTO(map);
- }
-
- @Override
- public List getRootTopics(Long sessionId) {
- ForumToolSession session = getSessionBySessionId(sessionId);
- if ((session == null) || (session.getForum() == null)) {
- ForumService.log.error("Failed on getting session by given sessionID:" + sessionId);
- throw new ForumException("Failed on getting session by given sessionID:" + sessionId);
- }
-
- List topicsBySession = messageDao.getRootTopics(sessionId);
- List messageDTOs = MessageDTO.getMessageDTO(topicsBySession);
-
- // sort by sequence id
- Set topicSet = new TreeSet(new MessageDtoComparator());
- topicSet.addAll(messageDTOs);
-
- topicsBySession.clear();
- topicsBySession.addAll(topicSet);
- return topicsBySession;
- }
-
- @Override
- public int getTopicsNum(Long userID, Long sessionId) {
- return messageDao.getTopicsNum(userID, sessionId);
- }
-
- @Override
- public int getNumOfPostsByTopic(Long userId, Long topicId) {
- return messageSeqDao.getNumOfPostsByTopic(userId, topicId);
- }
-
- @Override
- public ForumUser getUserByID(Long userId) {
- return forumUserDao.getByUserId(userId);
- }
-
- @Override
- public ForumUser getUserByUserAndSession(Long userId, Long sessionId) {
- return forumUserDao.getByUserIdAndSessionId(userId, sessionId);
- }
-
- @Override
- public List