function getResults() { $result="<table><thead><tr> <th>RollNo</th> <th>FirstName</th> <th>Rank</th> <th>Dept</th> <th>Section</th> <th>ActivityName</th> <th>ActivityGrade</th> <th>Course Name</th> <th>Course Grade</th></thead><tbody>"; $completed_courses=getCompletedCourses(); //$students=getStudentsByCourse("3"); //$grades=getGrades($students,"3"); //$data= render($grades); //var_dump($data); //$result.=$data; //$result.="</tbody></table>"; //sendCustomMail($teacher_email ,$result); foreach($completed_courses as $course) { $course_id= $course->course; $teacher_email= getTeachersByCourse($course_id); $students=getStudentsByCourse($course_id); $grades=getGrades($students,$courseId); $data= render($grades); //var_dump($data); $result.=$data; $result.="</tbody></table>"; sendCustomMail($teacher_email ,$result); } }
<?php include_once 'PHP/db_connect.php'; include_once 'PHP/functions.php'; sec_session_start(); ?> <?php include "header.php"; ?> <?php include "sidebar_3332.php"; ?> <!--Body Goes Here--> <main class="mdl-layout__content" style="padding: 10px 20px;"> <h2> Gradebook </h2> <?php getGrades($mysqli, 'cosc3332_sgrades', strpos(htmlentities($_SESSION['username']), 'Admin')); ?> </main> <script src="http://d3js.org/d3.v3.min.js"></script> <script type="text/javascript" src="JS/d3-circularheat-master/js/circularHeatChart.js"></script> <script type="text/javascript" src="JS/d3-circularheat-master/js/example.js"></script> <?php include "footer.php";
<?php error_reporting(0); include "includes/header.inc"; ?> <div id="content"> <div id="errorFlash" class="error" style="display:none"></div> <?php if (filter_input_array(INPUT_POST)) { $inputGrades = getGrades(); $AvgGrades = calcGrades($inputGrades); showGrades($AvgGrades, $inputGrades); printForm($inputGrades); } else { printForm(); } ?> </div> <?php include "includes/footer.inc"; ?> <?php // function defs function getGrades() { $formData = filter_input_array(INPUT_POST); $grades = array(); for ($i = 0; $i < count($formData["name"]); $i++) { $grades[] = array("name" => $formData["name"][$i], "points_poss" => $formData["points_poss"][$i], "points_earned" => $formData["points_earned"][$i], "assignment_type" => $formData["assignment_type"][$i]); }
return $x; } function getEthnicityDesc() { $q = mysql_query("select * from ethnicity"); while ($r = mysql_fetch_array($q)) { $t = $r['ethnicity_id']; $e[$t] = $r['ethnicity_desc']; } return $e; } //We start creating the PDF here. We wait as long as possible to do this. global $pdf; switch ($report_type) { case "students": $grades = getGrades(); $eth = getEthnicityDesc(); $sch = getSchoolNames(); $pdf = new PDF('L'); $w = array(20, 40, 20, 30, 20, 25, 30, 20, 25); $pdf->Open(); $pdf->SetWidths($w); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 12); $pdf->SetFont('Arial', 'B', 10); $pdf->PrintHeader(); $pdf->SetFont('Arial', '', 8); $pdf->SetFillColor(255, 255, 255); if ($sort2 == 'none') { $q = mysql_query("SELECT * FROM studentbio, \nstudent_grade_year, school_names, ethnicity, grades WHERE \nstudentbio.studentbio_id = student_grade_year.student_grade_year_student \nAND studentbio.studentbio_school = school_names.school_names_id AND \nstudentbio.studentbio_ethnicity = ethnicity.ethnicity_id AND \ngrades.grades_id = student_grade_year.student_grade_year_grade AND \nstudentbio.studentbio_active = '1' order by " . $sort1 . ", studentbio_lname \nASC"); } else {