todo list model

I’m trying to add “todo list” functionality to an existing application. Essentially, an administrator can create arbitrary todo list items which consist of a name and a date. Regular users of the application (students) can see the todo list items and check them off when complete.

I’ve created two new tables:

admintask (id, duedate, title)

admintaskcomplete (id, student_id, admintask_id)

If a student_id, admintask_id pair exists in admintaskcomplete then that task has been completed by that student.

I’m going to need two views:

one for students which has a list of all admintask’s and an (ajax) checkbox correlating to admintaskcomplete.

one for administrators which lists which students have not completed an admintask.

I’ve setup foreign keys and created the basic gii models, but now I’m drawing a blank on the best way to approach this with Yii and how exactly to design the models, relationships, etc. Admittedly, it’s been a while since I’ve work with Yii (or done any webdev for that matter). Can anyone point me in the right direction?

this guide will help you through the process. it helped me.