I want to make a quality audit application - Layered process audit - think survey app.
Along these lines:
https://github.com/williej/rails-nested-survey
This one is quite simple and uses cocoon nested forms.
I want to add question types (like harley/surveyor), drop down list of questions to choose from, sort order for questions, answers should have and issues field and corrections field.
Questions could have correct answers.
https://github.com/harley/surveyor
- This is close to what I want. BUT.. I don't understand the code he uses. I more understand cocoon nested forms like williej uses.
- Proposed changes..
- I want to add drop-down question type, drop down list of questions to choose from, sort order for questions,
- answers should have and issues field and corrections field.
- Questions could have correct answers.
This is what I have built so far..
https://github.com/dgleba/lpa338
Notes:
- I want to use devise with devise-ldap-authenticable, to use our active directory for user/pass like I am using on other apps.
Other examples..
https://github.com/runtimerevolution/survey ( has online demo )
https://github.com/code-mancers/rapidfire ( has online demo, see demo app code and link there )
Sign in. Pick an audit. 7-20 questions are presented based on who you are. Answer the questions and provide comments regarding issues and corrective actions taken.
I have written many apps, but I can't get my head around this one.
_____________
As I think about this more, I have hacked on the williej schema by taking inspriation from harley/surveyor.
These are the scaffolds to create it.
----
rails generate scaffold Answer body:text choice:references question:references response:references issue:string action:text -f
rails generate scaffold Choice name:string question:references -f
rails generate scaffold Question name question_list:references sort:integer qtype:integer survey:references -f
rails generate scaffold QuestionList name:string sort:integer active_status:integer -f
rails generate scaffold Survey name:string -f
rails generate scaffold Response survey:references user:references ip:string -f
----
Previously, I had hacked on this...
See > symbols below..
ActiveRecord::Schema.define(version: 20160728042324) do
create_table "answers", force: :cascade do |t|
t.integer "choice_id"
t.integer "question_id"
t.integer "response_id"
t.string "content"
> text issue
> text correction
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["choice_id"], name: "index_answers_on_choice_id"
t.index ["question_id"], name: "index_answers_on_question_id"
t.index ["response_id"], name: "index_answers_on_response_id"
end
create_table "choices", force: :cascade do |t|
t.integer "question_id"
t.string "content"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["question_id"], name: "index_choices_on_question_id"
end
create_table "collaborations", force: :cascade do |t|
t.integer "survey_id"
t.integer "user_id"
t.integer "role"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["survey_id"], name: "index_collaborations_on_survey_id"
t.index ["user_id"], name: "index_collaborations_on_user_id"
end
create_table "questions", force: :cascade do |t|
t.string "title"
t.integer "survey_id"
t.integer "type"
> integer sort
> integer active
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["survey_id"], name: "index_questions_on_survey_id"
end
create_table "responses", force: :cascade do |t|
t.integer "survey_id"
t.string "ip"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["survey_id"], name: "index_responses_on_survey_id"
end
create_table "surveys", force: :cascade do |t|
t.string "title"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "users", force: :cascade do |t|
t.string "email"
t.string "password_digest"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "admin", default: false
end
end
Wow! This can be one particular of the most beneficial blogs We’ve ever arrive across on this subject. Basically Wonderful. I’m also a specialist in this topic so I can understand your effort. supplier process audits
ReplyDelete