<% all_count = @user.favorite_courses.visible.where("is_delete =?", 0).count%>
<div id="homepageLeftMenuCourses">
  <ul class="user_sub_menu" id="user_courses_li">
    <%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user,:all_count => all_count,:page => 0} %>
  </ul>
</div>
<% if !courses.empty? %>
    <a class="user_navmorebox" href="javascript:void(0);" id="user_hide_course" onclick="leftCourseslistChange();">
      <span id="hide_show_courseicon" class="user_icons_closeclass"></span>
    </a>
<% end %>

<script>
  $(function() {
      $('#user_hide_course').hide();
  })
</script>