diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index 3116a9a68..b943cf565 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -44,6 +44,13 @@ <% if User.current.user_extensions && [UserExtensions::TEACHER, UserExtensions::STUDENT].include?(User.current.user_extensions.identity) -%> <% hasCourse=true%> + <% _bool=false %> + <% User.current.courses.each do |course| %> + <% if !course_endTime_timeout?(course) %> + <% _bool=true %> + <% end %> + <% end %> + <% if _bool %>
  • <%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
  • + <% end %> <% end -%> <% end %> -
  • <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %> + <% if User.current.projects.count>0 %> +
  • + <%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.project_domain} %> <% if hasCourse %>
  • + <% end %>
  • <%=link_to l(:label_user_edit), {:controller => 'my', :action=> 'account', host: Setting.user_domain}%>