|
@@ -176,15 +176,31 @@ class Activity < ApplicationRecord
|
176
|
176
|
st = Time.strptime(row['start_time'], '%H:%M')
|
177
|
177
|
a.start = Time.zone.local(sd.year, sd.month, sd.day, st.hour, st.min)
|
178
|
178
|
|
179
|
|
- if not row['end_date'].blank?
|
|
179
|
+ unless row['end_date'].blank?
|
180
|
180
|
ed = Date.strptime(row['end_date'])
|
181
|
181
|
et = Time.strptime(row['end_time'], '%H:%M')
|
182
|
182
|
a.end = Time.zone.local(ed.year, ed.month, ed.day, et.hour, et.min)
|
183
|
183
|
end
|
184
|
184
|
|
185
|
|
- dd = Date.strptime(row['deadline_date'])
|
186
|
|
- dt = Time.strptime(row['deadline_time'], '%H:%M')
|
187
|
|
- a.deadline = Time.zone.local(dd.year, dd.month, dd.day, dt.hour, dt.min)
|
|
185
|
+ unless row['deadline_date'].blank?
|
|
186
|
+ dd = Date.strptime(row['deadline_date'])
|
|
187
|
+ dt = Time.strptime(row['deadline_time'], '%H:%M')
|
|
188
|
+ a.deadline = Time.zone.local(dd.year, dd.month, dd.day, dt.hour, dt.min)
|
|
189
|
+ end
|
|
190
|
+
|
|
191
|
+ unless row['reminder_at_date'].blank?
|
|
192
|
+ rd = Date.strptime(row['reminder_at_date'])
|
|
193
|
+ rt = Time.strptime(row['reminder_at_time'], '%H:%M')
|
|
194
|
+ a.reminder_at = Time.zone.local(rd.year, rd.month, rd.day, rt.hour, rt.min)
|
|
195
|
+ end
|
|
196
|
+
|
|
197
|
+ unless row['subgroup_division_enabled'].blank?
|
|
198
|
+ a.subgroup_division_enabled = row['subgroup_division_enabled'].downcase == 'y'
|
|
199
|
+ end
|
|
200
|
+
|
|
201
|
+ unless row['no_response_action'].blank?
|
|
202
|
+ a.no_response_action = row['no_response_action'].downcase == 'p'
|
|
203
|
+ end
|
188
|
204
|
|
189
|
205
|
result << a
|
190
|
206
|
end
|