Commit db5fd951 authored by Zac Wood's avatar Zac Wood

Merge branch 'fix-online-in-schedule' into 'master'

Add online courses to schedule page

See merge request !54
parents dd3c5822 a43bcd3e
Pipeline #5102 passed with stages
in 26 minutes
......@@ -5,17 +5,20 @@ class CourseSectionsController < ApplicationController
@sections = crns.map { |crn| CourseSection.latest_by_crn(crn) }
@days = {
"M" => [], "T" => [], "W" => [],
"R" => [], "F" => []
"R" => [], "F" => [], "Online" => []
}
@sections.each do |s|
s.days.split('').each do |day|
days = s.days.gsub(/[^a-zA-Z]/, "") # get rid of weird &nbsp; character
@days["Online"] << s if days.empty?
days.split('').each do |day|
@days[day] << s unless s.start_time == "TBA"
end
end
@days_map = {
"M" => "Monday", "T" => "Tuesday", "W" => "Wednesday",
"R" => "Thursday", "F" => "Friday"
"R" => "Thursday", "F" => "Friday", "Online" => "Online"
}
@days.each do |day, sections|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment