Example #1
0
 $title = $myrow['title'];
 $count = 0;
 $i = 0;
 $bus_report = new bus_report($student_id, $_POST['period_id'], $db);
 echo "<form method='post' action=" . $_SERVER['PHP_SELF'] . "?" . SID . ">";
 echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
 echo "<table  width='50%' align='center' border=\"1\" >";
 echo "<tr><td colspan='8'  class=\"centered\"><font size='4'>" . _('Masinde Muliro University of Science & Technology') . "</td></tr>";
 echo "<tr><td colspan='8' class=\"centered\"><font size='4'>" . _('Academic Year') . ' ' . $academic_year . ' ' . _('Transcript') . "</td></tr>";
 echo "<tr><td colspan='5' align='center'><font size='4'>" . _('RegNO') . _(': ') . $_SESSION['UserID'] . "</td></tr>";
 echo "<tr><th>" . _('Subject') . "</th><th>" . _('Marks') . "</th><th>" . _('Points') . "</th><th>" . _('Grade') . "</th></tr>";
 $asterik = 0;
 $marks = 0;
 foreach ($bus_report->scheduled_subjects as $a => $b) {
     $count = $count + 1;
     $scheduled = new scheduled($b['subject_id'], $db);
     $scheduled->set_calendar_vars($student_id, $_POST['period_id'], $b['id'], $db);
     echo "<tr><td class=\"visible\">" . $scheduled->subject_name . "</td>";
     foreach ($scheduled->subject as $sub => $s) {
         $asterik = $s['asterik'];
         $marks = $s['tmarks'];
     }
     //end of foreach subject
     $totalmarks_array = $bus_report->total_marks2($student_id, $b['subject_id'], $_POST['period_id'], $db);
     if ($asterik == 1) {
         echo "<td class=\"visible\">" . _('*') . $totalmarks_array . "</td>";
     } else {
         echo "<td class=\"visible\">" . $totalmarks_array . "</td>";
     }
     $sql = "SELECT title,comment FROM reportcardgrades\n\t\tWHERE range_from <=  '" . $totalmarks_array . "'\n\t\tAND range_to >='" . $totalmarks_array . "'";
     $result = DB_query($sql, $db);
Example #2
0
 echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
 echo "<table class=enclosed>";
 echo "<tr><td colspan='8'><font size='16'>" . _('AFRICAN INSTITUTE') . "</td></tr>";
 echo "<tr><td colspan='8' align='center'><font size='4'>" . _('of Research & Development Studies') . "</td></tr>";
 echo "<tr><td colspan='8' align='center'><font size='2'>" . _('RegNO') . _(': ') . $_SESSION['student'] . _('  ') . _('Term') . _(': ') . $title . _(' ') . _('Course') . _(': ') . $course . "</td></tr>";
 echo "<tr><td>" . _('Subject') . "</td>";
 foreach ($status_array as $r => $s) {
     echo "<td>" . $s['title'] . "</td>";
 }
 echo "<td>" . _('Total(%)') . "</td>";
 echo "<td>" . _('Grade') . "</td>";
 echo "<td>" . _('Comment') . "</td>";
 echo "</tr>";
 foreach ($bus_report->scheduled_subjects as $a => $b) {
     $count = $count + 1;
     $scheduled = new scheduled($b['subject_id'], $db);
     $scheduled->set_calendar_vars($b['id'], $db);
     echo "<tr><td>" . $scheduled->subject_name . "</td>";
     $status_array = tep_get_status($db);
     foreach ($scheduled->status as $y => $z) {
         $i++;
         echo "<td>" . $z['marks'] . "</td>";
     }
     $totalmarks_array = $bus_report->total_marks($_POST['student_id'], $b['id'], $b['subject_id'], $db);
     $sql = "SELECT title,comment FROM reportcardgrades\n\tWHERE range_from <=  '" . $totalmarks_array . "'\n\tAND range_to >='" . $totalmarks_array . "'";
     $result = DB_query($sql, $db);
     $myrow = DB_fetch_row($result);
     echo "<td>" . $totalmarks_array . "</td>";
     echo "<td>" . $myrow[0] . "</td>";
     echo "<td>" . $myrow[1] . "</td>";
     $totalmarks_array2 = $totalmarks_array2 + $totalmarks_array;
Example #3
0
 foreach ($status_array as $r => $s) {
     $pdf->starttransform();
     $pdf->xy($XPos, 332);
     $pdf->rotate(90);
     $LeftOvers = $pdf->addTextWrap($XPos - 25, $YPos - 70, 300, $FontSize, $s['title']);
     $pdf->stoptransform();
     $XPos += 40;
 }
 $YPos -= 5 * $line_height;
 foreach ($bus_report->scheduled_subjects as $a => $b) {
     //$count=$count+1;
     $sql = "select no_of_subjects from termly_class_ranks\n\t\t\tWHERE student_id='" . $myrowclass['student_id'] . "'\n\t\t\tAND period_id='" . $_POST['period_id'] . "'";
     $result = DB_query($sql, $db);
     $row = DB_fetch_row($result);
     $count = $row[0];
     $scheduled = new scheduled($b['subject_id'], $db);
     $scheduled->set_calendar_vars($b['id'], $b['subject_id'], $myrowclass['student_id'], $_POST['period_id'], $db);
     $LeftOvers = $pdf->addTextWrap(70, $YPos + 1, 300, $FontSize, $scheduled->subject_name);
     $pdf->line(60, $YPos + $line_height, $Page_Width - $Right_Margin - 25, $YPos + $line_height, $style);
     $status_array = tep_get_status($_POST['period_id'], $myrowclass['student_id'], $db);
     $XPos2 = 200;
     $YPos -= 1 * $line_height;
     foreach ($scheduled->status as $y => $z) {
         $i++;
         $LeftOvers = $pdf->addTextWrap($XPos2 + 10, $YPos + 15, 300, $FontSize, $z['marks']);
         $pdf->line($XPos2, $YPos3, $XPos2, $YPos - 16, $style);
         $XPos2 += 40;
     }
     $cat_marks = $bus_report->average_cat_marks($b['subject_id'], $myrowclass['student_id'], $_POST['period_id'], $b['id'], $db);
     $totalmarks_array = $bus_report->total_marks($b['subject_id'], $myrowclass['student_id'], $_POST['period_id'], $b['id'], $db);
     $sql = "SELECT grade,comment FROM reportcardgrades\n\t\t\tWHERE range_from <=  '" . $totalmarks_array . "'\n\t\t\tAND range_to >='" . $totalmarks_array . "'\n\t\t\tAND grading LIKE '" . $scheduled->grading . "'";
 $YPos -= 83;
 $YPos3 = $YPos;
 $YPos -= $line_height;
 $pdf->line(60, $YPos + $line_height, $Page_Width - $Right_Margin - 25, $YPos + $line_height, $style);
 $line_width = 70;
 $XPos = 170;
 $XPos5 = 100;
 $XPos6 = 100;
 $YPos2 = $YPos;
 $count = 0;
 $i = 0;
 $bus_report = new bus_report($myrowstudent['student_id'], $_POST['period_id'], $db);
 $YPos -= 5 * $line_height;
 foreach ($bus_report->scheduled_subjects as $a => $b) {
     $count = $count + 1;
     $scheduled = new scheduled($b['subject_id'], $db);
     $scheduled->set_calendar_vars($b['id'], $b['subject_id'], $myrowstudent['student_id'], $_POST['period_id'], $_POST['exam_mode'], $db);
     $LeftOvers = $pdf->addTextWrap(70, $YPos + 1, 300, $FontSize, $scheduled->subject_name);
     $pdf->line(60, $YPos + $line_height, $Page_Width - $Right_Margin - 25, $YPos + $line_height, $style);
     $status_array = tep_get_status($_POST['period_id'], $myrowstudent['student_id'], $db);
     $XPos2 = 200;
     $YPos -= 1 * $line_height;
     $LeftOvers = $pdf->addTextWrap($XPos2 + 50, $YPos + 15, 300, $FontSize, $scheduled->exam_marks);
     $XPos2 += 40;
     $totalmarks_array = $bus_report->total_marks($b['subject_id'], $myrowstudent['student_id'], $_POST['period_id'], $b['id'], $db);
     if (!isset($scheduled->exam_marks)) {
         $subjectGrade = '';
         $subjectGradeComment = 'Missed Exam';
     } else {
         $sql = "SELECT grade,comment FROM reportcardgrades\n\t\t\t\tWHERE range_from <=  '" . $scheduled->exam_marks . "'\n\t\t\t\tAND range_to >='" . $scheduled->exam_marks . "'\n\t\t\t\tAND grading LIKE '" . $scheduled->grading . "'";
         $result = DB_query($sql, $db);