From 47da84dee0995151fa848166b710b8e09d01b9ab Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 6 Dec 2014 16:27:58 +0800 Subject: [PATCH 01/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=90=8E=E6=9F=A5=E8=AF=A2=E6=A1=86=E6=B6=88?= =?UTF-8?q?=E5=A4=B1=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_member_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index 1c71d915a..c707487a7 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -5,7 +5,7 @@ <% end %>    <%= l(:label_current_group)%>: <%= @group.name %> <% end %> - <% if @show_serch%> + <% if @subPage_title && @subPage_title == l(:label_student_list)%> <%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %> <%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%> <%= submit_tag l(:label_search), :class => "f_2"%> From d9250231e5b3195ec328fa9cd5d57952363c68c0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 09:19:00 +0800 Subject: [PATCH 02/13] =?UTF-8?q?#1698=201.=E4=BF=AE=E6=94=B9=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E6=9F=A5=E8=AF=A2=E7=BB=93=E6=9E=9C=E4=B8=AD=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=AF=BE=E7=A8=8B/=E9=A1=B9=E7=9B=AE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=8A=A5=E9=94=99=E7=9A=84BUG=202.=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/stores_helper.rb | 4 +-- app/views/tags/_show_projects.html.erb | 10 ++++-- app/views/tags/_tag_search_results.html.erb | 34 ++++++++++++++++----- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/app/helpers/stores_helper.rb b/app/helpers/stores_helper.rb index e987367ad..0ae91a644 100644 --- a/app/helpers/stores_helper.rb +++ b/app/helpers/stores_helper.rb @@ -156,11 +156,11 @@ module StoresHelper klass = project.class.to_s case klass when "Project" - project_list = link_to l(:label_project_plural), projects_path + project_list = "#{l(:label_project_plural)}" project_item = link_to project.to_s, project_path(project) [project_list, project_item] when "Course" - course_list = link_to l(:label_new_course), courses_path + course_list = "#{l(:label_new_course)}" course_item = link_to project.name, course_path(project) [course_list, course_item] else diff --git a/app/views/tags/_show_projects.html.erb b/app/views/tags/_show_projects.html.erb index 2b6b42189..de8e10018 100644 --- a/app/views/tags/_show_projects.html.erb +++ b/app/views/tags/_show_projects.html.erb @@ -4,9 +4,15 @@ <% projects_results.each do |prj| %>

- <%= l(:label_tags_project_name) %><%= link_to "#{prj.name}",:controller => "projects",:action => "show",:id => prj.id %> + + <%= l(:label_tags_project_name) %> + <%= link_to "#{prj.name}",:controller => "projects",:action => "show",:id => prj.id %> +
- <%= l(:label_tags_project_description) %><%= textilizable prj.description %> + + <%= l(:label_tags_project_description) %> + + <%= textilizable prj.description %>

diff --git a/app/views/tags/_tag_search_results.html.erb b/app/views/tags/_tag_search_results.html.erb index 84a672617..591a86a70 100644 --- a/app/views/tags/_tag_search_results.html.erb +++ b/app/views/tags/_tag_search_results.html.erb @@ -2,32 +2,50 @@ <% unless show_flag.nil? %> <% case %> <% when show_flag == '1' %> - <%=l(:label_user)%>(<%= @results_count %>) + + <%=l(:label_user)%> + ( + <%= @results_count %> + ) + <%= render :partial => "show_users",:locals => {:users_results => users_results}%> <% when show_flag == '2'%> - <%=l(:label_project)%>(<%= @results_count %>) + + <%=l(:label_project)%>(<%= @results_count %>) + <%= render :partial => "show_projects",:locals => {:projects_results => projects_results }%> <% when show_flag == '3'%> <%=l(:label_issue)%>(<%= @results_count %>) <%= render :partial => "show_issues",:locals => {:issues_results => issues_results }%> <% when show_flag == '4'%> - <%= l(:label_requirement)%>(<%= @results_count %>) + + <%= l(:label_requirement)%>(<%= @results_count %>) + <%= render :partial => "show_bids",:locals => {:bids_results => bids_results}%> <% when show_flag == '5'%> - <%= l(:label_forum)%>(<%= @results_count %>) + + <%= l(:label_forum)%>(<%= @results_count %>) + <%= render :partial => "show_forums",:locals => {:forums_results => forums_results}%> <% when show_flag == '6'%> - <%= l(:label_attachment)%>(<%= @results_count %>) + + <%= l(:label_attachment)%>(<%= @results_count %>) + <%= render :partial => "show_attachments",:locals => {:attachments_results => attachments_results}%> <% when show_flag == '7'%> - <%= l(:label_contest_innovate)%>(<%= @results_count %>) + + <%= l(:label_contest_innovate)%>(<%= @results_count %>) + <%= render :partial => "show_contests",:locals => {:contests_results => contests_results}%> <% when show_flag == '8'%> <%#= l(:label_attachment)%> - 开源项目:(<%= @results_count %>) + 开源项目:(<%= @results_count %>) + <%= render :partial => "show_open_source_projects",:locals => {:projects_results => open_source_projects_results}%> <% when show_flag == '9'%> - <%= l(:label_course)%>(<%= @results_count %>) + + <%= l(:label_course)%>(<%= @results_count %>) + <%= render :partial => "show_courses",:locals => {:courses_results => courses_results}%> <% else %> <%= l(:label_tags_all_objects)%> From 9b5cbb0b4e8e721cab0fb57e52e99b4fdaa6dc18 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 09:25:24 +0800 Subject: [PATCH 03/13] =?UTF-8?q?#1696=E4=BD=9C=E4=B8=9A=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=B7=B2=E8=BF=87->=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4=E5=B7=B2=E5=88=B0=EF=BC=8C?= =?UTF-8?q?=E6=AD=A4=E5=90=8E=E6=8F=90=E4=BA=A4=E7=9A=84=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E5=B0=86=E8=AE=B0=E4=B8=BA=E8=BF=9F=E4=BA=A4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index c0bc4df73..b8c812a03 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1379,7 +1379,7 @@ zh: label_activity_time: 发布时间 label_update_time: 更新时间 label_current_contributors: 位当前贡献者 - label_commit_limit: 作业提交时间已过! + label_commit_limit: 作业截止时间已到,此后提交的作品将记为迟交。 label_commit_ar: 作业提交截止时间快到了! lable_has_commit_homework: 您已提交过作业 #modify by men From a69fdfe1ed9e02b878587579ae73c0728b643a75 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 09:30:16 +0800 Subject: [PATCH 04/13] =?UTF-8?q?#1691=E6=8C=89=E9=92=AE=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=B5=84=E6=BA=90->=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_upload_show.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb index a979715de..13bcd043e 100644 --- a/app/views/files/_upload_show.html.erb +++ b/app/views/files/_upload_show.html.erb @@ -8,7 +8,8 @@ <%= render :partial => 'attachement_list',:locals => {:course => course} %>
- 上传资源取  消 + 确  认 + 取  消 <% end %> From 0044f17fba2e02040691ce5ad4152958e9709618 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 09:37:24 +0800 Subject: [PATCH 05/13] =?UTF-8?q?#1688=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=8A=A5404?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/contests_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index af532cd87..6213b2315 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -37,7 +37,7 @@ class ContestsController < ApplicationController def index - render_404 + render_404 unless params[:name] # @contests = Contest.visible # @contests ||= [] @offset, @limit = api_offset_and_limit(:limit => 10) From 66d8609c5605984910c7178a82c9737aa84aaa77 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 09:44:03 +0800 Subject: [PATCH 06/13] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=B7=B2=E5=88=B0=EF=BC=8C=E6=AD=A4=E5=90=8E?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9A=84=E4=BD=9C=E5=93=81=E5=B0=86=E8=AE=B0?= =?UTF-8?q?=E4=B8=BA=E8=BF=9F=E4=BA=A4=20->=20=E6=88=AA=E6=AD=A2=E4=BA=86?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E8=A1=A5=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/zh.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b8c812a03..156880f13 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1379,7 +1379,7 @@ zh: label_activity_time: 发布时间 label_update_time: 更新时间 label_current_contributors: 位当前贡献者 - label_commit_limit: 作业截止时间已到,此后提交的作品将记为迟交。 + label_commit_limit: 截止了,可补交 label_commit_ar: 作业提交截止时间快到了! lable_has_commit_homework: 您已提交过作业 #modify by men From f977a622a28d116dbaa106937fda91fead472484 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 10:23:43 +0800 Subject: [PATCH 07/13] =?UTF-8?q?=20#1699=20=E5=85=AC=E5=85=B1=E8=B4=B4?= =?UTF-8?q?=E5=90=A7--=E6=B2=A1=E6=9C=89=E5=9B=9E=E5=A4=8D=E5=B0=B1?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E6=98=BE=E7=A4=BA=E2=80=9C=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E2=80=9D=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 424d4eff0..4dd58641b 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -174,8 +174,8 @@ <%= link_to topic.author.login.truncate(10, omission: '...'),user_path(topic.author),title: topic.author.login %> - <%= l(:label_final_reply)%>: <% unless (topic.last_reply.nil? || topic.last_reply.author.nil?) %> + <%= l(:label_final_reply)%>: <%=link_to topic.last_reply.author.login.truncate(10, omission: '...'),user_path(topic.last_reply.author),title: topic.last_reply.author.login%> <% end %> From 410d61022b84d9c8546b73f15529e12a0273f84f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 10:54:21 +0800 Subject: [PATCH 08/13] =?UTF-8?q?#1692=201.=E6=96=B0=E5=BB=BA=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A=E6=97=B6=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=90=AF=E7=94=A8=E5=8C=BF=E8=AF=84=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=A1=86js=E7=9A=84=E4=BF=AE=E6=94=B9=202.=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8C=BF=E8=AF=84=E5=88=86=E9=85=8D=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E6=9C=89=E6=AD=A7=E4=B9=89=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_homework_form.html.erb | 6 +++--- app/views/bids/edit.html.erb | 21 ++++++++++++--------- app/views/courses/_homework_form.html.erb | 6 +++--- app/views/courses/new_homework.html.erb | 2 ++ 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/app/views/bids/_homework_form.html.erb b/app/views/bids/_homework_form.html.erb index 12393c558..ffe0fc1b9 100644 --- a/app/views/bids/_homework_form.html.erb +++ b/app/views/bids/_homework_form.html.erb @@ -43,13 +43,13 @@

<%= f.select :proportion, proportion_option %>

-

+

<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %> - 未开启匿评作业将直接进入众评点赞阶段 +

<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> - 匿评分配数量不宜太大,否则会影响开启匿评速度 + 即每份作业被允许匿评的人数

<%= hidden_field_tag 'course_id', @course.id %> diff --git a/app/views/bids/edit.html.erb b/app/views/bids/edit.html.erb index 17e805fce..ee2142dd5 100644 --- a/app/views/bids/edit.html.erb +++ b/app/views/bids/edit.html.erb @@ -91,16 +91,19 @@ } }); }); - $(function(){ - if($("#bid_open_anonymous_evaluation").attr("checked") == "checked") - { - $("#evaluation_num_p").show(); - } - else - { - $("#evaluation_num_p").hide(); - } + $("#bid_open_anonymous_evaluation").click(function(){ + if($("#bid_open_anonymous_evaluation").attr("checked") == "checked") + { + $("#evaluation_num_p").slideDown(); + $("#open_anonymous_evaluation_span").slideUp(); + } + else + { + $("#evaluation_num_p").slideUp(); + $("#open_anonymous_evaluation_span").slideDown(); + } + }); }); function submitHomework(id) diff --git a/app/views/courses/_homework_form.html.erb b/app/views/courses/_homework_form.html.erb index 2d20ecf07..7e09e84fc 100644 --- a/app/views/courses/_homework_form.html.erb +++ b/app/views/courses/_homework_form.html.erb @@ -48,13 +48,13 @@

<%= f.select :proportion, proportion_option %>

-

+

<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %> - 未开启匿评作业将直接进入众评点赞阶段 +

<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onblur => "regexEvaluationNum();" , :maxlength => 4%> - 匿评分配数量不宜太大,否则会影响开启匿评速度 + 即每份作业被允许匿评的人数

<%= hidden_field_tag 'course_id', @course.id %> diff --git a/app/views/courses/new_homework.html.erb b/app/views/courses/new_homework.html.erb index e3121c6ad..2e0b35c6d 100644 --- a/app/views/courses/new_homework.html.erb +++ b/app/views/courses/new_homework.html.erb @@ -84,10 +84,12 @@ if($("#bid_open_anonymous_evaluation").attr("checked") == "checked") { $("#evaluation_num_p").slideDown(); + $("#open_anonymous_evaluation_span").slideUp(); } else { $("#evaluation_num_p").slideUp(); + $("#open_anonymous_evaluation_span").slideDown(); } }); }); From 2dab864199ea7fbd9f43a462d309b8c87bd4a3a0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 15:04:35 +0800 Subject: [PATCH 09/13] =?UTF-8?q?#1689=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=8C=BF=E8=AF=84=E5=BE=97=E5=88=86=E5=A4=A7?= =?UTF-8?q?=E4=BA=8E5=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20141210070327_change_student_score.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20141210070327_change_student_score.rb diff --git a/db/migrate/20141210070327_change_student_score.rb b/db/migrate/20141210070327_change_student_score.rb new file mode 100644 index 000000000..192689229 --- /dev/null +++ b/db/migrate/20141210070327_change_student_score.rb @@ -0,0 +1,9 @@ +class ChangeStudentScore < ActiveRecord::Migration + def up + sql = ActiveRecord::Base.connection() + sql.update_sql("update seems_rateable_rates set stars = 5 where stars > 5") + end + + def down + end +end From 8eb583b97168ca96f40c3a32b99c404bff07370d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 15:49:24 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/base_courses.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index beb3291d0..978eb7e35 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -249,7 +249,7 @@ <%= l(:label_course_description_no) %> <% end %> -

+
<%= l(:label_create_time) %>: From 8a2d22265c06d857fca1d3202af8b4e4cab51f8c Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 16:26:39 +0800 Subject: [PATCH 11/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=BF=E9=97=AE?= =?UTF-8?q?=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=97=B6?= =?UTF-8?q?=E6=8A=A5500=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 32cfefa9d..78ac4d208 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -309,7 +309,7 @@ class ApplicationController < ActionController::Base # Find project of id params[:id] def find_project - @project = Project.find_by_id(params[:id]) + @project = Project.find(params[:id]) rescue ActiveRecord::RecordNotFound render_404 end From 9957cfd40164c0a92857542d42b5095e1d9f65dc Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 17:04:22 +0800 Subject: [PATCH 12/13] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E6=97=A0=E5=AD=A6=E5=8F=B7=E6=97=B6=E6=89=93=E5=8C=85=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=85=B6=E4=B8=8A=E4=BC=A0=E4=BD=9C=E4=B8=9A=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/zipdown_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/zipdown_controller.rb b/app/controllers/zipdown_controller.rb index f0dc157b5..d4699b6c4 100644 --- a/app/controllers/zipdown_controller.rb +++ b/app/controllers/zipdown_controller.rb @@ -44,7 +44,9 @@ class ZipdownController < ApplicationController if homework != nil unless homework.attachments.empty? zipfile = zip_homework_by_user homework - send_file zipfile, :filename => homework.user.user_extensions.student_id + "_" + homework.user.lastname + homework.user.firstname + "_" + homework.name+".zip", :type => detect_content_type(zipfile) if(zipfile) + send_file zipfile, :filename => (homework.user.user_extensions.student_id.nil? ? "" : homework.user.user_extensions.student_id) + + "_" + (homework.user.lastname.nil? ? "" : homework.user.lastname) + (homework.user.firstname.nil? ? "" : homework.user.firstname) + + "_" + homework.name + ".zip", :type => detect_content_type(zipfile) if(zipfile) else render file: 'public/no_file_found.html' end @@ -78,7 +80,7 @@ class ZipdownController < ApplicationController homeattach.attachments.each do |attach| homeworks_attach_path << attach.diskfile#.to_s.slice((length+1)..-1) end - zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{homeattach.user.user_extensions.student_id}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true) + zipping("#{homeattach.user.lastname}#{homeattach.user.firstname}_#{(homework.user.user_extensions.student_id.nil? ? "" : homework.user.user_extensions.student_id)}_#{Time.now.to_i.to_s}.zip", homeworks_attach_path, OUTPUT_FOLDER, true) end From 0442ccd36505b6c58b3d2680cb1a84d223a6e17d Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Wed, 10 Dec 2014 17:57:49 +0800 Subject: [PATCH 13/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8F=82=E6=95=B0=E8=8E=B7=E5=8F=96=E4=B8=8D?= =?UTF-8?q?=E6=AD=A3=E7=A1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_member_list.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/courses/_member_list.html.erb b/app/views/courses/_member_list.html.erb index cdea592b4..9281634bd 100644 --- a/app/views/courses/_member_list.html.erb +++ b/app/views/courses/_member_list.html.erb @@ -3,10 +3,12 @@ <% if !@canShowCode %> <%= join_in_course_group(@course.course_groups,@group, User.current) %> <% end %>    - <%= l(:label_current_group)%>: <%= @group.name %> - <% end %> + + <%= l(:label_current_group)%>:  + <%= @group.name %> + +<% end %> <% if @subPage_title && @subPage_title == l(:label_student_list)%> - <% if @subPage_title == l(:label_student_list) %> <%= form_tag( searchmembers_course_path(@course), method: 'get',:class => "f_l",:style => "margin-left: 5px; ",:remote=>true) do %> <%= text_field_tag 'name', params[:name], name: "name", :class => 'f_1', :style => "height:15px"%> <% if @group %>