Subversion Repositories VORC

Rev

Rev 208 | Rev 222 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 208 Rev 215
Line 180... Line 180...
180
                  date = (select date from class where id = ?) and
180
                  date = (select date from class where id = ?) and
181
                  start_time = (select start_time from class where id = ?) and
181
                  start_time = (select start_time from class where id = ?) and
182
                  location = (select location from class where id = ?)", undef,
182
                  location = (select location from class where id = ?)", undef,
183
              $coach_id, "COA", $r1, $r2, $class_id, $class_id, $class_id);
183
              $coach_id, "COA", $r1, $r2, $class_id, $class_id, $class_id);
184
  } elsif ($change eq "save") {
184
  } elsif ($change eq "save") {
185
    my $r1 = ($role eq "assistant") ? "Assistant Coach" : "Coach";
185
    my $r1 = ($role eq "assistant") ? "Assistant (TA)" : "Coach";
186
    $dbh->do ("insert into shift (dept, role, type, date, location, start_time, end_time, doubletime, note, assignee_id)
186
    $dbh->do ("insert into shift (dept, role, type, date, location, start_time, end_time, doubletime, note, assignee_id)
187
               select ?, ?, ?, date, location, start_time, end_time, 1, name, ? from class where id = ?", undef,
187
               select ?, ?, ?, date, location, start_time, end_time, 1, name, ? from class where id = ?", undef,
188
               "COA", $r1, "selected", $coach_id, $class_id);
188
               "COA", $r1, "selected", $coach_id, $class_id);
189
  }
189
  }