From 63bc66adc378fb6095ee19a11fe93b753a22f40d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 24 Dec 2014 11:12:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E4=BC=9A=E9=BB=98=E8=AE=A4=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E5=B8=90=E5=8F=B7=E5=AF=86=E7=A0=81=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_form.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/repositories/_form.html.erb b/app/views/repositories/_form.html.erb index cc200ac5c..bc5a060db 100644 --- a/app/views/repositories/_form.html.erb +++ b/app/views/repositories/_form.html.erb @@ -29,6 +29,7 @@

<%= f.text_field :login, :size => 30 %> +

<%= f.password_field :password, :size => 30, :name => 'ignore', From 92c7ba49d1ea72d25eab2136e8365037c412660f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 24 Dec 2014 17:24:25 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=80=92=E8=AE=A1=E6=97=B6=E5=92=8C=E6=88=AA=E8=87=B3=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=9C=AA=E5=92=8C=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_bid_homework_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index a8296165f..7a095b3d2 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -158,7 +158,7 @@ - + <%= l(:label_create_time) %> :  From b0c2958a7285ce23962e670c9b8f9f8d136c2f08 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 24 Dec 2014 17:25:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E5=80=92=E8=AE=A1=E6=97=B6=E5=92=8C=E6=88=AA=E8=87=B3=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=9C=AA=E5=92=8C=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=AF=B9=E9=BD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_bid_homework_show.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index 7a095b3d2..2d6c35555 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -178,7 +178,6 @@ <% end %> - From 9545b1da0c48018e5319bde0fc3cd8d50cab9b24 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 25 Dec 2014 09:02:58 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E8=AE=BF=E9=97=AE=E6=95=88?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 9 +++---- app/views/courses/_member_list.html.erb | 33 +++++++++++++++++-------- 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index ae6ad4ce3..e0d7feff5 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -333,10 +333,11 @@ class CoursesController < ApplicationController case params[:role] when '1' @subPage_title = l :label_teacher_list - @members = searchTeacherAndAssistant(@course) + @members = @teachers when '2' @subPage_title = l :label_student_list - @@member_scores = student_homework_score + teachers = @teachers.map{|teacher| teacher.user_id}.join(",") + @@member_scores = student_homework_score teachers @members = @@member_scores # @member_scores = @@member_scores # @members = searchStudent_sort(@course, 'desc', @@member_scores) @@ -880,9 +881,7 @@ class CoursesController < ApplicationController end end - def student_homework_score - teachers = find_course_teachers(@course) - + def student_homework_score teachers homework_scores = Member.find_by_sql("SELECT id, user_id,course_id, course_group_id,created_on,IFNULL(SUM(CASE WHEN t_score <> 0 AND t_score IS NOT NULL THEN t_score ELSE s_score END),0) as score FROM ( SELECT members.id as id, members.user_id AS user_id, members.course_id AS course_id, members.created_on as created_on,members.course_group_id AS course_group_id, diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index 25be8709f..9b3a0443d 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -24,35 +24,46 @@

<% if members.any? %> <% if @result_count %> -

<%= l(:label_search_member_count) %><%= @result_count %><%= l(:label_member_people) %>

+

+ <%= l(:label_search_member_count) %> + <%= @result_count %> + <%= l(:label_member_people) %> +

<% end %>
<% members.each do |member| %> -
<% next if member.new_record? %> - - <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %> + + <%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 40, :height => 40)) %> +
    <% if @canShowCode %>
  • <%= l(:label_bidding_user_studentname) %> : <%= link_to member.user.show_name, user_path(member.user) %> - -

  • + +
    <%#= content_tag "li", "#{l(:label_bidding_user_studentname)}#{' : '}"link_to(member.user.show_name, user_path(member.user)) %> <% else %> <%= content_tag "li", link_to(member.user.name, user_path(member.user)) %> @@ -89,7 +100,9 @@ <% end; reset_cycle %>
- + <% else %>

<%= l(:label_no_data) %>