静态页面添加
This commit is contained in:
parent
fa00285529
commit
939a010adb
|
@ -72,80 +72,12 @@ class StudentWorkController < ApplicationController
|
||||||
query.update_attributes(:viewed => true)
|
query.update_attributes(:viewed => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@order,@b_sort,@name,@group = params[:order] || "score",params[:sort] || "desc",params[:name] || "",params[:group]
|
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
|
##################################################################################################################
|
||||||
course_group = CourseGroup.find_by_id(@group) if @group
|
@stundet_works = @homework.student_works
|
||||||
if course_group
|
|
||||||
group_students = course_group.users
|
|
||||||
if group_students.empty?
|
|
||||||
student_in_group = '(0)'
|
|
||||||
else
|
|
||||||
student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')'
|
|
||||||
end
|
|
||||||
#老师 || 非匿评作业 || 匿评结束 显示所有的作品
|
|
||||||
@show_all = @is_teacher || @homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3 || User.current.admin?
|
|
||||||
if @show_all
|
|
||||||
if @homework.homework_type == 1 || @is_teacher || User.current.admin? #超级管理员 || 老师 || 匿评结束 显示所有的作品
|
|
||||||
if @order == "name"
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
|
||||||
else
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name
|
|
||||||
end
|
|
||||||
else #剩余情况: 学生 && 非匿评作业 如果未提交作品,只能看到自己的,提交了作品,能看到所有作品
|
|
||||||
my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
|
||||||
if my_work.empty?
|
|
||||||
@stundet_works = []
|
|
||||||
else
|
|
||||||
if @order == "name"
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
|
||||||
else
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).where("users.id in #{student_in_group}").order("#{@order} #{@b_sort}"),@name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else #学生
|
|
||||||
if @homework.homework_detail_manual.comment_status == 1 #未开启匿评,只显示我的作品
|
|
||||||
@stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
|
||||||
elsif @homework.homework_detail_manual.comment_status == 2 #匿评列表,显示匿评作品和我的作品
|
|
||||||
@is_evaluation = true
|
|
||||||
my_work = @homework.student_works.where(:user_id => User.current.id)
|
|
||||||
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
#老师 || 非匿评作业 || 匿评结束 显示所有的作品
|
|
||||||
@show_all = @is_teacher || @homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 3 || User.current.admin?
|
|
||||||
if @show_all
|
|
||||||
if @homework.homework_type == 1 || @is_teacher || User.current.admin? #超级管理员 || 老师 || 匿评结束 显示所有的作品
|
|
||||||
if @order == "name"
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
|
||||||
else
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
|
||||||
end
|
|
||||||
else #剩余情况: 学生 && 非匿评作业 如果未提交作品,只能看到自己的,提交了作品,能看到所有作品
|
|
||||||
my_work = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
|
||||||
if my_work.empty?
|
|
||||||
@stundet_works = []
|
|
||||||
else
|
|
||||||
if @order == "name"
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").joins(:user).order("users.lastname #{@b_sort}, users.firstname #{@b_sort}"),@name
|
|
||||||
else
|
|
||||||
@stundet_works = search_homework_member @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").order("#{@order} #{@b_sort}"),@name
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else #学生
|
|
||||||
if @homework.homework_detail_manual.comment_status == 1 #未开启匿评,只显示我的作品
|
|
||||||
@stundet_works = @homework.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where(:user_id => User.current.id)
|
|
||||||
elsif @homework.homework_detail_manual.comment_status == 2 #匿评列表,显示匿评作品和我的作品
|
|
||||||
@is_evaluation = true
|
|
||||||
my_work = @homework.student_works.where(:user_id => User.current.id)
|
|
||||||
@stundet_works = my_work + User.current.student_works_evaluation_distributions.map(&:student_work).select { |work| work.homework_common_id == @homework.id}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
@homework_commons = @course.homework_commons.order("created_at desc")
|
@homework_commons = @course.homework_commons.order("created_at desc")
|
||||||
@score = @b_sort == "desc" ? "asc" : "desc"
|
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.xls {
|
format.xls {
|
||||||
|
@ -264,7 +196,7 @@ class StudentWorkController < ApplicationController
|
||||||
render_403 and return if User.current == @work.user #不可以匿评自己的作品
|
render_403 and return if User.current == @work.user #不可以匿评自己的作品
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
|
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
|
||||||
#老师、教辅可以随时评分,学生只能在匿评作业的匿评阶段进行评分
|
#老师、教辅可以随时评分,学生只能在匿评作业的匿评阶段进行评分
|
||||||
render_403 and return unless @is_teacher || (@homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2)
|
render_403 and return unless @is_teacher || @homework.homework_detail_manual.comment_status == 2
|
||||||
@score = student_work_score @work,User.current
|
@score = student_work_score @work,User.current
|
||||||
if @score
|
if @score
|
||||||
@score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""
|
@score.comment = params[:new_form][:user_message] if params[:new_form] && params[:new_form][:user_message] && params[:new_form][:user_message] != ""
|
||||||
|
@ -298,33 +230,10 @@ class StudentWorkController < ApplicationController
|
||||||
case @score.reviewer_role
|
case @score.reviewer_role
|
||||||
when 1 #教师评分:最后一个教师评分为最终评分
|
when 1 #教师评分:最后一个教师评分为最终评分
|
||||||
@work.teacher_score = @score.score
|
@work.teacher_score = @score.score
|
||||||
@work.final_score = @score.score
|
|
||||||
when 2 #教辅评分 教辅评分显示平均分
|
when 2 #教辅评分 教辅评分显示平均分
|
||||||
@work.teaching_asistant_score = @work.student_works_scores.where(:reviewer_role => 2).average(:score).try(:round, 2).to_f
|
@work.teaching_asistant_score = @work.student_works_scores.where(:reviewer_role => 2).average(:score).try(:round, 2).to_f
|
||||||
if @work.teacher_score.nil?
|
|
||||||
if @work.student_score.nil?
|
|
||||||
@work.final_score = @work.teaching_asistant_score
|
|
||||||
else
|
|
||||||
ta_proportion = @homework.homework_detail_manual.ta_proportion if @homework.homework_detail_manual
|
|
||||||
ta_proportion = @homework.homework_detail_programing.ta_proportion if @homework.homework_detail_programing
|
|
||||||
final_ta_score = BigDecimal.new("#{@work.teaching_asistant_score}") * BigDecimal.new("#{ta_proportion}")
|
|
||||||
final_s_score = BigDecimal.new("#{@work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{ta_proportion}"))
|
|
||||||
final_score = final_ta_score + final_s_score
|
|
||||||
@work.final_score = format("%.2f",final_score.to_f)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
when 3 #学生评分 学生评分显示平均分
|
when 3 #学生评分 学生评分显示平均分
|
||||||
@work.student_score = @work.student_works_scores.where(:reviewer_role => 3).average(:score).try(:round, 2).to_f
|
@work.student_score = @work.student_works_scores.where(:reviewer_role => 3).average(:score).try(:round, 2).to_f
|
||||||
if @work.teacher_score.nil?
|
|
||||||
if @work.teaching_asistant_score.nil?
|
|
||||||
@work.final_score = @work.student_score
|
|
||||||
else
|
|
||||||
final_ta_score = BigDecimal.new("#{@work.teaching_asistant_score}") * BigDecimal.new("#{@homework.homework_detail_manual.ta_proportion}")
|
|
||||||
final_s_score = BigDecimal.new("#{@work.student_score}") * (BigDecimal.new('1.0') - BigDecimal.new("#{@homework.homework_detail_manual.ta_proportion}"))
|
|
||||||
final_score = final_ta_score + final_s_score
|
|
||||||
@work.final_score = format("%.2f",final_score.to_f)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if @work.save
|
if @work.save
|
||||||
|
|
|
@ -145,12 +145,12 @@
|
||||||
</div><!--LSide end-->
|
</div><!--LSide end-->
|
||||||
|
|
||||||
<div id="RSide" class="fl">
|
<div id="RSide" class="fl">
|
||||||
<%= render_flash_messages %>
|
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
<%= call_hook :view_layouts_base_content %>
|
<%#= render_flash_messages %>
|
||||||
|
<%#= call_hook :view_layouts_base_content %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="clear:both;"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
</div><!--Content end-->
|
</div><!--Content end-->
|
||||||
</div><!--Container end-->
|
</div><!--Container end-->
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<% if @homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @stundet_works.count > 1%>
|
$(function(){
|
||||||
|
$("#RSide").removeAttr("id");
|
||||||
|
$("#Container").css("width","1000px");
|
||||||
|
});
|
||||||
|
|
||||||
|
// 匿评弹框提示
|
||||||
|
<% if @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @stundet_works.count > 1%>
|
||||||
$(function(){
|
$(function(){
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/praise_alert') %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/praise_alert') %>');
|
||||||
showModal('ajax-modal', '500px');
|
showModal('ajax-modal', '500px');
|
||||||
|
@ -12,210 +18,255 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="project_r_h">
|
<div class="homepageRight mt0 ml10">
|
||||||
<div id="menu_r">
|
<div class="resources">
|
||||||
<ul class="menu_r">
|
<div class="hworkListBanner">
|
||||||
<li><a href="javascript:void(0);" class="parent">作业批次</a>
|
<div id="menu_r" class="fl">
|
||||||
<ul>
|
<ul class="menu_r">
|
||||||
<% @homework_commons.each_with_index { |homework_common,index |%>
|
<li><a href="javascript:void(0);" class="parent">作业批次</a>
|
||||||
<li>
|
<ul>
|
||||||
<%= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
|
<% @homework_commons.each_with_index do |homework_common,index |%>
|
||||||
</li>
|
<li>
|
||||||
<%}%>
|
<%= link_to "第#{@homework_commons.count - index}次作业",student_work_index_path(:homework => homework_common.id)%>
|
||||||
|
</li>
|
||||||
|
<% end%>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<!---level1 end--->
|
||||||
</ul>
|
</ul>
|
||||||
</li><!---level1 end--->
|
<!---menu_r end--->
|
||||||
</ul><!---menu_r end--->
|
</div>
|
||||||
</div>
|
<!--div class="hworkInfor"><a href="javascript:void(0);" class="linkBlue">作业信息</a></div-->
|
||||||
</div><!--contentbox end-->
|
<div class="fr mt5">
|
||||||
|
<ul class="resourcesSelect">
|
||||||
<div class="to_top" id="goTopBtn" style="display: none;">
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
返<br/>回<br/>顶<br/>部
|
<ul class="hworkMenu">
|
||||||
</div>
|
<li><a href="javascript:void(0);" class="hworkExport resourcesGrey">导出作业成绩</a></li>
|
||||||
<div class="cl"></div>
|
<li><a href="javascript:void(0);" class="hworkExport postTypeGrey">导出作业附件</a></li>
|
||||||
<div id="contentbox">
|
<li><a href="javascript:void(0);" class="hworkExport postTypeGrey">导出缺评情况</a></li>
|
||||||
<div id="tb_" class="hwork_tb_">
|
<li><a href="javascript:void(0);" class="hworkExport resourcesGrey">导出匿评情况</a></li>
|
||||||
<ul>
|
<li><a href="javascript:void(0);" class="hworkSetting resourcesGrey">评分设置</a></li>
|
||||||
<li id="tb_1" class="hwork_hovertab" onclick="course_setting(1)">全部作品</li>
|
</ul>
|
||||||
<li id="tb_2" class="hwork_normaltab" onclick="course_setting(2)">作业信息</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<div class="ctt">
|
|
||||||
<div class="dis" id="tbc_01">
|
|
||||||
<div class="code_list">
|
|
||||||
<span class="fl mt3">
|
|
||||||
<%= link_to "所有作品(<span class='c_red'>#{@stundet_works.count}</span>)".html_safe,student_work_index_path(:homework => @homework.id), :class => "fl"%>
|
|
||||||
</span>
|
|
||||||
<% if @show_all%>
|
|
||||||
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="昵称、学号、姓名搜索" class="min_search ml10 fl" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);">
|
|
||||||
<%= select_tag(:late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"}) if(@is_teacher && course_group_list(@course).count > 0) %>
|
|
||||||
<a class="student_work_search fl" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)">搜索</a>
|
|
||||||
<%= link_to("缺评情况",student_work_absence_penalty_student_work_index_path(:homework => @homework.id), :class => "student_work_search fl", :target => "_blank") if((@is_teacher || User.current.admin?) && @homework.homework_type == 1) %>
|
|
||||||
<% end%>
|
|
||||||
<% if @is_teacher%>
|
|
||||||
<div class="fr">
|
|
||||||
<% unless @homework.homework_type == 2%>
|
|
||||||
<% if @homework.student_works.empty?%>
|
|
||||||
<%= link_to "附件", "javascript:void(0)", class: "down_btn fr zip_download_alert", :onclick => "alert('没有学生提交作业,无法下载附件')" %>
|
|
||||||
<% else%>
|
|
||||||
<%= link_to "附件", zipdown_assort_path(obj_class: @homework.class, obj_id: @homework, format: :json),
|
|
||||||
remote: true, class: "down_btn fr zip_download_alert", :id => "download_homework_attachments" %>
|
|
||||||
<% end%>
|
|
||||||
<div class="info_ni_download" style="<%= @homework.homework_type == 1 ? '' : 'margin-left: 130px;'%>">
|
|
||||||
使用
|
|
||||||
<span class="c_red">winzip</span>
|
|
||||||
工具进行解压可能会导致
|
|
||||||
<span class="c_red">下载文件乱码</span>
|
|
||||||
,建议您使用
|
|
||||||
<span class="c_red">winrar</span>
|
|
||||||
工具进行解压
|
|
||||||
</div>
|
|
||||||
<% end%>
|
|
||||||
<%= link_to("匿评", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%>
|
|
||||||
<%= link_to("缺评", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'down_btn fr') if @homework.homework_type == 1%>
|
|
||||||
<%= link_to l(:label_list), student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :format => 'xls'),:class=>'down_btn fr'%>
|
|
||||||
<span class="mt3 fr " style="color:#136b3b;">导出全部:</span>
|
|
||||||
</div>
|
|
||||||
<% end%>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!---code_list end--->
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="hworkListContainer">
|
||||||
|
<div class="ctt2">
|
||||||
<% if @is_evaluation%>
|
<div class="dis" id="tbc_01">
|
||||||
<ul class="hwork_ul">
|
<div class="codeList">
|
||||||
<%= render :partial => 'evaluation_work_title'%>
|
<span class="fl mt3">
|
||||||
</ul><!---hwork_ul end-->
|
<a href="javascript:void(0);" class="fl f14" >所有作品
|
||||||
<div class="cl"></div>
|
<font class="f12 c_red">[共199份]</font>
|
||||||
<% @stundet_works.each do |student_work|%>
|
</a>
|
||||||
<%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%>
|
</span>
|
||||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
<form class="resourcesSearchloadBox fr">
|
||||||
<% end%>
|
<input type="text" name="serach" placeholder="输入资源关键词进行搜索" class="searchResource" />
|
||||||
<% else %>
|
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
|
||||||
<% if @homework.homework_type == 1 || @homework.homework_type == 2%>
|
</form>
|
||||||
<ul class="hwork_ul">
|
|
||||||
<%= render :partial => 'evaluation_student_work_title'%>
|
|
||||||
</ul><!---hwork_ul end-->
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% @stundet_works.each do |student_work|%>
|
</div>
|
||||||
<%= render :partial => "evaluation_student_work",:locals => {:student_work => student_work}%>
|
<!---code_list end--->
|
||||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
<div class="fl">
|
||||||
<% end%>
|
<ul class="hworkUl b_grey">
|
||||||
<% else%>
|
<li class="hworkList380">
|
||||||
<ul class="hwork_ul">
|
<span class="c_dark f14 fb fl ml10">作品信息</span>
|
||||||
<%= render :partial => 'student_work_title'%>
|
</li>
|
||||||
</ul><!---hwork_ul end-->
|
<li class="hworkList80" >
|
||||||
|
<span class="c_dark f14 fb fl ml10">教师评分</span>
|
||||||
|
<a href="javascript:void(0);" class="st_up mt19" ></a>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList80">
|
||||||
|
<span class="c_dark f14 fb fl ml10">教辅评分</span>
|
||||||
|
<a href="javascript:void(0);" class="st_up mt19" ></a>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList80">
|
||||||
|
<span class="c_dark f14 fb fl ml10">系统评分</span>
|
||||||
|
<a href="javascript:void(0);" class="st_up mt19" ></a>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList50">
|
||||||
|
<span class="c_dark f14 fb fl ml5">匿评</span>
|
||||||
|
<a href="javascript:void(0);" class="st_up mt19" ></a>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList50">
|
||||||
|
<span class="c_dark f14 fb fl ml5">成绩</span>
|
||||||
|
<a href="javascript:void(0);" class="st_down mt19" ></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<!---hwork_ul end--->
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="hworkListRow" >
|
||||||
|
<li class="hworkList380">
|
||||||
|
<ul>
|
||||||
|
<li class="hworkName mt12"><a href="javascript:void(0);" class="linkGrey f14">作品名称作品名称作品名称作品名称作品名称</a></li>
|
||||||
|
<li>
|
||||||
|
<ul class="mt12">
|
||||||
|
<li class="hworkDetail mr15">姓名:马克</li>
|
||||||
|
<li class="hworkDetail mr15">学号:123456789</li>
|
||||||
|
<li class="hworkDate">时间:2015-08-21 11:00</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList80 c_red">90</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList50 c_red">100<span class="linkBlue">(3)</span>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList50 c_red">90</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% @stundet_works.each do |student_work|%>
|
</ul>
|
||||||
<%= render :partial => "student_work",:locals => {:student_work => student_work}%>
|
<!---hwork_ul end--->
|
||||||
<div id="about_hwork_<%= student_work.id%>" ></div>
|
<div id="about_hwork">
|
||||||
<% end%>
|
|
||||||
<% end%>
|
|
||||||
<% end%>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!---tbc_01 end-->
|
|
||||||
|
|
||||||
<div class="undis" id="tbc_02">
|
<!---show_hwork end--->
|
||||||
<div class="problem_main mt10">
|
</div>
|
||||||
<%= link_to(image_tag(url_to_avatar(@homework.user), :width => "42", :height => "42"), user_path(@homework.user), :class => "problem_pic fl") %>
|
<ul class="hworkListRow" >
|
||||||
<div class="problem_txt fl mt5">
|
<li class="hworkList380">
|
||||||
<h4 class="r_txt_tit mb5">
|
<ul>
|
||||||
<%= @homework.name%>
|
<li class="hworkName mt12"><a href="javascript:void(0);" class="linkGrey f14">作品名称作品名称作品名称作品名称作品名称</a></li>
|
||||||
</h4>
|
<li>
|
||||||
<% if @is_teacher%>
|
<ul class="mt12">
|
||||||
<%#= homework_anonymous_comment(@homework)%>
|
<li class="hworkDetail mr15">姓名:马克</li>
|
||||||
<% else%>
|
<li class="hworkDetail mr15">学号:123456789</li>
|
||||||
<%= student_anonymous_comment @homework %>
|
<li class="hworkDate">时间:2015-08-21 11:00</li>
|
||||||
<%= student_new_homework @homework %>
|
</ul>
|
||||||
<% end %>
|
</li>
|
||||||
<div class="cl"></div>
|
</ul>
|
||||||
|
</li>
|
||||||
<div id="bid_description_<%= @homework.id%>" class="mt5 upload_img">
|
<li class="hworkList80 c_red">90</li>
|
||||||
<%= @homework.description.html_safe %>
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList50 c_red">100<span class="linkBlue">(3)</span>
|
||||||
|
<div class="infoNi" >
|
||||||
|
现共有<span class="c_red"> 3 </span>
|
||||||
|
名学生进行了匿评,平均分为
|
||||||
|
<span class="c_red"> 100 </span>分
|
||||||
|
。</div>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList50 c_red">90</li>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<ul class="hworkListRow" >
|
||||||
|
<li class="hworkList380">
|
||||||
|
<ul>
|
||||||
|
<li class="hworkName mt12"><a href="javascript:void(0);" class="linkGrey f14">作品名称作品名称作品名称作品名称作品名称</a></li>
|
||||||
|
<li>
|
||||||
|
<ul class="mt12">
|
||||||
|
<li class="hworkDetail mr15">姓名:马克</li>
|
||||||
|
<li class="hworkDetail mr15">学号:123456789</li>
|
||||||
|
<li class="hworkDate">时间:2015-08-21 11:00</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList80 c_red">90</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList50 c_grey">--</li>
|
||||||
|
<li class="hworkList50 c_red">90</li>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<ul class="hworkListRow" >
|
||||||
|
<li class="hworkList380">
|
||||||
|
<ul>
|
||||||
|
<li class="hworkName mt12"><a href="javascript:void(0);" class="linkGrey f14">作品名称作品名称作品名称作品名称作品名称作品名称作品名称作品名称作品名称</a></li>
|
||||||
|
<li>
|
||||||
|
<ul class="mt12">
|
||||||
|
<li class="hworkDetail mr15">姓名:马克</li>
|
||||||
|
<li class="hworkDetail mr15">学号:123456789</li>
|
||||||
|
<li class="hworkDate">时间:2015-08-21 11:00</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li class="hworkList80 c_red">90</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList80 c_grey">--</li>
|
||||||
|
<li class="hworkList50 c_grey">--</li>
|
||||||
|
<li class="hworkList50 c_red">90</li>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<!---about_hwork end--->
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<!---tbc_01 end-->
|
||||||
|
|
||||||
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
<div class="undis" id="tbc_02">
|
||||||
<% if @is_teacher%>
|
<div class="problem_main mt10"> <a class="problem_pic fl"><img src="images/courses/pic_01.jpg" width="42" height="42" /></a>
|
||||||
<table class="border_ce" cellpadding="0" cellspacing="0">
|
<div class="problemTxt fl mt5">
|
||||||
<tbody>
|
<h4 class="rTxtTit mb5"> 请以下同学重新提交作业ppt,只要更新附件,不要删除作否则否则否则评分就丢了</h4>
|
||||||
<tr class="<%= cycle("", "b_grey") %>">
|
<div class="homepagePostSetting">
|
||||||
<td class="td_tit">
|
<ul>
|
||||||
输入
|
<li class="homepagePostSettingIcon">
|
||||||
</td>
|
<ul class="homepagePostSettiongText">
|
||||||
<td class="td_tit">
|
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||||
输出
|
<li><a href="javascript:void(0);" class="postOptionLink">启动匿评</a></li>
|
||||||
</td>
|
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||||
</tr>
|
</ul>
|
||||||
<% @homework.homework_tests.each do |test|%>
|
</li>
|
||||||
<tr class="<%= cycle("", "b_grey") %>">
|
</ul>
|
||||||
<td class="td_tit">
|
</div>
|
||||||
<%=test.input%>
|
<div class="cl"></div>
|
||||||
</td>
|
<p id="news_description" class="news_description mt5">项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题</p>
|
||||||
<td class="td_tit">
|
<a href="javascript:void(0);" class=" linkBlue" onclick="show_more_msg02();">[展开]</a>
|
||||||
<%= test.output%>
|
<div class="cl"></div>
|
||||||
</td>
|
<span class="fl">截止时间:2015-04-02</span>
|
||||||
</tr>
|
<div >
|
||||||
<% end%>
|
<form name="formnow" class="fr">
|
||||||
</tbody>
|
<input class="c_red " name="dd" type="text" style="border:0;" size="1" >
|
||||||
</table>
|
天
|
||||||
<div class="cl"></div>
|
<input class="c_red " name="hh" type="text" style="border:0;" size="1">
|
||||||
<% end%>
|
小时
|
||||||
|
<input class="c_red " name="mm" type="text" style="border:0;" size="1">
|
||||||
<div class="mt5">
|
分
|
||||||
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
|
<input class="c_red " name="ss" type="text" style="border:0;" size="1">
|
||||||
<div class="fl">
|
秒
|
||||||
<% if @homework.homework_detail_programing.language.to_i == 1%>
|
</form>
|
||||||
C
|
<p class="fr">作业提交还剩:</p>
|
||||||
<% elsif @homework.homework_detail_programing.language.to_i == 2%>
|
|
||||||
C++
|
|
||||||
<% end%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--problem_txt end-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end%>
|
|
||||||
|
|
||||||
<div class="mt5">
|
|
||||||
<% unless @homework.attachments.empty?%>
|
|
||||||
<span class="tit_fb" style="width: auto;"> 附件:</span>
|
|
||||||
<div class="fl mb5">
|
|
||||||
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => @homework.attachments} %>
|
|
||||||
</div>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<!--div class="mt5">
|
|
||||||
<span class="tit_fb" style="width: auto;"> 扣分标准:</span>
|
|
||||||
<div class="fl mb5 c_red">
|
|
||||||
<%# if @homework.homework_type == 1%>
|
|
||||||
<%#= scoring_rules @homework.late_penalty,@homework.id,@is_teacher,@homework.homework_detail_manual.absence_penalty%>
|
|
||||||
<%# else%>
|
|
||||||
<%#= scoring_rules @homework.late_penalty,@homework.id,@is_teacher%>
|
|
||||||
<%# end%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<!--problem_main end-->
|
||||||
|
|
||||||
<div class="cl"></div-->
|
<div class="problem_main mt10" style="display:none;"> <a class="problem_pic fl"><img src="images/courses/pic_01.jpg" width="42" height="42" /></a>
|
||||||
<span class="fl">截止时间:<%= @homework.end_time%></span>
|
<div class="problem_txt fl mt5">
|
||||||
<div >
|
<h4 class="rTxtTit mb5"> 请以下同学重新提交作业ppt,只要更新附件,不要删除作否则否则否则评分就丢了</h4>
|
||||||
<% if betweentime(@homework.end_time) < 0 %>
|
<div class="homepagePostSetting">
|
||||||
<span class='fr mr10 c_red '>
|
<ul>
|
||||||
<%= l(:label_commit_limit)%>
|
<li class="homepagePostSettingIcon">
|
||||||
</span>
|
<ul class="homepagePostSettiongText">
|
||||||
<% else %>
|
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||||
<script type="text/javascript">
|
<li><a href="javascript:void(0);" class="postOptionLink">关闭匿评</a></li>
|
||||||
window.setInterval(function(){show_bid_dead_line(<%= @homework.end_time.year%>,<%= @homework.end_time.month%>,<%= @homework.end_time.day + 1%>,"bid_deadline_<%= @homework.id%>");},1000)
|
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||||
</script>
|
</ul>
|
||||||
<div id="bid_deadline_<%= @homework.id%>">
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<div class="cl"></div>
|
||||||
|
<p class=" mt5">项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题项目问题个数显示问题个数显示问题项目问题个数显示问题项目问题个数显题个数显示问题<br />
|
||||||
|
创建时间 : 2014-11-26 10:19</p>
|
||||||
|
<span class="fr c_red">已截止,但可补交。</span> </div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<!--课程动态 end-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div> <!--problem_txt end-->
|
<!---tbc_02 end-->
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--problem_main end-->
|
|
||||||
</div><!---tbc_02 end-->
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!--ctt end-->
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<!--contentbox end-->
|
||||||
|
</div>
|
||||||
|
<!--RSide end-->
|
||||||
|
|
||||||
</div><!--ctt end-->
|
</div>
|
||||||
</div><!--contentbox end-->
|
<!--Content end-->
|
||||||
|
<!--Footer end-->
|
||||||
|
<div class="cl"></div>
|
Loading…
Reference in New Issue