From 5c4e4e7c8ad2190c35595ba914ef78c2b24472ef Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 7 Jul 2016 16:55:34 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=90=8E=E5=86=8D=E5=88=A0=E9=99=A4=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=EF=BC=8C=E6=8F=90=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/syllabuses/_delete_syllabus.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/syllabuses/_delete_syllabus.html.erb b/app/views/syllabuses/_delete_syllabus.html.erb index fbc0a0995..b043186aa 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? %> + <% if @syllabus.courses.empty? || @syllabus.courses.not_deleted.empty? %> 确认删除该课程吗? <% else %> 该课程下已经存在班级,不能删除。 @@ -8,7 +8,7 @@

- <% if @syllabus.courses.empty? %> + <% if @syllabus.courses.empty?|| @syllabus.courses.not_deleted.empty? %> <%=link_to '确认', syllabus_path(@syllabus), :class => 'Blue-btn fl', :method => 'delete'%> 关闭 <% else %> From 41fc812ca4444ad8b8d3756b935d76960385dd02 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 7 Jul 2016 17:34:38 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E9=85=8D=E7=BD=AE--=E6=B7=BB=E5=8A=A0=E6=88=90=E5=91=98?= =?UTF-8?q?=EF=BC=9A=E7=94=A8=E6=88=B7=E5=90=8D=E7=A7=B0=E5=A4=AA=E9=95=BF?= =?UTF-8?q?=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/views/courses/_member.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/courses/_member.html.erb b/app/views/courses/_member.html.erb index 1bfe3cbd7..95177c92c 100644 --- a/app/views/courses/_member.html.erb +++ b/app/views/courses/_member.html.erb @@ -1,7 +1,7 @@ <% @members.each do |member| %>
  • <%#= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %> - <%= link_to "#{member.principal}(#{member.principal.show_name})", user_path(member.principal), :class => "w150 linkBlue fl" %> + <%= link_to "#{member.principal}(#{member.principal.show_name})", user_path(member.principal), :class => "w150 linkBlue fl", :style=>"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;", :title => "#{member.principal}(#{member.principal.show_name})" %> <%= zh_course_role(h member.roles.sort.collect(&:to_s).join(', ')) %> <%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member), From 00d59a55961924b64f857739b17f455b377108cc Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 11 Jul 2016 15:47:33 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=9D=90=E4=B8=8B=E4=B8=8B=EF=BC=8C=E6=8F=90=E7=A4=BA=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E7=9A=84=E8=A1=A8=E8=BE=BE=E5=BD=A2=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_show.html.erb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index 484e8eb0e..cfc5c42ad 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -59,9 +59,14 @@
  • 内容: -
    - <%= work.description.html_safe if work.description%> -
    + <% com_contents = work.work_status %> + <% if com_contents != 0 && work.description %> +
    + <%= work.description.html_safe if work.description%> +
    + <% else %> + 该作品未在线下完成提交 + <% end %>
  • From 97599849ee6d76e960a5a40b4207f68ae6212353 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 11 Jul 2016 16:03:45 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=E4=BD=9C=E5=93=81=E4=B8=8B=E5=86=85=E5=AE=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/student_work/_show.html.erb b/app/views/student_work/_show.html.erb index cfc5c42ad..039baa386 100644 --- a/app/views/student_work/_show.html.erb +++ b/app/views/student_work/_show.html.erb @@ -62,7 +62,7 @@ <% com_contents = work.work_status %> <% if com_contents != 0 && work.description %>
    - <%= work.description.html_safe if work.description%> + <%= work.description.html_safe %>
    <% else %> 该作品未在线下完成提交 From 304f18ac5e179d76b81192cb86b83da2c2cbdddf Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 12 Jul 2016 15:05:42 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E4=B8=AD=EF=BC=8C=E5=AF=B9=E5=8A=A8=E6=80=81=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E7=9A=84=E9=A1=B5=E9=9D=A2=E5=91=88=E7=8E=B0?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/show.html.erb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index b9d97e18a..cabbb5d04 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -9,7 +9,23 @@
    -
    班级动态
    +
    班级动态 + <% if params[:type] == "homework" %> + <%= ">作业动态" %> + <% elsif params[:type] == "news" %> + <%= ">通知动态" %> + <% elsif params[:type] == "attachment" %> + <%= ">资源库动态" %> + <% elsif params[:type] == "message" %> + <%= ">论坛动态" %> + <% elsif params[:type] == "journalsForMessage" %> + <%= ">留言动态" %> + <% elsif params[:type] == "poll" %> + <%= ">问卷动态" %> + <% else %> + <%= ">全部动态" %> + <% end %> +
      • From dcc37ef847c52769b93526506f5a144632e39f8a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 13 Jul 2016 16:58:31 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E7=95=8C=E9=9D=A2=E4=B8=AD=EF=BC=8C=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=B8=8B=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9A=82=E6=97=A0=E5=88=86=E7=8F=AD=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/student_work_controller.rb | 22 ++++++++++++++++------ app/helpers/student_work_helper.rb | 4 ++++ config/locales/zh.yml | 1 + 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 4c3a608de..1d0b80f70 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -381,14 +381,24 @@ class StudentWorkController < ApplicationController @is_evaluation = @homework.homework_detail_manual && @homework.homework_detail_manual.comment_status == 2 && !@is_teacher #是不是匿评 @show_all = false - course_group = CourseGroup.find_by_id(@group) if @group - if course_group - group_students = course_group.users - if group_students.empty? - student_in_group = '(0)' + if @group + if @group == "0" + none_group_students = @course.members.select{ |member| member.course_group_id == 0 } + if none_group_students.empty? + student_in_group = '(0)' + else + student_in_group = '(' + none_group_students.map{ |member| member.user_id }.join(',') + ')' + end else - student_in_group = '(' + group_students.map{|user| user.id}.join(',') + ')' + course_group = CourseGroup.find_by_id(@group) + group_students = course_group.users + if group_students.empty? + student_in_group = '(0)' + else + student_in_group = '(' + group_students.map{ |user| user.id }.join(',') + ')' + end end + #开放作品 || 老师 || 超级管理员 || 禁用匿评&&作业截止&&已提交作品 显示所有列表 if (@homework.is_open == 1 && @course.is_public == 1) || (@homework.is_open == 1 && @course.is_public == 0 && User.current.member_of_course?(@course)) || @is_teacher || User.current.admin? || (User.current.member_of_course?(@course) && @homework.anonymous_comment == 1 && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") && !@homework.student_works.has_committed.where(:user_id => User.current.id).empty?) if @order == 'lastname' diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index 42a3a6538..4f0a2ca6d 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -101,6 +101,10 @@ module StudentWorkHelper if course.course_groups && !course.course_groups.empty? base = [] base << l(:label_chose_group) + base << -1 + result << base + base = [] + base << l(:label_no_group) base << 0 result << base course.course_groups.each do |group| diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 9c19fcbbb..dbb3ff074 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2101,6 +2101,7 @@ zh: label_file_lost_list: 缺失文件列表 lable_unset: 未设置 label_chose_group: 请选择分班 + label_no_group: 暂无 label_hostedz_organization: 主办单位 label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室 From 03d6afd1c45f96d147a55764e1e323ff64eaceb7 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 18 Jul 2016 15:52:04 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E5=91=A8?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E8=8E=B7=E5=8F=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/courses_helper.rb | 20 ++++++++++++++++++++ app/views/courses/show.html.erb | 17 +---------------- config/locales/courses/zh.yml | 10 ++++++++++ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index d1f4bfe97..ee520cb77 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -591,6 +591,26 @@ module CoursesHelper Course.tagged_with(tag_name).order('updated_at desc') end + # 获取动态列表名称 + def get_acts_list_type type + case type + when "homework" + ">" + l(:label_homework_acts) + when "news" + ">" + l(:label_news_acts) + when "attachment" + ">" + l(:label_attachment_acts) + when "message" + ">" + l(:label_message_acts) + when "journalsForMessage" + ">" + l(:label_journalsForMessage_acts) + when "poll" + ">" + l(:label_poll_acts) + else + ">" + l(:label_all_cats) + end + end + #分班下拉框 def course_group_option course type = [] diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index cabbb5d04..bf209ddb5 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -10,22 +10,7 @@
        班级动态 - <% if params[:type] == "homework" %> - <%= ">作业动态" %> - <% elsif params[:type] == "news" %> - <%= ">通知动态" %> - <% elsif params[:type] == "attachment" %> - <%= ">资源库动态" %> - <% elsif params[:type] == "message" %> - <%= ">论坛动态" %> - <% elsif params[:type] == "journalsForMessage" %> - <%= ">留言动态" %> - <% elsif params[:type] == "poll" %> - <%= ">问卷动态" %> - <% else %> - <%= ">全部动态" %> - <% end %> -
        + <%= get_acts_list_type @type %>
          • diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml index 29d6b236c..9a07e0fa8 100644 --- a/config/locales/courses/zh.yml +++ b/config/locales/courses/zh.yml @@ -29,6 +29,16 @@ zh: label_upload_files: 上传资源 label_apply_join_course: 申请加入班级 label_apply_for_homework: 申请引用作业 + + #动态名称 + label_homework_acts: 作业动态 + label_news_acts: 通知动态 + label_attachment_acts: 资源库动态 + label_message_acts: 论坛动态 + label_journalsForMessage_acts: 留言动态 + label_poll_acts: 问卷动态 + label_all_cats: 全部动态 + # # 课程托管平台主页 # From 7808bb5ebec68f357471016efe883a23b3e7db12 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 19 Jul 2016 17:37:39 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9D=9E=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E8=BF=9C=E7=94=A8=E6=88=B7=E5=B8=96=E5=AD=90=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=AE=A1=E7=90=86=E5=91=98=E5=B8=96=E5=AD=90=E7=BD=AE?= =?UTF-8?q?=E9=A1=B6=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/views/boards/_course_new.html.erb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb index df61d2b9c..32cec24d5 100644 --- a/app/views/boards/_course_new.html.erb +++ b/app/views/boards/_course_new.html.erb @@ -130,11 +130,13 @@

        -
        <%= link_to User.find(act.user_id), user_url_in_org(act.user_id) %>  创建了 <%= Organization.find(act.org_act_id).name %> +
        创建时间:<%= format_activity_day(act.created_at) %> <%= format_time(act.created_at, false) %>
        From 7c2495c8a19393593b8dde3ebce8db2599249f51 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 21 Jul 2016 10:20:45 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E6=B5=8B=E9=AA=8C=E6=96=B0=E5=BB=BA=E5=8D=95=E9=80=89=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E6=97=B6=EF=BC=8C=E6=A0=B7=E5=BC=8F=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/exercise/_edit_MC.html.erb | 2 +- app/views/exercise/_edit_MCQ.html.erb | 4 ++-- app/views/exercise/_exercise_form.html.erb | 2 +- app/views/exercise/_new_MCQ.html.erb | 8 ++++---- app/views/exercise/_show_MCQ.html.erb | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/exercise/_edit_MC.html.erb b/app/views/exercise/_edit_MC.html.erb index 06d3e00da..9dfa2c48f 100644 --- a/app/views/exercise/_edit_MC.html.erb +++ b/app/views/exercise/_edit_MC.html.erb @@ -8,7 +8,7 @@ $("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>") $("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" + "
      • " + - "" + + "" + "" + "" + "" + diff --git a/app/views/exercise/_edit_MCQ.html.erb b/app/views/exercise/_edit_MCQ.html.erb index 48422be1c..186cebd18 100644 --- a/app/views/exercise/_edit_MCQ.html.erb +++ b/app/views/exercise/_edit_MCQ.html.erb @@ -8,7 +8,7 @@ $("#poll_question_standard_answer_<%=exercise_question.id %>").val("<%= convert_to_char(exercise_question.exercise_standard_answers.first.exercise_choice_id.to_s)%>") $("#poll_answers_<%=exercise_question.id%>").html("<% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>" + "
      • " + - "" + + "" + "" + "" + "" + @@ -34,7 +34,7 @@
        <% exercise_question.exercise_choices.reorder("choice_position").each_with_index do |exercise_choice,index| %>
      • - + diff --git a/app/views/exercise/_exercise_form.html.erb b/app/views/exercise/_exercise_form.html.erb index 9d70511e8..71389b313 100644 --- a/app/views/exercise/_exercise_form.html.erb +++ b/app/views/exercise/_exercise_form.html.erb @@ -171,7 +171,7 @@ //单选题 function add_single_answer(doc) { - var li = doc.parent().after("
      • " + + var li = doc.parent().after("
      • " + ""+ "
      • "); var select_items =$("label[name='select_items']",li.parent()); diff --git a/app/views/exercise/_new_MCQ.html.erb b/app/views/exercise/_new_MCQ.html.erb index 875b9ec4c..11ec08d05 100644 --- a/app/views/exercise/_new_MCQ.html.erb +++ b/app/views/exercise/_new_MCQ.html.erb @@ -18,28 +18,28 @@
      • - +
      • - +
      • - +
      • - + diff --git a/app/views/exercise/_show_MCQ.html.erb b/app/views/exercise/_show_MCQ.html.erb index a7ee60aa3..f122e1256 100644 --- a/app/views/exercise/_show_MCQ.html.erb +++ b/app/views/exercise/_show_MCQ.html.erb @@ -54,28 +54,28 @@ '分'+ '
      • '+ '
      • '+ - ''+ + ''+ ''+ ''+ ''+ '
      • '+ '
        '+ '
      • '+ - ''+ + ''+ ''+ ''+ ''+ '
      • '+ '
        '+ '
      • '+ - ''+ + ''+ ''+ ''+ ''+ '
      • '+ '
        '+ '
      • '+ - ''+ + ''+ ''+ ''+ ''+ From df8036289966e8e982b0a9fe0fc73e712bf9a56d Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 25 Jul 2016 09:58:17 +0800 Subject: [PATCH 12/18] =?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 e31fbe9b50cf2ffee9f4fc4ca5e050a41842326c Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 25 Jul 2016 15:29:47 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E8=A7=A3=E5=86=B3task=E6=8A=A5=E9=94=99?= =?UTF-8?q?=EF=BC=8C=E6=89=BE=E4=B8=8D=E5=88=B0uglifier=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 --- lib/tasks/wechat.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/wechat.rake b/lib/tasks/wechat.rake index bbba9994c..dd02f9209 100644 --- a/lib/tasks/wechat.rake +++ b/lib/tasks/wechat.rake @@ -1,5 +1,6 @@ #coding=utf-8 # +require 'uglifier' def compress(srcs, outfile) wechat_path = File.join(Rails.root, "public", "javascripts", "wechat") 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 14/18] =?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 15/18] =?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 16/18] =?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 @@