{% import "TopxiaWebBundle::macro.html.twig" as web_macro %}


<h5>课后作业</h5>
<div class="lesson-about">
	{% if homework %}
	  共{{ homework.itemCount }}个作业题 
	  {% if homeworkResult %}
	  	{% if homeworkResult.status == 'reviewing' %}
	  		<span class="text-muted">作业批改中....</span>
	  	{% elseif homeworkResult.status == 'finished' %}
	  		<a href="{{ path('course_homework_result',{courseId:course.id,homeworkId:homework.id,resultId:homeworkResult.id,userId:app.user.id}) }}" class="mlm" target="_blank">查看批改结果</a>
	  	{% else %}
{% if homeworkItemsResult|default(null) %}
			<a href="{{ path('course_homework_continue',{courseId:course.id,homeworkId:homework.id,resultId:homeworkResult.id}) }}" class="btn btn-primary btn-sm mlm" target="_blank">继续做题</a>
				{% else %}
			<a href="{{ path('course_homework_start_do',{courseId:course.id,homeworkId:homework.id}) }}" class="btn btn-primary btn-sm mlm" target="_blank">开始做题</a>
		{% endif %}
{% endif %}
	  {% else %}
		<a href="{{ path('course_homework_start_do',{courseId:course.id,homeworkId:homework.id}) }}" class="btn btn-primary btn-sm mlm" target="_blank">开始做题</a>
	  {% endif %}
	{% else %}
	  此课时暂无作业
	{% endif %}
</div>

<h5>课时练习</h5>

<div class="lesson-about">
	{% if exercise %}
　　　<a href="{{ path('course_exercise_start_do',{courseId:course.id,exerciseId:exercise.id}) }}" class="btn btn-primary btn-sm" target="_blank">来{{ exercise.itemCount }}题</a>
	{% else %}
		此课时暂无练习
	{% endif %}
</div>