<div class="panel panel-default mg" ng-controller="PaperTaskTeacherAssessmentCtrl">
<div class="panel-body">
<form class="form-horizontal {{submitted ? 'submitted' : ''}}" name="form" novalidate ng-submit="submit()">
	<h3 class="text-center">
		自学考试全国统考命题教师评价表
	</h3>
	<h5 class="text-center">
		 <span> 教师姓名：{{task.propositionTeacherBean.name}}</span> 
		 <spana class="m-l">课程代码：{{task.course.code}}</span>
		 <span class="m-l">课程名称：{{task.course.name}}</span>
		 <span class="m-l"> 试卷代码：{{task.taskNo}}</span>
	</h5>
	<h5 class="text-center">
		 <span> 评定人：{{task.primarySecretaryBean.name}}</span> 
		 <spana class="m-l">评定分数：{{totalScore}}</span>
		 <span class="m-l">评定等级：
		 	<span ng-if="totalScore > 85">A</span>
		 	<span ng-if="totalScore < 85 && totalScore > 74">B</span>
		 	<span ng-if="totalScore < 75">C</span>
		 </span>
	</h5>
	<form class="{{submitted ? 'submitted' : ''}}" name="form" novalidate ng-submit="submit()">
		<div>
			<table class="table table-bordered">
				<thead>
					<tr>
						<td class="col-md-1">项目</td>
						<td>总分</td>
						<td class="col-md-5">指标</td>
						<td>分值</td>
						<td class="col-md-1">得分</td>
						<td class="col-md-3">评分情况记载</td>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in assessmentItems">
						<td ng-if="item.group" rowspan="{{item.groupRow}}">{{item.group}}</td>
						<td ng-if="item.totalScore" rowspan="{{item.scoreRow}}">{{item.totalScore}}</td>
						<td>{{item.title}}</td>
						<td>{{item.score}}</td>
						<td ng-if="editable">
							<input type="number" class="form-control" ng-model="assessment.details[$index].score" name="{{$index}}-score"
								min=0 max={{item.score}} valid-input-value-range ng-change="changeValue()"/>
							<div class="error-container" ng-show="form[$index+'-score'].$dirty && form[$index+'-score'].$invalid">
						    	<small class="text-danger" ng-show="form[$index+'-score'].$error.required">请输入</small>
						    	<small class="text-danger" ng-show="form[$index+'-score'].$error.inRange">输入的值超出了范围</small>
						    </div>
						</td>
						<td ng-if="!editable">{{assessment.details[$index].score}}</td>
						<td ng-if="editable">
							<input type="text" class="form-control" ng-model="assessment.details[$index].remark" name="$index+'-remark'" ng-maxlength=100 />
							<div class="error-container" ng-show="form[$index+'-remark'].$dirty && form[$index+'-remark'].$invalid">
						    	<small class="text-danger" ng-show="form[$index+'-remark'].$error.maxlength">最多输入100个字</small>
						    </div>
						</td>
						<td ng-if="!editable">{{assessment.details[$index].remark}}</td>
					</tr>
					
					<tr>
	        			<td colspan='3' style="text-align:right;">合计：</td>
	        			<td>100</td>
	        			<td>{{totalScore}}</td>
	        			<td></td>
	        		</tr>
				</tbody>
			</table>
		</div>
	
		<div class="col-sm-8 col-sm-offset-2 m-t">
			<p class="text-center"><b>说明:（1）评价等级分为A、B、C三个等级，A为优秀、B为中等、C为不合格。 （2）A:86—100；B:85—75；C:74分以下。</b></p>
		</div>
	  
		<div class="col-sm-7 col-sm-offset-5">
		      <button type="submit" class="btn btn-primary btn-lg" ng-if="editable">保存</button>
		</div>
	</form>
</form>
</div>
</div>
