gorrillamcd / Armory

Armory is an application making it easy for people to deploy a Bible College either on the internet or local network. Written with Ruby on Rails.
3 stars 0 forks source link

Add Exam and Grading Logic #5

Open gorrillamcd opened 12 years ago

gorrillamcd commented 12 years ago

Exams and grading are kind of integral to the whole "taking classes" thing! This needs to be added. Hmmm, I'm apparently 5 days past due on this too.

gorrillamcd commented 12 years ago

Working on this now. I will be changing my approach from what I initially planned:

There will be an Exam model that lessons will reference. Lessons will be either a normal lesson, or cumulative exam (i.e. midterms), probably defined with a boolean for easy checking. So, Lesson has_many :exams. Exam has_many :questions; belongs_to :lesson. Question has_many :answers; belongs_to :exam. And Answer belongs_to :question.

Grades will be stored in the Exam model. I won't keep information on what questions were right or wrong, just the grade, though I'll probably use javascript/AJAX to display to the student what was right/wrong, but after that, the info won't be persisted. I'm not sure about how I should store the average grade for a course. Should it be in the Exam as a special row or on the course with checks to keep the data fresh? Or maybe there should be a Grade model that stores the grades with a state column that tracks whether a row is a lesson-grade, midterm-grade, or average.