Class: ImportedExam

Inherits:
RolePlaying::Role
  • Object
show all
Defined in:
app/roles/imported_exam.rb

Constant Summary collapse

DEFAULT_EXAM_DURATION =
90.minutes

Instance Method Summary collapse

Instance Method Details

#end_dateObject


7
8
9
10
11
12
13
14
# File 'app/roles/imported_exam.rb', line 7

def end_date
  exam = __getobj__
  if exam.end_date
    exam.end_date
  else
    exam.start_date + DEFAULT_EXAM_DURATION
  end
end

#event_typeObject


16
17
18
19
20
21
22
# File 'app/roles/imported_exam.rb', line 16

def event_type
  if term_type == :assessment
    'assessment'
  else
    'exam'
  end
end