diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index f88b1ff21..2171d44f5 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -80,4 +80,19 @@ module StudentWorkHelper end color end + + #获取分班信息 + def course_group_list course + result = [] + if course.course_groups && !course.course_groups.empty? + result << l(:label_chose_group) + course.course_groups.each do |group| + option = [] + option << group.name + option << group.id + result << option + end + end + result + end end \ No newline at end of file diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index 70f7c08f4..ad355c4ad 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -49,6 +49,7 @@ <% if @show_all%> + <%= select_tag :late_penalty,options_for_select(course_group_list(@course),@group), {:class => "fl h22 w100 ml10"} %> 搜索 <%= 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%> diff --git a/config/locales/zh.yml b/config/locales/zh.yml index ac8ab40a9..2dd5bcf9a 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2026,6 +2026,7 @@ zh: label_file_lost_list: 缺失文件列表 lable_unset: 未设置 + label_chose_group: 请选择分班 diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index a6d8ff0a2..abeec52d3 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -665,7 +665,7 @@ a:hover.ping_pic{border:1px solid #64bdd9;} a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;} a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;} .fr{ float:right;} -.min_search{ width:200px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; cursor:pointer;} +.min_search{ width:140px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; } .li_min_search{ float:right; margin-right:-10px;} .info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;} .info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 8a128e71f..8e16c9436 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -110,6 +110,7 @@ h4{ font-size:14px; color:#3b3b3b;} .w350{ width:350px;} .w610{ width:610px;} .w600{ width:600px;} +.h20{height: 20px;} .h22{ height:22px;} .h26{ height:26px;} .h50{ height:50px;}