本文整理汇总了PHP中GradeSpecPeer::doSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP GradeSpecPeer::doSelect方法的具体用法?PHP GradeSpecPeer::doSelect怎么用?PHP GradeSpecPeer::doSelect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GradeSpecPeer
的用法示例。
在下文中一共展示了GradeSpecPeer::doSelect方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeUploadFinish
public function executeUploadFinish()
{
$employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
$employee = EmployeePeer::retrieveByPK($employee_id);
$this->forward404Unless($employee);
$this->employee_id = $employee_id;
$this->employee = $employee;
$course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
$this->forward404Unless($course_schedule);
$course_schedule_id = $course_schedule->getId();
$actions = array();
$this->actions = $actions;
$this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - (' . $course_schedule->getClassGroup()->toString() . ' # ' . $course_schedule->getAcademicCalendar()->getName() . ')';
$this->type = 'edit';
$this->course_schedule = $course_schedule;
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 1);
$cr->addAscendingOrderByColumn(GradeSpecPeer::ID);
$this->grade1 = GradeSpecPeer::doSelect($cr);
$this->count1 = GradeSpecPeer::doCount($cr);
$cw = new Criteria();
$cw->add(GradeSpecPeer::PARENT, 7);
$cw->addAscendingOrderByColumn(GradeSpecPeer::ID);
$this->grade2 = GradeSpecPeer::doSelect($cw);
$this->count2 = GradeSpecPeer::doCount($cw);
$cm = new Criteria();
$cm->addJoin(StudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
$cm->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$cm->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$c = new Criteria();
$c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$c->addJoin(VStudentActivePeer::ID, StudentAccalPeer::STUDENT_ID);
$c->addJoin(StudentPeer::ID, VStudentActivePeer::ID);
$c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
$rpp = $this->getRequestParameter('max_per_page', $this->getUser()->getAttribute('max_per_page', ParamsPeer::retrieveByCode('row_per_page')->getValue(), 'student'));
$this->getUser()->setAttribute('max_per_page', $rpp, 'student');
$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;
$this->student_count = StudentAccalPeer::doCount($cm);
}
示例2: executeGetChild
public function executeGetChild()
{
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$ct = new Criteria();
$ct->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($ct);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$id = $this->getRequestParameter('id');
$grade_spec = GradeSpecPeer::retrieveByPK($id);
$level = $this->getRequestParameter('level');
if ($level == null) {
$level = 0;
}
$c = new Criteria();
$c->add(GradeSpecPeer::PARENT, $grade_spec->getId());
$this->sort($c);
$this->rows = GradeSpecPeer::doSelect($c);
$this->level = $level + 1;
$this->parent_id = $id;
$this->parent_class = $this->getRequestParameter('parent_class');
}
示例3: executePrintMiddle
public function executePrintMiddle()
{
$counseling_id = $this->getRequestParameter('counseling_id');
$counseling = CounselingPeer::retrieveByPK($counseling_id);
$this->forward404Unless($counseling);
$academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id'));
$this->forward404Unless($academic_calendar);
$time = $this->getRequestParameter('time');
$time2 = $this->getRequestParameter('time2');
$tgl = $this->getRequestParameter('tgl_cetak');
$c = new Criteria();
$c->add(TempTablePeer::COUNSELING_ID, $counseling->getId());
$c->add(TempTablePeer::TIME, $time);
$c->addJoin(VStudentActivePeer::ID, TempTablePeer::STUDENT_ID);
$c->addAscendingOrderByColumn(VStudentActivePeer::CLASS_NAME);
$students = VStudentActivePeer::doSelect($c);
$this->forward404Unless($students);
$co = new Criteria();
$co->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$co->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$cton1 = $co->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
$cton2 = $co->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 333, Criteria::NOT_IN);
$cton1->addAnd($cton2);
$co->add($cton1);
$co->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects = VCoursePeer::doSelect($co);
$subject_count = VCoursePeer::doCount($co);
$this->subject_count = $subject_count;
$cw = new Criteria();
$cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 350, Criteria::IN);
$cton2 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 351, Criteria::IN);
$cton3 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 346, Criteria::IN);
$cton4 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 339, Criteria::IN);
$cton5 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 340, Criteria::IN);
$cton6 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 337, Criteria::IN);
$cton5->addOr($cton6);
$cton4->addOr($cton5);
$cton3->addOr($cton4);
$cton2->addOr($cton3);
$cton1->addOr($cton2);
$cw->add($cton1);
$cw->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects1 = VCoursePeer::doSelect($cw);
$subject_count1 = VCoursePeer::doCount($cw);
$this->subject_count1 = $subject_count1;
$cm = new Criteria();
$cm->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cm->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 353, Criteria::IN);
$cton2 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 354, Criteria::IN);
$cton1->addOr($cton2);
$cm->add($cton1);
$cm->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->ipas = VCoursePeer::doSelect($cm);
$ipa_count = VCoursePeer::doCount($cm);
$this->ipa_count = $ipa_count;
$cl = new Criteria();
$cl->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cl->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cl->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 343, Criteria::IN);
$cton2 = $cl->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 338, Criteria::IN);
$cton3 = $cl->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 347, Criteria::IN);
$cton2->addOr($cton3);
$cton1->addOr($cton2);
$cl->add($cton1);
$cl->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->ips = VCoursePeer::doSelect($cl);
$ips_count = VCoursePeer::doCount($cl);
$this->ips_count = $ips_count;
$cd = new Criteria();
$cd->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cd->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 352, Criteria::IN);
$cton2 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 349, Criteria::IN);
$cton3 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 348, Criteria::IN);
$cton4 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 341, Criteria::IN);
$cton5 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 355, Criteria::IN);
$cton4->addOr($cton5);
$cton3->addOr($cton4);
$cton2->addOr($cton3);
$cton1->addOr($cton2);
$cd->add($cton1);
$cd->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects2 = VCoursePeer::doSelect($cd);
$subject_count2 = VCoursePeer::doCount($cd);
$this->subject_count2 = $subject_count2;
$cb = new Criteria();
$cb->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cb->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cb->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
$cb->add(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
$cb->add(VCoursePeer::SUBJECT_CURR_ID, 333, Criteria::NOT_IN);
$cb->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects7 = VCoursePeer::doSelect($cb);
$subject_count7 = VCoursePeer::doCount($cb);
$this->subject_count7 = $subject_count7;
$crit = new Criteria();
$crit->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
//.........这里部分代码省略.........
示例4: executeListHistoryScore
public function executeListHistoryScore()
{
$student_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
$student = StudentPeer::retrieveByPK($student_id);
$this->forward404Unless($student);
$course_schedule = CourseSchedulePeer::retrieveByPk($this->getRequestParameter('course_id'));
$this->forward404Unless($course_schedule);
$course_schedule_id = $course_schedule->getId();
$c = new Criteria();
$c->addJoin(StudentAccalPeer::STUDENT_ID, VStudentActivePeer::ID);
$c->add(StudentAccalPeer::STUDENT_ID, $student->getId());
$c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$c->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$student_accal = StudentAccalPeer::doSelectOne($c);
$this->forward404Unless($student_accal);
$this->student_accal = $student_accal;
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 1);
$this->grade1 = GradeSpecPeer::doSelect($cr);
$this->count1 = GradeSpecPeer::doCount($cr);
$crew = new Criteria();
$crew->add(GradeSpecPeer::PARENT, 7);
$this->grade2 = GradeSpecPeer::doSelect($crew);
$this->count2 = GradeSpecPeer::doCount($crew);
$actions = array();
$this->actions = $actions;
$this->subtitle = $course_schedule->getSubjectCurr()->getSubject()->getName() . ' - ' . $course_schedule->getClassGroup()->toString();
$this->type = 'list';
$this->course_schedule = $course_schedule;
$this->course_schedule_id = $course_schedule_id;
$this->student = $student;
$actions2 = array(array('name' => '<span>' . $course_schedule->getAcademicCalendar()->getName() . '</span>', 'url' => 'student_agenda/listHistory', 'color' => 'sun'));
array_push($actions2, array('name' => '<span>Agenda Kelas</span>', 'url' => 'student_agenda/listHistoryAgenda?course_id=' . $course_schedule->getId(), 'color' => 'sun'));
array_push($actions2, array('name' => '<span>Absensi</span>', 'url' => 'student_agenda/listHistoryAbsence?course_id=' . $course_schedule->getId(), 'color' => 'sun'));
array_push($actions2, array('name' => '<span>Jadwal Tugas/Ulangan/PR</span>', 'url' => 'student_agenda/listHistoryTest?course_id=' . $course_schedule->getId(), 'color' => 'sun'));
array_push($actions2, array('name' => '<span>Penilaian</span>', 'url' => 'student_agenda/listHistoryScore?course_id=' . $course_schedule->getId(), 'color' => 'sun', 'type' => 'direct'));
$this->actions2 = $actions2;
}
示例5: executeEditObject
public function executeEditObject()
{
$rule_id = $this->getRequestParameter('rule_id');
$score_rule = ScoreRulePeer::retrieveByPK($rule_id);
$this->forward404Unless($score_rule);
$actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
array_push($actions, array('name' => 'cancel', 'url' => 'score_rule_new/listSubject?rule_id=' . $score_rule->getId(), 'color' => 'white'));
$c = new Criteria();
$c->add(GradeSpecPeer::TYPE_SPEC, GradeSpec::OTHERS, Criteria::NOT_EQUAL);
$grade_specs = GradeSpecPeer::doSelect($c);
$this->grade_specs = $grade_specs;
$subtitle = $score_rule->toName();
$this->subtitle = $subtitle;
$this->actions = $actions;
$this->type = 'add';
$this->score_rule = $score_rule;
$actions2 = array(array('name' => '<span>Aturan Penilaian</span>', 'url' => 'score_rule_new/list', 'color' => 'sun'));
array_push($actions2, array('name' => '<span>Daftar Mata Pelajaran</span>', 'url' => 'score_rule_new/listSubject?rule_id=' . $score_rule->getId(), 'color' => 'sun'));
array_push($actions2, array('name' => '<span>Daftar Kategori Penilaian</span>', 'url' => 'score_rule_new/listObject?rule_id=' . $score_rule->getId(), 'color' => 'sky', 'type' => 'direct'));
$this->actions2 = $actions2;
}
示例6: __
echo __('Description');
?>
</th>
<th><?php
echo __('Tipe Penilaian');
?>
</th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
foreach ($rows as $row) {
$ct = new Criteria();
$ct->add(GradeSpecPeer::PARENT, $row->getId());
$row_childs = GradeSpecPeer::doSelect($ct);
?>
<tr class="list<?php
++$i;
if ($i % 2 == 0) {
echo ' even';
}
?>
">
<td style="text-align: center;"><?php
echo $i;
?>
</td>
<td class='first'><?php
echo link_to_function(strlen($row->getCode()) > 0 ? $row->getCode() : 'n/a', visual_effect('toggle_appear', 'row_' . $row->getId(), array('onclick' => 'this.blur()')));
?>
示例7: foreach
echo $i + ($pager->getPage() - 1) * $pager->getMaxPerPage();
?>
</td>
<td style="font-size: 10px; font-weight: normal;" align="left"><?php
echo $student->getStudent() ? $student->getStudent()->getName() : '-';
?>
</td>
<?php
$k = 0;
foreach ($grade as $g1) {
?>
<?php
$cin = new Criteria();
$cin->add(GradeSpecPeer::PARENT, $g1->getId());
$cin->addAscendingOrderByColumn(GradeSpecPeer::ID);
$specs = GradeSpecPeer::doSelect($cin);
foreach ($specs as $spec) {
?>
<td align="center" style="text-align:center; font-size: 10px; <?php
if ($course_reg) {
if (array_key_exists($student->getId() . '#' . $spec->getId(), $grades)) {
if ($grades[$student->getId() . '#' . $spec->getId()] < $course_reg->getKkm()) {
echo 'color: red;';
}
}
}
?>
" class="score<?php
++$k;
if ($k % 2 == 0) {
echo '_tab';
示例8: doSelectAfective
public static function doSelectAfective(Criteria $criteria, $con = null)
{
$criteria->add(GradeSpecPeer::TYPE_SPEC, 4, Criteria::IN);
$tmp_depts = GradeSpecPeer::doSelect($criteria);
$depts = array();
foreach ($tmp_depts as $key => $val) {
$pi = $val->getParentalIndex();
$prefix = '';
for ($i = 0; $i < $val->level - 1; $i++) {
$prefix .= ParamsPeer::retrieveByCode('tree_node_mark')->getValue();
}
$val->setCode($prefix . $val->getCode());
$val->setDescription($prefix . $val->getDescription());
$depts[$pi] = $val;
}
ksort($depts);
$result = array();
foreach ($depts as $r) {
$result[] = $r;
}
return $result;
}
示例9: retrieveByPKs
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(GradeSpecPeer::ID, $pks, Criteria::IN);
$objs = GradeSpecPeer::doSelect($criteria, $con);
}
return $objs;
}
示例10: executeListMiddle
public function executeListMiddle()
{
$employee_id = sfContext::getInstance()->getUser()->getAttribute('user_id', null, 'bo');
$employee = EmployeePeer::retrieveByPK($employee_id);
$this->forward404Unless($employee);
$counseling_id = $this->getRequestParameter('counseling_id');
$counseling = CounselingPeer::retrieveByPK($counseling_id);
$this->forward404Unless($counseling);
$accal_id = $this->getRequestParameter('accal_id');
$academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
$this->forward404Unless($academic_calendar);
$student_id = $this->getRequestParameter('student_id');
$student = StudentPeer::retrieveByPK($this->getRequestParameter('student_id'));
$this->forward404Unless($student);
if ($employee->getDepartmentId() == 3) {
$c = new Criteria();
$c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId());
$c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$c->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects = VCoursePeer::doSelect($c);
$subject_count = VCoursePeer::doCount($c);
$this->subject_count = $subject_count;
$c = new Criteria();
$c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
$c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$c->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
$c->add(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
$c->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects7 = VCoursePeer::doSelect($c);
$subject_count7 = VCoursePeer::doCount($c);
$this->subject_count7 = $subject_count7;
} else {
$c = new Criteria();
$c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
$c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$c->add(VCoursePeer::SUBJECT_CURR_ID, 316, Criteria::NOT_IN);
$c->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects = VCoursePeer::doSelect($c);
$subject_count = VCoursePeer::doCount($c);
$this->subject_count = $subject_count;
$c = new Criteria();
$c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId(), Criteria::IN);
$c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$c->add(VCoursePeer::SUBJECT_GROUP_ID, 7, Criteria::IN);
$c->add(VCoursePeer::SUBJECT_CURR_ID, 316, Criteria::NOT_IN);
$c->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects7 = VCoursePeer::doSelect($c);
$subject_count7 = VCoursePeer::doCount($c);
$this->subject_count7 = $subject_count7;
}
$c = new Criteria();
$c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId());
$c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$c->add(VCoursePeer::SUBJECT_GROUP_ID, 8);
$c->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->subjects8 = VCoursePeer::doSelect($c);
$subject_count8 = VCoursePeer::doCount($c);
$this->subject_count8 = $subject_count8;
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 1);
$this->grade1 = GradeSpecPeer::doSelect($cr);
$this->count1 = GradeSpecPeer::doCount($cr);
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 7);
$this->grade2 = GradeSpecPeer::doSelect($cr);
$this->count2 = GradeSpecPeer::doCount($cr);
$cw = new Criteria();
$cton1 = $cw->getNewCriterion(GradeSpecPeer::PARENT, 1, Criteria::IN);
$cton2 = $cw->getNewCriterion(GradeSpecPeer::ID, 19, Criteria::NOT_IN);
$cton3 = $cw->getNewCriterion(GradeSpecPeer::ID, 25, Criteria::NOT_IN);
$cton2->addAnd($cton3);
$cton1->addAnd($cton2);
$cw->add($cton1);
$this->gradeSD1 = GradeSpecPeer::doSelect($cw);
$this->countSD1 = GradeSpecPeer::doCount($cw);
$cw = new Criteria();
$cton1 = $cw->getNewCriterion(GradeSpecPeer::PARENT, 7, Criteria::IN);
$cton2 = $cw->getNewCriterion(GradeSpecPeer::ID, 18, Criteria::NOT_IN);
$cton3 = $cw->getNewCriterion(GradeSpecPeer::ID, 26, Criteria::NOT_IN);
$cton2->addAnd($cton3);
$cton1->addAnd($cton2);
$cw->add($cton1);
$this->gradeSD2 = GradeSpecPeer::doSelect($cw);
$this->countSD2 = GradeSpecPeer::doCount($cw);
$crit = new Criteria();
$crit->add(GradeSpecPeer::PARENT, 1);
$cton1 = $crit->getNewCriterion(GradeSpecPeer::ID, 53, Criteria::NOT_IN);
$cton2 = $crit->getNewCriterion(GradeSpecPeer::ID, 54, Criteria::NOT_IN);
$cton1->addAnd($cton2);
$crit->add($cton1);
$this->gradePdf1 = GradeSpecPeer::doSelect($crit);
$this->countPdf1 = GradeSpecPeer::doCount($crit);
$crew = new Criteria();
$crew->add(GradeSpecPeer::PARENT, 7);
$cton1 = $crew->getNewCriterion(GradeSpecPeer::ID, 55, Criteria::NOT_IN);
$cton2 = $crew->getNewCriterion(GradeSpecPeer::ID, 56, Criteria::NOT_IN);
$cton1->addAnd($cton2);
$crew->add($cton1);
$this->gradePdf2 = GradeSpecPeer::doSelect($crew);
$this->countPdf2 = GradeSpecPeer::doCount($crew);
//.........这里部分代码省略.........
示例11: executeEditFromScore
public function executeEditFromScore()
{
$student_id = $this->getRequestParameter('student_id');
$student = StudentPeer::retrieveByPK($student_id);
$this->forward404Unless($student);
$this->student = $student;
$group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo');
$c = new Criteria();
$c->add(JobPeer::CODE, $this->getModuleName());
$job = JobPeer::doSelectOne($c);
$acl = AclPeer::retrieveByPK($group_id, $job->getId());
if (!$acl) {
$this->forward('default', 'error404');
}
$this->can_add = $acl->getAddPriv() == 1;
$this->can_edit = $acl->getEditPriv() == 1;
$this->can_remove = $acl->getRemovePriv() == 1;
$c = new Criteria();
$c->add(VCoursePeer::CLASS_GROUP_ID, $student->getClassGroupId());
$c->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $student->getAcademicCalendarId());
$c->addAscendingOrderByColumn(VCoursePeer::SUBJECT_CURR_ID);
$this->subjects = VCoursePeer::doSelect($c);
$this->subject_count = VCoursePeer::doCount($c);
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 1);
$this->grade1 = GradeSpecPeer::doSelect($cr);
$this->count1 = GradeSpecPeer::doCount($cr);
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 7);
$this->grade2 = GradeSpecPeer::doSelect($cr);
$this->count2 = GradeSpecPeer::doCount($cr);
$rpp = $this->getRequestParameter('max_per_page', 999);
$pager = new sfPropelPager('VCourse', $rpp);
$pager->setCriteria($c);
$pager->setPage($this->getRequestParameter('page', 1));
$pager->init();
$this->pager = $pager;
}
示例12: executePrintExam
public function executePrintExam()
{
$counseling_id = $this->getRequestParameter('counseling_id');
$counseling = CounselingPeer::retrieveByPK($counseling_id);
$this->forward404Unless($counseling);
$academic_calendar = AcademicCalendarPeer::retrieveByPK($this->getRequestParameter('accal_id'));
$this->forward404Unless($academic_calendar);
$time = $this->getRequestParameter('time');
$time2 = $this->getRequestParameter('time2');
$tgl = $this->getRequestParameter('tgl_cetak');
$test1 = $this->getRequestParameter('test1');
$test2 = $this->getRequestParameter('test2');
$task1 = $this->getRequestParameter('task1');
$task2 = $this->getRequestParameter('task2');
$note = $this->getRequestParameter('note');
$c = new Criteria();
$c->add(TempTablePeer::COUNSELING_ID, $counseling->getId());
$c->add(TempTablePeer::TIME, $time);
$c->addJoin(VStudentActivePeer::ID, TempTablePeer::STUDENT_ID);
$c->addAscendingOrderByColumn(VStudentActivePeer::CLASS_NAME);
$students = VStudentActivePeer::doSelect($c);
$this->forward404Unless($students);
## Menentukan Aturan Penilaian (Tengah Semester)
$cd = new Criteria();
$cd->add(ScoreRulePeer::ACADEMIC_CALENDAR_ID, $counseling->getAcademicCalendarId());
$cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
$cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
$cd->add(ScoreRulePeer::TYPE, ScoreRule::TYPE_ONE);
$score_rule = ScoreRulePeer::doSelectOne($cd);
$this->score_rule = $score_rule;
## Daftar Mata Pelajaran di Jadwal Pelajaran
$cw = new Criteria();
$cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$subjects = VCoursePeer::doSelect($cw);
$subject_ids = array();
foreach ($subjects as $subject) {
$subject_ids[] = $subject->getSubjectCurrId();
}
$this->subjects = $subjects;
## Menentukan Aturan Penilaian Yang digunakan
$cm = new Criteria();
$cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::PUBLISHED, ScoreRule::ONE, Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::PUBLISHED, ScoreRule::ONE, Criteria::IN);
$cm->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$list_subs = ScoreRuleSubjectPeer::doSelect($cm);
$subject_count = ScoreRuleSubjectPeer::doCount($cm);
$this->list_subs = $list_subs;
$this->subject_count = $subject_count;
$grades_ids = array();
$t1 = $test1 - 1;
$t2 = $test2 - 1;
while ($t1 <= $t2) {
$t1++;
$grades_ids[] = $t1;
}
$cmen = new Criteria();
$cmen->add(GradeAliasPeer::ID, $grades_ids, Criteria::IN);
$cmen->addJoin(GradeSpecPeer::ID, GradeAliasPeer::GRADE_SPEC_ID);
$cmen->addAscendingOrderByColumn(GradeSpecPeer::ID);
$this->grade_pdf1 = GradeSpecPeer::doSelect($cmen);
$this->count_pdf1 = GradeSpecPeer::doCount($cmen);
$ids = array();
$tsk1 = $task1 - 1;
$tsk2 = $task2 - 1;
while ($tsk1 <= $tsk2) {
$tsk1++;
$ids[] = $tsk1;
}
$cmet = new Criteria();
$cmet->add(GradeAliasPeer::ID, $ids, Criteria::IN);
$cmet->addJoin(GradeSpecPeer::ID, GradeAliasPeer::GRADE_SPEC_ID);
$cmet->addAscendingOrderByColumn(GradeSpecPeer::ID);
$this->grade_pdf2 = GradeSpecPeer::doSelect($cmet);
$this->count_pdf2 = GradeSpecPeer::doCount($cmet);
$ce = new Criteria();
$ce->add(DepartmentDetailPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
$this->department_detail = DepartmentDetailPeer::doSelectOne($ce);
$cr = new Criteria();
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$student_raports = StudentRaportPeer::doSelect($cr);
$subject_grade_spec = array();
foreach ($student_raports as $student_raport) {
$subject_grade_spec[$student_raport->getSubjectCurrId() . '#' . $student_raport->getGradeSpecId() . '#' . $student_raport->getStudentId()] = $student_raport;
}
$this->subject_grade_spec = $subject_grade_spec;
$cw = new Criteria();
$cw->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$cw->add(CourseRegulationPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$c_regulations = CourseRegulationPeer::doSelect($cw);
$course_reg = array();
foreach ($c_regulations as $cr) {
$course_reg[$cr->getAcademicCalendarId() . '#' . $cr->getSubjectCurrId() . '#' . $cr->getClassGroupId()] = $cr->getKkm();
}
$this->course_reg = $course_reg;
$cb = new Criteria();
$cb->add(StudentAbsencePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
//.........这里部分代码省略.........
示例13: executeUploadStudent
public function executeUploadStudent()
{
include sfConfig::get('sf_lib_dir') . '/helper/readerHelper.php';
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 1);
$cr->addAscendingOrderByColumn(GradeSpecPeer::ID);
$this->grade = GradeSpecPeer::doSelect($cr);
$this->count = GradeSpecPeer::doCount($cr);
if (!empty($_FILES['score_file']['tmp_name'])) {
$file = $_FILES['score_file']['tmp_name'];
$data = new Spreadsheet_Excel_Reader($file);
$baris = $data->rowcount($sheet_index = 0);
$this->baris = $baris;
$this->data = $data;
$fileName = $this->getRequest()->getFileName('score_file');
if ($fileName != null && $fileName != '') {
if (!is_readable($_FILES['score_file']['tmp_name'])) {
$this->error = true;
$this->error_msg = 'File Tidak Terbaca';
} else {
if (substr($fileName, -3) == 'xls') {
$this->error = false;
$this->uploaded = true;
} else {
$this->error = true;
$this->error_msg = 'Format Yang Anda Upload Salah';
}
}
}
}
$this->actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value")));
$this->subtitle = '';
}
示例14: getGradeSpecsRelatedByParent
public function getGradeSpecsRelatedByParent($criteria = null, $con = null)
{
include_once 'lib/model/om/BaseGradeSpecPeer.php';
if ($criteria === null) {
$criteria = new Criteria();
} elseif ($criteria instanceof Criteria) {
$criteria = clone $criteria;
}
if ($this->collGradeSpecsRelatedByParent === null) {
if ($this->isNew()) {
$this->collGradeSpecsRelatedByParent = array();
} else {
$criteria->add(GradeSpecPeer::PARENT, $this->getId());
GradeSpecPeer::addSelectColumns($criteria);
$this->collGradeSpecsRelatedByParent = GradeSpecPeer::doSelect($criteria, $con);
}
} else {
if (!$this->isNew()) {
$criteria->add(GradeSpecPeer::PARENT, $this->getId());
GradeSpecPeer::addSelectColumns($criteria);
if (!isset($this->lastGradeSpecRelatedByParentCriteria) || !$this->lastGradeSpecRelatedByParentCriteria->equals($criteria)) {
$this->collGradeSpecsRelatedByParent = GradeSpecPeer::doSelect($criteria, $con);
}
}
}
$this->lastGradeSpecRelatedByParentCriteria = $criteria;
return $this->collGradeSpecsRelatedByParent;
}
示例15: executeListFullTryout
public function executeListFullTryout()
{
$counseling = CounselingPeer::retrieveByPk($this->getRequestParameter('counseling_id'));
$this->forward404Unless($counseling);
$academic_calendar = AcademicCalendarPeer::retrieveByPk($this->getRequestParameter('accal_id'));
$this->forward404Unless($academic_calendar);
$c = new Criteria();
$c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$c->add(StudentAccalPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$c->addJoin(StudentPeer::ID, StudentAccalPeer::STUDENT_ID);
$c->add(StudentPeer::STATUS, 2, Criteria::NOT_EQUAL);
$c->add(StudentPeer::STATUS, 3, Criteria::NOT_EQUAL);
$c->addAscendingOrderByColumn(StudentPeer::CLASS_NAME);
$this->students = StudentPeer::doSelect($c);
$this->student_count = StudentPeer::doCount($c);
$rpp = $this->getRequestParameter('max_per_page', 999);
$pager = new sfPropelPager('Student', $rpp);
$pager->setCriteria($c);
$pager->setPage($this->getRequestParameter('page', 1));
$pager->init();
$this->pager = $pager;
$grade_id = $this->getRequestParameter('grade_id');
$this->grade_id = $grade_id;
$cr = new Criteria();
$cr->add(GradeSpecPeer::PARENT, 45, Criteria::IN);
$grade1 = GradeSpecPeer::doSelect($cr);
$count1 = GradeSpecPeer::doCount($cr);
$this->grade1 = $grade1;
$this->count1 = $count1;
$grade_current = GradeSpecPeer::retrieveByPk($grade_id);
$this->counseling = $counseling;
$this->academic_calendar = $academic_calendar;
$this->subtitle = $grade_current->getCode() . ' # ' . $counseling->getClassGroup()->getName() . ' - ' . $academic_calendar->toString();
#SMP
if ($academic_calendar->getDepartmentId() == 2) {
$cw = new Criteria();
$cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 350, Criteria::IN);
$cton2 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 351, Criteria::IN);
$cton3 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 346, Criteria::IN);
$cton4 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 339, Criteria::IN);
$cton5 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 340, Criteria::IN);
$cton6 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 337, Criteria::IN);
$cton5->addOr($cton6);
$cton4->addOr($cton5);
$cton3->addOr($cton4);
$cton2->addOr($cton3);
$cton1->addOr($cton2);
$cw->add($cton1);
$cw->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->smp_subjects = VCoursePeer::doSelect($cw);
$this->smp_count = VCoursePeer::doCount($cw);
$cd = new Criteria();
$cd->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cd->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 352, Criteria::IN);
$cton2 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 349, Criteria::IN);
$cton3 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 348, Criteria::IN);
$cton4 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 341, Criteria::IN);
$cton5 = $cd->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 355, Criteria::IN);
$cton4->addOr($cton5);
$cton3->addOr($cton4);
$cton2->addOr($cton3);
$cton1->addOr($cton2);
$cd->add($cton1);
$cd->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->smp_subjects2 = VCoursePeer::doSelect($cd);
$this->smp_count2 = VCoursePeer::doCount($cd);
$cm = new Criteria();
$cm->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cm->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cton1 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 353, Criteria::IN);
$cton2 = $cm->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 354, Criteria::IN);
$cton1->addOr($cton2);
$cm->add($cton1);
$cm->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->ipas = VCoursePeer::doSelect($cm);
$this->ipa_count = VCoursePeer::doCount($cm);
$cl = new Criteria();
$cl->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId(), Criteria::IN);
$cl->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId(), Criteria::IN);
$cl->add(VCoursePeer::SUBJECT_CURR_ID, 371, Criteria::IN);
$cl->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->ips = VCoursePeer::doSelect($cl);
$this->ips_count = VCoursePeer::doCount($cl);
#SD
} else {
if ($counseling->getClassGroup()->getParent() == 54) {
$cw = new Criteria();
$cw->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cw->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$cton1 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 319, Criteria::NOT_IN);
$cton2 = $cw->getNewCriterion(VCoursePeer::SUBJECT_CURR_ID, 332, Criteria::NOT_IN);
$cton1->addAnd($cton2);
$cw->add($cton1);
$cw->addAscendingOrderByColumn(VCoursePeer::CODE);
$this->sd_subjects = VCoursePeer::doSelect($cw);
$this->sd_count = VCoursePeer::doCount($cw);
} else {
//.........这里部分代码省略.........