#coding=utf-8 class CourseModule < ActiveRecord::Base # attr_accessible :title, :body default_scope :order => 'position' belongs_to :course attr_accessible :course_id, :module_type, :position, :hidden, :module_name def default_module_name name = "" case self.module_type when "activity" name = "动态" when "shixun_homework" name = "实训作业" when "common_homework" name = "普通作业" when "group_homework" name = "分组作业" when "graduation" name = "毕业设计" when "exercise" name = "试卷" when "poll" name = "问卷" when "attachment" name = "资源" when "board" name = "讨论" when "course_group" name = "分班" end name end end