diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-30 15:43:52 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-01-30 15:43:52 +0100 |
commit | 8ea6ea6db019f68436a69f36aae55a9f205efa35 (patch) | |
tree | 5c367520523c42b1935491d199b4e8f3c17b4708 /doc/niels-diplom/Dateistruktur/results/statistic.php | |
parent | ec6e82dbcdc153b9973240cdff91a03b6d2dc886 (diff) | |
download | sqltutor-plugin-8ea6ea6db019f68436a69f36aae55a9f205efa35.tar.gz sqltutor-plugin-8ea6ea6db019f68436a69f36aae55a9f205efa35.tar.bz2 sqltutor-plugin-8ea6ea6db019f68436a69f36aae55a9f205efa35.zip |
doc: Nils Weber doesnt have an 'e' in his firstname
Diffstat (limited to 'doc/niels-diplom/Dateistruktur/results/statistic.php')
-rwxr-xr-x | doc/niels-diplom/Dateistruktur/results/statistic.php | 211 |
1 files changed, 0 insertions, 211 deletions
diff --git a/doc/niels-diplom/Dateistruktur/results/statistic.php b/doc/niels-diplom/Dateistruktur/results/statistic.php deleted file mode 100755 index 74e0fb8..0000000 --- a/doc/niels-diplom/Dateistruktur/results/statistic.php +++ /dev/null @@ -1,211 +0,0 @@ -<?php - - include("../header.php"); - - $user = $_SESSION['user']; - - $sql = "select max(tmp.versuche) from ERROR_LOG join (SELECT LESSON_ID, count(lesson_ID) as VERSUCHE FROM error_log group by LESSon_ID)tmp on tmp.LESSON_ID=ERROR_LOG.LESSON_ID"; // wieviele Aufgabe sind derzeit aktiv - - $stmt = dbconnect($sql); - - OCIExecute($stmt); - - $nrows = OCIFetchStatement($stmt,$results); - - if ( $nrows == 1 ) - { - OCIExecute($stmt); - - while(OCIFetch($stmt)) - { - $max = OCIResult($stmt, $results); // Anzahl der zu lösenden Aufgaben - } - } - - - $sql = "select LO.NR, VERSUCHE_insgesamt from LESSON_ORDER LO join (SELECT LESSON_ID, count(lesson_ID) as VERSUCHE_insgesamt FROM error_log group by LESSON_ID)tmp on LO.LESSON_ID=tmp.LESSON_ID order by LO.NR"; - - $stmt = dbconnect($sql); - - OCIExecute($stmt); - -?> - - <tr > - <td><div class=titel_15>STATISTIK</div></td> - </tr> - <tr> - <td><br></td> - </tr> - <tr> - <td bgcolor=#e99900 colspan=2><div class=text><b>Überblick über die Lösungsversuche pro Aufgabe:</b></div></td> - </tr> - <tr> - <td> - -<? - - -$nrows = OCIFetchStatement($stmt,$results); //Ergebnisse in Array eintragen... - -if ( $nrows > 0 ) - { - print "<BR><TABLE BORDER=\"1\" class=text>\n"; - print "<TR>\n"; - while ( list( $key, $val ) = each( $results ) ) - { - print "<TH>$key</TH>\n"; - } - print "</TR>\n"; - - for ( $i = 0; $i < $nrows; $i++ ) { - $col=0; - reset($results); - print "<TR>\n"; - while ( $column = each($results) ) - { - $data = $column['value']; - - if ($col==1) - { - $percent = $data[$i] * 100/$max; //wieviel Prozent der aufgaben hat der Student gelöst - - $width = $percent * 400/100; // Darstellung per Balkendiagramm - - if ($percent <= 25) - print "<td width=500> <img src=\"/dipl/css/balken_gruen.gif\" width=$width height=10 > $data[$i] Anfragen</td>"; - if ($percent > 25 and $percent < 50) - print "<td width=500> <img src=\"/dipl/css/balken_orange.gif\" width=$width height=10 > $data[$i] Anfragen</td>"; - if ($percent >= 50) - print "<td width=500> <img src=\"/dipl/css/balken_rot.gif\" width=$width height=10 > $data[$i] Anfragen</td>"; - } - - else - print "<TD>$data[$i]</TD>\n"; - $col++; - } - print "</TR>\n"; - } - print "<tr><td colspan=3 class=text>Verteilung der Anzahl Anfragen nach Aufgaben.<BR></td></tr>"; - print "</TABLE><BR>"; - } - - -?> - -<br><br> -</td> -</tr> -<tr> -<td colspan=2><div class=text> </div></td> -</tr> -<tr> -<td bgcolor=#e99900 colspan=2><div class=text><b>durchschnittlich zur Lösung benötigte Zeit in Tagen:</b>:</div></td> -</tr> -<tr> -<td colspan=2><div class=text> </div></td> -</tr> -<tr> -<td> - -<? - -$sql="select max(schnitt) from LESSON_ORDER LO join (select LESSON_ID, round(sum(time)/count(LESSON_ID),1) as schnitt from (select LESSON_ID, STUD_ID, max(datum) - min(datum) as time from (select stud_ID, datum, LESSON_ID from ERror_log union select stud_ID, datum, LESSON_ID from Logon) group by (LESSON_ID, STUD_ID)) group by LESSON_ID)tmp on LO.LESSON_ID=tmp.LESSON_ID order by LO.NR"; - -$stmt = dbconnect($sql); - - OCIExecute($stmt); - - $nrows = OCIFetchStatement($stmt,$results); - - if ( $nrows == 1 ) - { - OCIExecute($stmt); - - while(OCIFetch($stmt)) - { - $tagmax = OCIResult($stmt, $results); // Anzahl der zu lösenden Aufgaben - } - } - - - - -$sql="select LO.NR, schnitt as \"benötigte Zeit\" from LESSON_ORDER LO join (select LESSON_ID, round(sum(time)/count(LESSON_ID),1) as schnitt from (select LESSON_ID, STUD_ID, max(datum) - min(datum) as time from (select stud_ID, datum, LESSON_ID from ERror_log union select stud_ID, datum, LESSON_ID from Logon) group by (LESSON_ID, STUD_ID)) group by LESSON_ID)tmp on LO.LESSON_ID=tmp.LESSON_ID order by LO.NR";// benötigte Zeit ermitteln... - -$stmt = dbconnect($sql); - -OCIExecute($stmt); - -$nrows = OCIFetchStatement($stmt,$results); - - -if ( $nrows > 0 ) - { - print "<BR><TABLE BORDER=\"1\" class=text width=560>\n"; - print "<TR>\n"; - while ( list( $key, $val ) = each( $results ) ) - { - print "<TH>$key</TH>\n"; - } - print "</TR>\n"; - - for ( $i = 0; $i < $nrows; $i++ ) - { - $col=0; - reset($results); - print "<TR>\n"; - while ( $column = each($results) ) - { - $data = $column['value']; - - if ($col==1) - { - - $wert = (float)(ereg_replace(",", ".", $data[$i])); // umwandeln in float - $percent = $wert * 100/$tagmax; //wieviel Prozent der aufgaben hat der Student gelöst - - $width = $percent * 4; - - if ($percent >= 0 and $percent <= 25) - print "<td width=500> <img src=\"/dipl/css/balken_gruen.gif\" width=$width height=10 > $wert Tage</td>"; - if ($percent > 25 and $percent < 50) - print "<td width=500> <img src=\"/dipl/css/balken_orange.gif\" width=$width height=10 > $wert Tage</td>"; - if ($percent >= 50) - print "<td width=500> <img src=\"/dipl/css/balken_rot.gif\" width=$width height=10 > $wert Tage</td>"; - /*if ($percent == 0) - print "<td width=500> $wert Tage</td>"; - if ($percent > 0 and $percent < 1) - print "<td width=500> <img src=\"/dipl/css/balken_rot.gif\" width=2 height=10 >$wert Tage</td>";*/ - } - - else - print "<TD>$data[$i]</TD>\n"; // Name und vorname ausgeben.... - $col++; - } - print "</TR>\n"; - } - } -else - { - if (isset($_GET['ID'])) - { - $message = "Es sind noch keine Aufgaben gelöst worden...."; - } - - print "<tr><td class=text>" . $message . "<BR></tr></td>"; - } - -?> - -</td> -</tr> - -</table> -</table> -</table> - - -<? -include("../footer.php"); -?>
\ No newline at end of file |