diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 4b655cf31..0a33ef87a 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -144,6 +144,8 @@ class HomeworkCommonController < ApplicationController end if homework.save + homework_detail_programing.save if homework_detail_programing + homework_detail_manual.save if homework_detail_manual respond_to do |format| format.html { flash[:notice] = l(:notice_successful_create) @@ -254,7 +256,6 @@ class HomeworkCommonController < ApplicationController client.request(request) end result = JSON.parse(res.body) - homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0 end @homework.save_attachments(params[:attachments])