Skip to content

Commit 46975ff

Browse files
committed
Nerf my courses
1 parent 43de073 commit 46975ff

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

app/controllers/organizations_controller.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def index
3030
def show
3131
add_organization_breadcrumb
3232
ordering = 'hidden, disabled_status, LOWER(courses.title)'
33-
@my_courses = Course.participated_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
3433
@my_assisted_courses = Course.assisted_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
3534
@ongoing_courses = @organization
3635
.courses
@@ -56,11 +55,10 @@ def all_courses
5655
add_organization_breadcrumb
5756
add_breadcrumb 'All Courses'
5857
ordering = 'hidden, disabled_status, LOWER(courses.title)'
59-
@my_courses = Course.participated_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
58+
6059
@my_assisted_courses = Course.assisted_courses(current_user, @organization).order(ordering).select { |c| c.visible_to?(current_user) }
6160
@ongoing_courses = @organization.courses.ongoing.order(ordering).select { |c| c.visible_to?(current_user) }
6261
@expired_courses = @organization.courses.expired.order(ordering).select { |c| c.visible_to?(current_user) }
63-
# @my_courses_percent_completed = percent_completed_hash(@my_courses, current_user)
6462
authorize! :read, @ongoing_courses
6563
authorize! :read, @expired_courses
6664
end
Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
11
<h2><%= title %></h2>
2-
<table id="my-courses-table" class="course-list table table-striped table-bordered table-hover">
3-
<thead>
4-
<tr>
5-
<th>
6-
Course
7-
</th>
8-
</tr>
9-
</thead>
10-
<tbody>
11-
<% courses.each do |course| %>
12-
<tr class="course <% if course.hidden? || course.disabled? %>hidden-course<% end %>">
13-
<td>
14-
<%= link_to course.title, organization_course_path(@organization, course) %>
15-
</td>
16-
</tr>
17-
<% end %>
18-
</tbody>
19-
</table>
2+
3+
<p>For a list of the courses you've participated in please see your <%= link_to 'profile', participant_path(current_user) %>.</p>

0 commit comments

Comments
 (0)