Merge branch 'szzh' into dev_hjq

This commit is contained in:
huang 2015-09-19 09:11:39 +08:00
commit 16084a8d08
8 changed files with 18 additions and 11 deletions

View File

@ -6,7 +6,7 @@ module StudentWorkHelper
def user_projects_option
projects = User.current.projects.visible
not_have_project = []
not_have_project << "没有可选项目,请直接为本作品创建一个项目"
not_have_project << "请选择关联项目"
not_have_project << 0
type = []
type << not_have_project

View File

@ -4,6 +4,6 @@ class HomeworkDetailPrograming < ActiveRecord::Base
belongs_to :homework_common
def language_name
%W(c c++).at(self.language.to_i - 1)
%W(C C++).at(self.language.to_i - 1)
end
end

View File

@ -31,9 +31,8 @@ class StudentWork < ActiveRecord::Base
else
self.system_score = last_test.test_score
end
set_final_score self.homework_common,self
end
set_final_score self.homework_common,self
end
def set_src
self.description = last_test.src if last_test

View File

@ -57,7 +57,7 @@
</li>
<!-- 成绩 -->
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
<%= score.nil? ? "--" : format("%.1f",score)%>
<% unless score.nil?%>

View File

@ -87,13 +87,13 @@
<div class="dis" id="tbc_01">
<div class="codeList">
<span class="fl mt3">
<%= link_to "所有作品<font class='f12 c_red'>[共#{@homework.student_works.count}份]</font>".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%>
<%= link_to "所有作品<font class='f12 c_red'>[共#{@stundet_works.count}份]</font>".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%>
</span>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
<form class="resourcesSearchloadBox fr">
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="输入资源关键词进行搜索" class="searchResource" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
<div class="resourcesSearchloadBox fr">
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="姓名、学号、邮箱" class="searchResource" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
<a class="homepageSearchIcon" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
</form>
</div>
<% end%>
<div class="cl"></div>
</div>

View File

@ -29,7 +29,7 @@
<% end %>
<div class="mt10">
<span class="f12 c_red db mt5 fl">温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测和提交。</span>
<span class="f12 c_red db mt5 fl">温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测。</span>
<a href="javascript:void(0);" class="BlueCirBtn fr">确&nbsp;&nbsp;定</a>
<div class="cl"></div>
</div>

View File

@ -0,0 +1,8 @@
class NormalHomeworkType < ActiveRecord::Migration
def up
HomeworkCommon.where("homework_type = 0").update_all(:homework_type => 1)
end
def down
end
end

View File

@ -474,7 +474,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageEditProfile {width:16px; height:16px; border-radius:2px; background-color:#888888; position:absolute; right:5px; bottom:5px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -14px -37px no-repeat; width:20px; height:20px; display:block;}
.homepageEditProfileIcon {background:url(../images/homepage_icon2.png) -14px -37px no-repeat; width:20px; height:20px; display:block;}
.homepageImageName {font-size:16px; color:#484848; height:25px; float:left; font-weight: bold; max-width:90px;overflow: hidden; white-space:nowrap; text-overflow:ellipsis;}
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}