dev_xiangzheng
Tim 10 years ago
commit 83b984a909

@ -6,8 +6,8 @@ class HomeworkCommonController < ApplicationController
include StudentWorkHelper include StudentWorkHelper
before_filter :find_course, :only => [:index,:new,:create] 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] 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]
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] 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]
before_filter :member_of_course, :only => [:index] before_filter :member_of_course, :only => [:index]
def index def index
@ -215,6 +215,11 @@ class HomeworkCommonController < ApplicationController
end end
end end
#评分设置
def score_rule_set
end
private private
#获取课程 #获取课程
def find_course def find_course

@ -457,7 +457,13 @@ class StudentWorkController < ApplicationController
end end
end end
respond_to do |format| respond_to do |format|
format.html{redirect_to student_work_index_url(:homework => @homework.id)} format.html{
if params[:student_path]
redirect_to student_work_index_url(:homework => @homework.id)
else
redirect_to user_homeworks_user_path(User.current.id)
end
}
end end
end end

@ -76,11 +76,13 @@
} }
$("#intro_content_show_<%= activity.id %>").click(function(){ $("#intro_content_show_<%= activity.id %>").click(function(){
$("#activity_description_<%= activity.id %>").toggleClass("maxh360"); $("#activity_description_<%= activity.id %>").toggleClass("maxh360");
$("#activity_description_<%= activity.id%>").toggleClass("lh18");
$("#intro_content_show_<%= activity.id %>").hide(); $("#intro_content_show_<%= activity.id %>").hide();
$("#intro_content_hide_<%= activity.id %>").show(); $("#intro_content_hide_<%= activity.id %>").show();
}); });
$("#intro_content_hide_<%= activity.id %>").click(function(){ $("#intro_content_hide_<%= activity.id %>").click(function(){
$("#activity_description_<%= activity.id %>").toggleClass("maxh360"); $("#activity_description_<%= activity.id %>").toggleClass("maxh360");
$("#activity_description_<%= activity.id%>").toggleClass("lh18");
$("#intro_content_hide_<%= activity.id %>").hide(); $("#intro_content_hide_<%= activity.id %>").hide();
$("#intro_content_show_<%= activity.id %>").show(); $("#intro_content_show_<%= activity.id %>").show();
}); });

@ -0,0 +1,6 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework, :student_path => false}) %>');
showModal('ajax-modal', '350px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");

@ -1,4 +1,7 @@
<%= form_for('new_form',:url => {:controller => 'student_work',:action => 'set_score_rule',:homework => homework.id},:method => "post") do |f|%> <%= form_for('new_form',:url => {:controller => 'student_work',:action => 'set_score_rule',:homework => homework.id},:method => "post") do |f|%>
<% if student_path %>
<%=hidden_field_tag 'student_path', params[:student_path], :value => student_path %>
<% end %>
<div class="markPopup" id="popbox02"> <div class="markPopup" id="popbox02">
<span class="uploadText">评分设置</span> <span class="uploadText">评分设置</span>
<div class="mt15"> <div class="mt15">

@ -20,7 +20,7 @@
//设置评分规则 //设置评分规则
function set_score_rule(){ function set_score_rule(){
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework}) %>'); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework,:student_path => true}) %>');
showModal('ajax-modal', '350px'); showModal('ajax-modal', '350px');
$('#ajax-modal').siblings().remove(); $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" + $('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +

@ -44,11 +44,13 @@
} }
$("#intro_content_show_<%= user_activity.id %>").click(function(){ $("#intro_content_show_<%= user_activity.id %>").click(function(){
$("#activity_description_<%= user_activity.id %>").toggleClass("maxh360"); $("#activity_description_<%= user_activity.id %>").toggleClass("maxh360");
$("#activity_description_<%= user_activity.id%>").toggleClass("lh18");
$("#intro_content_show_<%= user_activity.id %>").hide(); $("#intro_content_show_<%= user_activity.id %>").hide();
$("#intro_content_hide_<%= user_activity.id %>").show(); $("#intro_content_hide_<%= user_activity.id %>").show();
}); });
$("#intro_content_hide_<%= user_activity.id %>").click(function(){ $("#intro_content_hide_<%= user_activity.id %>").click(function(){
$("#activity_description_<%= user_activity.id %>").toggleClass("maxh360"); $("#activity_description_<%= user_activity.id %>").toggleClass("maxh360");
$("#activity_description_<%= user_activity.id%>").toggleClass("lh18");
$("#intro_content_hide_<%= user_activity.id %>").hide(); $("#intro_content_hide_<%= user_activity.id %>").hide();
$("#intro_content_show_<%= user_activity.id %>").show(); $("#intro_content_show_<%= user_activity.id %>").show();
}); });

@ -68,6 +68,9 @@
<li> <li>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => is_in_course),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %> <%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => is_in_course),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
</li> </li>
<li>
<%= link_to("评分设置", score_rule_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) %>
</li>
<li> <li>
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%> <%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%>
</li> </li>

@ -21,11 +21,13 @@
} }
$("#intro_content_show_<%= homework_common.id%>").click(function(){ $("#intro_content_show_<%= homework_common.id%>").click(function(){
$("#homework_description_<%= homework_common.id%>").toggleClass("maxh360"); $("#homework_description_<%= homework_common.id%>").toggleClass("maxh360");
$("#homework_description_<%= homework_common.id%>").toggleClass("lh18");
$("#intro_content_show_<%= homework_common.id%>").hide(); $("#intro_content_show_<%= homework_common.id%>").hide();
$("#intro_content_hide_<%= homework_common.id%>").show(); $("#intro_content_hide_<%= homework_common.id%>").show();
}); });
$("#intro_content_hide_<%= homework_common.id%>").click(function(){ $("#intro_content_hide_<%= homework_common.id%>").click(function(){
$("#homework_description_<%= homework_common.id%>").toggleClass("maxh360"); $("#homework_description_<%= homework_common.id%>").toggleClass("maxh360");
$("#homework_description_<%= homework_common.id%>").toggleClass("lh18");
$("#intro_content_hide_<%= homework_common.id%>").hide(); $("#intro_content_hide_<%= homework_common.id%>").hide();
$("#intro_content_show_<%= homework_common.id%>").show(); $("#intro_content_show_<%= homework_common.id%>").show();
}); });

File diff suppressed because it is too large Load Diff

@ -102,6 +102,7 @@ RedmineApp::Application.routes.draw do
get 'stop_anonymous_comment' get 'stop_anonymous_comment'
get 'alert_anonymous_comment' get 'alert_anonymous_comment'
get 'start_evaluation_set' get 'start_evaluation_set'
get 'score_rule_set'
post 'set_evaluation_attr' post 'set_evaluation_attr'
end end
collection do collection do

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 B

@ -1298,5 +1298,5 @@ a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; c
.list_style ol li{list-style-type: decimal;margin-left: 20px;} .list_style ol li{list-style-type: decimal;margin-left: 20px;}
.list_style ul li{list-style-type: disc;margin-left: 20px;} .list_style ul li{list-style-type: disc;margin-left: 20px;}
.list_style_disc {list-style-type:disc;margin-left:5px;} .ul_grey li {color:#909090; list-style-position:inside; padding-left:1px;list-style-image:url('../images/news_dot2.png')}
.system_message_style li{color:#909090} .ul_normal_color li {list-style-position:inside; padding-left:1px; list-style-image:url('../images/news_dot.png')}

Loading…
Cancel
Save