I am working on a project for a Student Management System for my school (gradebook, attendance, classes etc…). I currently have it running with straight php/mysql/html/js/ajax.
I have roles set up (isStudent, isTeacher, isParent, isAdmin, isOffice & isGuidance) and each user can have 1 or more of these flags set in the db.
I have pages like Take Attendance = index.php?lev=teach&cat=attend and a corresponding page teach_attend.php. I test the role before displaying the page to make sure the user has rights to this page.
I have some tables that are simple to convert to Yii like “user” simply generate the model and CRUD. I edit users directly. What do I do with a table like student2section which maps a user_id to a section_id (I think this is called a relation table)? I don’t really need to create CRUD for student2class do I ?
Also, I have course table (the different subjects I teach this year) and a section table (a course for a specific term (also in a separate table)). Currently I create the course and the sections at the same time. I have a page where I enter the course name and check the terms it will run in. When I submit, it creates the course in the course table, retrieves the course_id and creates a section (course_id,term_id) foreach term checked off. How should I do this with Yii? Separate CRUD for course & section or a single for section like I currently have?
Disclaimer: I am not a programmer by trade, I am a HS teacher. I work on this project just because it interests me.
I appreciate any assistance you may provide in helping me understand Yii.