Merge branch 'dev_course' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_course

dev_course
daiao 6 years ago
commit 6c38e3e63e

@ -240,7 +240,7 @@ class QuestionBanksController < ApplicationController
ActiveRecord::Base.transaction do
new_task = GraduationTask.new
new_task.attributes = task.attributes.dup.except("id", "course_id", "user_id", "quotes", "graduation_task_id",
"course_list_id", "gtask_bank_id")
"course_list_id", "gtask_bank_id", "created_at", "updated_at")
new_task.course_id = course.id
new_task.gtask_bank_id = task.id
new_task.user_id = current_user.id
@ -266,7 +266,7 @@ class QuestionBanksController < ApplicationController
ActiveRecord::Base.transaction do
new_topic = GraduationTopic.new
new_topic.attributes = topic.attributes.dup.except("id", "course_id", "user_id", "graduation_topic_id",
"course_list_id", "gtopic_bank_id")
"course_list_id", "gtopic_bank_id", "created_at", "updated_at")
new_topic.course_id = course.id
new_topic.gtopic_bank_id = topic.id
new_topic.user_id = current_user.id

@ -10,7 +10,7 @@ json.courses do
json.tasks_count get_tasks_count course
json.visits course.visits
json.is_public course.is_public
json.is_accessible course.is_public? || @user.course_identity(course) < Course::NORMAL
json.is_accessible course.is_public == 1 || @user.course_identity(course) < Course::NORMAL
json.is_end course.is_end
json.first_category_url module_url(course.course_modules.first, course)
end

Loading…
Cancel
Save