From df8036289966e8e982b0a9fe0fc73e712bf9a56d Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 25 Jul 2016 09:58:17 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index ee520cb77..92a85e32d 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -595,19 +595,19 @@ module CoursesHelper def get_acts_list_type type case type when "homework" - ">" + l(:label_homework_acts) + "> " + l(:label_homework_acts) when "news" - ">" + l(:label_news_acts) + "> " + l(:label_news_acts) when "attachment" - ">" + l(:label_attachment_acts) + "> " + l(:label_attachment_acts) when "message" - ">" + l(:label_message_acts) + "> " + l(:label_message_acts) when "journalsForMessage" - ">" + l(:label_journalsForMessage_acts) + "> " + l(:label_journalsForMessage_acts) when "poll" - ">" + l(:label_poll_acts) + "> " + l(:label_poll_acts) else - ">" + l(:label_all_cats) + "> " + l(:label_all_cats) end end From 4646d13234a62e517315041908142929b6e8a89b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 25 Jul 2016 18:54:44 +0800 Subject: [PATCH 2/6] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=EF=BC=8C=E7=AB=9F=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E6=98=BE=E7=A4=BA=E5=85=A8=E3=80=82=202.=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E5=8A=A8=E6=80=81=E4=B8=8B=EF=BC=8C=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E2=80=9C=E7=8F=AD=E7=BA=A7=E5=8A=A8=E6=80=81>=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 14 +++++++------- app/views/courses/show.html.erb | 2 +- app/views/files/_resource_detail.html.erb | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 96e0d7683..e5066d0fe 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -595,19 +595,19 @@ module CoursesHelper def get_acts_list_type type case type when "homework" - ">" + l(:label_homework_acts) + l(:label_homework_acts) when "news" - ">" + l(:label_news_acts) + l(:label_news_acts) when "attachment" - ">" + l(:label_attachment_acts) + l(:label_attachment_acts) when "message" - ">" + l(:label_message_acts) + l(:label_message_acts) when "journalsForMessage" - ">" + l(:label_journalsForMessage_acts) + l(:label_journalsForMessage_acts) when "poll" - ">" + l(:label_poll_acts) + l(:label_poll_acts) else - ">" + l(:label_all_cats) + l(:label_all_cats) end end diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index e7800531b..3e509faa5 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -9,7 +9,7 @@
-
班级动态 +
<%= get_acts_list_type @type %>
  • diff --git a/app/views/files/_resource_detail.html.erb b/app/views/files/_resource_detail.html.erb index 4e9f38c50..07d1f248b 100644 --- a/app/views/files/_resource_detail.html.erb +++ b/app/views/files/_resource_detail.html.erb @@ -8,11 +8,11 @@
    <%# 如果有历史版本则提供历史版本下载 %> <% if file.attachment_histories.count == 0 %> - <%= link_to truncate(file.filename,length: 40, omission: '...'), + <%= link_to truncate(file.filename,length: 70, omission: '...'), download_named_attachment_path(file.id, file.filename), :title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "linkGrey3 f_14" %> <% else %> - <%= link_to truncate(file.filename,length: 40, omission: '...'), attachment_history_download_path(file.id), + <%= link_to truncate(file.filename,length: 70, omission: '...'), attachment_history_download_path(file.id), :title => file.filename+"\n"+file.description.to_s, :class => "linkGrey3 f_14", :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;", :remote=>true %> From 6ab2c15504e707e2f021cb2085d90c8a13ffb71d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 26 Jul 2016 10:38:04 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=88=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E8=AF=BE=E7=A8=8B=E4=B8=8B=E7=9A=84=E6=9F=90=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=EF=BC=8C=E5=86=8D=E5=88=A0=E9=99=A4=E8=AF=A5=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 1 + app/controllers/syllabuses_controller.rb | 2 +- app/views/syllabuses/_delete_syllabus.html.erb | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 966f23a3c..e2dd23552 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -381,6 +381,7 @@ class StudentWorkController < ApplicationController @is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 @show_all = false + # 0表示没有分组的学生,-1表示所有分组的学生 if @group if @group == "0" none_group_students = @course.members.select{ |member| member.course_group_id == 0 } diff --git a/app/controllers/syllabuses_controller.rb b/app/controllers/syllabuses_controller.rb index 9c69f5259..e77b19511 100644 --- a/app/controllers/syllabuses_controller.rb +++ b/app/controllers/syllabuses_controller.rb @@ -88,7 +88,7 @@ class SyllabusesController < ApplicationController end def destroy - if @syllabus && @syllabus.courses.empty? + if @syllabus && @syllabus.courses.not_deleted.empty? @syllabus.destroy redirect_to user_courselist_user_path(User.current.id) end diff --git a/app/views/syllabuses/_delete_syllabus.html.erb b/app/views/syllabuses/_delete_syllabus.html.erb index b043186aa..a72a87c03 100644 --- a/app/views/syllabuses/_delete_syllabus.html.erb +++ b/app/views/syllabuses/_delete_syllabus.html.erb @@ -1,6 +1,6 @@
    - <% if @syllabus.courses.empty? || @syllabus.courses.not_deleted.empty? %> + <% if @syllabus.courses.not_deleted.empty? %> 确认删除该课程吗? <% else %> 该课程下已经存在班级,不能删除。 @@ -8,7 +8,7 @@

    - <% if @syllabus.courses.empty?|| @syllabus.courses.not_deleted.empty? %> + <% if @syllabus.courses.not_deleted.empty? %> <%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%> 关闭 <% else %> From 1dcf4918b9db2fa57962955d9323ce00de88606d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 26 Jul 2016 14:30:12 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9C=A8=E6=96=B0=E5=BB=BA=E5=B8=96=E5=AD=90?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E7=BD=AE=E9=A1=B6=E5=8F=8A=E9=94=81=E5=AE=9A?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=9C=A8=E9=A1=B5=E9=9D=A2=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_new.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb index 32cec24d5..90f0d9c7e 100644 --- a/app/views/boards/_course_new.html.erb +++ b/app/views/boards/_course_new.html.erb @@ -132,12 +132,12 @@