From f4c637a094dabd572a45841c99d19b0fab63fa2a Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 22 Mar 2019 17:51:19 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E7=9A=84=E5=AE=A1=E6=89=B9=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../managements/_subject_authorization_list.html.erb | 8 ++++++++ .../_subject_authorization_passed_list.html.erb | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/app/views/managements/_subject_authorization_list.html.erb b/app/views/managements/_subject_authorization_list.html.erb index 4c09ec7c..497e6a05 100644 --- a/app/views/managements/_subject_authorization_list.html.erb +++ b/app/views/managements/_subject_authorization_list.html.erb @@ -36,6 +36,14 @@ <% end %> +
+
+
    + <%= pagination_links_full @authorizations_pages, @authorizations_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %> +
+
+
+
<% else %> <%= render :partial => "welcome/no_data" %> <% end %> diff --git a/app/views/managements/_subject_authorization_passed_list.html.erb b/app/views/managements/_subject_authorization_passed_list.html.erb index fdedc8ca..3d0707f4 100644 --- a/app/views/managements/_subject_authorization_passed_list.html.erb +++ b/app/views/managements/_subject_authorization_passed_list.html.erb @@ -27,6 +27,15 @@ <% end %> +
+
+
    + <%= pagination_links_full @authorizations_pages, @authorizations_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %> +
+
+
+
+ From 8e4bb66272308c178de30008d1e91703f200487c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 25 Mar 2019 09:23:29 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E6=97=B6=E7=9A=84=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 77f768d1..030f3f10 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -464,7 +464,7 @@ class MyshixunsController < ApplicationController render :json => {:data => "success"} end rescue Exception => e - render :json => {:data => "failed"} + render :json => {:data => "failed, exception_message: #{e}"} end end From 59884af2f9f09f70350895d8be58a7e952135851 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 26 Mar 2019 16:25:13 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 52 +++++++++++++-------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 43b0076f..9a84fc6b 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -2431,8 +2431,8 @@ class CoursesController < ApplicationController sheet1[count_row,column+=1] = 0 else work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score - sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2) - shixun_score += work_score < 0 ? 0 : work_score.round(2) + sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1) + shixun_score += work_score < 0 ? 0 : work_score.round(1) end # current_col += 1 end @@ -2443,8 +2443,8 @@ class CoursesController < ApplicationController sheet1[count_row,column+=1] = 0 else work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score - sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2) - common_score += work_score < 0 ? 0 : work_score.round(2) + sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1) + common_score += work_score < 0 ? 0 : work_score.round(1) end # current_col += 1 end @@ -2455,8 +2455,8 @@ class CoursesController < ApplicationController sheet1[count_row,column+=1] = 0 else work_score = student_works.first.work_score.nil? ? 0 : student_works.first.work_score - sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2) - group_score += work_score < 0 ? 0 : work_score.round(2) + sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1) + group_score += work_score < 0 ? 0 : work_score.round(1) end # current_col += 1 end @@ -2467,8 +2467,8 @@ class CoursesController < ApplicationController sheet1[count_row,column+=1] = 0 else work_score = exercise_user.first.score.nil? ? 0 : exercise_user.first.score - sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2) - exercise_score += work_score < 0 ? 0 : work_score.round(2) + sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1) + exercise_score += work_score < 0 ? 0 : work_score.round(1) end # current_col += 1 end @@ -2480,8 +2480,8 @@ class CoursesController < ApplicationController sheet1[count_row,column+=1] = 0 else work_score = graduation_works.first.work_score.nil? ? 0 : graduation_works.first.work_score - sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(2) - graduation_score += work_score < 0 ? 0 : work_score.round(2) + sheet1[count_row,column+=1] = work_score < 0 ? 0 : work_score.round(1) + graduation_score += work_score < 0 ? 0 : work_score.round(1) end # current_col += 1 end @@ -2494,7 +2494,7 @@ class CoursesController < ApplicationController if tasks.count > 0 sheet1[count_row,column+=1] = graduation_score end - sheet1[count_row,column+=1] = sum.round(2) + sheet1[count_row,column+=1] = sum.round(1) count_row += 1 end @@ -2578,7 +2578,7 @@ class CoursesController < ApplicationController sheet[count_row,3] = stu.user.user_extensions.student_id sheet[count_row,4] = strip_html stu.description sheet[count_row,5] = stu.late_penalty - sheet[count_row,6] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,6] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1) sheet[count_row,7] = format_time(stu.commit_time) count_row += 1 end @@ -2613,17 +2613,17 @@ class CoursesController < ApplicationController sheet[count_row,2] = stu.user.login sheet[count_row,3] = stu.user.user_extensions.student_id sheet[count_row,4] = strip_html stu.description - sheet[count_row,5] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2) - sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) + sheet[count_row,5] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(1) + sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(1) if home.anonymous_comment ==0 - sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2) + sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(1) sheet[count_row,8] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.absence_penalty sheet[count_row,9] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty - sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1) sheet[count_row,11] = format_time(stu.commit_time) else sheet[count_row,7] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty - sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1) sheet[count_row,9] = format_time(stu.commit_time) end count_row += 1 @@ -2662,17 +2662,17 @@ class CoursesController < ApplicationController sheet[count_row,3] = stu.user.user_extensions.student_id sheet[count_row,4] = get_group_member_names home.student_works.where(:group_id => stu.group_id).pluck(:user_id) sheet[count_row,5] = strip_html stu.description - sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2) - sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2) + sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(1) + sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(1) if home.anonymous_comment ==0 - sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2) + sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(1) sheet[count_row,9] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.absence_penalty sheet[count_row,10] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty - sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1) sheet[count_row,12] = format_time(stu.commit_time) else sheet[count_row,8] = (home.teacher_priority == 1 && !stu.teacher_score.nil?) ? 0 : stu.late_penalty - sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1) sheet[count_row,10] = format_time(stu.commit_time) end count_row += 1 @@ -2704,7 +2704,7 @@ class CoursesController < ApplicationController sheet[count_row,3] = stu.user.user_extensions.student_id sheet[count_row,4] = stu.objective_score == -1 ? "0.0" : format("%.1f",stu.objective_score) sheet[count_row,5] = stu.subjective_score == -1 ? "0.0" : format("%.1f",stu.subjective_score) - sheet[count_row,6] = stu.score.nil? ? '--' : stu.score.round(2) + sheet[count_row,6] = stu.score.nil? ? '--' : stu.score.round(1) sheet[count_row,7] = stu.commit_status == 0 ? l(:excel_no_answer) : format_time(stu.start_at) count_row += 1 end @@ -2745,12 +2745,12 @@ class CoursesController < ApplicationController sheet[count_row,column+=1] = get_group_member_names task.graduation_works.where(:group_id => stu.group_id).pluck(:user_id) end sheet[count_row,column+=1] = strip_html stu.description - sheet[count_row,column+=1] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2) + sheet[count_row,column+=1] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(1) if task.cross_comment - sheet[count_row,column+=1] = stu.cross_score.nil? ? l(:label_without_score) : stu.cross_score.round(2) + sheet[count_row,column+=1] = stu.cross_score.nil? ? l(:label_without_score) : stu.cross_score.round(1) end sheet[count_row,column+=1] = stu.late_penalty - sheet[count_row,column+=1] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2) + sheet[count_row,column+=1] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(1) sheet[count_row,column+=1] = format_time(stu.commit_time) count_row += 1 end From 7454064a9c798cdf73045fb12186375b4d2293b0 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Tue, 26 Mar 2019 23:23:52 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=88=90=E7=BB=A9=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 9a84fc6b..57d57938 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -1194,6 +1194,13 @@ class CoursesController < ApplicationController @exercises = @course.exercises.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc") @tasks = @course.graduation_tasks.where("publish_time <= '#{Time.now}'").order("publish_time asc, created_at asc") + @homeworks.where(:homework_type => 4).each do |homework| + items = homework.student_works.where("work_status != 0") + if items.count == 0 && homework.publish_time < Time.now && !@course.is_end + update_shixun_work_status homework + end + end + respond_to do |format| format.xls { send_data(member_to_xls(@homeworks, @exercises, @tasks, @course,@all_members,@course.course_groups), :type => "text/excel;charset=utf-8; header=present", From e5589780c77772255108ea88ff8539b3e128922f Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 27 Mar 2019 08:44:29 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/shixun_work_report.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/student_work/shixun_work_report.html.erb b/app/views/student_work/shixun_work_report.html.erb index a7307405..8649ed57 100644 --- a/app/views/student_work/shixun_work_report.html.erb +++ b/app/views/student_work/shixun_work_report.html.erb @@ -101,7 +101,7 @@
- <%= render :partial => "student_work/echart_of_shixun_skills" %> + <%#= render :partial => "student_work/echart_of_shixun_skills" %>
From 523fb82aa1de946a7b1d86f849bb24bf43bfdbec Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 27 Mar 2019 09:13:04 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/pdf.html.erb | 6 +++--- app/views/student_work/shixun_work_report.html.erb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/layouts/pdf.html.erb b/app/views/layouts/pdf.html.erb index 23e1f238..adf80d61 100644 --- a/app/views/layouts/pdf.html.erb +++ b/app/views/layouts/pdf.html.erb @@ -10,10 +10,10 @@ <%= heads_for_theme %> <%= call_hook :view_layouts_base_html_head %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/edu-common','educoder/edu-main','educoder/edu-all', 'css/edu-public', 'css/font-awesome', 'css/edu-class', 'css/magic-check'%> - <%#= javascript_heads %> - <%= javascript_include_tag "edu/application",'educoder/edu_application'%> + <%= javascript_heads %> + <%= javascript_include_tag "edu/application", 'educoder/edu_application'%> - +
<%= render_flash_messages %> diff --git a/app/views/student_work/shixun_work_report.html.erb b/app/views/student_work/shixun_work_report.html.erb index 8649ed57..a7307405 100644 --- a/app/views/student_work/shixun_work_report.html.erb +++ b/app/views/student_work/shixun_work_report.html.erb @@ -101,7 +101,7 @@
- <%#= render :partial => "student_work/echart_of_shixun_skills" %> + <%= render :partial => "student_work/echart_of_shixun_skills" %>
From 5d8a0158ae4794d2e8515d421ded494b7521949d Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 27 Mar 2019 09:43:14 +0800 Subject: [PATCH 07/10] =?UTF-8?q?pdf=E5=AF=BC=E5=87=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/pdf.html.erb | 3 +-- app/views/student_work/shixun_work_report.html.erb | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/layouts/pdf.html.erb b/app/views/layouts/pdf.html.erb index adf80d61..b20f1c15 100644 --- a/app/views/layouts/pdf.html.erb +++ b/app/views/layouts/pdf.html.erb @@ -11,12 +11,11 @@ <%= call_hook :view_layouts_base_html_head %> <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'css/edu-common','educoder/edu-main','educoder/edu-all', 'css/edu-public', 'css/font-awesome', 'css/edu-class', 'css/magic-check'%> <%= javascript_heads %> - <%= javascript_include_tag "edu/application", 'educoder/edu_application'%> + <%= javascript_include_tag "edu/application", 'educoder/edu_application'%>
- <%= render_flash_messages %> <%= yield %>
diff --git a/app/views/student_work/shixun_work_report.html.erb b/app/views/student_work/shixun_work_report.html.erb index a7307405..a6f89ce3 100644 --- a/app/views/student_work/shixun_work_report.html.erb +++ b/app/views/student_work/shixun_work_report.html.erb @@ -101,7 +101,9 @@
- <%= render :partial => "student_work/echart_of_shixun_skills" %> + <% unless params[:pdf] %> + <%= render :partial => "student_work/echart_of_shixun_skills" %> + <% end %>
From 66597eb20bed0eb65c088117da382e4ae0dbc67a Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 27 Mar 2019 09:46:17 +0800 Subject: [PATCH 08/10] =?UTF-8?q?pdf=E5=AF=BC=E5=87=BA500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/student_work/shixun_work_report.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/student_work/shixun_work_report.html.erb b/app/views/student_work/shixun_work_report.html.erb index a6f89ce3..1b1fe228 100644 --- a/app/views/student_work/shixun_work_report.html.erb +++ b/app/views/student_work/shixun_work_report.html.erb @@ -93,7 +93,7 @@ <%#= render :partial => "student_work/echart_of_shixun_skills" %>
--> -<% if true %> + <% unless params[:pdf] %>

图形统计 @@ -101,9 +101,7 @@

- <% unless params[:pdf] %> - <%= render :partial => "student_work/echart_of_shixun_skills" %> - <% end %> + <%= render :partial => "student_work/echart_of_shixun_skills" %>
From f45822e01f389082f22029f1c1d98dd56dfba227 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 27 Mar 2019 10:17:03 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=A4=E6=AE=B5?= =?UTF-8?q?=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/comment/Comments.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/comment/Comments.js b/public/react/src/modules/comment/Comments.js index 7bde1298..0beaae83 100644 --- a/public/react/src/modules/comment/Comments.js +++ b/public/react/src/modules/comment/Comments.js @@ -303,7 +303,7 @@ class Comments extends Component {
- { item.hidden && item.admin === false && item.manager === false + { item.hidden && item.admin === false && (item.manager === false || item.manager == undefined) ?

违规评论已被屏蔽!

:
} From a63e45c081707f6051fce2505144d8657dda8534 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 27 Mar 2019 10:46:22 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E7=94=A8=E6=88=B7=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E5=88=97=E8=A1=A8500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/managements/_users_authorization_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/managements/_users_authorization_list.html.erb b/app/views/managements/_users_authorization_list.html.erb index 5be2d75c..16aa63e1 100644 --- a/app/views/managements/_users_authorization_list.html.erb +++ b/app/views/managements/_users_authorization_list.html.erb @@ -38,7 +38,7 @@ <%= user.try(:authentication_status) %> <%= user.try(:professional_status) %> <%= user.try(:user_extensions).try(:school).try(:name).blank? ? "--" : user.try(:user_extensions).try(:school) %> - <%= user.try(:user_extensions).department ? user.try(:user_extensions).try(:department).try(:name).to_s : '--' %> + <%= user.try(:user_extensions).try(:department) ? user.try(:user_extensions).try(:department).try(:name).to_s : '--' %> <%= user.last_login_on.blank? ? "--" : (format_time user.last_login_on) %> <%= identity_authentication_status(user) %>