There isn't any built-in functionality.  When you submit your data,
debug $this->data to see what was sent in.  Then do loop through the
data and save each grade individually.  Here's the catch - you have to
set the id to null each time you save a new row, or each new row will
overwrite the last one.  Editing is a different ballgame.  Then you
just have to make sure you are using the correct id for each grade.

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.

On Oct 20, 2:40 pm, "soldier.coder" <[EMAIL PROTECTED]>
wrote:
> This doesn't have to be ajax or have any fancy transitions.  Just a
> save button would be fine.  I guess more than anything I am asking is
> there any built-in facility for saving more than one record at a time?
>
> Investigation into the grades_controller reveals
> if (!empty($this->data) {
>    $this->Grade->save($this->data);
>
> so based on that and given the grades array, can i just iterate over
> the array and change $this->data and then call
>    $this->Grade->save($this->data);
> ??
>
> On Oct 20, 1:47 pm, hydra12 <[EMAIL PROTECTED]> wrote:
>
> > This can get complicated VERY fast.  First, do you want the changes to
> > be made immediately, or does the teacher have to click a submit/save
> > button to save changes?  Second, is ajax an option?
>
> > hydra12
>
> > On Oct 20, 10:27 am, "soldier.coder"
>
> > <[EMAIL PROTECTED]> wrote:
> > > Hello coders!
>
> > > I'm trying to build a nice gradebook app, so teachers can keep of
> > > students grades.
> > > Right now, scaffolding has given me enough to enter one grade for one
> > > grade category for one student.
>
> > > The way my code is set up, teachers choose categories (like writing
> > > assignments, oral presentations, lab assignments, etc), then decide a
> > > weight for those categories, then decide a number of assignments for
> > > those categories.  This is all set up so teachers can figure out
> > > current and final grades which can either be emailed to the individual
> > > students or they can login to the website and see their grades.
>
> > > Anyway, I'd like to set up a teacher view that lets them do mass input
> > > of grades.  So after logging in, and picking the class they want to
> > > work on, it should show a table (for editing)  with one student per
> > > row and then grades for each category across the rows....
>
> > > Can someone please point me toward how to set that sort of thing up?
--~--~---------~--~----~------------~-------~--~----~
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