示例#1
0
 public function getCitation($con = null)
 {
     include_once 'lib/model/om/BaseCitationPeer.php';
     if ($this->aCitation === null && $this->citation_id !== null) {
         $this->aCitation = CitationPeer::retrieveByPK($this->citation_id, $con);
     }
     return $this->aCitation;
 }
示例#2
0
 public static function doSelectJoinAllExceptScheduleDetail(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     StudentRaportPeer::addSelectColumns($c);
     $startcol2 = StudentRaportPeer::NUM_COLUMNS - StudentRaportPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     StudentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + StudentPeer::NUM_COLUMNS;
     StudentCoursePeer::addSelectColumns($c);
     $startcol4 = $startcol3 + StudentCoursePeer::NUM_COLUMNS;
     GradeComponentPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + GradeComponentPeer::NUM_COLUMNS;
     GradeSpecPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + GradeSpecPeer::NUM_COLUMNS;
     CitationPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + CitationPeer::NUM_COLUMNS;
     SubjectCurrPeer::addSelectColumns($c);
     $startcol8 = $startcol7 + SubjectCurrPeer::NUM_COLUMNS;
     ClassGroupPeer::addSelectColumns($c);
     $startcol9 = $startcol8 + ClassGroupPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol10 = $startcol9 + AcademicCalendarPeer::NUM_COLUMNS;
     SchedulePeer::addSelectColumns($c);
     $startcol11 = $startcol10 + SchedulePeer::NUM_COLUMNS;
     $c->addJoin(StudentRaportPeer::STUDENT_ID, StudentPeer::ID);
     $c->addJoin(StudentRaportPeer::STUDENT_COURSE_ID, StudentCoursePeer::ID);
     $c->addJoin(StudentRaportPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
     $c->addJoin(StudentRaportPeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $c->addJoin(StudentRaportPeer::CITATION_ID, CitationPeer::ID);
     $c->addJoin(StudentRaportPeer::SUBJECT_CURR_ID, SubjectCurrPeer::ID);
     $c->addJoin(StudentRaportPeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
     $c->addJoin(StudentRaportPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(StudentRaportPeer::SCHEDULE_ID, SchedulePeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = StudentRaportPeer::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->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initStudentRaports();
             $obj2->addStudentRaport($obj1);
         }
         $omClass = StudentCoursePeer::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->getStudentCourse();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initStudentRaports();
             $obj3->addStudentRaport($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->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initStudentRaports();
             $obj4->addStudentRaport($obj1);
         }
         $omClass = GradeSpecPeer::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->getGradeSpec();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initStudentRaports();
             $obj5->addStudentRaport($obj1);
         }
         $omClass = CitationPeer::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->getCitation();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initStudentRaports();
             $obj6->addStudentRaport($obj1);
         }
         $omClass = SubjectCurrPeer::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->getSubjectCurr();
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj7->initStudentRaports();
             $obj7->addStudentRaport($obj1);
         }
         $omClass = ClassGroupPeer::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->getClassGroup();
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj8->initStudentRaports();
             $obj8->addStudentRaport($obj1);
         }
         $omClass = AcademicCalendarPeer::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->getAcademicCalendar();
             if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj9->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj9->initStudentRaports();
             $obj9->addStudentRaport($obj1);
         }
         $omClass = SchedulePeer::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->getSchedule();
             if ($temp_obj10->getPrimaryKey() === $obj10->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj10->addStudentRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj10->initStudentRaports();
             $obj10->addStudentRaport($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
示例#3
0
<?php

use_helper('Object', 'Validation', 'myHelper');
$citations = array();
foreach (CitationPeer::doSelect(new Criteria()) as $citation) {
    $citations[$citation->getId()] = $citation->toString();
}
?>
	<tr>
		<td class='first'><label><?php 
echo __('Student');
?>
</label></td>
		<td class='first'><label><?php 
echo __('KKM');
?>
</label></td>
		<td class='first'><label><?php 
echo __('Grade');
?>
</label></td>
		<td class='first'><label><?php 
echo __('Remark');
?>
</label></td>
		<td class='first'><label><?php 
echo __('Citation');
?>
</label></td>
	</tr>
	<?php 
示例#4
0
 public function executeDelete()
 {
     $citation = CitationPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($citation);
     $ref_error = 0;
     foreach ($citation->getRefCountMethods() as $ref) {
         $method = "count" . $ref['affix'];
         $count = $citation->{$method}();
         if ($count > 0) {
             ++$ref_error;
             $this->getRequest()->setError('citation/delete/' . sfInflector::camelize($ref['table']), $count);
         }
     }
     if ($ref_error > 0) {
         $this->getRequest()->setError('citation/delete', '_ERR_DELETE_ (' . $citation->toString() . ' - id:' . $citation->getId() . ')');
     } else {
         $citation->delete();
     }
     return $this->forward('citation', 'list');
 }
示例#5
0
 public static function doSelectJoinAllExceptAcademicCalendar(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     VRaportPeer::addSelectColumns($c);
     $startcol2 = VRaportPeer::NUM_COLUMNS - VRaportPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     StudentCoursePeer::addSelectColumns($c);
     $startcol3 = $startcol2 + StudentCoursePeer::NUM_COLUMNS;
     GradeComponentPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + GradeComponentPeer::NUM_COLUMNS;
     GradeSpecPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + GradeSpecPeer::NUM_COLUMNS;
     CitationPeer::addSelectColumns($c);
     $startcol6 = $startcol5 + CitationPeer::NUM_COLUMNS;
     SubjectPeer::addSelectColumns($c);
     $startcol7 = $startcol6 + SubjectPeer::NUM_COLUMNS;
     $c->addJoin(VRaportPeer::STUDENT_COURSE_ID, StudentCoursePeer::ID);
     $c->addJoin(VRaportPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
     $c->addJoin(VRaportPeer::GRADE_SPEC_ID, GradeSpecPeer::ID);
     $c->addJoin(VRaportPeer::CITATION_ID, CitationPeer::ID);
     $c->addJoin(VRaportPeer::SUBJECT_ID, SubjectPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = VRaportPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = StudentCoursePeer::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->getStudentCourse();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addVRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initVRaports();
             $obj2->addVRaport($obj1);
         }
         $omClass = GradeComponentPeer::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->getGradeComponent();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addVRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initVRaports();
             $obj3->addVRaport($obj1);
         }
         $omClass = GradeSpecPeer::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->getGradeSpec();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addVRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initVRaports();
             $obj4->addVRaport($obj1);
         }
         $omClass = CitationPeer::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->getCitation();
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addVRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj5->initVRaports();
             $obj5->addVRaport($obj1);
         }
         $omClass = SubjectPeer::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->getSubject();
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addVRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj6->initVRaports();
             $obj6->addVRaport($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
示例#6
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = CitationPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setCode($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setDescription($arr[$keys[2]]);
     }
 }
 public static function doSelectJoinAllExceptInstance(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     StudentJobHistoryPeer::addSelectColumns($c);
     $startcol2 = StudentJobHistoryPeer::NUM_COLUMNS - StudentJobHistoryPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     StudentPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + StudentPeer::NUM_COLUMNS;
     AcademicCalendarPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + AcademicCalendarPeer::NUM_COLUMNS;
     CitationPeer::addSelectColumns($c);
     $startcol5 = $startcol4 + CitationPeer::NUM_COLUMNS;
     $c->addJoin(StudentJobHistoryPeer::STUDENT_ID, StudentPeer::ID);
     $c->addJoin(StudentJobHistoryPeer::ACADEMIC_CALENDAR_ID, AcademicCalendarPeer::ID);
     $c->addJoin(StudentJobHistoryPeer::CITATION_ID, CitationPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = StudentJobHistoryPeer::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->addStudentJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initStudentJobHistorys();
             $obj2->addStudentJobHistory($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->addStudentJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initStudentJobHistorys();
             $obj3->addStudentJobHistory($obj1);
         }
         $omClass = CitationPeer::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->getCitation();
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addStudentJobHistory($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj4->initStudentJobHistorys();
             $obj4->addStudentJobHistory($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
示例#8
0
 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(CitationPeer::ID, $pks, Criteria::IN);
         $objs = CitationPeer::doSelect($criteria, $con);
     }
     return $objs;
 }