-
- <%@ include file="/jsps/learning/message/topiceditform.jsp"%>
-
-
-
-
-
+ } else {
+ // make sure the old edit form is gone, so if something goes wrong
+ // the user won't try to submit it again
+ $('#edit').remove();
+ var loadString = "learning/viewMessage.do?topicID=" + rootUid + "&sessionMapID=" + response.sessionMapID + "&messageUid="+messageUid;
+ $.ajaxSetup({ cache: true });
+ $(messDiv).load(loadString, function() {
+ $('#pb-msg'+messageUid).focus();
+ setupJRating("?toolSessionID=${sessionMap.toolSessionID}&sessionMapID=${sessionMapID}");
+ highlightMessage();
+ });
+ }
-
-
\ No newline at end of file
+ } else {
+ // No valid id? Validation failed! Assume it is the form coming back.
+ $('#edit').html(response);
+ }
+ hideBusy("itemAttachmentArea");
+ }
+ });
+ } // end validateForm()
+ else {
+ enableSubmitButton();
+ }
+ return false;
+ });
+ });
+
+ function cancelEdit() {
+ $('#edit').remove();
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+ <%@ include file="/jsps/learning/message/topiceditform.jsp"%>
+
+
+
\ No newline at end of file
Index: lams_tool_forum/web/jsps/learning/message/bodyarea.jsp
===================================================================
diff -u -rabf11f48c3a772c5715c3e5caa1ecc86d62056a8 -r81f928586161dd03042b6353f68c7d7b8279ccde
--- lams_tool_forum/web/jsps/learning/message/bodyarea.jsp (.../bodyarea.jsp) (revision abf11f48c3a772c5715c3e5caa1ecc86d62056a8)
+++ lams_tool_forum/web/jsps/learning/message/bodyarea.jsp (.../bodyarea.jsp) (revision 81f928586161dd03042b6353f68c7d7b8279ccde)
@@ -1,168 +1,157 @@
<%@ include file="/common/taglibs.jsp"%>
- <%-- for validateForm() method --%>
-
+
-
+ isNewlyInstantiated = false;
-
- :
-
-
-
-
-
-
-
-
-
-
-
- <%-- Use c:out to escape any quotes in the I18N string. Then use html: true converts any escaped quotes back --%>
- <%-- into real quotes. Should be safe from XSS attack as the string is coming from a translation file. --%>
-
-
-
+ //limit exceeded in case of CKEditor
+ } else if (isCkeditor) {
+ //detect key pressed
+ var key = ((evt.data === undefined) || (evt.data.$ === undefined)) ? null : evt.data.$.keyCode || evt.data.$.charCode;
-
-
-
-
\ No newline at end of file
+ //don't block backspace and del
+ if (key == 8 || key == 46) {
+ return;
+ }
+
+ //evt.cancel();
+ ckeditor.execCommand( 'undo' );
+
+ //limit exceeded in case of textarea
+ } else {
+ this.value = this.value.substring(0, limit);
+ //fix a bug: when change "this.value", onchange event won't be fired any more. So this will
+ //manually handle onchange event. It is a kind of crack coding!
+ filterData(document.getElementById('message.body'),document.getElementById('message.body__lamshidden'));
+ }
+ };
+
+ //assign function
+ if (isCkeditor) {
+ // @todo Make this more elegant (.on('change') once we upgrade to Ckeditor 4
+ //ckeditor.on('key', counter);
+ ckeditor.on('paste', counter);
+ ckeditor.on('afterCommandExec', counter);
+ ckeditor.on("instanceReady", function(){
+ this.document.on("keyup", counter);
+ });
+ //count characters initially
+ ckeditor.on('instanceReady', counter);
+
+ } else {
+ $('textarea[id="message.body"]').on('change keydown keypress keyup paste', counter);
+ //count characters initially
+ counter();
+ }
+
+
+
+ var isCkeditor = ${sessionMap.allowRichEditor};
+ var ckeditor = isCkeditor ? CKEDITOR.instances["message.body"] : null;
+
+ //character count fuction
+ var counter = function() {
+ var value = isCkeditor ? ckeditor.getSnapshot()
+ : $('textarea[id="message.body"]').val();
+
+ var charactersCount = getNumberOfCharacters(value, isCkeditor);
+
+ var limit = ;
+ var count = (limit - charactersCount) > 0 ? limit - charactersCount : 0;
+ $('#char-required-div').html(count);
+ };
+
+ //assign function
+ if (isCkeditor) {
+ // @todo Make this more elegant (.on('change') once we upgrade to Ckeditor 4
+ ckeditor.on('paste', counter);
+ ckeditor.on('afterCommandExec', counter);
+ ckeditor.on("instanceReady", function(){
+ this.document.on("keyup", counter);
+ });
+ //count characters initially
+ ckeditor.on('instanceReady', counter);
+
+ } else {
+ $('textarea[id="message.body"]').on('change keydown keypress keyup paste', counter);
+ //count characters initially
+ counter();
+ }
+
+
+
+ $('[data-bs-toggle="popover"]').each((i, el) => {
+ new bootstrap.Popover($(el), {
+ content: '',
+ delay: 50,
+ html: true
+ })
+ });
+
+ });
+
+
+<%-- for validateForm() method --%>
+
+
+
+
+
+
+
+
+ <%-- Does not use general tag because this field need keep compatible with CKEditor's content --%>
+ ${messageForm.message.body}
+
+
+
+
+
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
Index: lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
diff -u -rbbe6b21a663059e2539bc0ea5ce761445b5ae1c1 -r81f928586161dd03042b6353f68c7d7b8279ccde
--- lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision bbe6b21a663059e2539bc0ea5ce761445b5ae1c1)
+++ lams_tool_scratchie/conf/language/lams/ApplicationResources_en_AU.properties (.../ApplicationResources_en_AU.properties) (revision 81f928586161dd03042b6353f68c7d7b8279ccde)
@@ -309,3 +309,7 @@
label.authoring.advance.time.limit.absolute = for all learners
label.authoring.advance.time.limit.absolute.tooltip = Set the number of minutes to finish the assessment for all learners. The duration will apply from the moment the first learner starts the assessment.
label.time.limit.tooltip = Number of minutes that each student will get from the moment they enter this activity. Leave it at 0 for no time restrictions.
+label.activity.monitoring = Activity details
+label.minutes = minutes
+label.hours = hour(s)
+label.incorrect.answer = Incorrect answer
Index: lams_tool_scratchie/web/WEB-INF/tags/Page5.tag
===================================================================
diff -u -r0ebe63b978acffe32a0c7e4a2cd63cfadf73cc96 -r81f928586161dd03042b6353f68c7d7b8279ccde
--- lams_tool_scratchie/web/WEB-INF/tags/Page5.tag (.../Page5.tag) (revision 0ebe63b978acffe32a0c7e4a2cd63cfadf73cc96)
+++ lams_tool_scratchie/web/WEB-INF/tags/Page5.tag (.../Page5.tag) (revision 81f928586161dd03042b6353f68c7d7b8279ccde)
@@ -18,7 +18,7 @@
<%@ tag import="org.lamsfoundation.lams.util.Configuration"%>
<%@ tag import="org.lamsfoundation.lams.util.ConfigurationKeys"%>
-
+true<%=Configuration.get(ConfigurationKeys.DISPLAY_PORTRAIT)%>
@@ -99,7 +99,8 @@
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+ ${score}
+ ${scorePercentage}
+
+
+
+
-
-
-
-
- ${score}
- ${scorePercentage}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
-
- <%@ include file="questionlist.jsp"%>
-
+
-
-
-
-
\ No newline at end of file
+
+ <%@ include file="questionlist.jsp"%>
+
+
+
+
\ No newline at end of file
Index: lams_tool_scratchie/web/pages/learning/results.jsp
===================================================================
diff -u -r44f0e989b04441472ac01249232fae739ad3dba0 -r81f928586161dd03042b6353f68c7d7b8279ccde
--- lams_tool_scratchie/web/pages/learning/results.jsp (.../results.jsp) (revision 44f0e989b04441472ac01249232fae739ad3dba0)
+++ lams_tool_scratchie/web/pages/learning/results.jsp (.../results.jsp) (revision 81f928586161dd03042b6353f68c7d7b8279ccde)
@@ -1,9 +1,6 @@
-
<%@ include file="/common/taglibs.jsp"%>
-
-
-
+
<%-- param has higher level for request attribute --%>
@@ -14,22 +11,18 @@
-
-
-
- <%@ include file="/common/header.jsp"%>
+
+ ${scratchie.title} /
+
+
-
-
+
-
-
-
-
-
- ${scratchie.title} /
-
-
-
+