mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
new schedule
This commit is contained in:
parent
0018284c66
commit
d8f9de9363
9 changed files with 182 additions and 81 deletions
|
|
@ -223,6 +223,20 @@ class Event < ActiveRecord::Base
|
|||
(100 * result.values.count(true) / result.values.compact.count).to_s
|
||||
end
|
||||
|
||||
##
|
||||
# Returns the number of columns this event should span in the schedule
|
||||
#
|
||||
def span
|
||||
self.event_type.length / EventType::LENGTH_STEP
|
||||
end
|
||||
|
||||
##
|
||||
# Returns end of the event
|
||||
#
|
||||
def end_time
|
||||
self.start_time + self.event_type.length.minutes
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
##
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue