Exercise 4
Course Registration System ("Ilmo 2.0") - third iteration
Exercises (features to implement)
Required features
You should have these features implemented at the exercise session. You get 1 point for each implemented feature.
- 1p: Courses have "instances" (sections?) and instances have exercise groups.
- E.g. Course "Agile Web Development with Rails" has an instance "Autumn 2009" and that has exercise groups
- Modify views to support this
- 1p: Related objects are destroyed
- When a course is destroyed, its implementations and exercise groups are destroyed
- When a implementation is destroyed, all of its exercise groups are destroyed
- You don't have to implement a "clickable feature", just so that application (code) has this behaviour
- 1p: Finding objects is based on named_scopes (refactor)
- Your code may not contain
Model.find(:all, :order => "created_at DESC")
or similar, but named scopes, like: Course.all_in_order
Optional features
You can select three of the following:
- 1p: Nested routes (/courses/1/implementations/3/exercise_groups/5)
- 1p: User management for administrator
- You can do it by hand if you want to have more exercise on CRUD-operations
- Or use a plugin, like Active Scaffold
- You don't have to authenticate administrator, yet.
- 1p: Capistrano deployment (or any automated deploy tool)
- Here is sample recipe to your
config/deploy.rb
- Deploy application with capistrano
- Add task to initialize sample data in your application
- Add task to show latest 100 lines from your production.log
- 1p: Basic i18n (localization) support
- 1p: Extend given unit tests
- run
script/generate rspec
to create spec/
-directory
- run tests with
rake spec
- Modify these unit tests to pass in your code
- Implement pending tests.
- 1p: Edit database seeding script you did in exercise 2 to also initialize course instances and excercise groups
- 1p: Generate a PDF (basic test)
I want to become an expert (+1credit)
It's okay to miss 1 of these, you need to have 4/5 times implemented if you want to have +1credit
- All except PDF generation, user management and capistrano