Mi duda esta relacionada con la obtencion de las calificaciones por estudiante en un curso donde cada uno de los modulos que conforman dicho curso es una materia por tal motivo se requiere obtener de la base de datos dicha informacion!!! me explico la sumatoria de todas las tareas de ese modulo es la nota definitiva del estudiante... no obstante al momento de exportar la data por el modulo de calificaciones solo muestra las asignaciones del estudiante con su respectiva nota mas no me dice a que modulo pertenece esa asignacion.. me explico ???
a continuacion muestro el select que realice pero el mismo a pesar de traer la calificacion de la tarea no me muestra a que modulo del curso pertenece
$con = mysql_connect("localhost","root","123456");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("moodledbname", $con);
$result = mysql_query("select u.username,c.fullname,a.name,a_s.grade,cs.summary
from mdl_user AS u,mdl_course AS c,mdl_groups_members AS gm, mdl_groups AS g,mdl_assignment AS a,mdl_assignment_submissions AS a_s,mdl_grade_items AS gi, mdl_course_sections AS cs where
u.idnumber='10736552'
and gm.userid=u.id
and gm.groupid=g.id
and c.id=g.courseid
and a.course=c.id
and a_s.userid=u.id
and a.id=a_s.assignment
and gi.courseid=c.id
and gi.iteminstance=a.id
and cs.course=c.id
GROUP BY a.id
ORDER BY gi.sortorder",$con);
Print "<table border=1 cellpadding=1 width=900px>";
Print "<tr>";
Print "<td width=125px bgcolor=#C0C0C0><b>Username</b></td>";
Print "<td width=400px bgcolor=#C0C0C0><b>Assignment Name</b></td>";
Print "<td width=300px bgcolor=#C0C0C0><b>Course</b></td>";
Print "<td width=75px bgcolor=#C0C0C0><b>Grade</b></td>";
Print "<td width=75px bgcolor=#C0C0C0><b>modulo</b></td>";
Print "</tr>";
Print "<tr>";
Print "</table>";
$x=0;
Print "<table border=1 cellpadding=1 width=900px>";
while($row = mysql_fetch_array( $result ))
{ $x++;
Print "<tr>";
Print "<td width=125px>".$x. "</td>";
Print "<td width=125px>".$row['username'] . "</td>";
Print "<td width=400px>".$row['name'] . "</td>";
Print "<td width=300px>".$row['fullname'] . "</td>";
Print "<td width=75px>".$row['grade'] . "</td>";
Print "<td width=75px>".strip_tags($row['summary']). "</td>";
Print "</tr>";
}
Print "</table>";
Agradeciendo de antemano cualquier apoyo que me puedan brindar al respecto????
Slds. Roberto Pinto