Sample gradebook-type Rails application built by Ryan Stenberg.
Build an application that allows for the recording and reporting of courses offered by teachers and taken by students that meets the following requirements:
- A Teacher can manage his course roster
- A Teacher can view the enrolled students and their grades for a given course
- A Student can see the courses he is registered for (with grades)
- A Student can see his GPA for a given semester
- An Administrator can view enrollment counts across all courses for a semester (performance is a concern)
- An Administrator can view an average grade for a given course (performance is a concern)
Built on Rails v4.0.0 and Ruby v2.0.0.
A new user can choose any role/type (Admin, Teacher, or Student) during account creation in order to easily view role/type-related functionality.
Students cannot enroll in courses from past semesters (ones that have ended). Likewise, teachers can only modify grades for current (and future -- see next point) semesters.
Any new enrollment (not generated by seed data) is automatically assigned a random grade to facilitate grade-related functionality observation. This will create enrollments for future courses with grades for the sake of being able to work with more than 1-semester worth of data. I thought it was more important to demonstrate grade-related functionality across multiple semesters. In a non-sample application, teachers would be limited to modifying grades for the current semester only and grades for future semesters would default to a nil-equivalent value.
Course seed data is automatically generated with variety in mind rather than plausibility of credit hours vs course-level (i.e. 100 through 400-level) so that student GPA values are more diverse and more easily observable when changes occur in enrollments.
Semester seed data is automatically generated in 90-day increments, assigning a season-year name by approximating based on the mid-point of the semester. Again, the focus was on creating a span of semesters where validations could be observed/tested rather than having true-to-life standard Fall/Spring/Summer semesters (which usually vary in duration).
Teachers are practically omniscient, being able to teach anything (another fun by-product of variety in seed data)!
After running bundle install and rake db:migrate, also run rake db:seed to create the default Admin account and trigger the DataGenerator (creates a bunch of data for testing).
When first logging on, use the seeded administrator account:
- Email: [email protected]
- Password: sekretz
To test Teacher and Student functionality, grab an email address for each type from the "Users" page after you're logged in as the above admin. The default passwords are all seeded to 'sekretz'.