コード例 #1
0
 public function countValidCourseSubjectStudentPathwayMarks()
 {
     $c = new Criteria();
     $c->add(CourseSubjectStudentPathwayPeer::STUDENT_ID, $this->getStudent()->getId());
     $c->add(CourseSubjectStudentPathwayPeer::COURSE_SUBJECT_ID, $this->getCourseSubject()->getId());
     $c->add(CourseSubjectStudentPathwayPeer::MARK, null, Criteria::ISNOTNULL);
     return CourseSubjectStudentPathwayPeer::doCount($c);
 }
コード例 #2
0
 public static function countStudentInscriptionsForCareerSubjectSchoolYear($course_subject_id, $student_id)
 {
     $course_subject = CourseSubjectPeer::retrieveByPk($course_subject_id);
     $c = new Criteria();
     $c->addJoin(CourseSubjectStudentPathwayPeer::COURSE_SUBJECT_ID, CourseSubjectPeer::ID);
     $c->add(CourseSubjectPeer::CAREER_SUBJECT_SCHOOL_YEAR_ID, $course_subject->getCareerSubjectSchoolYearId());
     $c->add(CourseSubjectStudentPathwayPeer::STUDENT_ID, $student_id);
     $c->addAnd(CourseSubjectPeer::ID, $course_subject_id, Criteria::NOT_EQUAL);
     return CourseSubjectStudentPathwayPeer::doCount($c);
 }
コード例 #3
0
ファイル: Course.php プロジェクト: nvidela/kimkelen
 public function CanClosePathway(PropelPDO $con = null)
 {
     if ($this->getIsClosed()) {
         return false;
     }
     if ($this->countPathwayStudents() == 0) {
         return false;
     }
     $c = new Criteria();
     $c->addJoin(CourseSubjectStudentPathwayPeer::COURSE_SUBJECT_ID, CourseSubjectPeer::ID);
     $c->addJoin(CourseSubjectStudentPathwayPeer::STUDENT_ID, StudentPeer::ID);
     $c->addJoin(StudentPeer::PERSON_ID, PersonPeer::ID);
     $c->addJoin(PersonPeer::IS_ACTIVE, true);
     $c->addJoin(CourseSubjectPeer::COURSE_ID, $this->getId());
     $c->add(CourseSubjectStudentPathwayPeer::MARK, null, Criteria::ISNULL);
     return CourseSubjectStudentPathwayPeer::doCount($c) == 0;
 }