{% extends 'layout.html.twig' %}
{% block body %}
<div class="iframe-parent-content">
  <div  class="modal show iframe-modal">
	  <div class="modal-dialog ">
	    <div class="modal-content">
	      <div class="modal-body task-state-modal">
	        <div class="title font-blod">
	          <i class="es-icon es-icon-xinxi color-info"></i>{{'考试说明'|trans}}
	        </div>
	        {% if testpaper.status == 'open' %}
		        <div class="content">
		        	{% if testpaperActivity.testMode == 'realTime' and activity.startTime and activity.startTime > "now"|date("U") %}
			          <div class="text-16 ">
			          	考试未开始，请在{{ activity.startTime|date('Y-m-d H:i:s') }}之后再来
			          </div>
		          {% else %}
								<div class="text-16 ">
			          	本次考试共<span class="color-primary">{{ testpaper.itemCount }}题</span>，总分<span class="color-primary">{{ testpaper.score }}分</span>
		          		{% if testpaperActivity.finishCondition.type == 'score' %}
		          			，及格为<span class="color-primary">{{ testpaperActivity.finishCondition.finishScore}}分</span>
		          		{% endif %}；

			          	{% if testpaperActivity.limitedTime %}
			          		<div class="mt5">请在<span class="color-primary">{{ testpaperActivity.limitedTime }}分钟</span>内作答。</div>
			          	{% endif %}
			          	{% if testpaperActivity.doTimes %}
										仅有<span class="color-danger">一次</span>考试机会。
			          	{% endif %}
			          </div>
		          {% endif %}
		        </div>
		        <div class="text-right mtl">
		        	{% if not activity.startTime or (activity.startTime and activity.startTime <= "now"|date("U")) %}
		          	<a class="btn btn-primary" href="{{ path('testpaper_do',{lessonId:activity.id,testId:testpaperActivity.mediaId})}}">{{'开始考试'|trans}}</a>
		          {% endif %}
		        </div>
	        {% else %}
						<div class="content">
							<div class="text-16 ">该考试已关闭，请联系教师！</div>
						</div>
	        {% endif %}
	      </div>
	    </div>
	  </div>
	</div>
</div>
<div class="modal-backdrop in"></div>
{% endblock %}
