12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?php
- // @copyright 2014 LInE - http://line.ime.usp.br
- $conn = mysql_connect("localhost", "root", "XYZAdminLMDlA00--");
- $db = mysql_select_db("moodle2_6_1_2014_02");
- //$query_a = mysql_query("select m_course.*, m_nasatlx.course as cid, m_nasatlx.name from m_nasatlx, m_course where m_nasatlx.course = m_course.id");
- $query_a = mysql_query("select * from m_nasatlx_resps group by cmid");
- $cont = 0;
- $cmids = array();
- $cmids[30] = "1 - T1";
- $cmids[193] = "2.4 - T1";
- $cmids[196] = "2.x Desafio - T1";
- $cmids[309] = "3.4 - T1";
- $cmids[314] = "Discursiva - T1";
- $cmids[68] = "1 - T2";
- $cmids[203] = "2 - T2";
- $cmids[204] = "2 Desafio - T2";
- $cmids[321] = "3.4 - T2";
- $cmids[324] = "Discursiva - T2";
- $cmids[88] = "1 - T3";
- $cmids[209] = "2 - T3";
- $cmids[215] = "2 Desafio - T3";
- $cmids[330] = "3.4 - T3";
- $cmids[333] = "Discursiva - T3";
- while ($d = mysql_fetch_array($query_a)) {
- print $cmids[intVal(strval(($d["cmid"])))]. " " ." - " . intVal(strval(($d["cmid"])))."\n";
- $query_r = mysql_query("select * from m_nasatlx_resps where cmid = ".$d["cmid"]." and user > 7");
- print "ESCALA";
- while($d2 = mysql_fetch_array($query_r)) {
- print ";".$d2["user"]."";
- }
- print "\n";
-
- mysql_data_seek($query_r, 0);
- $escalas = array();
- for($i=0;$i<6;$i++)
- $escalas[] = "scale".($i+1);
- for($i=0;$i<6;$i++)
- $escalas[] = "peso".($i+1);
- for($i=0;$i<6;$i++)
- $escalas[] = "calc".($i+1);
- foreach($escalas as $e){
- mysql_data_seek($query_r, 0);
- print $e."";
- while($d2 = mysql_fetch_array($query_r)){
- print ";".str_replace(".", ",", $d2[$e]);
- }
- print "\n";
- }
- /*while($d2 = mysql_fetch_array($query_r)){
- print
- $d2["scale1"].";".
- $d2["scale2"].";".
- $d2["scale3"].";".
- $d2["scale4"].";".
- $d2["scale5"].";".
- $d2["scale6"].";";
- print
- $d2["peso1"].";".
- $d2["peso2"].";".
- $d2["peso3"].";".
- $d2["peso4"].";".
- $d2["peso5"].";".
- $d2["peso6"].";";
- print
- $d2["calc1"].";".
- $d2["calc2"].";".
- $d2["calc3"].";".
- $d2["calc4"].";".
- $d2["calc5"].";".
- $d2["calc6"].";\n";
- }*/
- }
|