diff --git a/app/views/layouts/base_users_new.html.erb b/app/views/layouts/base_users_new.html.erb
index 33973b047..acd9c238e 100644
--- a/app/views/layouts/base_users_new.html.erb
+++ b/app/views/layouts/base_users_new.html.erb
@@ -171,11 +171,11 @@
- <% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
- <% if(get_create_course_count(@user)) == 0 %>
+ <% if @user.user_extensions && @user.user_extensions.identity == 0 %>
+ <% if(get_create_course_count(@user)) != 0 %>
- 创建课程 :
<% end %>
- <% if(get_homework_commons_count(@user)) == 0 %>
+ <% if(get_homework_commons_count(@user)) != 0 %>
- 发布作业 :
<% end %>
<% end %>
@@ -202,11 +202,11 @@
<% end %>
- <% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
- <% if(get_create_course_count(@user)) == 0 %>
+ <% if @user.user_extensions && @user.user_extensions.identity == 0 %>
+ <% if(get_create_course_count(@user)) != 0 %>
- <%= get_create_course_count(@user) %>
<% end %>
- <% if(get_homework_commons_count(@user)) == 0 %>
+ <% if(get_homework_commons_count(@user)) != 0 %>
- <%= get_homework_commons_count(@user) %>
<% end %>
<% end %>