diff --git a/app/models/apply_homework.rb b/app/models/apply_homework.rb index 0a7c505a4..f4ded9733 100644 --- a/app/models/apply_homework.rb +++ b/app/models/apply_homework.rb @@ -1,5 +1,5 @@ class ApplyHomework < ActiveRecord::Base - #status:1. 待审核 2.审核通过 3.已拒绝 + #status:1. 等待回复 2.审核通过 3.已拒绝 belongs_to :user belongs_to :homework_common attr_accessible :status, :user_id, :homework_common_id diff --git a/app/models/homework_common.rb b/app/models/homework_common.rb index f8e222b0f..ac3303c15 100644 --- a/app/models/homework_common.rb +++ b/app/models/homework_common.rb @@ -15,6 +15,7 @@ class HomeworkCommon < ActiveRecord::Base has_many :student_works, :dependent => :destroy, :conditions => "is_test=0" has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表 has_many :journals_for_messages, :as => :jour, :dependent => :destroy + has_many :apply_homeworks, :dependent => :destroy has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy #用户活动 # 课程动态 has_many :course_acts, :class_name => 'CourseActivity',:as =>:course_act ,:dependent => :destroy diff --git a/app/models/user.rb b/app/models/user.rb index 2a9a13c73..cf71ec42c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -108,6 +108,7 @@ class User < Principal has_many :student_works_evaluation_distributions, :dependent => :destroy has_many :student_works_scores, :dependent => :destroy has_many :student_work_projects, :dependent => :destroy + has_many :apply_homeworks, :dependent => :destroy #end has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)}, diff --git a/app/views/admin/apply_for_homework.html.erb b/app/views/admin/apply_for_homework.html.erb index 1c7a04901..25d15f707 100644 --- a/app/views/admin/apply_for_homework.html.erb +++ b/app/views/admin/apply_for_homework.html.erb @@ -65,7 +65,7 @@ <% if homework.status == 1 %> - 待审核 + 等待回复 <% elsif homework.status == 2 %> 已通过 <% else %> diff --git a/app/views/users/_homework_repository.html.erb b/app/views/users/_homework_repository.html.erb index 738de678c..6443942fb 100644 --- a/app/views/users/_homework_repository.html.erb +++ b/app/views/users/_homework_repository.html.erb @@ -43,7 +43,7 @@ <% if ah.nil? %> <%= link_to("请求分享", apply_homework_user_path(User.current.id,:homework_id => homework.id), :class => 'green_btn_share c_white', :remote => true) %> <% elsif ah.status == 1 %> - 待审核 + 等待回复 <% elsif ah.status == 2 %> 可引用 <% elsif ah.status == 3 %> diff --git a/app/views/users/_user_message_course.html.erb b/app/views/users/_user_message_course.html.erb index f3942d95e..9d49f687f 100644 --- a/app/views/users/_user_message_course.html.erb +++ b/app/views/users/_user_message_course.html.erb @@ -231,17 +231,17 @@ <% end %> <% if ma.course_message_type == "HomeworkCommon" && ma.status == 5 %>