From 980f2ddc51d455fcfa5c7320cd50c795c2d4ec26 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 1 Sep 2017 19:05:43 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E9=80=9A=E7=9F=A5?=
=?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=AF=BE=E7=A8=8B=E7=9A=84=E9=93=BE=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/messages/_course_new.html.erb | 2 +-
app/views/messages/edit.html.erb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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) %>
From 1775922c5bfc86d32fc2548c4f5a3c938cbde711 Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 1 Sep 2017 19:19:19 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=95=E7=94=A8=E7=94=B3=E8=AF=B7?=
=?UTF-8?q?=E7=9A=84=E5=A4=9A=E6=AC=A1=E5=BC=B9=E6=A1=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/my_controller.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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