本文整理汇总了PHP中StudentRaportPeer类的典型用法代码示例。如果您正苦于以下问题:PHP StudentRaportPeer类的具体用法?PHP StudentRaportPeer怎么用?PHP StudentRaportPeer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了StudentRaportPeer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: executeDelete
public function executeDelete()
{
$subject_curr_id = $this->getRequestParameter('subject_curr_id');
$subject_curr = SubjectCurrPeer::retrieveByPK($subject_curr_id);
$this->forward404Unless($subject_curr);
$this->subject_curr = $subject_curr;
$subject_grading = SubjectGradingPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($subject_grading);
$ref_error = 0;
foreach ($subject_grading->getRefCountMethods() as $ref) {
$method = "count" . $ref['affix'];
$count = $subject_grading->{$method}();
if ($count > 0) {
++$ref_error;
$this->getRequest()->setError('subject_grading/delete/' . sfInflector::camelize($ref['table']), $count);
}
}
$c = new Criteria();
$c->add(StudentCoursePeer::SUBJECT_CURR_ID, $subject_grading->getSubjectCurrId());
$c->add(StudentCoursePeer::GRADE_COMPONENT_ID, $subject_grading->getGradeComponentId());
$c->addJoin(StudentRaportPeer::STUDENT_COURSE_ID, StudentCoursePeer::ID);
$score_count = StudentRaportPeer::doCount($c);
if ($ref_error > 0) {
$this->getRequest()->setError('subject_grading/delete', '_ERR_DELETE_ (' . $subject_grading->toString() . ' - id:' . $subject_grading->getId() . ')');
} elseif ($score_count > 0) {
$this->getRequest()->setError('subject_grading/delete/StudentScore', $score_count);
$this->getRequest()->setError('subject_grading/delete', '_ERR_DELETE_ (' . $subject_grading->toString() . ' - id:' . $subject_grading->getId() . ')');
} else {
$subject_grading->delete();
}
$this->getRequest()->setParameter('subject_curr_id', $subject_curr_id);
return $this->forward('subject_grading', 'list');
}
开发者ID:taryono,项目名称:school,代码行数:33,代码来源:actions.class.php
示例2: Criteria
$cr = new Criteria();
$cr->add(StudentRaportPeer::STUDENT_COURSE_ID, $student_course->getId());
$cr->add(StudentRaportPeer::GRADE_SPEC_ID, 15);
$sr4 = StudentRaportPeer::doSelectOne($cr);
?>
<td align="center" style="text-align:center" class="first">
<?php
echo $sr4 != null ? $sr4->getGrade() : '-';
?>
</td>
<?php
$cr = new Criteria();
$cr->add(StudentRaportPeer::STUDENT_COURSE_ID, $student_course->getId());
$cr->add(StudentRaportPeer::GRADE_SPEC_ID, 16);
$sr5 = StudentRaportPeer::doSelectOne($cr);
?>
<td align="center" style="text-align:center" class="first">
<?php
echo $sr5 != null ? $sr5->getGrade() : '-';
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listFromScoreSuccess.php
示例3: executeGetScore
public function executeGetScore()
{
$academic_calendar_id = $this->getRequestParameter('academic_calendar_id');
$academic_calendar = AcademicCalendarPeer::retrieveByPK($academic_calendar_id);
$this->forward404Unless($academic_calendar);
$counseling_id = $this->getRequestParameter('counseling_id');
$counseling = CounselingPeer::retrieveByPK($counseling_id);
$this->forward404Unless($counseling);
$student_id = $this->getRequestParameter('student_id');
$student = StudentPeer::retrieveByPK($student_id);
$this->forward404Unless($student);
## 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;
## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
$cr = new Criteria();
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$stugrades = StudentRaportPeer::doSelect($cr);
$this->stugrades = $stugrades;
## Menentukan Aturan Penilaian
$cd = new Criteria();
$cd->add(ClassGroupPeer::DEPARTMENT_ID, $counseling->getAcademicCalendar()->getDepartmentId());
$cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
$cd->add(ScoreRulePeer::TYPE, 6);
$score_rule = ScoreRulePeer::doSelectOne($cd);
$this->score_rule = $score_rule;
## Menentukan Aturan Penilaian Yang digunakan
$cm = new Criteria();
$cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, 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;
## Kelompokkan Mata Pelajaran Muatan Nasional
$cmi = new Criteria();
$cmi->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$cmi->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$subs1 = ScoreRuleSubjectPeer::doSelect($cmi);
$subs1_count = ScoreRuleSubjectPeer::doCount($cmi);
$this->subs1 = $subs1;
$this->subs1_count = $subs1_count;
## Kelompokkan Mata Pelajaran Muatan Lokal
$ciw = new Criteria();
$ciw->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$ciw->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$ciw->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 2, Criteria::IN);
$ciw->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$ciw->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$subs2 = ScoreRuleSubjectPeer::doSelect($ciw);
$subs2_count = ScoreRuleSubjectPeer::doCount($ciw);
$this->subs2 = $subs2;
$this->subs2_count = $subs2_count;
## Kelompokkan Mata Pelajaran IPA
$ci = new Criteria();
$ci->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$ci->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$ci->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 3, Criteria::IN);
$ci->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$ci->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$ipas = ScoreRuleSubjectPeer::doSelect($ci);
$ipas_count = ScoreRuleSubjectPeer::doCount($ci);
$this->ipas = $ipas;
$this->ipas_count = $ipas_count;
## Kelompokkan Mata Pelajaran IPS
$cit = new Criteria();
$cit->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cit->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cit->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 4, Criteria::IN);
$cit->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$cit->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$ips = ScoreRuleSubjectPeer::doSelect($cit);
$ips_count = ScoreRuleSubjectPeer::doCount($cit);
$this->ips = $ips;
$this->ips_count = $ips_count;
## Kelompokkan Mata Pelajaran Setelah IPS
$cet = new Criteria();
$cet->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cet->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cet->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 5, Criteria::IN);
$cet->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$cet->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$subs3 = ScoreRuleSubjectPeer::doSelect($cet);
$subs3_count = ScoreRuleSubjectPeer::doCount($cet);
$this->subs3 = $subs3;
$this->subs3_count = $subs3_count;
## Kelompokkan Mata Pelajaran Pilihan
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php
示例4: use_helper
<?php
use_helper('Object', 'Validation', 'myHelper');
echo include_partial('global/tab', array('actions2' => $actions2));
echo include_partial('global/title4', array('type' => 'list', 'title' => __('Rekap Nilai UAS'), 'actions' => $actions, 'subtitle' => $subtitle . ($sf_request->hasErrors() ? '<div class=form_error>* ' . __('_FORM_HAS_ERROR_') . '</div>' : '')));
echo form_remote_tag(array('url' => 'counseling_menu/listUas?accal_id=' . $academic_calendar->getId() . '&counseling_id=' . $counseling->getId(), 'update' => 'content', 'script' => 'true', 'before' => "this.blur();showIndicator('content', 'snakebig_black');", 'complete' => "hideIndicator()"), 'name=edit_form');
echo input_hidden_tag('sort');
$cr = new Criteria();
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$stugrades = StudentRaportPeer::doSelect($cr);
$grades = array();
$grade_avg = array();
foreach ($stugrades as $stugrade) {
$grades[$stugrade->getSubjectCurrId() . '#' . $stugrade->getStudentId() . '#' . $stugrade->getGradeSpecId()] = $stugrade->getGrade();
$grade_avg[$stugrade->getSubjectCurrId() . '#' . $stugrade->getGradeSpecId()] = (array_key_exists($stugrade->getsubjectCurrId() . '#' . $stugrade->getGradeSpecId(), $grade_avg) ? $grade_avg[$stugrade->getSubjectCurrId() . '#' . $stugrade->getGradeSpecId()] : 0) + $stugrade->getGrade();
}
$column = $subject_count7 + $subject_count8;
$column_smp = $subject_count1 + $subject_count2 + $ipa_count + $ips_count;
?>
<table border="0" width="100%" style="margin-top: -10px;">
<tr>
<td valign="top">
<table class="list">
<tr>
<td class="list" valign="top">
<table class="list_content" width="100%">
<thead>
<!-- Tingkat SD -->
<?php
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listUasSuccess.php
示例5: Criteria
?>
</td>
<td style="text-align:left; vertical-align: middle; padding-left: 5px;" width="10%"><?php
echo $student->getStudent() ? $student->getStudent()->getName() : '-';
?>
</td>
<?php
$cm = new Criteria();
$cm->add(GradeComponentPeer::GRADE_SPEC_ID, 21);
$cm->add(GradeComponentPeer::PUBLISHED, 1);
$cm->addJoin(StudentRaportPeer::GRADE_COMPONENT_ID, GradeComponentPeer::ID);
$cm->add(StudentRaportPeer::STUDENT_ID, $student->getStudentId());
$cm->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$ekskuls = StudentRaportPeer::doSelect($cm);
$count_ekskul = StudentRaportPeer::doCount($cm);
?>
<?php
if ($ekskuls) {
?>
<?php
$m = 0;
foreach ($ekskuls as $ekskul) {
?>
<td style="text-align:left; vertical-align: middle; font-size: 8px;">
<?php
if ($counseling->getEmployeeId() == 222) {
echo $ekskul ? $ekskul->getGradeComponent() ? $ekskul->getGradeComponent()->getCode() : '-' : '-';
} else {
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listLedgerAsPDFSuccess.php
示例6: foreach
if ($course_details < 1) {
echo '-';
} else {
foreach ($cs_details as $detail) {
echo $detail->getClassSession()->getBegin() . ' - ' . $detail->getClassSession()->getEnd() . '<br>';
}
}
?>
</td>
<td style="white-space: nowrap;width: 1%;" align="left">
<?php
$c = new Criteria();
$c->add(StudentRaportPeer::STUDENT_ID, $student->getId());
$c->add(StudentRaportPeer::GRADE_COMPONENT_ID, $grade_component->getId());
$c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $accal);
$sr = StudentRaportPeer::doSelectOne($c);
if ($sr != null) {
if ($sr->getGrade() == '80') {
echo "<font class='level_green'>" . __('A') . "</font>";
} elseif ($sr->getGrade() == '70') {
echo "<font class='level_green'>" . __('B') . "</font>";
} elseif ($sr->getGrade() == '60') {
echo "<font class='level_yellow'>" . __('C') . "</font>";
} elseif ($sr->getGrade() == '50') {
echo "<font class='level_red'>" . __('D') . "</font>";
} else {
echo '-';
}
} else {
echo '-';
}
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listAsPDFSuccess.php
示例7: executeDelete
public function executeDelete()
{
$schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($schedule);
#$ref_error = 0;
#foreach ($schedule->getRefCountMethods() as $ref) {
# $method = "count".$ref['affix'];
# $count = $schedule->$method();
# if ($count > 0) {
# ++$ref_error;
# $this->getRequest()->setError('extracurricular/delete/'.sfInflector::camelize($ref['table']), $count);
# }
#}
#if ($ref_error > 0) {
# $this->getRequest()->setError('extracurricular/delete', '_ERR_DELETE_ ('.$schedule->toString().' - id:'.$schedule->getId().')');
#} else {
$c = new Criteria();
$c->add(ScheduleDetailPeer::SCHEDULE_ID, $this->getRequestParameter('id'));
$sc_details = ScheduleDetailPeer::doSelect($c);
foreach ($sc_details as $sc_detail) {
$sc_detail->delete();
}
$cb = new Criteria();
$cb->add(ScheduleTutorPeer::SCHEDULE_ID, $this->getRequestParameter('id'));
$sc_tutors = ScheduleTutorPeer::doSelect($cb);
foreach ($sc_tutors as $sc_tutor) {
$sc_tutor->delete();
}
$cw = new Criteria();
$cw->add(StudentRaportPeer::SCHEDULE_ID, $this->getRequestParameter('id'));
$sc_raports = StudentRaportPeer::doSelect($cw);
foreach ($sc_raports as $sc_raport) {
$sc_raport->delete();
}
$schedule->delete();
#}
return $this->forward('extracurricular', 'list');
}
开发者ID:taryono,项目名称:school,代码行数:38,代码来源:actions.class.php
示例8: strlen
<td><?php
echo strlen($student->getCode()) > 0 ? $student->getCode() : 'n/a';
?>
</td>
<td><?php
echo $student->getName() ? $student->getName() : '-';
?>
</td>
<td><?php
$cm = new Criteria();
$cm->add(StudentRaportPeer::STUDENT_ID, $student->getId());
$cm->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$cm->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$cm->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$cm->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_spec->getId());
$sr1 = StudentRaportPeer::doSelectOne($cm);
echo input_tag('score[' . $student->getId() . '_' . $grade_spec->getId() . ']', $sr1 != null ? $sr1->getGrade() : '', array('size' => 2, 'maxlength' => 5, 'style' => 'font-size: 10px;'));
?>
</td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
</table>
<?php
if ($pager->getNbResults() > 1) {
echo include_partial('global/pager', array('position' => 'bottom', 'pager' => $pager, 'module' => 'student'));
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:getListSuccess.php
示例9: executeSaveScoreSmp
public function executeSaveScoreSmp()
{
$accal_id = $this->getRequestParameter('accal_id');
$academic_calendar = AcademicCalendarPeer::retrieveByPK($accal_id);
$this->forward404Unless($academic_calendar);
$this->academic_calendar = $academic_calendar;
$schedule = SchedulePeer::retrieveByPk($this->getRequestParameter('schedule_id'));
$this->forward404Unless($schedule);
$this->schedule = $schedule;
$schedule_detail = ScheduleDetailPeer::retrieveByPk($this->getRequestParameter('detail_id'));
$this->forward404Unless($schedule_detail);
$this->schedule_detail = $schedule_detail;
$class_group = ClassGroupPeer::retrieveByPK($this->getRequestParameter('class_id'));
$this->forward404Unless($class_group);
$scores = $this->getRequestParameter('score');
foreach ($scores as $k => $score) {
if ($score != null) {
$cr = new Criteria();
$cr->add(StudentRaportPeer::GRADE_COMPONENT_ID, $schedule->getGradeComponentId());
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $schedule->getAcademicCalendarId());
$cr->add(StudentRaportPeer::SCHEDULE_DETAIL_ID, $schedule_detail->getId());
$cr->add(StudentRaportPeer::SCHEDULE_ID, $schedule->getId());
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $class_group->getId());
$cr->add(StudentRaportPeer::STUDENT_ID, $k);
$sc = StudentRaportPeer::doSelectOne($cr);
$sc->setStudentId($k);
$sc->setAcademicCalendarId($schedule->getAcademicCalendarId());
$sc->setGradeComponentId($schedule->getGradeComponentId());
$sc->setClassGroupId($class_group->getId());
$sc->setScheduleId($schedule->getId());
$sc->setScheduleDetailId($schedule_detail->getId());
$sc->setGrade($score);
$sc->save();
}
}
return $this->redirect('extracurricular_new/listEksStu?id=' . $schedule->getId() . '&detail_id=' . $schedule_detail->getId() . '&accal_id=' . $academic_calendar->getId());
}
开发者ID:taryono,项目名称:school,代码行数:37,代码来源:actions.class.php
示例10: executeSaveRaportHistory
public function executeSaveRaportHistory()
{
$course_id = $this->getRequestParameter('course_id');
$course_schedule = CourseSchedulePeer::retrieveByPK($course_id);
$this->forward404Unless($course_schedule);
$cw = new Criteria();
$cw->add(CourseRegulationPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$cw->add(CourseRegulationPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$cw->add(CourseRegulationPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$c_regulation = CourseRegulationPeer::doSelectOne($cw);
if ($c_regulation) {
$scores = $this->getRequestParameter('score');
foreach ($scores as $k => $score) {
if ($score != null) {
if ($score != '-') {
$ids = split('_', $k);
$cd = new Criteria();
$cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
$cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$stu_accal = StudentAccalPeer::doSelectOne($cd);
$c = new Criteria();
$c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
$c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
$c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$g = StudentRaportPeer::doSelectOne($c);
if ($g == null) {
$g = new StudentRaport();
}
$g->setStudentId($ids[0]);
$g->setGradeSpecId($ids[1]);
$g->setGrade($score);
$g->setSubjectCurrId($course_schedule->getSubjectCurrId());
$g->setClassGroupId($course_schedule->getClassGroupId());
$g->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
$g->setCitationId($stu_accal->getId());
$g->save();
} else {
$ids = split('_', $k);
$c = new Criteria();
$c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
$c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
$c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$g = StudentRaportPeer::doSelectOne($c);
if ($g != null) {
$g->delete();
}
}
}
}
#Nilai Utama dan Remed
$exams = $this->getRequestParameter('exam');
foreach ($exams as $k => $exam) {
if ($exam != null) {
if ($exam != '-') {
$ids = split('_', $k);
$cd = new Criteria();
$cd->add(StudentAccalPeer::STUDENT_ID, $ids[0]);
$cd->add(StudentAccalPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$cd->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$stu_accal = StudentAccalPeer::doSelectOne($cd);
$c = new Criteria();
$c->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
$c->add(StudentRaportPeer::GRADE_SPEC_ID, $ids[1]);
$c->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$c->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$c->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$g = StudentRaportPeer::doSelectOne($c);
if ($g == null) {
$g = new StudentRaport();
}
$g->setStudentId($ids[0]);
$g->setGradeSpecId($ids[1]);
$g->setGrade($exam);
$g->setSubjectCurrId($course_schedule->getSubjectCurrId());
$g->setClassGroupId($course_schedule->getClassGroupId());
$g->setAcademicCalendarId($course_schedule->getAcademicCalendarId());
$g->setCitationId($stu_accal->getId());
$g->save();
$grade_spec = GradeSpecPeer::retrieveByPK($ids[1]);
#Nilai Utama
if ($grade_spec->getCode() == 'NU') {
$cg = new Criteria();
$cg->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
$cg->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_spec->getId());
$cg->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$cg->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$cg->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$nu = StudentRaportPeer::doSelectOne($cg);
$f = new Criteria();
$f->add(StudentRaportPeer::STUDENT_ID, $ids[0]);
$f->add(StudentRaportPeer::GRADE_SPEC_ID, $grade_spec->getParent());
$f->add(StudentRaportPeer::SUBJECT_CURR_ID, $course_schedule->getSubjectCurrId());
$f->add(StudentRaportPeer::CLASS_GROUP_ID, $course_schedule->getClassGroupId());
$f->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $course_schedule->getAcademicCalendarId());
$uh = StudentRaportPeer::doSelectOne($f);
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class1.php
示例11: executeDeleteFinal
public function executeDeleteFinal()
{
$student_id = $this->getRequestParameter('student_id');
$student = StudentPeer::retrieveByPK($student_id);
$this->forward404Unless($student);
$this->student = $student;
$student_score = StudentRaportPeer::retrieveByPk($this->getRequestParameter('id'));
$this->forward404Unless($student_score);
$ref_error = 0;
foreach ($student_score->getRefCountMethods() as $ref) {
$method = "count" . $ref['affix'];
$count = $student_score->{$method}();
if ($count > 0) {
++$ref_error;
$this->getRequest()->setError('student_score/deleteFinal/' . sfInflector::camelize($ref['table']), $count);
}
}
if ($ref_error > 0) {
$this->getRequest()->setError('student_score/deleteFinal', '_ERR_DELETE_ (' . $student_score->toString() . ' - id:' . $student_score->getId() . ')');
} else {
$student_score->delete();
}
$this->getRequest()->setParameter('student_id', $student_id);
return $this->forward('student_score', 'listFinal');
}
开发者ID:taryono,项目名称:school,代码行数:25,代码来源:actions.class.php
示例12: strlen
if (array_key_exists($student_score->getSubjectCurrId(), $subject_grade_spec)) {
$sr = $subject_grade_spec[$student_score->getSubjectCurrId()];
$grade = $sr->getGrade();
}
echo strlen($grade) > 0 ? $grade : '';
?>
</td>
<!-- Rata-rata Kelas -->
<?php
$cm = new Criteria();
$cm->add(StudentRaportPeer::SUBJECT_CURR_ID, $student_score->getSubjectCurrId());
$cm->add(StudentRaportPeer::CLASS_GROUP_ID, $student_score->getClassGroupId());
$cm->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$cm->add(StudentRaportPeer::GRADE_SPEC_ID, 16);
$raports = StudentRaportPeer::doSelect($cm);
$total_score = 0;
foreach ($raports as $c) {
$total_score += $c->getGrade();
}
$count = VCounselingPeer::retrieveByPK($counseling->getId());
$student_count = $count->getStudentCount();
$x = $total_score / $student_count;
?>
<td align="center" style="text-align:center;" class="first"><?php
echo $total_score ? round($x) : '-';
?>
</td>
</tr>
<?php
}
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listFinalSuccess.php
示例13: 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());
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php
示例14: executeGetListFinalAll
public function executeGetListFinalAll()
{
$academic_calendar_id = $this->getRequestParameter('academic_calendar_id');
$academic_calendar = AcademicCalendarPeer::retrieveByPK($academic_calendar_id);
$this->academic_calendar = $academic_calendar;
$student_id = $this->getRequestParameter('student_id');
$student = StudentPeer::retrieveByPK($student_id);
$this->forward404Unless($student);
$this->student = $student;
$c = new Criteria();
$c->add(StudentAccalPeer::STUDENT_ID, $student_id, Criteria::IN);
$c->add(StudentAccalPeer::ACADEMIC_CALENDAR_ID, $academic_calendar_id, Criteria::IN);
$stu_accal = StudentAccalPeer::doSelectOne($c);
$this->stu_accal = $stu_accal;
## Menentukan Aturan Penilaian
$cd = new Criteria();
$cd->add(ClassGroupPeer::DEPARTMENT_ID, $academic_calendar->getDepartmentId());
$cd->addJoin(ScoreRulePeer::CLASS_GROUP_ID, ClassGroupPeer::ID);
$cd->add(ScoreRulePeer::TYPE, 6);
$score_rule = ScoreRulePeer::doSelectOne($cd);
$this->score_rule = $score_rule;
$cw = new Criteria();
$cw->add(CounselingPeer::CLASS_GROUP_ID, $stu_accal->getClassGroupId());
$cw->add(CounselingPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getParent());
$counseling = CounselingPeer::doSelectOne($cw);
$this->counseling = $counseling;
$ct = new Criteria();
$ct->add(GradeSpecPeer::PARENT, 1, Criteria::IN);
#$ct->addJoin(GradeSpecPeer::ID, ScoreRuleObjectPeer::GRADE_SPEC_ID);
#$ct->add(ScoreRuleObjectPeer::PUBLISHED, 1, Criteria::IN);
#$ct->add(ScoreRuleObjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
#$ct->addAscendingOrderByColumn(ScoreRuleObjectPeer::SEQUENCE);
$this->grade1 = GradeSpecPeer::doSelect($ct);
$this->count1 = GradeSpecPeer::doCount($ct);
$cte = new Criteria();
$cte->add(GradeSpecPeer::PARENT, 7, Criteria::IN);
#$cte->addJoin(GradeSpecPeer::ID, ScoreRuleObjectPeer::GRADE_SPEC_ID);
#$cte->add(ScoreRuleObjectPeer::PUBLISHED, 1, Criteria::IN);
#$cte->add(ScoreRuleObjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
#$cte->addAscendingOrderByColumn(ScoreRuleObjectPeer::SEQUENCE);
$this->grade2 = GradeSpecPeer::doSelect($cte);
$this->count2 = GradeSpecPeer::doCount($cte);
## Daftar Mata Pelajaran di Jadwal Pelajaran
$cty = new Criteria();
$cty->add(VCoursePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cty->add(VCoursePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$subjects = VCoursePeer::doSelect($cty);
$subject_ids = array();
foreach ($subjects as $subject) {
$subject_ids[] = $subject->getSubjectCurrId();
}
$this->subjects = $subjects;
## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
$cr = new Criteria();
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$stugrades = StudentRaportPeer::doSelect($cr);
$this->stugrades = $stugrades;
## Menentukan Aturan Penilaian Yang digunakan
$cm = new Criteria();
$cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, 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;
## Kelompokkan Mata Pelajaran Muatan Nasional
$cmi = new Criteria();
$cmi->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$cmi->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$subs1 = ScoreRuleSubjectPeer::doSelect($cmi);
$subs1_count = ScoreRuleSubjectPeer::doCount($cmi);
$this->subs1 = $subs1;
$this->subs1_count = $subs1_count;
## Kelompokkan Mata Pelajaran Muatan Lokal
$ciw = new Criteria();
$ciw->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$ciw->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$ciw->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 2, Criteria::IN);
$ciw->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$ciw->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$subs2 = ScoreRuleSubjectPeer::doSelect($ciw);
$subs2_count = ScoreRuleSubjectPeer::doCount($ciw);
$this->subs2 = $subs2;
$this->subs2_count = $subs2_count;
## Kelompokkan Mata Pelajaran IPA
$ci = new Criteria();
$ci->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$ci->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$ci->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 3, Criteria::IN);
$ci->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$ci->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$ipas = ScoreRuleSubjectPeer::doSelect($ci);
$ipas_count = ScoreRuleSubjectPeer::doCount($ci);
$this->ipas = $ipas;
//.........这里部分代码省略.........
开发者ID:taryono,项目名称:school,代码行数:101,代码来源:actions.class.php
示例15: executePrintFinal
public function executePrintFinal()
{
$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');
$term = $this->getRequestParameter('term');
$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);
## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
$cri = new Criteria();
$cri->add(StudentNotePeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cri->add(StudentNotePeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$stunotes = StudentNotePeer::doSelect($cri);
$notes = array();
foreach ($stunotes as $stunote) {
$notes[$stunote->getStudentId() . '#' . $stunote->getRanking()] = $stunote->getNote();
}
$this->notes = $notes;
$this->stunotes = $stunotes;
## 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;
## Mengelompokkan Penilaian Anak berdasarkan Tahun Ajaran dan Kelas
$cr = new Criteria();
$cr->add(StudentRaportPeer::CLASS_GROUP_ID, $counseling->getClassGroupId());
$cr->add(StudentRaportPeer::ACADEMIC_CALENDAR_ID, $academic_calendar->getId());
$stugrades = StudentRaportPeer::doSelect($cr);
$this->stugrades = $stugrades;
## Menentukan Aturan Penilaian
$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, 6);
$score_rule = ScoreRulePeer::doSelectOne($cd);
$this->score_rule = $score_rule;
## Menentukan Aturan Penilaian Yang digunakan
$cm = new Criteria();
$cm->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cm->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, 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;
## Kelompokkan Mata Pelajaran Muatan Nasional
$cmi = new Criteria();
$cmi->add(ScoreRuleSubjectPeer::SCORE_RULE_ID, $score_rule->getId(), Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::PUBLISHED, 1, Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::SUBJECT_TYPE, 1, Criteria::IN);
$cmi->add(ScoreRuleSubjectPeer::SUBJECT_CURR_ID, $subject_ids, Criteria::IN);
$cmi->addAscendingOrderByColumn(ScoreRuleSubjectPeer::SEQUENCE);
$subs1 = ScoreRuleSubjectPeer::doSelect($cmi);
$subs1_count = ScoreRuleSubjectPeer::doCount($cmi);
$this->subs1 = $subs1;
$this->subs1_count = $subs1_count;
## Kelompokkan Mata Pelajaran Mua
|
请发表评论