Przeglądaj źródła

在评卷界面加入合分显示,以帮助老师判断学生的具体及格与未及格情况

nikang 7 lat temu
rodzic
commit
1d01ab2855

+ 25 - 2
stmms-web/src/main/webapp/static/mark-new/js/modules/mark-board.js

@@ -11,6 +11,8 @@ function MarkBoard(option) {
     this.autoSubmit = option.autoSubmit === false ? false : true;
     this.showScoreBoard = option.showScoreBoard === false ? false : true;
     this.enableSkip = option.enableSkip === true ? true : false;
+    //显分板上是否显示合分样式
+    this.showObjectScoreAndSubjectScore = option.showTotalScore === true ? true : false;
 
     this.init();
     this.markControl.on('task.get.before', this, function(event, context, eventObject) {
@@ -197,6 +199,15 @@ MarkBoard.prototype.init = function() {
     this.popover.title.css('line-height', '25px');
     //this.popover.width('100');
     //this.popover.title.width('100');
+    var dom5 = this.stepBoard.find(".sublist");
+    var dom6 = this.stepBoard.find(".newSubListCss");
+    if(this.showObjectScoreAndSubjectScore){
+      dom6.show();
+      dom5.hide();
+    }else {
+      dom6.hide();
+      dom5.show();
+    }
 }
 
 MarkBoard.prototype.initByTask = function(task) {
@@ -353,6 +364,10 @@ MarkBoard.prototype.onScoreSubmit = function(autoNext) {
         this.updateTotalScore();
 
         this.stepBoard.find('#total-score').html(this.task.totalScore);
+        this.stepBoard.find('#subject-score').html(this.task.totalScore);
+        var ObjectiveAndSubjectScore = this.task.totalScore+this.task.objectiveScore;
+        this.stepBoard.find('#ObjectiveAndSubjectScore').html(ObjectiveAndSubjectScore);
+
         this.scoreBoard.footer.html(this.task.totalScore);
         var currentScore = this.currentStep.score;
         this.scoreBoard.stepArray[this.currentStep.number - 1].find('.score-select').each(function(index, obj) {
@@ -466,10 +481,14 @@ MarkBoard.prototype.render = function(task) {
         this.stepBoard.stepArray = [];
         if (task.markFinish === true) {
             this.stepBoard.find('#total-score').html(task.totalScore);
+            this.stepBoard.find('#subject-score').html(task.totalScore);
+            this.stepBoard.find('#ObjectiveAndSubjectScore').html((task.totalScore+task.objectiveScore) + '');
             this.scoreBoard.footer.html(task.totalScore);
         } else {
             this.stepBoard.find('#total-score').html('');
+            this.stepBoard.find('#subject-score').html('');
             this.scoreBoard.footer.html('');
+            this.stepBoard.find('#ObjectiveAndSubjectScore').html(task.objectiveScore);
         }
 
         this.scoreBoard.stepHolder.empty();
@@ -529,6 +548,8 @@ MarkBoard.prototype.render = function(task) {
         this.stepBoard.stepHolder.empty();
         this.stepBoard.stepArray = [];
         this.stepBoard.find('#total-score').html('');
+        this.stepBoard.find('#subject-score').html('');
+        this.stepBoard.find('#ObjectiveAndSubjectScore').html('');
         this.stepBoard.hide();
 
         this.scoreBoard.stepHolder.empty();
@@ -643,7 +664,9 @@ MarkBoard.prototype.togglePopover = function(show, text, baseDom) {
 
 MarkBoard.prototype.step_board_dom = '<div class="span2 mark-steps" style="display:none"><div class="step-board">\
 <a href="#" class="header" id="show-score-board-button"><< 鼠标给分</a>\
-<div class="sublist"><p class="fraction">总分 <i id="total-score">5</i></p><div>\
+<div class="newSubListCss"><span class="fraction" style="margin-right: 10px;">主观分<i class="red" id="subject-score"></i></span>\
+<span class="fraction">总分<i class="red" id="ObjectiveAndSubjectScore"></i></span></div>\
+<div class="sublist"><p class="fraction">总分 <i id="total-score">5</i></p></div>\
 <a href="#" class="header all-zero-button">全零分</a>\
 <div class="step-list"></div>\
 </div></div>';
@@ -676,7 +699,7 @@ MarkBoard.prototype.scoreBoard_step_dom = '<div class="sublist">\
 MarkBoard.prototype.scoreBoard_score_dom = '<a href="#" class="score-select"></a>';
 
 MarkBoard.prototype.scoreBoard_footer_dom = '<div class="footer">\
-<p class="font">总分:<i class="yellow" id="score-board-total-score"></i></p>\
+<p class="font">主观分:<i class="yellow" id="score-board-total-score"></i></p>\
 <a id="task-submit-button" class="button" href="#">提 交</a>\
 <a class="button all-zero-button" href="##">全零分</a>\
 <a id="task-pass-button" class="button" href="#" style="display:none">跳 过</a>\

+ 24 - 6
stmms-web/src/main/webapp/static/mark-track/js/modules/mark-board.js

@@ -11,6 +11,8 @@ function MarkBoard(option) {
 	this.needConfirm = option.needConfirm === true ? true : false;
 	this.autoSubmit = option.autoSubmit === false ? false : true;
 	this.enableSkip = option.enableSkip === true ? true : false;
+  //显分板上是否显示合分样式
+  this.showObjectScoreAndSubjectScore = option.showTotalScore === true ? true : false;
 
 	this.init();
 	this.markControl.on('task.get.before', this, function(event, context, eventObject) {
@@ -104,6 +106,15 @@ MarkBoard.prototype.init = function() {
 			//self.markControl.trigger('mark.track.clear');
 		}
 	});
+    var dom5 = this.stepBoard.find(".sublist");
+    var dom6 = this.stepBoard.find(".newSubListCss");
+    if(this.showObjectScoreAndSubjectScore){
+      dom6.show();
+      dom5.hide();
+    }else {
+      dom6.hide();
+      dom5.show();
+    }
 }
 
 MarkBoard.prototype.initByTask = function(task) {
@@ -147,8 +158,12 @@ MarkBoard.prototype.render = function(task) {
 
 		if(task.markFinish === true) {
 			this.stepBoard.find('#total-score').html(task.totalScore + '');
+			this.stepBoard.find('#subject-score').html(task.totalScore + '');
+      this.stepBoard.find('#ObjectiveAndSubjectScore').html((task.totalScore+task.objectiveScore) + '');
 		} else {
 			this.stepBoard.find('#total-score').html('');
+			this.stepBoard.find('#subject-score').html('');
+      this.stepBoard.find('#ObjectiveAndSubjectScore').html(task.objectiveScore);
 		}
 
 		for( var i in task.markStepList) {
@@ -169,6 +184,8 @@ MarkBoard.prototype.render = function(task) {
 		this.stepBoard.scoreContainer.empty();
 		this.stepArray = [];
 		this.stepBoard.find('#total-score').html('');
+		this.stepBoard.find('#subject-score').html('');
+    this.stepBoard.find('#ObjectiveAndSubjectScore').html('');
 	}
 }
 
@@ -209,10 +226,6 @@ MarkBoard.prototype.onStepSelect = function(stepNumber) {
 				self.onScoreClick($(this).attr('data-number'));
 			});
 		}
-		//this.markControl.trigger('mark.track.clear');
-		//for(var i = 0; i < this.currentStep.trackList.length; i++) {
-		//	this.markControl.trigger('mark.track.show', this.currentStep.trackList[i]);
-		//}
 	}
 }
 
@@ -355,9 +368,12 @@ MarkBoard.prototype.updateTotalScore = function() {
 				finish = false;
 			}
 		}
+		var ObjectiveAndSubjectScore = totalScore+this.task.objectiveScore;
 		this.task.totalScore = totalScore;
 		this.task.markFinish = finish;
+		this.stepBoard.find('#ObjectiveAndSubjectScore').html(ObjectiveAndSubjectScore);
 		this.stepBoard.find('#total-score').html(totalScore);
+		this.stepBoard.find('#subject-score').html(totalScore);
 	}
 }
 
@@ -402,7 +418,7 @@ MarkBoard.prototype.onTaskSubmit = function() {
 	}
 	if(!finish) {
 		alert('当前任务还有未给分的题,请继续给分');
-	} else if(!this.needConfirm || confirm('分为' + totalScore + ', 确认要提交吗?')) {
+	} else if(!this.needConfirm || confirm('主观分为' + totalScore + ', 确认要提交吗?')) {
 		this.task.totalScore = totalScore;
 		this.task.scoreList = scoreList.join(',');
 		this.task.trackList = trackList;
@@ -411,7 +427,9 @@ MarkBoard.prototype.onTaskSubmit = function() {
 }
 
 MarkBoard.prototype.step_board_dom = '<div class="span3 mark-steps"><div class="step-board">\
-	<div class="sublist"><p class="fraction">总分 <i class="red" id="total-score"></i></p></div>\
+  <div class="newSubListCss"><span class="fraction" style="">主观分<i class="red" id="subject-score"></i></span>\
+  <span class="fraction">总分<i class="red" id="ObjectiveAndSubjectScore"></i></span></div>\
+  <div class="sublist"><p class="fraction">总分 <i class="red" id="total-score"></i></p></div>\
 	<div class="button"><input type="submit" value="零分卷" class="btn1 all-zero-button"/>\
 	<input type="submit" value="提&nbsp;交" class="btn2 task-submit-button"/></div>\
 	<div class="step-list"><div class="number"><ul></ul></div></div>\