prepare('SELECT * FROM aStudents ORDER BY sID'); $qs->execute(); $q = $qs->fetchAll(); //--------------------------------------------------------- //- REMOVING PERSONAL INFO (SECURITY REASON) //--------------------------------------------------------- for($i=0; $i 2.0 || $q['lab10r'] > 2.0 || $q['lab12r'] > 2.0) { if($q['lab09r'] > 2.0) $m01 = $q['lab09r']; else $m01 = 0.0; if($q['lab10r'] > 2.0) $m02 = $q['lab10r']; else $m02 = 0.0; if($q['lab12r'] > 2.0) $m03 = $q['lab12r']; else $m03 = 0.0; $ocena_egz = max($m01, $m02, $m03); } else { if($ocena_kartk >= $prog && $q['lab11r'] == 1) $ocena_egz = $ocena_kartk; else $ocena_egz = 0.0; } //--- OCENA KONCOWA if($ocena_kartk != '-' && $ocena_proj != '-' && $ocena_egz != 0.0) { if($ocena_kartk > 4.0) { $rateVal = round($ocena_proj + $ocena_egz)/2; } else { if(round(0.8*$ocena_proj + 0.8*$ocena_egz + 0.4*$ocena_kartk)/2 < 3) $rateVal = 3.0; else $rateVal = round(0.8*$ocena_proj + 0.8*$ocena_egz + 0.4*$ocena_kartk)/2; } } else { $rateVal = '-'; } //--- RETURNING ----------------------------------------------------------- if(is_numeric($rateVal) && $rateVal < 3.0) { $rateVal = ''.number_format($rateVal, 1).''; } else { if(is_numeric($rateVal)) $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 'E': $aI = 'Egzamin '.$actNum; break; case 'F': $aI = 'Egzamin poprawkowy '.$actNum; break; case 'G': $aI = 'Kartkówka '.$actNum; break; case 'H': $aI = 'Zwolnienie z egzaminu '.$actNum; break; case 'Z': $aI = 'Przepisanie oceny '.$actNum; break; default: $aI = ''; break; } return $aI; } $tWidth = 70 + ($lNum-1)*50*3 + 100; ?> <? echo $sTitle; ?> '; echo ''; echo ''; echo ''; echo ''; echo '
'; echo $sTitle; echo ''; echo '
'; echo '
'; echo ''; echo ''; echo ''; for($l=0; $l<$lNum; $l++) { if($l != 10) { echo ''; } } echo ''; echo ''; //--------------------------------------------------------- //- CONTENT //--------------------------------------------------------- for($i=0; $i'; echo ''; for($l=1; $l<=$lNum; $l++) { if($l != 11) { 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 '
'; ?>