The data about each student is stored in a database, and you update that database. Usually, that’s done in an admin page that you also write.
A relational database like MySQL allows you a great deal of flexibility here – you generally only ever have to enter a given piece of data once, rather than duplicating it in a bunch of different places. You might have a set of tables like this:
students
id
first_name
last_name
email
guardian_1_name
guardian_1_email
guardian_2_name
guardian_2_email
guardian_3_name
guardian_3_email
created_at
updated_at
grades
assignment_name
student_id
grade
created_on
These tables are related through the students.id = grades.student_id relationship. In Rails parlance, the Student is said to has_many grades, and the Grade is said to belongs_to student. This means you don’t need to have an infinite number of properties for grades within a student record – a student can have many different grades, and you can present an average of them or individual results, depending on what your template needs.
These examples also show another thing: in a ‘normalized’ set of tables, I would have a third table called guardians, and rather than having three slots per student for guardians, I might have something like this:
guardians
id
student_id
name
phone_1
phone_2
email
You can take this to ridiculous extremes, adding a table for emails, another for phone numbers, all in the name of honoring the Single Responsibility Principle. You get to choose how complex to make this, though, and the database and your code will sort it out in the end anyway. You always trade flexibility for clarity in any case.
Walter
On Feb 24, 2013, at 10:13 AM, Barry Hoffman wrote:
If the data changes (the scores) are not added in FW, how are they done?
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options