On Sat, May 18, 2002 at 09:30:13AM +0200, Martin Schulze wrote:
> Erik Tews wrote:
> > On Fri, May 17, 2002 at 06:26:30PM +0200, CVS User joey wrote:
> > > Update of /var/cvs/ltev/ltp/admin/supporter
> > > In directory luonnotar:/tmp/cvs-serv3013
> > >
> > > Modified Files:
> > > supporter.wml
> > > Log Message:
> > > This should be sufficient for only displaying jobs that still need
> > > somebody to work on it, instead of all people.
> > >
> > > --- /var/cvs/ltev/ltp/admin/supporter/supporter.wml 2002/05/17 16:11:56 1.2
> > > +++ /var/cvs/ltev/ltp/admin/supporter/supporter.wml 2002/05/17 16:26:29 1.3
> > > @@ -106,6 +106,25 @@
> > > </table>
> > > <hr>
> > > <?
> > > + function fragment_ok ($dbh, $fragment)
> > > + {
> > > + $query = sprintf ("SELECT max,person FROM fragment,assignment WHERE id = %d "
> > > + ."AND fragment.id = assignment.fragment",
> > > + $fragment);
> > > + $sth = pg_exec ($dbh, $query) or die("Datenbank-Abfrage!");
> > > +
> > > + if ( pg_NumRows ($sth) > 0) {
> > > + $row = pg_fetch_array ($sth, 0);
> > > + if (pg_NumRows ($sth) >= $row['max']) {
> > > + return true;
> > > + } else {
> > > + return false;
> > > + }
> > > + } else {
> > > + return false;
> > > + }
> > > + }
> > > +
> >
> > No, this function will not work. For example if a fragment starts at
> > 10:00 and ends at 12:00, and you have 2 people assigned to this
> > fragment, one from 10:00 to 10:30 and one from 10:30 to 11:00, this code
>
> This must not happen since it would mean that the person managing a
> talk besides the speaker will have to be exchanged *during* the talk.
>
> A supporter must take the entire shift or none.
>
> > will think that there are enough people for this fragment. Have a look
> > at job-fast.php3 which is able to handle this situation correctly.
>
> Aha. No such predicate found, but with the above assumption, I
> believe the predicate works as expected, no?
Yes, so should we remove assignment.starttime and assignment.endtime and
add a comment-field? This would make things much more easyer. I first
thought that it would be a good idea if it would be possible to exchange
a supporter during a talk.
This archive was generated by hypermail 2.1.3 : Sat May 18 2002 - 16:20:48 CEST