public static function doSelectJoinAllExceptEmployee(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } AbsenceEkskulPeer::addSelectColumns($c); $startcol2 = AbsenceEkskulPeer::NUM_COLUMNS - AbsenceEkskulPeer::NUM_LAZY_LOAD_COLUMNS + 1; StudentPeer::addSelectColumns($c); $startcol3 = $startcol2 + StudentPeer::NUM_COLUMNS; AcademicCalendarPeer::addSelectColumns($c); $startcol4 = $startcol3 + AcademicCalendarPeer::NUM_COLUMNS; ClassGroupPeer::addSelectColumns($c); $startcol5 = $startcol4 + ClassGroupPeer::NUM_COLUMNS; SchedulePeer::addSelectColumns($c); $startcol6 = $startcol5 + SchedulePeer::NUM_COLUMNS; ScheduleDetailPeer::addSelectColumns($c); $startcol7 = $startcol6 + ScheduleDetailPeer::NUM_COLUMNS; GradeComponentPeer::addSelectColumns($c); $startcol8 = $startcol7 + GradeComponentPeer::NUM_COLUMNS; $c->addJoin(AbsenceEkskulPeer::STUDENT_ID, StudentPeer::ID); $c->addJoin(AbsenceEkskulPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID); $c->addJoin(AbsenceEkskulPeer::CLASS_GROUP_ID, ClassGroupPeer::ID); $c->addJoin(AbsenceEkskulPeer::SCHEDULE_ID, SchedulePeer::ID); $c->addJoin(AbsenceEkskulPeer::SCHEDULE_DETAIL_ID, ScheduleDetailPeer::ID); $c->addJoin(AbsenceEkskulPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = AbsenceEkskulPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = StudentPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getStudent(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addAbsenceEkskul($obj1); break; } } if ($newObject) { $obj2->initAbsenceEkskuls(); $obj2->addAbsenceEkskul($obj1); } $omClass = AcademicCalendarPeer::getOMClass(); $cls = Propel::import($omClass); $obj3 = new $cls(); $obj3->hydrate($rs, $startcol3); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj3 = $temp_obj1->getAcademicCalendar(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) { $newObject = false; $temp_obj3->addAbsenceEkskul($obj1); break; } } if ($newObject) { $obj3->initAbsenceEkskuls(); $obj3->addAbsenceEkskul($obj1); } $omClass = ClassGroupPeer::getOMClass(); $cls = Propel::import($omClass); $obj4 = new $cls(); $obj4->hydrate($rs, $startcol4); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj4 = $temp_obj1->getClassGroup(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) { $newObject = false; $temp_obj4->addAbsenceEkskul($obj1); break; } } if ($newObject) { $obj4->initAbsenceEkskuls(); $obj4->addAbsenceEkskul($obj1); } $omClass = SchedulePeer::getOMClass(); $cls = Propel::import($omClass); $obj5 = new $cls(); $obj5->hydrate($rs, $startcol5); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj5 = $temp_obj1->getSchedule(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) { $newObject = false; $temp_obj5->addAbsenceEkskul($obj1); break; } } if ($newObject) { $obj5->initAbsenceEkskuls(); $obj5->addAbsenceEkskul($obj1); } $omClass = ScheduleDetailPeer::getOMClass(); $cls = Propel::import($omClass); $obj6 = new $cls(); $obj6->hydrate($rs, $startcol6); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj6 = $temp_obj1->getScheduleDetail(); if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) { $newObject = false; $temp_obj6->addAbsenceEkskul($obj1); break; } } if ($newObject) { $obj6->initAbsenceEkskuls(); $obj6->addAbsenceEkskul($obj1); } $omClass = GradeComponentPeer::getOMClass(); $cls = Propel::import($omClass); $obj7 = new $cls(); $obj7->hydrate($rs, $startcol7); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj7 = $temp_obj1->getGradeComponent(); if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) { $newObject = false; $temp_obj7->addAbsenceEkskul($obj1); break; } } if ($newObject) { $obj7->initAbsenceEkskuls(); $obj7->addAbsenceEkskul($obj1); } $results[] = $obj1; } return $results; }
public function executeSaveScoreEks() { $counsel_id = $this->getRequestParameter('counseling_id'); $counseling = CounselingPeer::retrieveByPK($counsel_id); $this->forward404Unless($counseling); $this->counseling = $counseling; $accal_id = $this->getRequestParameter('accal_id'); $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id); $this->forward404Unless($academic_calendar); $this->academic_calendar = $academic_calendar; $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id')); $this->forward404Unless($schedule); $this->schedule = $schedule; $schedule_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('detail_id')); $this->forward404Unless($schedule_detail); $this->schedule_detail = $schedule_detail; $cj = new Criteria(); $cj->add(GradeConversionPeer::DEPARTMENT_ID, $academic_calendar->getDepartmentId()); $cj->add(GradeConversionPeer::GRADE_CONVERSION_TEMPLATE_ID, 19); $cj->add(GradeConversionPeer::TYPE_CONVERSION, ScoreRule::FIVE); $cj->addDescendingOrderByColumn(GradeConversionPeer::MAX_VALUE); $grade_convs = GradeConversionPeer::doSelect($cj); $scores = $this->getRequestParameter('score'); foreach ($scores as $k => $score) { if ($score != null) { if ($score != '-') { $ids = split('_', $k); ## $ids[0] = Cur13 Ekskul Id ## $ids[1] = Grade Spec Id $c = new Criteria(); $c->add(Cur13GradeEkskulPeer::CUR13_EKSKUL_ID, $ids[0]); $c->add(Cur13GradeEkskulPeer::GRADE_SPEC_ID, $ids[1]); $cur13_grade_ekskul = Cur13GradeEkskulPeer::doSelectOne($c); if ($cur13_grade_ekskul == null) { $cur13_grade_ekskul = new Cur13GradeEkskul(); } $cur13_grade_ekskul->setCur13EkskulId($ids[0]); $cur13_grade_ekskul->setGradeSpecId($ids[1]); $cur13_grade_ekskul->setGrade($score); $cur13_grade_ekskul->save(); $cc = new Criteria(); $cc->add(Cur13GradeEkskulPeer::CUR13_EKSKUL_ID, $ids[0]); $cur13_grades = Cur13GradeEkskulPeer::doSelect($cc); if ($cur13_grades) { $total = 0; $count = 0; foreach ($cur13_grades as $cur13_grade) { $count += 1; $total += $cur13_grade->getGrade(); } $avg = round($total / $count); $scale = number_format($avg / 100 * 4, 2); $remark = ''; foreach ($grade_convs as $gc) { if ($avg >= $gc->getMinValue() && $avg < $gc->getMaxValue() + 1) { $remark = $gc->getName(); } } $cur13_ekskul = Cur13EkskulPeer::retrieveByPK($ids[0]); $cur13_ekskul->setGradeScale($scale); $cur13_ekskul->setGrade($avg); $cur13_ekskul->setRemark($remark); $cur13_ekskul->save(); } } else { $ids = split('_', $k); ## $ids[0] = Cur13 Ekskul Id ## $ids[1] = Grade Spec Id $c = new Criteria(); $c->add(Cur13GradeEkskulPeer::CUR13_EKSKUL_ID, $ids[0]); $c->add(Cur13GradeEkskulPeer::GRADE_SPEC_ID, $ids[1]); $cur13_grade_ekskul = Cur13GradeEkskulPeer::doSelectOne($c); if ($cur13_grade_ekskul != null) { $cur13_grade_ekskul->delete(); } } } } return $this->redirect('counseling_sd/listEksStu?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId() . '&accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId()); }
</td> </tr> <tr> <td style="vertical-align:middle;"><label><?php echo __('Waktu'); ?> </label></td> <td style="text-align:center; vertical-align:middle;">:</td> <td style="vertical-align:middle;"> <p class="detail" style="font-weight: bold;"> <?php $c = new Criteria(); $c->add(ScheduleDetailPeer::SCHEDULE_ID, $schedule->getId()); $c->addDescendingOrderByColumn(ScheduleDetailPeer::ID); $cs_details = ScheduleDetailPeer::doSelect($c); $course_details = ScheduleDetailPeer::doCount($c); if ($course_details < 1) { echo '-'; } else { foreach ($cs_details as $detail) { echo $detail->getClassSession()->getBegin() . ' - ' . $detail->getClassSession()->getEnd() . '<br>'; } } ?> </p> </td> </tr> </tbody> </table> </td></tr></table></td>
public function getScheduleDetail($con = null) { include_once 'lib/model/om/BaseScheduleDetailPeer.php'; if ($this->aScheduleDetail === null && $this->schedule_detail_id !== null) { $this->aScheduleDetail = ScheduleDetailPeer::retrieveByPK($this->schedule_detail_id, $con); } return $this->aScheduleDetail; }
public function executeListStudentAll() { $employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo'); $employee = EmployeePeer::retrieveByPK($employee_id); $this->forward404Unless($employee); $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id')); $this->forward404Unless($schedule); $schedule_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('detail_id')); $this->forward404Unless($schedule_detail); $schedule_id = $schedule->getId(); $tanggal = $this->getRequestParameter('time'); $c = new Criteria(); $c->add(AbsenceEkskulPeer::SCHEDULE_ID, $schedule->getId()); $c->add(AbsenceEkskulPeer::SCHEDULE_DETAIL_ID, $schedule_detail->getId()); $c->add(AbsenceEkskulPeer::TIME, $this->getRequestParameter('time')); $c->addJoin(StudentPeer::ID, AbsenceEkskulPeer::STUDENT_ID); $c->addAscendingOrderByColumn(StudentPeer::NAME); $rpp = $this->getRequestParameter('max_per_page', 999); $pager = new sfPropelPager('Student', $rpp); $pager->setCriteria($c); $page = $this->getRequestParameter('page', $this->getUser()->getAttribute('page', 1, 'student')); $this->getUser()->setAttribute('page', $page, 'student'); $pager->setPage($page); $pager->init(); $this->pager = $pager; $actions = array(array('name' => 'kembali', 'url' => 'course_ekskul/listAbsence?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId(), 'color' => 'black')); $this->actions = $actions; $actions2 = array(array('name' => '<span>Peserta Ekskul</span>', 'url' => 'course_ekskul/list?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId(), 'color' => 'sun')); array_unshift($actions2, array('name' => '<span>Detail Jadwal Ekskul</span>', 'url' => 'course_ekskul/listDetail?id=' . $schedule->getId(), 'color' => 'sun')); array_push($actions2, array('name' => '<span>Absensi Ekskul</span>', 'url' => 'course_ekskul/listAbsence?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId(), 'color' => 'sun', 'type' => 'direct')); array_push($actions2, array('name' => '<span>Penilaian Ekskul</span>', 'url' => 'course_ekskul/listScore?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId(), 'color' => 'sun')); $this->actions2 = $actions2; $this->subtitle = $schedule->getGradeComponent()->toString() . ' - ' . $schedule_detail->getDayString(); $cw = new Criteria(); $cw->add(AbsenceEkskulPeer::SCHEDULE_ID, $schedule->getId()); $cw->add(AbsenceEkskulPeer::SCHEDULE_DETAIL_ID, $schedule_detail->getId()); $cw->add(AbsenceEkskulPeer::TIME, $tanggal); $absence_course = AbsenceEkskulPeer::doSelectOne($cw); $this->absence_course = $absence_course; $this->schedule = $schedule; $this->schedule_detail = $schedule_detail; $this->schedule_id = $schedule_id; $this->employee = $employee; $this->tanggal = $tanggal; }
public function executeDeleteSchedule() { $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id')); $this->schedule = $schedule; $cs_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($cs_detail); $cs_detail->delete(); return $this->redirect('extracurricular/edit?id=' . $schedule->getId()); }
public static function doSelectJoinAllExceptEmployee(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } VAbsenceEkskulPeer::addSelectColumns($c); $startcol2 = VAbsenceEkskulPeer::NUM_COLUMNS - VAbsenceEkskulPeer::NUM_LAZY_LOAD_COLUMNS + 1; SchedulePeer::addSelectColumns($c); $startcol3 = $startcol2 + SchedulePeer::NUM_COLUMNS; ScheduleDetailPeer::addSelectColumns($c); $startcol4 = $startcol3 + ScheduleDetailPeer::NUM_COLUMNS; GradeComponentPeer::addSelectColumns($c); $startcol5 = $startcol4 + GradeComponentPeer::NUM_COLUMNS; $c->addJoin(VAbsenceEkskulPeer::SCHEDULE_ID, SchedulePeer::ID); $c->addJoin(VAbsenceEkskulPeer::SCHEDULE_DETAIL_ID, ScheduleDetailPeer::ID); $c->addJoin(VAbsenceEkskulPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = VAbsenceEkskulPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = SchedulePeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getSchedule(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addVAbsenceEkskul($obj1); break; } } if ($newObject) { $obj2->initVAbsenceEkskuls(); $obj2->addVAbsenceEkskul($obj1); } $omClass = ScheduleDetailPeer::getOMClass(); $cls = Propel::import($omClass); $obj3 = new $cls(); $obj3->hydrate($rs, $startcol3); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj3 = $temp_obj1->getScheduleDetail(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) { $newObject = false; $temp_obj3->addVAbsenceEkskul($obj1); break; } } if ($newObject) { $obj3->initVAbsenceEkskuls(); $obj3->addVAbsenceEkskul($obj1); } $omClass = GradeComponentPeer::getOMClass(); $cls = Propel::import($omClass); $obj4 = new $cls(); $obj4->hydrate($rs, $startcol4); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj4 = $temp_obj1->getGradeComponent(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) { $newObject = false; $temp_obj4->addVAbsenceEkskul($obj1); break; } } if ($newObject) { $obj4->initVAbsenceEkskuls(); $obj4->addVAbsenceEkskul($obj1); } $results[] = $obj1; } return $results; }
public function getScheduleDetailsJoinClassSession($criteria = null, $con = null) { include_once 'lib/model/om/BaseScheduleDetailPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collScheduleDetails === null) { if ($this->isNew()) { $this->collScheduleDetails = array(); } else { $criteria->add(ScheduleDetailPeer::SCHEDULE_ID, $this->getId()); $this->collScheduleDetails = ScheduleDetailPeer::doSelectJoinClassSession($criteria, $con); } } else { $criteria->add(ScheduleDetailPeer::SCHEDULE_ID, $this->getId()); if (!isset($this->lastScheduleDetailCriteria) || !$this->lastScheduleDetailCriteria->equals($criteria)) { $this->collScheduleDetails = ScheduleDetailPeer::doSelectJoinClassSession($criteria, $con); } } $this->lastScheduleDetailCriteria = $criteria; return $this->collScheduleDetails; }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(ScheduleDetailPeer::ID, $pks, Criteria::IN); $objs = ScheduleDetailPeer::doSelect($criteria, $con); } return $objs; }
public function executeSaveScoreSmp() { $accal_id = $this->getRequestParameter('accal_id'); $academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id); $this->forward404Unless($academic_calendar); $this->academic_calendar = $academic_calendar; $schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id')); $this->forward404Unless($schedule); $this->schedule = $schedule; $schedule_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('detail_id')); $this->forward404Unless($schedule_detail); $this->schedule_detail = $schedule_detail; $class_group = ClassGroupPeer::retrieveByPK($this->getRequestParameter('class_id')); $this->forward404Unless($class_group); $scores = $this->getRequestParameter('score'); foreach ($scores as $k => $score) { if ($score != null) { $cr = new Criteria(); $cr->add(StudentRaportPeer::GRADE_COMPONENT_ID, $schedule->getGradeComponentId()); $cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $schedule->getAcademicCalendarId()); $cr->add(StudentRaportPeer::SCHEDULE_DETAIL_ID, $schedule_detail->getId()); $cr->add(StudentRaportPeer::SCHEDULE_ID, $schedule->getId()); $cr->add(StudentRaportPeer::CLASS_GROUP_ID, $class_group->getId()); $cr->add(StudentRaportPeer::STUDENT_ID, $k); $sc = StudentRaportPeer::doSelectOne($cr); $sc->setStudentId($k); $sc->setAcademicCalendarId($schedule->getAcademicCalendarId()); $sc->setGradeComponentId($schedule->getGradeComponentId()); $sc->setClassGroupId($class_group->getId()); $sc->setScheduleId($schedule->getId()); $sc->setScheduleDetailId($schedule_detail->getId()); $sc->setGrade($score); $sc->save(); } } return $this->redirect('extracurricular_new/listEksStu?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId() . '&accal_id=' . $academic_calendar->getId()); }
public static function doSelectJoinAllExceptSchedule(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } VStudentRaportPeer::addSelectColumns($c); $startcol2 = VStudentRaportPeer::NUM_COLUMNS - VStudentRaportPeer::NUM_LAZY_LOAD_COLUMNS + 1; StudentPeer::addSelectColumns($c); $startcol3 = $startcol2 + StudentPeer::NUM_COLUMNS; StudentAccalPeer::addSelectColumns($c); $startcol4 = $startcol3 + StudentAccalPeer::NUM_COLUMNS; StudentCoursePeer::addSelectColumns($c); $startcol5 = $startcol4 + StudentCoursePeer::NUM_COLUMNS; GradeComponentPeer::addSelectColumns($c); $startcol6 = $startcol5 + GradeComponentPeer::NUM_COLUMNS; GradeSpecPeer::addSelectColumns($c); $startcol7 = $startcol6 + GradeSpecPeer::NUM_COLUMNS; CitationPeer::addSelectColumns($c); $startcol8 = $startcol7 + CitationPeer::NUM_COLUMNS; SubjectCurrPeer::addSelectColumns($c); $startcol9 = $startcol8 + SubjectCurrPeer::NUM_COLUMNS; ClassGroupPeer::addSelectColumns($c); $startcol10 = $startcol9 + ClassGroupPeer::NUM_COLUMNS; AcademicCalendarPeer::addSelectColumns($c); $startcol11 = $startcol10 + AcademicCalendarPeer::NUM_COLUMNS; ScheduleDetailPeer::addSelectColumns($c); $startcol12 = $startcol11 + ScheduleDetailPeer::NUM_COLUMNS; $c->addJoin(VStudentRaportPeer::STUDENT_ID, StudentPeer::ID); $c->addJoin(VStudentRaportPeer::STUDENT_ACCAL_ID, StudentAccalPeer::ID); $c->addJoin(VStudentRaportPeer::STUDENT_COURSE_ID, StudentCoursePeer::ID); $c->addJoin(VStudentRaportPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID); $c->addJoin(VStudentRaportPeer::GRADE_SPEC_ID, GradeSpecPeer::ID); $c->addJoin(VStudentRaportPeer::CITATION_ID, CitationPeer::ID); $c->addJoin(VStudentRaportPeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID); $c->addJoin(VStudentRaportPeer::CLASS_GROUP_ID, ClassGroupPeer::ID); $c->addJoin(VStudentRaportPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID); $c->addJoin(VStudentRaportPeer::SCHEDULE_DETAIL_ID, ScheduleDetailPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = VStudentRaportPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = StudentPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getStudent(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addVStudentRaport($obj1); break; } } if ($newObject) { $obj2->initVStudentRaports(); $obj2->addVStudentRaport($obj1); } $omClass = StudentAccalPeer::getOMClass(); $cls = Propel::import($omClass); $obj3 = new $cls(); $obj3->hydrate($rs, $startcol3); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj3 = $temp_obj1->getStudentAccal(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) { $newObject = false; $temp_obj3->addVStudentRaport($obj1); break; } } if ($newObject) { $obj3->initVStudentRaports(); $obj3->addVStudentRaport($obj1); } $omClass = StudentCoursePeer::getOMClass(); $cls = Propel::import($omClass); $obj4 = new $cls(); $obj4->hydrate($rs, $startcol4); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj4 = $temp_obj1->getStudentCourse(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) { $newObject = false; $temp_obj4->addVStudentRaport($obj1); break; } } if ($newObject) { $obj4->initVStudentRaports(); $obj4->addVStudentRaport($obj1); } $omClass = GradeComponentPeer::getOMClass(); $cls = Propel::import($omClass); $obj5 = new $cls(); $obj5->hydrate($rs, $startcol5); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj5 = $temp_obj1->getGradeComponent(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) { $newObject = false; $temp_obj5->addVStudentRaport($obj1); break; } } if ($newObject) { $obj5->initVStudentRaports(); $obj5->addVStudentRaport($obj1); } $omClass = GradeSpecPeer::getOMClass(); $cls = Propel::import($omClass); $obj6 = new $cls(); $obj6->hydrate($rs, $startcol6); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj6 = $temp_obj1->getGradeSpec(); if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) { $newObject = false; $temp_obj6->addVStudentRaport($obj1); break; } } if ($newObject) { $obj6->initVStudentRaports(); $obj6->addVStudentRaport($obj1); } $omClass = CitationPeer::getOMClass(); $cls = Propel::import($omClass); $obj7 = new $cls(); $obj7->hydrate($rs, $startcol7); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj7 = $temp_obj1->getCitation(); if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) { $newObject = false; $temp_obj7->addVStudentRaport($obj1); break; } } if ($newObject) { $obj7->initVStudentRaports(); $obj7->addVStudentRaport($obj1); } $omClass = SubjectCurrPeer::getOMClass(); $cls = Propel::import($omClass); $obj8 = new $cls(); $obj8->hydrate($rs, $startcol8); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj8 = $temp_obj1->getSubjectCurr(); if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) { $newObject = false; $temp_obj8->addVStudentRaport($obj1); break; } } if ($newObject) { $obj8->initVStudentRaports(); $obj8->addVStudentRaport($obj1); } $omClass = ClassGroupPeer::getOMClass(); $cls = Propel::import($omClass); $obj9 = new $cls(); $obj9->hydrate($rs, $startcol9); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj9 = $temp_obj1->getClassGroup(); if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) { $newObject = false; $temp_obj9->addVStudentRaport($obj1); break; } } if ($newObject) { $obj9->initVStudentRaports(); $obj9->addVStudentRaport($obj1); } $omClass = AcademicCalendarPeer::getOMClass(); $cls = Propel::import($omClass); $obj10 = new $cls(); $obj10->hydrate($rs, $startcol10); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj10 = $temp_obj1->getAcademicCalendar(); if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) { $newObject = false; $temp_obj10->addVStudentRaport($obj1); break; } } if ($newObject) { $obj10->initVStudentRaports(); $obj10->addVStudentRaport($obj1); } $omClass = ScheduleDetailPeer::getOMClass(); $cls = Propel::import($omClass); $obj11 = new $cls(); $obj11->hydrate($rs, $startcol11); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj11 = $temp_obj1->getScheduleDetail(); if ($temp_obj11->getPrimaryKey() === $obj11->getPrimaryKey()) { $newObject = false; $temp_obj11->addVStudentRaport($obj1); break; } } if ($newObject) { $obj11->initVStudentRaports(); $obj11->addVStudentRaport($obj1); } $results[] = $obj1; } return $results; }
public static function doSelectJoinAllExceptStudentAccal(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } Cur13EkskulPeer::addSelectColumns($c); $startcol2 = Cur13EkskulPeer::NUM_COLUMNS - Cur13EkskulPeer::NUM_LAZY_LOAD_COLUMNS + 1; ScheduleDetailPeer::addSelectColumns($c); $startcol3 = $startcol2 + ScheduleDetailPeer::NUM_COLUMNS; $c->addJoin(Cur13EkskulPeer::SCHEDULE_DETAIL_ID, ScheduleDetailPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = Cur13EkskulPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = ScheduleDetailPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getScheduleDetail(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addCur13Ekskul($obj1); break; } } if ($newObject) { $obj2->initCur13Ekskuls(); $obj2->addCur13Ekskul($obj1); } $results[] = $obj1; } return $results; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = ScheduleDetailPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setScheduleId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setLocationId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setDay($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setClassSessionId($arr[$keys[4]]); } }