Index: lams_tool_sbmt/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -raa932dd995a61adeed918456c6257a4a9a9cea74 -rc975422008a65f765d147629720d7eb8c10f63a0
--- lams_tool_sbmt/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision aa932dd995a61adeed918456c6257a4a9a9cea74)
+++ lams_tool_sbmt/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision c975422008a65f765d147629720d7eb8c10f63a0)
@@ -108,7 +108,7 @@
event.mark.release.mark = For the file named "{0}" submitted on {1} the mark is {2}\n
label.authoring.advanced.notify.onfilesubmit = Notify instructor when a learner submits a file
event.file.submit.subject = LAMS: A learner submitted a file in a Submit Files tool
-event.file.submit.body = The learner {0} submitted a file in a Submit Files tool.\n\nThis message was send automatically, following tool''s advanced settings.
+event.file.submit.body = Hi,
The learner {0} submitted a file named "{1}" in a Submit Files tool.
The file description is: {2}
This message was sent automatically, following the tool's advanced settings.
Thank you,
LAMS
label.monitor.mark.markedFile = Marked file
label.monitor.mark.updoad = Response
label.monitor.mark.replaceFile = Replace
Index: lams_tool_sbmt/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
diff -u -raa932dd995a61adeed918456c6257a4a9a9cea74 -rc975422008a65f765d147629720d7eb8c10f63a0
--- lams_tool_sbmt/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision aa932dd995a61adeed918456c6257a4a9a9cea74)
+++ lams_tool_sbmt/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision c975422008a65f765d147629720d7eb8c10f63a0)
@@ -108,7 +108,7 @@
event.mark.release.mark = For the file named "{0}" submitted on {1} the mark is {2}\n
label.authoring.advanced.notify.onfilesubmit = Notify instructor when a learner submits a file
event.file.submit.subject = LAMS: A learner submitted a file in a Submit Files tool
-event.file.submit.body = The learner {0} submitted a file in a Submit Files tool.\n\nThis message was send automatically, following tool''s advanced settings.
+event.file.submit.body = Hi,
The learner {0} submitted a file named "{1}" in a Submit Files tool.
The file description is: {2}
This message was sent automatically, following the tool's advanced settings.
Thank you,
LAMS
label.monitor.mark.markedFile = Marked file
label.monitor.mark.updoad = Response
label.monitor.mark.replaceFile = Replace
Index: lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/controller/LearningController.java
===================================================================
diff -u -ra3c7b292fe985dbffe8ae12dacb4a14145bc2fc4 -rc975422008a65f765d147629720d7eb8c10f63a0
--- lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/controller/LearningController.java (.../LearningController.java) (revision a3c7b292fe985dbffe8ae12dacb4a14145bc2fc4)
+++ lams_tool_sbmt/src/java/org/lamsfoundation/lams/tool/sbmt/web/controller/LearningController.java (.../LearningController.java) (revision c975422008a65f765d147629720d7eb8c10f63a0)
@@ -352,9 +352,21 @@
String fileDescription = learnerForm.getDescription();
// reset fields and display a new form for next new file upload
learnerForm.setDescription("");
+
+ SubmitUser learner = getCurrentLearner(sessionID, submitFilesService);
+ SubmitFilesContent content = submitFilesService.getSessionById(sessionID).getContent();
try {
for (File file : files) {
submitFilesService.uploadFileToSession(sessionID, file, fileDescription, userID);
+
+ if (content.isNotifyTeachersOnFileSubmit()) {
+ String message = submitFilesService.getLocalisedMessage("event.file.submit.body",
+ new Object[] { learner.getFullName(), file.getName(), fileDescription });
+
+ submitFilesService.getEventNotificationService().notifyLessonMonitors(sessionID,
+ submitFilesService.getLocalisedMessage("event.file.submit.subject", new Object[] {}),
+ message, true);
+ }
}
} catch (SubmitFilesException e) {
MultiValueMap errorMap = new LinkedMultiValueMap<>();
@@ -367,16 +379,6 @@
FileUtil.deleteTmpFileUploadDir(learnerForm.getTmpFileUploadId());
}
- SubmitUser learner = getCurrentLearner(sessionID, submitFilesService);
-
- SubmitFilesContent content = submitFilesService.getSessionById(sessionID).getContent();
- if (content.isNotifyTeachersOnFileSubmit()) {
-
- String message = submitFilesService.getLocalisedMessage("event.file.submit.body",
- new Object[] { learner.getFullName() });
- submitFilesService.getEventNotificationService().notifyLessonMonitors(sessionID, message, false);
- }
-
request.setAttribute(SbmtConstants.ATTR_SESSION_MAP_ID, sessionMapID);
return "learner/redirectAfterSubmit";
}