socialforge/app/views/exercise/_student_exercise.html.erb

46 lines
2.4 KiB
Plaintext
Raw Normal View History

2015-11-17 09:33:40 +08:00
<div class="fl" style="padding-bottom:10px; width:720px;">
<span class="c_dark f14 fb fl mr30">
测验
<font class="f12 c_red">
(<%= @exercise_count%>人已交)
</font>
<% if !@is_teacher && @exercise_users_list.empty?%>
<span class="f12 c_red">您尚未提交</span>
<% elsif !@is_teacher && !@exercise_users_list.empty?%>
<span class="f12 c_red">您已提交</span>
<% end %>
</span>
<%if @is_teacher || @exercise.exercise_status == 3%>
<div class="hworkSearchBox">
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="姓名、学号、邮箱" class="hworkSearchInput" onkeypress="SearchByName('<%#= student_work_index_path(:homework => @homework.id)%>',event);"/>
<a class="hworkSearchIcon" id="search_in_student_work" onclick="SearchByName_1('<%#= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
</div>
<%#= select_tag(:student_work_in_group,options_for_select(course_group_list(@course),@group), {:class => "classSplit"}) unless course_group_list(@course).empty? %>
<% end%>
<span class="fr c_grey"> <a href="javascript:void(0);" class="linkGrey2" id="homework_info_show" style="display: none">[ 显示测验信息 ]</a> </span>
</div>
<div class="cl"></div>
<div class="fl">
<%= render :partial => "evaluation_un_title"%>
</div>
<div class="cl"></div>
<% @stundet_works.each do |student_work|%>
<% if @is_evaluation%>
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work}%>
<% else%>
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work}%>
<% end%>
<div class="cl"></div>
<div id="about_hwork_<%= student_work.id%>">
<% if student_work.user == User.current && !@is_evaluation %>
<% if @homework.homework_type == 2%>
<%=render :partial => 'programing_work_show', :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
<% else %>
<%=render :partial => 'show' , :locals=> {:work => student_work, :score =>student_work_score(student_work,User.current),:student_work_scores => student_work.student_works_scores.order("updated_at desc")} %>
<% end %>
<% end %>
</div>
<div class="cl"></div>
<% end%>