Index: lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/MonitoringController.java
===================================================================
diff -u -r8bcf5f3b87aa5b9bcead80b6c2c06a5982513b41 -r4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd
--- lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/MonitoringController.java (.../MonitoringController.java) (revision 8bcf5f3b87aa5b9bcead80b6c2c06a5982513b41)
+++ lams_tool_assessment/src/java/org/lamsfoundation/lams/tool/assessment/web/controller/MonitoringController.java (.../MonitoringController.java) (revision 4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd)
@@ -601,7 +601,8 @@
userData.add(questionResult.getMaxMark());
userData.add(fullName);
//LDEV_NTU-11 Swapping Mark and Response columns in Assessment Monitor
- userData.add(questionResult.getMark());
+ userData.add(questionResult.getQbQuestion().getType().equals(QbQuestion.TYPE_ESSAY)
+ && questionResult.getMarkedBy() == null ? "-" : questionResult.getMark().toString());
// show confidence levels if this feature is turned ON
if (assessment.isEnableConfidenceLevels()) {
userData.add(questionResult.getQbQuestion().getType().equals(QbQuestion.TYPE_MARK_HEDGING) ? -1
@@ -643,7 +644,13 @@
}
userData.add(response);
- userData.add(questionResult.getMarkedBy() == null ? "" : questionResult.getMarkedBy().getFullName());
+ userData.add(
+ questionResult.getMarkedBy() == null
+ ? (questionResult.getQbQuestion().getType().equals(QbQuestion.TYPE_ESSAY)
+ ? service.getMessage("label.monitoring.user.summary.grade.required")
+ : "")
+ : questionResult.getMarkedBy().getFullName());
+ userData.add(questionResult.getMarkerComment());
} else {
userData.add("");
userData.add("");
Index: lams_tool_assessment/web/pages/monitoring/parts/masterDetailLoadUp.jsp
===================================================================
diff -u -r8bcf5f3b87aa5b9bcead80b6c2c06a5982513b41 -r4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd
--- lams_tool_assessment/web/pages/monitoring/parts/masterDetailLoadUp.jsp (.../masterDetailLoadUp.jsp) (revision 8bcf5f3b87aa5b9bcead80b6c2c06a5982513b41)
+++ lams_tool_assessment/web/pages/monitoring/parts/masterDetailLoadUp.jsp (.../masterDetailLoadUp.jsp) (revision 4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd)
@@ -5,10 +5,6 @@
function masterDetailLoadUp(){
jQuery("#userSummary${assessmentResult.sessionId}").clearGridData().setGridParam({scrollOffset: 18});
- $('#userSummary${assessmentResult.sessionId}').on( "sortstop", function(event, ui) {
- debugger;
- });
-
@@ -23,7 +19,6 @@
table.addRowData(${i.index + 1}, {
id:"${i.index + 1}",
questionResultUid:"${questionResult.uid}",
- questionType : "${questionResult.questionDto.type}",
title:"${fn:escapeXml(title)}",
response:responseStr,
@@ -56,8 +51,6 @@
// set maxGrade attribute to cell DOM element
table.setCell(${i.index + 1}, "grade", "", null, {"maxGrade" : "${questionResult.maxMark}"});
-
- $('[data-toggle="tooltip"]').bootstrapTooltip();
if (typeof CodeMirror != 'undefined') {
CodeMirror.colorize($('.code-style'));
Index: lams_tool_assessment/web/pages/monitoring/parts/questionsummary.jsp
===================================================================
diff -u -r1b7935cf90adedfd42ee3f59b1533f5c4d0840a8 -r4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd
--- lams_tool_assessment/web/pages/monitoring/parts/questionsummary.jsp (.../questionsummary.jsp) (revision 1b7935cf90adedfd42ee3f59b1533f5c4d0840a8)
+++ lams_tool_assessment/web/pages/monitoring/parts/questionsummary.jsp (.../questionsummary.jsp) (revision 4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd)
@@ -111,7 +111,8 @@
"",
"",
- 'markedBy',
+ "",
+ "",
'userId',
'portraitId'
],
@@ -131,18 +132,35 @@
{name:'rating', index:'rating', width:120, align:"center", sortable:false, search:false},
{name:'response', index:'response', width:400, sortable:false, search:false, formatter: responseFormatter},
- {name:'markedBy', index:'markedBy', width:0, hidden: true},
+ {name:'marker', index:'marker', width: 80, search:false, title: false},
+ {name:'markerComment', index:'markerComment', width:120, search:false, editable:true, sortable: false,
+ editoptions: {maxlength: 100}, align:"left", classes: 'vertical-align', title : false },
{name:'userId', index:'userId', width:0, hidden: true},
{name:'portraitId', index:'portraitId', width:0, hidden: true}
],
multiselect: false,
caption: "${sessionDto.sessionName}",
cellurl: '&',
cellEdit: true,
+ formatCell: function(rowid, name, value, iRow, iCol){
+ if (name != "grade") {
+ return value;
+ }
+ if (value == "-") {
+ value = "0";
+ }
+ return value;
+ },
beforeEditCell: function (rowid,name,val,iRow,iCol){
+ if (name != "grade") {
+ return;
+ }
previousCellValue = val;
},
beforeSaveCell : function(rowid, name, val, iRow, iCol) {
+ if (name != "grade") {
+ return val;
+ }
if (isNaN(val)) {
return null;
}
@@ -154,6 +172,9 @@
}
},
afterSaveCell : function (rowid,name,val,iRow,iCol){
+ if (name != "grade") {
+ return;
+ }
var questionResultUid = jQuery("#session${sessionDto.sessionId}").getCell(rowid, 'questionResultUid');
if (isNaN(val) || (questionResultUid=="")) {
jQuery("#session${sessionDto.sessionId}").restoreCell(iRow,iCol);
@@ -162,13 +183,24 @@
}
},
beforeSubmitCell : function (rowid,name,val,iRow,iCol){
- if (isNaN(val)) {
- return {nan:true};
- } else {
- var questionResultUid = jQuery("#session${sessionDto.sessionId}").getCell(rowid, 'questionResultUid');
- return {questionResultUid:questionResultUid};
- }
+ if (name == "grade" && isNaN(val)) {
+ return {nan:true};
+ } else {
+ var questionResultUid = jQuery("#session${sessionDto.sessionId}").getCell(rowid, 'questionResultUid');
+ return {
+ questionResultUid:questionResultUid,
+ column:name
+ };
+ }
},
+ afterSubmitCell : function (serverresponse, rowid, name, value, iRow, iCol) {
+ if (serverresponse.statusText == "OK") {
+ if (serverresponse.responseText != "") {
+ $(this).setCell(rowid, 'marker', serverresponse.responseText, {}, {});
+ }
+ return [true, ""];
+ }
+ },
loadComplete: function () {
initializeJRating();
initializePortraitPopover('');
@@ -177,31 +209,6 @@
CodeMirror.colorize($('.code-style'));
}
},
- gridComplete : function(){
- let questionType = ${questionDto.type};
- // highlight essay questions which have not been graded
- if (questionType == 6) {
- let table = jQuery("#session${sessionDto.sessionId}"),
- rows = table.getDataIDs();
- for (rowIndex = 0;rowIndex < rows.length; rowIndex++) {
- let rowData = jQuery("#session${sessionDto.sessionId}").getRowData(rows[rowIndex]),
- requiresMarking = rowData.markedBy == "" && rowData.grade == 0;
- table.setCell(rows[rowIndex], "grade", "", requiresMarking ? 'requires-grading' : '',
- requiresMarking ? {
- title : "",
- "data-toggle" : "tooltip",
- "data-container" : "body"
- } :
- (rowData.markedBy == "" ? null : {
- title : " "
- + rowData.markedBy,
- "data-toggle" : "tooltip",
- "data-container" : "body"
- }));
- }
- $('[data-toggle="tooltip"]').tooltip();
- }
- },
subGrid: true,
subGridOptions: {
reloadOnExpand : false,
Index: lams_tool_assessment/web/pages/monitoring/parts/usersummary.jsp
===================================================================
diff -u -r1b7935cf90adedfd42ee3f59b1533f5c4d0840a8 -r4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd
--- lams_tool_assessment/web/pages/monitoring/parts/usersummary.jsp (.../usersummary.jsp) (revision 1b7935cf90adedfd42ee3f59b1533f5c4d0840a8)
+++ lams_tool_assessment/web/pages/monitoring/parts/usersummary.jsp (.../usersummary.jsp) (revision 4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd)
@@ -91,7 +91,9 @@
"",
- ""
+ "",
+ "",
+ ""
],
colModel:[
{name:'id', index:'id', width:52, sorttype:"int"},
@@ -102,15 +104,33 @@
{name:'confidence', index:'confidence', width: 80, classes: 'vertical-align', formatter: gradientNumberFormatter},
{name:'grade', index:'grade', width:80, sorttype:"float", editable:true,
- editoptions: {size:4, maxlength: 4}, align:"right", classes: 'vertical-align', title : false }
+ editoptions: {size:4, maxlength: 4}, align:"right", classes: 'vertical-align', title : false },
+ {name:'marker', index:'marker', width: 80, title: false},
+ {name:'markerComment', index:'markerComment', width:120, editable:true, sortable: false,
+ editoptions: {maxlength: 100}, align:"left", classes: 'vertical-align', title : false }
],
multiselect: false,
cellurl: '&',
cellEdit: true,
+ formatCell: function(rowid, name, value, iRow, iCol){
+ if (name != "grade") {
+ return value;
+ }
+ if (value == "-") {
+ value = "0";
+ }
+ return value;
+ },
beforeEditCell: function (rowid,name,val,iRow,iCol){
+ if (name != "grade") {
+ return;
+ }
previousCellValue = val;
},
beforeSaveCell : function(rowid, name, val, iRow, iCol) {
+ if (name != "grade") {
+ return val;
+ }
if (isNaN(val)) {
return null;
}
@@ -122,7 +142,9 @@
}
},
afterSaveCell : function (rowid,name,val,iRow,iCol){
- //var questionResultUid = jQuery("#user${question.uid}").getCell(rowid, 'questionResultUid');
+ if (name != "grade") {
+ return;
+ }
if (isNaN(val)) { //|| (questionResultUid=="")) {
jQuery("#user${question.uid}").restoreCell(iRow,iCol);
} else {
@@ -132,13 +154,16 @@
}
},
beforeSubmitCell : function (rowid,name,val,iRow,iCol){
- if (isNaN(val)) {
- return {nan:true};
- } else {
- var questionResultUid = jQuery("#user${question.uid}").getCell(rowid, 'questionResultUid');
- return {questionResultUid:questionResultUid};
- }
- }
+ if (name == "grade" && isNaN(val)) {
+ return {nan:true};
+ } else {
+ var questionResultUid = jQuery("#user${question.uid}").getCell(rowid, 'questionResultUid');
+ return {
+ questionResultUid:questionResultUid,
+ column:name
+ };
+ }
+ }
});
@@ -157,32 +182,32 @@
confidence:"${questionResult.confidenceLevel}",
- grade:""
+ grade:
+
+
+ "-"
+
+
+ ""
+
+ ,
+ marker :
+
+
+ ("")
+
+
+ ""
+
+
+ ""
+
+ ,
+ markerComment: ""
});
-
- // set maxGrade attribute to cell DOM element
- table.setCell(${i.index + 1}, "grade", "", ${requiresMarking ? "'requires-grading'" : "null"},
- {"maxGrade" : "${questionResult.maxMark}"
-
-
- ,"title" : ""
- ,"data-toggle" : "tooltip"
- ,"data-container" : "body"
-
-
- ,"title" : "
-
- "
- ,"data-toggle" : "tooltip"
- ,"data-container" : "body"
-
-
- });
-
- $('[data-toggle="tooltip"]').tooltip();
//jqgrid autowidth (http://stackoverflow.com/a/1610197)
$(window).bind('resize', function() {
Index: lams_tool_assessment/web/pages/monitoring/summary.jsp
===================================================================
diff -u -r8bcf5f3b87aa5b9bcead80b6c2c06a5982513b41 -r4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd
--- lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 8bcf5f3b87aa5b9bcead80b6c2c06a5982513b41)
+++ lams_tool_assessment/web/pages/monitoring/summary.jsp (.../summary.jsp) (revision 4f1a37c96ff1b0aab43c11f24ba557ba0fdbe5dd)
@@ -112,7 +112,6 @@
colNames:[
'#',
'questionResultUid',
- 'questionType',
"",
"",
@@ -125,7 +124,6 @@
colModel:[
{name:'id', index:'id', width:20, sorttype:"int"},
{name:'questionResultUid', index:'questionResultUid', width:0, hidden: true},
- {name:'questionType', index:'questionType', width:0, hidden: true},
{name:'title', index:'title', width: 200},
{name:'grade', index:'grade', width:80, sorttype:"float", editable:true,
editoptions: {size:4, maxlength: 4}, align:"right", classes: 'vertical-align', title : false },
@@ -135,7 +133,7 @@
{name:'response', index:'response', datatype:'html', width:400, sortable:false},
{name:'marker', index:'marker', width: 80, title: false},
{name:'markerComment', index:'markerComment', width:120, editable:true, sortable: false,
- editoptions: {maxlength: 100}, align:"left", classes: 'vertical-align', title : false },
+ editoptions: {maxlength: 100}, align:"left", classes: 'vertical-align', title : false }
],
multiselect: false,
@@ -201,7 +199,6 @@
}
return [true, ""];
}
-
}
});