Re-factoring database calls into models (User Controller): CodeIgniter branch
completed by: Matīss Jānis Āboltiņš
mentors: Shubham Sachdeva, Diogo Gonçalves (dionet)
This year LimeSurvey got ported to the CodeIgniter framework. As CodeIgniter is based on MVC architecture, all database calls should be in served via models and "Active Records" should be used everywhere. This task aim for searching through the
User Controller and moving all database calls to models. (i.e. making new functions in models to serve the purpose and call it in controller instead of using db_execute_assoc()!).
Task Steps:
- Download LimeSurvey's CodeIgniter branch
- Read the Documentation
- Find outdated database calls in User Controller (db_execute_assoc()).
- Identify which calls have equivalent methods in models.
- Port these calls using the existing models.
- Create or extend the models for the remaining calls.
- Port the remaining calls using the new models.
- Discuss the patch with your mentor and ask for feedback.
- Check-in your changes into the LimeSurvey svn trunk.
- Done!