课程是否启用匿评

课程作业列表样式
加入与退出课程按钮样式
This commit is contained in:
sw 2015-03-26 19:01:22 +08:00
parent ed92faaedd
commit cba678a357
6 changed files with 10 additions and 10 deletions

View File

@ -849,7 +849,7 @@ class BidsController < ApplicationController
@bid.is_evaluation = params[:bid][:is_evaluation] @bid.is_evaluation = params[:bid][:is_evaluation]
@bid.proportion = params[:bid][:proportion] @bid.proportion = params[:bid][:proportion]
@bid.evaluation_num = params[:bid][:evaluation_num] @bid.evaluation_num = params[:bid][:evaluation_num]
@bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation] params[:bid][:open_anonymous_evaluation] ? @bid.open_anonymous_evaluation = 1 : @bid.open_anonymous_evaluation = 0
@bid.reward_type = 3 @bid.reward_type = 3
@bid.deadline = params[:bid][:deadline] @bid.deadline = params[:bid][:deadline]
@bid.budget = 0 @bid.budget = 0

View File

@ -682,13 +682,13 @@ module CoursesHelper
url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id) url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id)
method = joined ? 'delete' : 'post' method = joined ? 'delete' : 'post'
if joined if joined
link = "<span class='pr_join_span' ><em class='pr_add'></em>#{l(:label_course_join_student)}</span>" + link_to(text, url, :remote => true, :method => method, :class => "pr_join_a", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out)) link = "<span class='pr_join_span mr5' ><em class='pr_add'></em>#{l(:label_course_join_student)}</span>" + link_to(text, url, :remote => true, :method => method, :class => "pr_join_a", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out))
else else
link = link_to(text, url, :remote => true, :method => method, :id => "#{course.id}", :class => "pr_join_a") + "<span class='pr_join_span' ><em class='pr_arrow'></em>#{l(:label_course_exit_student)}</span>".html_safe link = link_to(text, url, :remote => true, :method => method, :id => "#{course.id}", :class => "pr_join_a") + "<span class='pr_join_span mr5' ><em class='pr_arrow'></em>#{l(:label_course_exit_student)}</span>".html_safe
end end
else else
link = "<span class='pr_join_span' ><em class='pr_add'></em>#{l(:label_course_join_student)}</span>" + link = "<span class='pr_join_span mr5' ><em class='pr_add'></em>#{l(:label_course_join_student)}</span>" +
"<span class='pr_join_span' ><em class='pr_arrow'></em>#{l(:label_course_exit_student)}</span>" "<span class='pr_join_span mr5' ><em class='pr_arrow'></em>#{l(:label_course_exit_student)}</span>"
end end
link.html_safe link.html_safe
end end
@ -702,7 +702,7 @@ module CoursesHelper
when 1 when 1
link = link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit' link = link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit'
when 2 when 2
link = "<span class='fr mr10 pr_join_span ' title='匿评结束'>匿评结束</span>".html_safe link = "<span class='fr pr_join_span mr10' title='匿评结束'>匿评结束</span>".html_safe
end end
else else
link = "<span class='fr mr10 pr_join_span ' title='学生提交作业数大于2时才可以启动匿评'>启动匿评</span>".html_safe link = "<span class='fr mr10 pr_join_span ' title='学生提交作业数大于2时才可以启动匿评'>启动匿评</span>".html_safe

View File

@ -23,7 +23,7 @@
</li> </li>
<li class=" mb5 ml30"> <li class=" mb5 ml30">
<label ><%= l(:label_open_anonymous_evaluation)%>&nbsp;&nbsp;</label> <label ><%= l(:label_open_anonymous_evaluation)%>&nbsp;&nbsp;</label>
<input type="checkbox" name="bid[open_anonymous_evaluation]" id="bid_open_anonymous_evaluation" checked="<%= bid.open_anonymous_evaluation == 1 ? 'checked' : ''%>" > <input type="checkbox" name="bid[open_anonymous_evaluation]" id="bid_open_anonymous_evaluation" <%= bid.open_anonymous_evaluation == 1 ? 'checked' : ''%> >
<div class="cl"></div> <div class="cl"></div>
</li> </li>
<li class="ml9"> <li class="ml9">

View File

@ -41,7 +41,7 @@
</div> </div>
<span class="fl"><%= l(:label_end_time)%><%= bid.deadline%></span> <span class="fl"><%= l(:label_end_time)%><%= bid.deadline%></span>
<% if betweentime(bid.deadline) < 0 %> <% if betweentime(bid.deadline) < 0 %>
<span class='fr mr10 pr_join_span '> <span class='fr mr10 c_red '>
<%= l(:label_commit_limit)%> <%= l(:label_commit_limit)%>
</span> </span>
<% else %> <% else %>

View File

@ -83,7 +83,7 @@
<div class="cl"></div> <div class="cl"></div>
<div > <div >
<a class="pr_info_name fl c_dark" href="courses/<%= @course.id%>" target="_blank"> <a class="pr_info_name fl c_dark fb" href="courses/<%= @course.id%>" target="_blank">
<%= @course.name %> <%= @course.name %>
<% if @course.is_public == 0%> <% if @course.is_public == 0%>
<span class="img_private "> <span class="img_private ">

View File

@ -9,7 +9,7 @@
.pr_info_join{} .pr_info_join{}
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; }
.pr_info_join a:hover{ background:#41a8c8;} .pr_info_join a:hover{ background:#41a8c8;}
.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;} .pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; float:left; text-align:center; background: #CCC;}
.pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }
.pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }