From bfd6b60f66ed0fd2a7751d85e34fd057678c9861 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 1 Jul 2019 14:45:47 +0800 Subject: [PATCH 1/2] =?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/homework_commons_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/homework_commons_controller.rb b/app/controllers/homework_commons_controller.rb index 545fbce85..3562be4f3 100644 --- a/app/controllers/homework_commons_controller.rb +++ b/app/controllers/homework_commons_controller.rb @@ -10,7 +10,8 @@ class HomeworkCommonsController < ApplicationController :create_subject_homework, :multi_destroy, :add_to_homework_bank] before_action :find_homework, only: [:edit, :show, :update, :group_list, :homework_code_repeat, :code_review_results, :code_review_detail, :show_comment, :settings, :works_list, :update_settings, - :reference_answer, :publish_groups, :end_groups, :alter_name, :update_explanation] + :reference_answer, :publish_groups, :end_groups, :alter_name, :update_explanation, + :update_score, :update_student_score] before_action :user_course_identity before_action :homework_publish, only: [:show, :works_list, :code_review_results, :show_comment, :settings, :reference_answer, :update_student_score] before_action :teacher_allowed, only: [:new, :edit, :create, :update, :shixuns, :subjects, :create_shixun_homework, From 2d2ab5e8bb24bd564e9e8ba552e9ba94e55dd9aa Mon Sep 17 00:00:00 2001 From: SylorHuang Date: Mon, 1 Jul 2019 14:46:34 +0800 Subject: [PATCH 2/2] fix bug --- app/templates/exercise_export/exercise_user.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/exercise_export/exercise_user.html.erb b/app/templates/exercise_export/exercise_user.html.erb index bb3723373..41f8d5726 100644 --- a/app/templates/exercise_export/exercise_user.html.erb +++ b/app/templates/exercise_export/exercise_user.html.erb @@ -222,13 +222,13 @@ <% end %>

答案(填空<%= index+1 %>): - <%= to_markdown(check_answer) %> + <%= to_markdown(check_answer,@request_url) %>

<% end %> <% elsif q_type == 4 %> <% check_answer = (user_answer.present? ? user_answer.first.answer_text : '--') %>

- <%= to_markdown(check_answer) %> + <%= to_markdown(check_answer,@request_url) %>

<% else %>