编辑编程作业出错

szzh
sw 10 years ago
parent ea8f72cce9
commit f4360e66dd

@ -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])

Loading…
Cancel
Save