I'd recommend jquery instead of cake's ajax (personal preference, but
I think jquery is easier to understand than prototype).

Be careful setting all the grades to 0.  I don't know your exact
situation, but at the school where I work we give parents the ability
to see their student's grades online.  Parents get really grumpy when
their kids have a bunch of 0's for no apparent reason . . .

I've been playing with a similar concept.  I'm assuming that you have
a students table, and each student has many assignments, but also each
assignment has many students (you could also do a
hasAndBelongsToMany).  When the teacher adds an assignment, you could
loop through the students and add the assignment to each student with
a null or blank grade.  Now, you can look at a grid of grades (columns
for assignments, rows for students).  I'd use the jquery editable
plugin or something like it.  It works like this - you click on a
grade, add the grade, and it calls a cake action via jquery to update
that specific assignment grade for that specific student.

On Oct 20, 6:46 pm, teknoid <[EMAIL PROTECTED]> wrote:
> To save multiple records or multiple related models you can use
> saveAll().
>
> On Oct 20, 7:04 pm, "soldier.coder" <[EMAIL PROTECTED]>
> wrote:
>
> > On Oct 20, 3:49 pm, hydra12 <[EMAIL PROTECTED]> wrote:
>
> > > I asked about ajax because that actually makes things easier in some
> > > ways.  You can set each grade to save via ajax when the teacher moves
> > > on to the next grade.  It all happens transparently in the background,
> > > so no looping through the data.
>
> > That's pretty hot, actually.  Maybe I could add something to the code
> > that sets up weights that fills grades for categories with 0's so that
> > all changes to the grades would be edits, and then use ajax for the
> > grade edits.
>
> > Looks like I need to learn about cake's implementation of ajax.
>
> > Thanks for your insights.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to