From 7fd1b84b3408c6eb776f0c5da5c98f4b1bf259ea Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 Jan 2017 16:28:53 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E9=80=9A=E7=9F=A5=E4=B8=AD=E5=B7=B2=E7=9C=81?= =?UTF-8?q?=E7=95=A5=E5=8F=B7=E7=BB=93=E5=B0=BE=E7=9A=84=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=85=A8=E9=83=A8=E5=86=85=E5=AE=B9=EF=BC=8C?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=85=AC=E5=85=B1=E7=9A=84=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E9=95=BF=E5=BA=A6=E9=9A=90=E8=97=8F=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_user_message_course.html.erb | 4 ++-- public/stylesheets/css/public.css | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index a7cd81917..80cbf6d38 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -727,9 +727,9 @@
  • <% if ma.status == 1 %> - <%= User.find(ma.course_message_id).show_name%>已通过 + <%= User.find(ma.course_message_id).show_name %>已通过 <% else %> - <%= User.find(ma.course_message_id).show_name%>已拒绝 + <%= User.find(ma.course_message_id).show_name %>已拒绝 <% end %>
  • <%= time_tag(ma.created_at).html_safe %>
  • diff --git a/public/stylesheets/css/public.css b/public/stylesheets/css/public.css index 96edb2dd8..ff203e977 100644 --- a/public/stylesheets/css/public.css +++ b/public/stylesheets/css/public.css @@ -1551,4 +1551,7 @@ a.syllabusbox_a_blue{ .pages_new_404_txt{ font-size: 16px; color: #888; text-align: center;} .feedbackText{box-shadow:none; width:550px; height:80px; border-color: #DFDFDF; background:#fff; color:#999; padding:3px; font-size:12px;overflow:auto; background-attachment:fixed;border-style:solid;} -._notice_box{border:solid 1px #f6d0b1; background:#fff9e9; padding:4px; color:#ee4a20;} \ No newline at end of file +._notice_box{border:solid 1px #f6d0b1; background:#fff9e9; padding:4px; color:#ee4a20;} + +/*针对名字过长的用户定义公共样式*/ +.user_hiddent{width: 55px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block;} \ No newline at end of file From 17bdb053bc34758b733ad7b8682daa2ffc0cdd35 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 Jan 2017 16:32:44 +0800 Subject: [PATCH 2/5] =?UTF-8?q?pull=20request=E6=8F=90=E7=A4=BA=E8=AF=AD?= =?UTF-8?q?=E7=97=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/pull_requests/_form.html.erb | 2 +- app/views/pull_requests/_tip.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pull_requests/_form.html.erb b/app/views/pull_requests/_form.html.erb index 0aa2a1177..be8e8f345 100644 --- a/app/views/pull_requests/_form.html.erb +++ b/app/views/pull_requests/_form.html.erb @@ -29,7 +29,7 @@ <%= render :partial => "tip" %>
  • diff --git a/app/views/pull_requests/_tip.html.erb b/app/views/pull_requests/_tip.html.erb index f511f1588..348526a2e 100644 --- a/app/views/pull_requests/_tip.html.erb +++ b/app/views/pull_requests/_tip.html.erb @@ -1,5 +1,5 @@ <% if @tip %>
    - 您选择的源分支和目标分支为似乎没有差异,请将新改动提交至源分支或者切换到其它目标分支 + 您选择的源分支和目标分支似乎没有差异,请将新改动提交至源分支或者切换到其它目标分支
    <% end %> From c34812f8a3cb287372d5fb8ef524832c51a4aaa4 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 Jan 2017 16:56:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=88=91=E5=8F=91=E5=B8=83=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=EF=BC=8C=E8=BF=87=E6=BB=A4=E5=90=8E=E6=8C=89?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 4f723fb28..d08e8ee07 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1842,11 +1842,11 @@ end if params[:property] all_homework_ids = @homeworks.empty? ? "(-1)" : "(" + @homeworks.map{|h| h.id}.join(",") + ")" if params[:property] == "1" - @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 1") + @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 1 order by created_at desc") elsif params[:property] == "2" - @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 2") + @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 2 order by created_at desc") elsif params[:property] == "3" - @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 3") + @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 3 order by created_at desc") end end @limit = 10 From d99ec1db10fc3701fb03e6cd08bde64cb9cb7da8 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 Jan 2017 16:57:51 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=88=91=E6=94=B6=E5=88=B0=E7=9A=84?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E8=BF=87=E6=BB=A4=E5=90=8E=E6=8C=89=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d08e8ee07..8293f437a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1875,11 +1875,11 @@ end if params[:property] all_homework_ids = @homeworks.empty? ? "(-1)" : "(" + @homeworks.map{|h| h.id}.join(",") + ")" if params[:property] == "1" - @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 1") + @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 1 order by created_at desc") elsif params[:property] == "2" - @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 2") + @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 2 order by created_at desc") elsif params[:property] == "3" - @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 3") + @homeworks = HomeworkCommon.find_by_sql("select * from homework_commons where id in #{all_homework_ids} and homework_type = 3 order by created_at desc") end end @limit = 10 From 629c1e849d730d17f03680ed9d9465471f1ac1de Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 6 Jan 2017 17:29:29 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=88=91=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E7=9A=84=E4=BD=9C=E4=B8=9A=E4=B8=AD=E5=B7=B2=E8=AF=84?= =?UTF-8?q?=E5=92=8C=E6=9C=AA=E8=AF=84=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_manage_homework_list.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/users/_manage_homework_list.html.erb b/app/views/users/_manage_homework_list.html.erb index 026bacc29..1bf66b333 100644 --- a/app/views/users/_manage_homework_list.html.erb +++ b/app/views/users/_manage_homework_list.html.erb @@ -14,11 +14,11 @@

    <%= (cur_homework_end_time homework).html_safe %> 未交: - <%= homework.homework_type == 3 ? '--' : (homework.course.student.count - homework.student_works.has_committed.count) %> + <%= homework.course.student.count - homework.student_works.has_committed.count %> 已评: - <%= homework.student_works.has_committed.count - homework.student_works.has_committed.where("teacher_score is null and teaching_asistant_score is null").count %> + <%= homework.student_works.where("work_status != 0 and (teacher_score is not null or teaching_asistant_score is not null)").count %> 未评: - <%= homework.student_works.has_committed.count %> + <%= homework.student_works.where("work_status != 0 and teacher_score is null and teaching_asistant_score is null").count %>

    <% if homework.student_works.has_committed.count == 0 %>