Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun
commit
82068f1293
@ -0,0 +1,12 @@
|
|||||||
|
json.activities @activities do |activity|
|
||||||
|
json.(activity, :course_act_id, :course_act_type)
|
||||||
|
json.author do
|
||||||
|
user = activity.user
|
||||||
|
json.name user.real_name
|
||||||
|
json.login user.login
|
||||||
|
json.img url_to_avatar(user)
|
||||||
|
end
|
||||||
|
json.created_at activity.created_at.strftime('%m-%d %H:%M:')
|
||||||
|
json.container_name activity.container_name
|
||||||
|
json.container_type activity.course_act_type == "HomeworkCommon" ? activity.course_act&.homework_type : ""
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
class MigrateCourseMessageAct < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
CourseActivity.where(course_act_type: "JoinCourse").update_all(course_act_type: "CourseMessage")
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue