lib/surveyor_gui/models/question_methods.rb
def question_type
        if self.pick == 'one'
          if self.display_type == 'slider'
            "Slider"
          elsif self.display_type == 'stars'
            "1-5 Stars"
          elsif self.display_type == 'dropdown'
            "Dropdown List"
          else
            "Multiple Choice (only one answer)"
          end
        elsif self.pick == 'any'
          "Multiple Choice (multiple answers)"
        else
          if self.display_type == 'label'  || !self.answers.first
            "Label"
          elsif self.answers.first.response_class == 'text'
            "Text Box (for extended text, like notes, etc.)"
          elsif self.answers.first.response_class == 'float' || self.answers.first.response_class == 'integer'
            "Number"
          elsif self.answers.first.response_class == 'date'
            "Date"
          elsif self.answers.first.response_class == 'blob'
            "File Upload"
          else
            "Text"
          end
        end
      end
#generates descriptions for different types of questions, including those that use widgets
generates descriptions for different types of questions, including those that use widgets
generates descriptions for different types of questions including those that use widgets
def question_type
        if self.pick == 'one'
          if self.display_type == 'slider'
            "Slider"
          elsif self.display_type == 'stars'
            "1-5 Stars"
          elsif self.display_type == 'dropdown'
            "Dropdown List"
          else
            "Multiple Choice (only one answer)"
          end
        elsif self.pick == 'any'
          "Multiple Choice (multiple answers)"
        else
          if self.display_type == 'label'  || !self.answers.first
            "Label"
          elsif self.answers.first.response_class == 'text'
            "Text Box (for extended text, like notes, etc.)"
          elsif self.answers.first.response_class == 'float' || self.answers.first.response_class == 'integer'
            "Number"
          elsif self.answers.first.response_class == 'date'
            "Date"
          elsif self.answers.first.response_class == 'blob'
            "File Upload"
          else
            "Text"
          end
        end
      end
def question_type if self . pick == 'one' if self . display_type == 'slider' "Slider" elsif self . display_type == 'stars' "1-5 Stars" elsif self . display_type == 'dropdown' "Dropdown List" else "Multiple Choice (only one answer)" end elsif self . pick == 'any' "Multiple Choice (multiple answers)" else if self . display_type == 'label' || ! self . answers . first "Label" elsif self . answers . first . response_class == 'text' "Text Box (for extended text, like notes, etc.)" elsif self . answers . first . response_class == 'float' || self . answers . first . response_class == 'integer' "Number" elsif self . answers . first . response_class == 'date' "Date" elsif self . answers . first . response_class == 'blob' "File Upload" else "Text" end end end
generates descriptions for different types of questions, including those that use widgets
generates descriptions for different types of questions including those that use widgets