public function testGetCurrentSemGpa() { $this->assertNull(getCurrentGpa('000')['gpa']); }
<?php include 'session.php'; include 'barLine.html'; include 'controller/dbController.php'; //get information about the student $record = getStudentInfo($login_session); $name = $record["name"]; $intake = $record["intake"]; $image = file_get_contents($record["image"]); //get all enrolled course titles $coursetitles = getEnrolledCourseTitles($login_session); //get the current GPA $currentgpa = getCurrentGpa($login_session); //get number of semesters passed $semList = getNumberOfSemestersPassed($login_session); ?> <!DOCTYPE html> <html> <head> <title>Home<?php echo $login_session; ?> </title> <script src="resources/jquery-1.6.1.min.js"></script> <link href="styles/studentStyle.css" rel="stylesheet" type="text/css"> </head> <body> <!-- This div will change by AJAX --> <div id="txtGetGrades"></div>
<head> <link href="styles/browseBatchFriendsStyle.css" rel="stylesheet" type="text/css"> <title>Browse Batch Friends<?php echo $login_session; ?> </title> </head> <body> <!--Div to the whole table --> <div class="box"> <table> <?php foreach ($batchFriends as $row) { $courseList = array(); $courseList = getEnrolledCourses($row["id"]); $currentGpa = getCurrentGpa($row["id"]); if ($row["id"] != $login_session) { echo '<tr>'; //box to store image and name echo '<td><div class ="subBox">'; echo "<center><label><b>{$row["name"]}</b><label></center>"; echo '<br>'; echo '<center><img src="data:image/jpeg;base64,' . base64_encode(file_get_contents($row["image"])) . '" width="100" height="100" /></center>'; echo "</div>"; echo "</td>"; echo "<td>"; //box for store course codes echo '<div class ="codeBox">'; echo '<b>Courses: </b>'; foreach ($courseList as $course) { echo $course["code"] . " ";