@ -234,6 +234,8 @@ class CoursesController < ApplicationController
def destroy
if @course.is_delete == 0
@course.delete!
Tiding.create!(user_id: @course.tea_id, trigger_user_id: 1, container_id: @course.id,
container_type: 'Course', tiding_type: 'Delete', extra: @course.name)
normal_status(0, "成功")
else
normal_status(-1, "课堂已删除,无需重复操作")
@ -126,8 +126,12 @@ module TidingDecorator
end
def course_content
if tiding_type == 'Delete'
I18n.t(locale_format(tiding_type)) % extra
I18n.t(locale_format) % container.name
def shixun_content
@ -55,6 +55,8 @@
"2_end": "你提交的试用授权申请,审核未通过<br/><span>原因:%{reason}</span>"
Apply_end: "提交了试用授权申请"
Course_end: "成功创建了课堂:%s"
Course:
Delete_end: "你删除了课堂:%s"
Shixun_end: "成功创建了实训:%s"
Subject_end: "成功创建了实训课程:%s"
ArchiveCourse_end: "你的课堂已经归档:%s"