Jan 13, 2011
simple application with CakePhp,creating a multi-record edit form using some related data.The application I'm developing is pretty straightforward, its main purpose is managing students records:updating, deleting, changing a student from one group to another, the usual suspects.The relevant tables of the database are:
View 1 Replies
group = (id, teacher, classroom, etc)
groups_students=(groupID, studentID, since, until)
students = (id, name, last_name, etc)
As you might have gathered from the tables above, the application is supposed to aid in recording assitance.Which is where I'm having some issues.What I want to do is this:Have the user select a group In de detail group, I'll have an action called "Register Assistance" Register assitance should redirect to a view in wich for every student belonging to that group, the user can see the student's assitance, edit them, and save.Something like this:In which A stands for "Absent" and P for "Present" and the user can edit everyone, and the save.
I just don't know how to go about that?How do I manage that?I've managed to create a multi-edit form for the assitance, but adding the related data is a pain, I don't know if I should query the students from the groups controllers and then pass that to the action to register assitance, or manage all the logic inside the assitance controller?
Edit: Here's the output of $this->Student->find('first');
[Alumno] => Array (
[id] => 14
[tipo] => dni
The output is in spanish.Alumno = Student, nombre= first name, apellido= last_name.