% protocol = ("#{URI(request.referer).scheme}://" rescue request.protocol) %>
<% host_url = protocol+(request.host_with_port) %>
<% @selected_courses.each do |selected_course| %>
<% member_profile = selected_course.member_profile %>
<%= selected_course.year %> |
<%= link_to selected_course.course_title, page_for_selected_course(selected_course), target: "blank"%>
- <%= link_to t('edit'), edit_admin_selected_course_path(selected_course,:page => params[:page]) %>
- <%= link_to t(:delete_), admin_selected_course_path(id: selected_course.id, :page => params[:page]), method: :delete, data: { confirm: 'Are you sure?' } %>
|
<% if member_profile.present? %>
<%= link_to CourseAssignment.where(:course_id=>selected_course.course_id).enabled_for_student.count,show_assignments_admin_selected_courses_path(:id=> selected_course.course_id,:member_profile_name=> member_profile.name,:member_profile_uid=> member_profile.uid) %>
<% else %>
0
<% end %>
|
<% course_url = selected_course.course_url %>
<% if selected_course.course %>
<% if course_url != "#" %>
<% course_url = host_url + course_url %>
<%=course_url%>
<% end %>
<% else %>
<%=selected_course.other_course_url%>
<% end %>
|
<%= member_profile.name rescue "" %> |
<% end %>