prepare('SELECT * FROM aStudents ORDER BY sID'); $qs->execute(); $q = $qs->fetchAll(); //--------------------------------------------------------- //- REMOVING PERSONAL INFO (SECURITY REASON) //--------------------------------------------------------- for($i=0; $i= 10 && $q['lab09r'] > 0 && $q['lab10r'] > 0 && $q['lab11r'] > 0 && $q['lab12r']) $sProjOK = 1; else $sProjOK = 0; $sTest = $q['lab13r'] + $q['lab14r'] + $q['lab15r']; if($sTest >= 7.5) $sTestOK = 1; else $sTestOK = 0; $sKol = 0; if($q['lab16r'] > $q['lab17r']) $sKol = $q['lab16r']; else $sKol = $q['lab17r']; if($sKol >= 15) $sKolOK = 1; else $sKolOK = 0; if($sProjOK == 1 && $sTestOK == 1 && $sKolOK == 1) { $sP = (3/2)*$sProj + (4/3)*$sTest + (5/3)*$sKol; if($sP >= 50) $rateVal = 3.0; if($sP >= 64) $rateVal = 3.5; if($sP >= 73) $rateVal = 4.0; if($sP >= 82) $rateVal = 4.5; if($sP >= 91) $rateVal = 5.0; } else { $rateVal = 2.0; } //--- RETURNING ----------------------------------------------------------- if($rateVal < 3.0) { $rateVal = ''.number_format($rateVal, 1).''; } else { $rateVal = ''.number_format($rateVal, 1).''; } //--- DESCRIPTION --------------------------------------------------------- $rateValD = ''.$rateVal.''; return $rateValD; } //--------------------------------------------------------- //- ACTIVITY INFO //--------------------------------------------------------- function getActivityInfo($actInfo) { $actTemp = explode(':', $actInfo); $actType = $actTemp[0]; $actNum = $actTemp[1]; switch($actType) { case 'C': $aI = 'Ćwiczenia
'.$actNum; break; case 'L': $aI = 'Laboratorium
'.$actNum; break; case 'P': $aI = 'Projekt
'.$actNum; break; case 'K': $aI = 'Kolokwium
'.$actNum; break; case 'T': $aI = 'Kartkówka
'.$actNum; break; case 'E': $aI = 'Egzamin
'.$actNum; break; case 'F': $aI = 'Egzamin poprawkowy
'.$actNum; break; case 'Z': $aI = 'Przepisanie oceny '.$actNum; break; default: $aI = ''; break; } return $aI; } $tWidth = 70 + $lNum*50*3 + 100; ?> <? echo $sTitle; ?> '; echo ''; echo ''; echo ''; echo ''; echo '
'; echo $sTitle; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo ''; for($l=0; $l<$lNum; $l++) { echo ''; } echo ''; echo ''; //--------------------------------------------------------- //- CONTENT //--------------------------------------------------------- for($i=0; $i'; echo ''; for($l=1; $l<=$lNum; $l++) { if($l<10) $labN = '0'.$l; else $labN = $l; echo ''; echo ''; echo ''; } if($q[$i]['sRewriteRate'] > 2.5) $sRate = ''.$q[$i]['sRewriteRate'].''; else $sRate = calcFinalRate($q[$i], $_SESSION['lNum']); echo ''; echo ''; } echo ''; echo ''; echo '
Album'; echo ''.getActivityInfo($lTypes[$l]).''; echo '
'; echo $lDescr[$l]; echo '
Ocena
końcowa
'.$q[$i]['sID'].''; if($q[$i]['sRewriteRate'] > 2.5) { echo '-'; } else { if($lDisableControlsR[intval($labN)-1] == 0) echo ''.$q[$i]['lab'.$labN.'r'].''; else echo '-'; } echo ''; if($q[$i]['sRewriteRate'] > 2.5) { echo '-'; } else { if($lDisableControlsD[intval($labN)-1] == 0) echo substr($q[$i]['lab'.$labN.'d'], 0, 5); else echo '-'; } echo ''; if($q[$i]['sRewriteRate'] > 2.5) { echo '-'; } else { if($lDisableControlsT[intval($labN)-1] == 0) echo $q[$i]['lab'.$labN.'t']; else echo '-'; } echo ''; echo $sRate; echo '
'; echo '
'; ?>