From 104eaf8c00cd1cd9834bbd2f707390390cd928c9 Mon Sep 17 00:00:00 2001 From: xianbo Date: Wed, 2 Apr 2014 15:13:34 +0800 Subject: [PATCH] fix student can create course in teacher maiun course page --- app/views/users/_my_course.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_my_course.html.erb b/app/views/users/_my_course.html.erb index 952dcd0a..b93afd41 100644 --- a/app/views/users/_my_course.html.erb +++ b/app/views/users/_my_course.html.erb @@ -13,7 +13,7 @@ <% else %>

<%=l(:label_course_doing)%>(<%=@memberships_doing.count%>) - <%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' %> + <%= link_to"#{l(:label_course_new)}",{:controller=>'projects',:action=>'new', :course => 1, :project_type => 1}, :class => 'icon icon-add' if @user == User.current %>

<%= render :partial => 'course_form', :locals => {:memberships => @memberships_doing}%>