Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningController.java
===================================================================
diff -u -re743566518bd5c53d6574987565cfb8581a92c66 -rbe905fe69c81781ca8c63f0772393bab29be0b8e
--- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningController.java (.../LearningController.java) (revision e743566518bd5c53d6574987565cfb8581a92c66)
+++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningController.java (.../LearningController.java) (revision be905fe69c81781ca8c63f0772393bab29be0b8e)
@@ -637,6 +637,8 @@
: WebUtil.readLongParam(request, ScratchieConstants.ATTR_ITEM_UID);
Long sessionId = WebUtil.readLongParam(request, ScratchieConstants.PARAM_SESSION_ID);
String question = request.getParameter(ScratchieConstants.ATTR_BURNING_QUESTION_PREFIX);
+ // this make is work with both plain HTML and HTML textfield
+ question = question.replaceAll("\n", "\r\n");
scratchieService.saveBurningQuestion(sessionId, itemUid, question);
}
Index: lams_tool_scratchie/web/pages/learning/results.jsp
===================================================================
diff -u -r1268ec552ee72a22db3a5df680d46de7db79e0c0 -rbe905fe69c81781ca8c63f0772393bab29be0b8e
--- lams_tool_scratchie/web/pages/learning/results.jsp (.../results.jsp) (revision 1268ec552ee72a22db3a5df680d46de7db79e0c0)
+++ lams_tool_scratchie/web/pages/learning/results.jsp (.../results.jsp) (revision be905fe69c81781ca8c63f0772393bab29be0b8e)
@@ -148,7 +148,10 @@
{name:'isUserAuthor', width:0, hidden: true},
{name:'groupName', index:'groupName', width:100, title: false},
{name:'burningQuestion', index:'burningQuestion', width:501, edittype: 'textarea', title: false, editoptions:{rows:"8"},
- formatter:function(cellvalue, options, rowObject) {
+ formatter:function(cellvalue, options, rowObject, event) {
+ if (event == "edit") {
+ cellvalue = cellvalue.replace(/\n/g, '
');
+ }
var item = $(this).jqGrid("getLocalRow", options.rowId);
//when item is editable - show pencil icon on hover
@@ -192,9 +195,6 @@
+ " [${fn:length(burningQuestionItemDto.burningQuestionDtos)}]",
editurl: '?sessionId=${toolSessionID}&itemUid=${scratchieItemUid}',
- beforeEditRow: function (options, rowid) {
- alert("aaa");
- },
inlineEditing: { keys: true, defaultFocusField: "burningQuestion", focusField: "burningQuestion" },
onSelectRow: function (rowid, status, e) {
var $self = $(this),