Class: Fe::QuestionGrid
- Inherits:
-
Element
- Object
- ActiveRecord::Base
- Element
- Fe::QuestionGrid
show all
- Defined in:
- app/models/fe/question_grid.rb
Instance Method Summary
collapse
Methods inherited from Element
#all_elements, #conditional_match, #duplicate, #limit, max_label_length, #page_id, #position, #previous_element, #ptemplate, #question?, #required?, #reuseable?, #set_conditional_element, #set_position, #update_any_previous_conditional_elements
Instance Method Details
#has_response?(answer_sheet = nil) ⇒ Boolean
21
22
23
|
# File 'app/models/fe/question_grid.rb', line 21
def has_response?(answer_sheet = nil)
elements.any? {|e| e.has_response?(answer_sheet)}
end
|
#num_cols ⇒ Object
15
16
17
18
19
|
# File 'app/models/fe/question_grid.rb', line 15
def num_cols
num = cols.to_s.split(';').length
num = 1 if num == 0
num
end
|