Example #1
0
 public function countSubjectAccals($criteria = null, $distinct = false, $con = null)
 {
     include_once 'lib/model/om/BaseSubjectAccalPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     $criteria->add(SubjectAccalPeer::EMPLOYEE_ID, $this->getId());
     return SubjectAccalPeer::doCount($criteria, $distinct, $con);
 }
Example #2
0
        echo $subject->getSubjectGroup() ? link_to_remote($subject->getSubjectGroup()->toString(), array('url' => 'subject_group/showFromSubject?id=' . $subject->getSubjectGroupId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), array('class' => 'white')) : '-';
        ?>
                        </td>
						<td>
						<?php 
        echo $subject->getDepartment() ? $subject->getDepartment()->toString() : '-';
        ?>
						<?php 
        #echo $subject->getDepartment()? link_to_remote($subject->getDepartment()->toString(), array('url'=>'department/show?id='.$subject->getDepartmentId(), 'update'=>'content', 'script'=>'true', 'before'=>"this.blur();showIndicator('content', 'snakebig_black');",'complete'=>"hideIndicator()"), array('class'=>'white')) : '-'
        ?>
                        </td>
                        <?php 
        $c = new Criteria();
        $c->add(SubjectAccalPeer::SUBJECT_ID, $subject->getId());
        $subject_curr = SubjectAccalPeer::doSelectOne($c);
        $subject_count = SubjectAccalPeer::doCount($c);
        ?>
                        <td>
                        <?php 
        if ($subject_count > 0) {
            echo $subject_curr->getAcademicCalendar() ? $subject_curr->getAcademicCalendar()->getYear() : '-';
        } else {
            echo '-';
        }
        ?>
                        </td>
                        <td>
                        <?php 
        if ($subject_count > 0) {
            echo $subject_curr->getEmployeeId() ? $subject_curr->getEmployee()->getName() : '-';
        } else {