Esempio n. 1
0
 public static function getGrade($value = 0)
 {
     $c = new Criteria();
     $c->addAscendingOrderByColumn(GraduationGradingPeer::MIN_VALUE);
     $ggs = GraduationGradingPeer::doSelect($c);
     $grade = '';
     foreach ($ggs as $gg) {
         if ($value >= $gg->getMinValue() && $value <= $gg->getMaxValue()) {
             $grade = $gg->getName();
             break;
         }
     }
     return $grade;
 }
Esempio n. 2
0
	</td></tr>
	<tr><td colspan="2"><br><br></td></tr>
	<tr><td colspan="2">
		<?php 
$sc = $stu->getStudentCourses();
$sc0 = $sc[0];
?>
		Telah menyelesaikan program studinya dengan menempuh jalur skripsi dan jumlah sks: <b><?php 
echo $sc0->getTotalCreditClosed() . ' ' . __('Credit');
?>
</b><br>
		IPK: <b><?php 
echo $sc0->getPerformanceIndex();
?>
</b> serta predikat kelulusan: <b><?php 
echo GraduationGradingPeer::getGrade($sc0->getPerformanceIndex());
?>
</b><br><br>
		Surat keterangan yudisium ini dikeluarkan pada tanggal <?php 
echo date('d-m-Y');
?>
, dan diberikan kepada<br>
		yang bersangkutan sebagai dasar pembuatan ijasah.
	</td></tr>
	<tr><td colspan="2" style="padding-left: 20px;"><br><br><br><?php 
echo date('d-m-Y') . "<br>" . ParamsPeer::retrieveByCode('univ_name')->getValue();
?>
</td></tr>
	<tr>
		<td style="padding-left: 20px;"><br><br><br><br><?php 
echo "Dekan";
Esempio n. 3
0
 public function executeDelete()
 {
     $graduation_grading = GraduationGradingPeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($graduation_grading);
     $ref_error = 0;
     foreach ($graduation_grading->getRefCountMethods() as $ref) {
         $method = "count" . $ref['affix'];
         $count = $graduation_grading->{$method}();
         if ($count > 0) {
             ++$ref_error;
             $this->getRequest()->setError('graduation_grading/delete/' . sfInflector::camelize($ref['table']), $count);
         }
     }
     if ($ref_error > 0) {
         $this->getRequest()->setError('graduation_grading/delete', '_ERR_DELETE_ (' . $graduation_grading->toString() . ' - id:' . $graduation_grading->getId() . ')');
     } else {
         $graduation_grading->delete();
     }
     return $this->forward('graduation_grading', 'list');
 }
Esempio n. 4
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = GraduationGradingPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setName($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setMinValue($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setMaxValue($arr[$keys[3]]);
     }
 }
 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(GraduationGradingPeer::ID, $pks, Criteria::IN);
         $objs = GraduationGradingPeer::doSelect($criteria, $con);
     }
     return $objs;
 }