Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
schedules
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
schedules
Commits
758c4ec2
Commit
758c4ec2
authored
Dec 17, 2018
by
Zac Wood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed crash with online courses
parent
b47e5386
Pipeline
#3507
failed with stage
in 2 minutes and 15 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
20 deletions
+13
-20
CHANGELOG.md
CHANGELOG.md
+2
-0
schedules/Dockerfile
schedules/Dockerfile
+1
-1
schedules/Dockerfile.dev
schedules/Dockerfile.dev
+0
-16
schedules/app/controllers/schedules_controller.rb
schedules/app/controllers/schedules_controller.rb
+10
-3
No files found.
CHANGELOG.md
View file @
758c4ec2
v2.1.0
-
Added "Save as PNG" feature for the calendar view
-
Fixed bugs related to exporting/sharing a view-only schedule
v2.1.1
-
Fixed crash related to adding online courses
schedules/Dockerfile
View file @
758c4ec2
...
...
@@ -10,6 +10,6 @@ ENV RAILS_ENV production
RUN
bundle
install
RUN
export
SECRET_KEY_BASE
=
$(
rails secret
)
RUN
ra
ke
assets:precompile
RUN
ra
ils
assets:precompile
RUN
rails db:migrate
RUN
rails db:seed
schedules/Dockerfile.dev
deleted
100644 → 0
View file @
b47e5386
FROM ruby:2.5
# Copy the project files to /api
COPY . /api
# Tell Docker to run all commands in /api
WORKDIR /api
# Install project dependencies
RUN bundle install
# Perform database migrations
RUN rails db:migrate
# Load the database from Patriot Web
RUN rails db:seed
schedules/app/controllers/schedules_controller.rb
View file @
758c4ec2
...
...
@@ -5,19 +5,26 @@ class SchedulesController < ApplicationController
def
show
valid_crns
=
@cart
.
reject
{
|
crn
|
s
=
CourseSection
.
find_by_crn
(
crn
)
s
.
nil?
||
s
.
start_time
==
"TBA"
||
s
.
end_time
==
"TBA"
s
.
nil?
}
@all
=
valid_crns
.
map
{
|
crn
|
CourseSection
.
latest_by_crn
(
crn
)
}
@events
=
generate_fullcalender_events
(
@all
)
@without_online
=
@all
.
reject
{
|
s
|
s
.
start_time
==
"TBA"
||
s
.
end_time
==
"TBA"
}
@events
=
generate_fullcalender_events
(
@without_online
)
end
def
view
@all
=
params
[
:crns
].
split
(
','
).
map
{
|
crn
|
CourseSection
.
latest_by_crn
(
crn
)
}
@events
=
generate_fullcalender_events
(
@all
)
@all
.
reject!
{
|
s
|
s
.
nil?
}
@without_online
=
@all
.
reject
{
|
s
|
s
.
start_time
==
"TBA"
||
s
.
end_time
==
"TBA"
}
@events
=
generate_fullcalender_events
(
@without_online
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment