Cómo hacer que se refleje el resultado de la evaluación de un docente mediante %
Publicado por María Fernanda (1 intervención) el 02/08/2015 23:44:17
Este el código en PHP, pero sólo refleja la evaluación del docente, es decir, la auto evaluación, pero hay otros formularios que hacen casi lo mimo, la del alumno, del rector y del inspector. Lo que quiero es un solo resultado donde se tome el 70% del alumno y el resto de los otros 3 evaluadores es decir, 10% del docente, 10% del rector y 10% del inspector.
Espero me puedan ayudar.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
session_start();
if ($_SESSION['userid']!=3){
echo '<br><br><br><br><br><br><br><br><br><center><h3>NO AUTORIZADO</h3></center>';
}else{
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Resultados Final de la Evaluación del Docente</title>
</head>
<body>
<center>
<div><img src=Imagenes/11.jpg width='40%'></div>
<h3>RESULTADOS DE LA AUTO-EVALUACIÓN DE DOCENTES DEL CURSO DE NIVELACIÓN (VII 2S-2015)</h3>
</center>
<?php
include 'conexion.php';
conectar();
$grafico=NULL;
echo "<br> <center>
<table border='1'; style='text-align: center; font-size: larger'>
<tr><td></td><td></td><td colspan='2'><b>NIVEL DE ACENTACIÓN<td><td></td></tr>
<tr><td ><b> No </td><td ><b> DOCENTES </td><td ><b> ABSOLUTO </td><td ><b> PORCENTAJE </td><td ><b> GRAFICOS </td><td ><b> RESULTADOS </td></tr>";
for ($i=1; $i<=333; $i++){// 333 = docentes = i
$docente = mysql_query("SELECT Nombres from docente WHERE iddocente='+$i+'") or die(mysql_error());
$longitud = mysql_query("select count(iddocente) from resultados where iddocente='+$i+' && autoevaluacion=1") or die(mysql_error());
$long=mysql_fetch_row($longitud);
$long[0]= htmlentities($long[0]); // $long[0] = estudiantes de cada docente = j
$s1=0;
$s2=0;
$s3=0;
$s4=0;
for ($j=1;$j<=31;$j++){ // j = cantidad de preguntas
for ($z=1;$z<=4;$z++){ // z= ponderacion
$pregunta=NULL;
$pregunta="p";
$pregunta .=$j;
$pregunta="$pregunta=$z";
$sql="SELECT SUM($pregunta), iddocente from resultados WHERE iddocente=$i && autoevaluacion=1";
$puntaje = mysql_query($sql) or die (mysql_error());
$punt=mysql_fetch_row($puntaje);
$punt[0]= htmlentities($punt[0]);
switch ($z) {
case 1:
$s1=$s1+$punt[0];
break;
case 2:
$s2=$s2+$punt[0];
break;
case 3:
$s3=$s3+$punt[0];
break;
case 4:
$s4=$s4+$punt[0];
break;
default:
break;
}
}
}
$st=$s1+$s2+$s3+$s4;
$media=(($s1*1)+($s2*2)+($s3*3)+($s4*4));
if ($media!=0){
$porcent1=($s1*100)/$st;
$porcent2=($s2*100)/$st;
$porcent3=($s3*100)/$st;
$porcent4=($s4*100)/$st;
}else{
$porcent1=0;
$porcent2=0;
$porcent3=0;
$porcent4=0;
}
if ($long[0]!=0){
$media= round(($media/($long[0]*31))*100)/100;
}else{}
while($registro=mysql_fetch_row($docente))
{
$registro[0]=htmlentities($registro[0]);
$porcentaje= round(($media/4)*10000)/100;
$porcentaje .=" %";
echo " <tr>
<td > $i </td>
<td> ".$registro[0]." </td>
<td style='width: 150'> ".$media." </td>
<td style='width: 150'> ".$porcentaje." </td>
<td >
<form action='grafico.php' method='POST' name='fgraf' id='fgraf' target='_blank'>
<input type='text' name='suma1' value='$porcent1' hidden='true' />
<input type='text' name='suma2' value='$porcent2' hidden='true' />
<input type='text' name='suma3' value='$porcent3' hidden='true' />
<input type='text' name='suma4' value='$porcent4' hidden='true' />
<input type='text' name='docente' value='$registro[0]' hidden='true' />
<input type='submit' name='graficar' id='graficar' value='Graficar' ></input></center></form> </td>
<td>
<form action='ind_auto.php' method='POST' name='findv' id='findv' target='_blank'>
<input type='text' name='docente' value='$registro[0]' hidden='true' />
<input type='text' name='iddocent' value='$i' hidden='true' />
<input type='submit' name='individual' id='individual' value='Resultados' ></input></td></form>
</tr>";
}
}echo "</table>";
desconectar();
?>
</body>
</html>
<?php
}
?>
Espero me puedan ayudar.
Valora esta pregunta
0