function students_position_subject($this, $exam, $class, $subject, $marks, $scholid) { /* * Added Student Marks :: Student ID, Student Class, Student Exam: * :: Find Other students in that Exam and in that Class. * Rank the students according to perforamce:: */ $performance = get_all_student_performance_subject($this, $subject, $scholid, $exms); $qq = $this->db->query("SELECT * from marksheet where school ='{$scholid}' and exam = '{$exam}' and isactive ='Y' and subject = '{$subject}'")->result_array(); print_r($qq); # $student_performance = $obj -> db-> query('SELECT a.student,sum(a.mark) as summation FROM marksheet as a inner join exams as b on a.exam = b.id where a.exam in( select id from exams where term = '.$term.' ) group by a.student order by a.mark DESC')->result_array(); }
$examid->appendChild($examx); $student_marks = $this->Query_reader->get_row_as_array('search_mark_sheet', array('limittext' => '', 'searchstring' => ' student=' . $registration_data['student'] . ' AND subject=' . $subject['id'] . ' AND exam=' . $exam_info['id'])); if (empty($student_marks)) { $student_marks['mark'] = ''; $student_marks['comments'] = ''; } $mark = $student_marks['mark'] == '' ? 0 : $student_marks['mark']; $mark_counter = $mark_counter + $mark; $mark_counter2 = $mark; $exm_info = $exam_info['id']; $exam_sumary = get_all_student_performance_exams($this, $exam_info['id'], $studentdetails['id']); $rt .= $mark_counter2 . "**"; if ($mark > 0) { //($obj,$exam,$class,$subject,$marks,$scholid) //get_all_student_performance_subject $performance = get_all_student_performance_subject($this, $student_marks['subject'], $student_marks['school'], $student_marks['exam']); // Get Student Performance $position = position_finder($mark, 0, $performance); // $postion = students_position_subject($this,$student_marks['exam'],$student_marks['class'],$student_marks['subject'],$student_marks['mark'],$student_marks['school']); } else { $position = "Not Graded"; } #subjectid $subjectid = $xml->createElement("subjectid"); $titleText = $xml->createTextNode($subject['id']); $subjectid->appendChild($titleText); $examx->appendChild($subjectid); $marks = $xml->createElement("marks"); $titleText = $xml->createTextNode($mark); $marks->appendChild($titleText); $examx->appendChild($marks);
<?php // var_dump($mark_per_subject); // Gettng Information about the Subject Performance if (!empty($mark_per_subject)) { foreach ($mark_per_subject as $utb) { $clas = $utb['class']; $exam = $utb['exm']; $subject = $utb['sbj']; $mark = $utb['mark']; $sbject = $utb['subjt']; $school = $utb['school']; $exms = $utb['exms']; } //get_all_student_performance_subject $performance = get_all_student_performance_subject($this, $sbject, $school, $exms); // Get Student Performance $position = position_finder($mark, 0, $performance); ?> <br style="clear: both;" /> <table> <tr> <td> <label>Class : <?php echo $clas; ?> </label> </td> </tr> <tr>