Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningController.java =================================================================== diff -u -r92ea854ad899fdf2e346b0b5ce005665600af0a6 -r8ab0cbbcfce07e694699a1bd81eab7cd00b57ce0 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningController.java (.../LearningController.java) (revision 92ea854ad899fdf2e346b0b5ce005665600af0a6) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/controller/LearningController.java (.../LearningController.java) (revision 8ab0cbbcfce07e694699a1bd81eab7cd00b57ce0) @@ -532,6 +532,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 -rbfe408b3fcab0b7112ec11ded9d56e374d89b7b2 -r8ab0cbbcfce07e694699a1bd81eab7cd00b57ce0 --- lams_tool_scratchie/web/pages/learning/results.jsp (.../results.jsp) (revision bfe408b3fcab0b7112ec11ded9d56e374d89b7b2) +++ lams_tool_scratchie/web/pages/learning/results.jsp (.../results.jsp) (revision 8ab0cbbcfce07e694699a1bd81eab7cd00b57ce0) @@ -147,16 +147,19 @@ {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 return ${isUserLeader} && eval(item.isUserAuthor) ? "" +cellvalue + " " : cellvalue; }, unformat:function(cellvalue, options, rowObject) { - var text = $('
' + cellvalue + '
').text(); + var text = $('
' + cellvalue + '
').text(); return text.trim(); }, editable: function (options) { @@ -173,9 +176,6 @@ ], caption: "${scratchieItem.title}""${scratchieItem.title}" + " [${fn:length(burningQuestionItemDto.burningQuestionDtos)}]", editurl: '?sessionId=${toolSessionID}&itemUid=${scratchieItem.uid}', - beforeEditRow: function (options, rowid) { - alert("aaa"); - }, inlineEditing: { keys: true, defaultFocusField: "burningQuestion", focusField: "burningQuestion" }, onSelectRow: function (rowid, status, e) { var $self = $(this),