app/controllers/questionnaires_controller.rb
def save
    @questionnaire.save!

    save_questions @questionnaire.id if !@questionnaire.id.nil? and @questionnaire.id > 0
    # We do not create node for quiz questionnaires
    if @questionnaire.type != "QuizQuestionnaire"
      pFolder = TreeFolder.find_by(name: @questionnaire.display_type)
      parent = FolderNode.find_by(node_object_id: pFolder.id)
      # create_new_node_if_necessary(parent)
    end
    undo_link("Questionnaire \"#{@questionnaire.name}\" has been updated successfully. ")
  end
# save questionnaire object after create or edit
save questionnaire object after create or edit
save questionnaire object after create or edit
def save
    @questionnaire.save!
    save_questions @questionnaire.id if !@questionnaire.id.nil? and @questionnaire.id > 0
    if @questionnaire.type != "QuizQuestionnaire"
      pFolder = TreeFolder.find_by(name: @questionnaire.display_type)
      parent = FolderNode.find_by(node_object_id: pFolder.id)
    end
    undo_link("Questionnaire \"#{@questionnaire.name}\" has been updated successfully. ")
  end
def save @questionnaire . save! save_questions @questionnaire . id if ! @questionnaire . id . nil? and @questionnaire . id > 0 if @questionnaire . type != "QuizQuestionnaire" pFolder = TreeFolder . find_by ( name : @questionnaire . display_type ) parent = FolderNode . find_by ( node_object_id : pFolder . id ) end undo_link ( "Questionnaire \"#{@questionnaire.name}\" has been updated successfully. " ) end
save questionnaire object after create or edit
save questionnaire object after create or edit
# We do not create node for quiz questionnaires # create_new_node_if_necessary(parent)