班级作业增加设置选项:成绩公开范围
This commit is contained in:
parent
ff6434d456
commit
2fd4cb9064
4
Gemfile
4
Gemfile
|
@ -50,10 +50,10 @@ gem 'elasticsearch-model'
|
|||
gem 'elasticsearch-rails'
|
||||
|
||||
#rails 3.2.22.2 bug
|
||||
# gem "test-unit", "~>3.0"
|
||||
gem "test-unit", "~>3.0"
|
||||
|
||||
### profile
|
||||
# gem 'oneapm_rpm'
|
||||
gem 'oneapm_rpm'
|
||||
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
|
|
|
@ -6,7 +6,7 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
include StudentWorkHelper
|
||||
before_filter :find_course, :only => [:index,:new,:create]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
|
||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works,:set_score_open,:alert_score_open_modal]
|
||||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
|
||||
before_filter :member_of_course, :only => [:index]
|
||||
|
||||
|
@ -198,6 +198,23 @@ class HomeworkCommonController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 成绩公开范围弹框
|
||||
def alert_score_open_modal
|
||||
if params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
else
|
||||
@user_activity_id = -1
|
||||
end
|
||||
@hw_status = params[:hw_status].to_i
|
||||
end
|
||||
|
||||
def set_score_open
|
||||
@homework.update_attribute('score_open', params[:score_open].to_i)
|
||||
@user_activity_id = params[:user_activity_id].to_i
|
||||
@hw_status = params[:hw_status].to_i
|
||||
@is_teacher = User.current.admin? || User.current.allowed_to?(:as_teacher, @course)
|
||||
end
|
||||
|
||||
#开启匿评
|
||||
#statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限
|
||||
def start_anonymous_comment
|
||||
|
|
|
@ -2855,18 +2855,18 @@ module ApplicationHelper
|
|||
#获取匿评相关连接代码
|
||||
def homework_anonymous_comment (homework, hw_status, user_activity_id = -1)
|
||||
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "wpostOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||
elsif homework.student_works.has_committed.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
||||
case homework.homework_detail_manual.comment_status
|
||||
when 1
|
||||
link = link_to '启动匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink'
|
||||
link = link_to '启动匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'wpostOptionLink'
|
||||
when 2
|
||||
link = link_to '关闭匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink'
|
||||
link = link_to '关闭匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'wpostOptionLink'
|
||||
when 3
|
||||
# link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
|
||||
end
|
||||
else
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于等于2时才可以启动匿评"
|
||||
link = link_to "启动匿评","javascript:void(0)", :class => "wpostOptionLink", :title => "学生提交作业数大于等于2时才可以启动匿评"
|
||||
end
|
||||
link
|
||||
end
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<div id="muban_popup_box" style="width:400px;">
|
||||
<div class="muban_popup_top">
|
||||
<h3 class="fl">成绩公开范围</h3>
|
||||
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<%= form_for('new_form',:url =>{:controller => 'homework_common',:action => 'set_score_open',:id => @homework.id,:user_activity_id => @user_activity_id, :hw_status => @hw_status},
|
||||
:method => "post", :remote => true) do |f|%>
|
||||
<div class="muban_popup_con clear">
|
||||
<div class="clear mt15 ml20">
|
||||
<ul class="pro_newsetting_con fl">
|
||||
<li class="mb10 clear">
|
||||
<ul class="fl">
|
||||
<li class="clear">
|
||||
<label class="fl ml5">请选择作品成绩的公开范围</label>
|
||||
</li>
|
||||
<li class="clear ml20">
|
||||
<input type="radio" class="fl" id="open_to_all" <%= @homework.score_open == 1 ? "checked" : "" %> value="1" name="score_open"/>
|
||||
<label for="open_to_all" class="fl ml5 fontGrey2">成绩对所有学生可见</label>
|
||||
</li>
|
||||
<li class="clear ml20">
|
||||
<input type="radio" class="fl" id="open_to_me" <%= @homework.score_open == 0 ? "checked" : "" %> value="0" name="score_open"/>
|
||||
<label for="open_to_me" class="fl ml5 fontGrey2">成绩仅对自己可见</label>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="fl ml20">
|
||||
<div class="popup_tip_box fontGrey2">
|
||||
<em></em>
|
||||
<span></span>
|
||||
<p>老师和助教始终能看到所有成绩</p>
|
||||
</div>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_blue mr20" onclick="$(this).parent().parent().parent().submit();">确定</a>
|
||||
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="hideModal();">取消</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
|
@ -0,0 +1,2 @@
|
|||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/alert_score_open_modal') %>";
|
||||
pop_box_new(htmlvalue, 400, 200);
|
|
@ -0,0 +1,11 @@
|
|||
hideModal();
|
||||
<% if @hw_status != 5 %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:hw_status=>@hw_status}) %>");
|
||||
<% if @user_activity_id != @homework.id %>
|
||||
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity");
|
||||
<% else %>
|
||||
sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>");
|
||||
<% end %>
|
||||
<% else %>
|
||||
$("#homework_post_brief").html("<%= escape_javascript(render :partial => 'student_work/homework_post_brief', :locals => {:homework => @homework, :is_teacher => @is_teacher}) %>");
|
||||
<% end %>
|
|
@ -30,7 +30,8 @@
|
|||
</th>
|
||||
</tr>
|
||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
||||
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i}%>
|
||||
<% score_open = @homework.score_open == 1 || student_work.user == User.current %>
|
||||
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<div id="about_hwork_<%= student_work.id%>" class="about_hwork">
|
||||
|
|
|
@ -21,19 +21,29 @@
|
|||
</span>
|
||||
<% end %>
|
||||
<div class="flex-container fl" style="width:340px;">
|
||||
<div class="flex-cell student_work_<%= st.id%>"><span class="<%= score_color st.teacher_score%>"><%= st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%></span></div>
|
||||
<div class="flex-cell student_work_<%= st.id%>"><span class="<%= score_color st.teaching_asistant_score%>"><%= st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%></span></div>
|
||||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>">
|
||||
<%= !score_open || st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<span class="<%= score_color (!score_open || st.teaching_asistant_score.nil? ? nil : st.teaching_asistant_score) %>">
|
||||
<%= !score_open || st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%>
|
||||
</span>
|
||||
</div>
|
||||
<% if @homework.anonymous_comment == 0 %>
|
||||
<div class="flex-cell student_work_<%= st.id%>">
|
||||
<div class="<%= score_color st.student_score%> student_score_info pr">
|
||||
<% if st.student_score.nil? %>
|
||||
<div class="<%= score_color (!score_open || st.student_score.nil? ? nil : st.student_score)%> student_score_info pr">
|
||||
<% if !score_open || st.student_score.nil? %>
|
||||
<% pro = @homework.student_work_projects.where("user_id = #{st.user_id}").first
|
||||
if pro.nil? || pro.student_work_id == "" || pro.student_work_id.nil?
|
||||
work = st
|
||||
else
|
||||
work = StudentWork.find pro.student_work_id
|
||||
end %>
|
||||
<% if @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<% if !score_open %>
|
||||
<span title="">--</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<span title="尚未开启匿评">未参与</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %>
|
||||
<span title="匿评期间,尚未获得他人匿评">待匿评</span>
|
||||
|
@ -44,8 +54,6 @@
|
|||
<% end %>
|
||||
<% else %>
|
||||
<%= format("%.1f", st.student_score) %>
|
||||
<% end %>
|
||||
<% unless st.student_score.nil? %>
|
||||
<span class="linkBlue">
|
||||
(<%= anon_count %>)
|
||||
</span>
|
||||
|
@ -61,9 +69,9 @@
|
|||
<% end %>
|
||||
<div class="flex-cell">
|
||||
<% score = st.work_score %>
|
||||
<div class="<%= score_color score%> student_final_scor_info pr" style="display: inline">
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
<div class="<%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr" style="display: inline">
|
||||
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless !score_open || score.nil?%>
|
||||
<div class="score-tip none tl" style="line-height: 18px; top:-32px; right:-273px;">
|
||||
<em></em>
|
||||
<font></font>
|
||||
|
|
|
@ -75,7 +75,8 @@
|
|||
</tr>
|
||||
<%# end %>
|
||||
<% @stundet_works.each_with_index do |student_work, i| %>
|
||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i} %>
|
||||
<% score_open = @is_teacher || @homework.score_open == 1 || student_work.user == User.current %>
|
||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<div id="about_hwork_<%= student_work.id %>" class="about_hwork">
|
||||
|
|
|
@ -52,24 +52,26 @@
|
|||
<%=get_status student_work.work_status %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="hworkList70 <%= score_color student_work.teacher_score%>">
|
||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.teacher_score.nil? ? nil : student_work.teacher_score)%>">
|
||||
<%= !score_open || student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||
</td>
|
||||
<td class="hworkList70 <%= score_color student_work.teaching_asistant_score%>">
|
||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.teaching_asistant_score.nil? ? nil : student_work.teaching_asistant_score)%>">
|
||||
<%= !score_open || student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||
</td>
|
||||
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<td class="hworkList70 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
|
||||
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</td>
|
||||
<% end%>
|
||||
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<td class="hworkList70 <%= score_color student_work.student_score%> student_score_info pr">
|
||||
<% if student_work.student_score.nil? %>
|
||||
<% if student_work.work_status != 0 %>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.student_score.nil? ? nil : student_work.student_score)%> student_score_info pr">
|
||||
<% if !score_open || student_work.student_score.nil? %>
|
||||
<% if !score_open %>
|
||||
<span title="">--</span>
|
||||
<% elsif student_work.work_status != 0 %>
|
||||
<% if @homework.homework_detail_manual.comment_status < 2 %>
|
||||
<span title="尚未开启匿评">未参与</span>
|
||||
<% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %>
|
||||
|
@ -84,8 +86,6 @@
|
|||
<% end %>
|
||||
<% else %>
|
||||
<%=format("%.1f",student_work.student_score) %>
|
||||
<% end %>
|
||||
<% unless student_work.student_score.nil?%>
|
||||
<span class="linkBlue">
|
||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
|
||||
</span>
|
||||
|
@ -97,7 +97,7 @@
|
|||
名学生进行了匿评,平均分为
|
||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||
</div>
|
||||
<% end%>
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
<!-- 成绩 -->
|
||||
|
@ -106,9 +106,9 @@
|
|||
<% else %>
|
||||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||
<% end %>
|
||||
<td class="hworkList70 <%= score_color score%> student_final_scor_info pr">
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
<td class="hworkList70 <%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr">
|
||||
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless !score_open || score.nil?%>
|
||||
<div class="score-tip none tl" style="line-height: 18px;">
|
||||
<em></em>
|
||||
<font></font>
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
<!-- 成绩 -->
|
||||
<% if @homework.homework_type == 2%>
|
||||
<!-- 系统评分 -->
|
||||
<td class="hworkList70 <%= score_color student_work.system_score%>">
|
||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
|
||||
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||
</td>
|
||||
<% end%>
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
<% student_work_groups = @homework.student_works.where("user_id in #{user_ids}").order("created_at asc") %>
|
||||
<% anon_count = student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
||||
<% student_work_groups.each_with_index do |st, j| %>
|
||||
<% score_open = @is_teacher || @homework.score_open == 1 || st.user == User.current %>
|
||||
<div class="syllabus_class_box" id="student_work_<%= st.id%>" style="background-color:#fff;">
|
||||
<%= render :partial => 'evaluation_un_group_member_work', :locals => {:st => st, :anon_count => anon_count} %>
|
||||
<%= render :partial => 'evaluation_un_group_member_work', :locals => {:st => st, :anon_count => anon_count, :score_open => score_open} %>
|
||||
</div>
|
||||
<div id="about_hwork_<%= st.id %>" class="about_hwork"></div>
|
||||
<% end %>
|
|
@ -88,19 +88,19 @@
|
|||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<ul class="whomepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(activity, :hw_status => hw_status), :class => "postOptionLink"%>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(activity, :hw_status => hw_status), :class => "wpostOptionLink"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity, :hw_status => hw_status),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity, :hw_status => hw_status),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "wpostOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true) %>
|
||||
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true) %>
|
||||
</li>
|
||||
<% if activity.anonymous_comment == 0 %>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status < 2%>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true) if activity.homework_detail_manual.comment_status < 2%>
|
||||
</li>
|
||||
<li>
|
||||
<%= homework_anonymous_comment activity,hw_status,user_activity_id %>
|
||||
|
@ -108,19 +108,22 @@
|
|||
<% end %>
|
||||
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id),:class => "postOptionLink",
|
||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id),:class => "wpostOptionLink",
|
||||
:title => "匿评是同学之间的双盲互评过程:每个同学将评阅系统分配给他/她的若干个作品", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if (activity.anonymous_comment == 1 && activity.is_open == 0) || (activity.anonymous_comment == 0 && comment_status == 3 && activity.is_open == 0) %>
|
||||
<li>
|
||||
<%= link_to("公开作品", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true)%>
|
||||
<%= link_to("公开作品", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% elsif activity.is_open == 1 %>
|
||||
<li>
|
||||
<%= link_to("取消公开", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true)%>
|
||||
<%= link_to("取消公开", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<%= link_to("成绩公开范围", alert_score_open_modal_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true) %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -313,6 +313,8 @@ RedmineApp::Application.routes.draw do
|
|||
get 'start_evaluation_set'
|
||||
get 'score_rule_set'
|
||||
post 'set_evaluation_attr'
|
||||
get 'alert_score_open_modal'
|
||||
post 'set_score_open'
|
||||
end
|
||||
|
||||
collection do
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddScoreOpenToHomework < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :homework_commons, :score_open, :integer, :default => 1
|
||||
end
|
||||
end
|
|
@ -236,12 +236,14 @@ a.postReplyCancel:hover {color:#ffffff;}
|
|||
.homepagePostSetting ul li:hover ul {display:block;}
|
||||
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;}
|
||||
.homepagePostSettiongText {width:85px; text-align:center; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;z-index:999; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.whomepagePostSettiongText {width:100px; text-align:center; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-80px; top:20px; padding:5px 0px; display:none;z-index:999; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat; cursor: pointer;}
|
||||
.whiteSettingIcon {background:url(/images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||
.whiteSettingIcon:hover {background:url(/images/homepage_icon.png) -93px -44px no-repeat;}
|
||||
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;text-align:center;}
|
||||
a.postOptionLink:hover {color:#ffffff; background-color:#3b94d6;}
|
||||
a.postOptionLink2 {color:#616060; display:block; width:35px; padding:0px 15px;}
|
||||
a.wpostOptionLink {color:#616060; display:block; width:80px; padding:0px 10px;text-align:center;}
|
||||
a.wpostOptionLink:hover {color:#ffffff; background-color:#3b94d6;}a.postOptionLink2 {color:#616060; display:block; width:35px; padding:0px 15px;}
|
||||
a.postOptionLink2:hover {color:#ffffff; background-color:#3b94d6;}
|
||||
.homepagePostReplyPortrait {float:left; width:33px;}
|
||||
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
|
||||
|
|
Loading…
Reference in New Issue