编辑编程作业出错
This commit is contained in:
parent
ea8f72cce9
commit
f4360e66dd
|
@ -144,6 +144,8 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
if homework.save
|
if homework.save
|
||||||
|
homework_detail_programing.save if homework_detail_programing
|
||||||
|
homework_detail_manual.save if homework_detail_manual
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
flash[:notice] = l(:notice_successful_create)
|
flash[:notice] = l(:notice_successful_create)
|
||||||
|
@ -254,7 +256,6 @@ class HomeworkCommonController < ApplicationController
|
||||||
client.request(request)
|
client.request(request)
|
||||||
end
|
end
|
||||||
result = JSON.parse(res.body)
|
result = JSON.parse(res.body)
|
||||||
homework_detail_programing.question_id = result["id"] if result["status"] && result["status"] == 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@homework.save_attachments(params[:attachments])
|
@homework.save_attachments(params[:attachments])
|
||||||
|
|
Loading…
Reference in New Issue