diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index a503b22d5..3db2dfb64 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -149,12 +149,12 @@ class MyController < ApplicationController # 认证 ue = @user.user_extensions - #@trail_authentication = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").order("created_at desc").first + @trail_authentication = ApplyAction.where(:user_id => User.current.id, :container_type => "TrialAuthorization").order("created_at desc").first @authentication = @user.authentication if @user.nickname.nil? || @user.lastname.nil? || ue.identity.nil? || ue.location.nil? || ue.school_id.nil? @require_auth = true else - if User.current.certification != 1 + if User.current.certification != 1 && (@trail_authentication.blank? || (@trail_authentication.status == 2 && (@trail_authentication.updated_at.to_i + 24*60*60) < Time.now.to_i)) @require_trail_auth = true end end diff --git a/app/views/messages/_course_new.html.erb b/app/views/messages/_course_new.html.erb index 82cf488a4..485af30db 100644 --- a/app/views/messages/_course_new.html.erb +++ b/app/views/messages/_course_new.html.erb @@ -3,7 +3,7 @@ <%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to "在线课堂", courses_path() %> > - <%= link_to @course.syllabus.title, syllabus_path(@course.syllabus), :title => "课程" %> > <%= link_to @course.name, course_path(@course), :title => "班级" %> > <%= link_to "讨论区列表", course_boards_path(@course) %> > 新建 + <%= link_to @course.name, course_path(@course), :title => "班级" %> > <%= link_to "讨论区列表", course_boards_path(@course) %> > 新建

diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb index 06df5bd96..3ce62e7ff 100644 --- a/app/views/messages/edit.html.erb +++ b/app/views/messages/edit.html.erb @@ -17,7 +17,7 @@ <%= link_to User.current.show_real_name, user_path(User.current) %> > <%= link_to "在线课堂", courses_path() %> > - <%= link_to @course.syllabus.title, syllabus_path(@course.syllabus), :title => "课程" %> > <%= link_to @course.name, course_path(@course), :title => "班级" %> > <%= link_to "讨论区列表", course_boards_path(@course) %> + <%= link_to @course.name, course_path(@course), :title => "班级" %> > <%= link_to "讨论区列表", course_boards_path(@course) %>