Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function GetFinalGPA($studentId, $fasttrack = "")
- {
- $where = "";
- if ($fasttrack !== '') {
- $where = " AND STATUSFASTRACK='$fasttrack'";
- } else {
- include "db.config.php";
- $studentDB = new DBStudent($academicConfig);
- if ($studentDB->IsExistStudent($studentId)) {
- $where = " AND STATUSFASTRACK IS NULL";
- }
- }
- //Indeks T tidak dihitung 13072016
- $query = " select round(sum(MULTIPLYCREDITCONVERSION)/sum(CREDIT),2) as GPA from FINALGRADE where STUDENTID='$studentId' and (INDEXPOINT is not NULL AND INDEXPOINT<>'T') $where";
- //$query = "SELECT ROUND (SUM (MULTIPLYCREDITCONVERSION) / SUM (CREDIT),2) AS GPA FROM FINALGRADE WHERE STUDENTID = '".$studentId."' AND (INDEXPOINT IS NOT NULL OR INDEXPOINT <> 'T') AND PASS_STATUS = 'Y'";
- //echo "<br>$query";
- $q = $this->ExecuteQuery($query);
- $r = $this->FetchArray($q);
- return (isset($r['GPA'])) ? floatval($r['GPA']) : 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement