PROBLEMA CON LIBRO DE CALIFICACIONES MOODLE 2

PROBLEMA CON LIBRO DE CALIFICACIONES MOODLE 2

de Samuel Ramirez -
Número de respuestas: 0

Saludos.

Tengo instalado la version 2.1.1 de moodle. Es una actualizacion de la 1.9.7

Ahora bien, cuando los estudiantes van a ver su libro de calificaciones en cada curso.

Me aparece el siguiente error:

_______________________________________________________________________

Error al leer de la base de datos

Más información sobre este error

Debug info: ERROR: syntax error at or near "WHERE"
LINE 18: WHERE gi.courseid = $4
^
SELECT gi.id, COUNT(u.id) AS count
FROM mdl_grade_items gi
JOIN mdl_user u
JOIN (SELECT DISTINCT eu2_u.id
FROM mdl_user eu2_u
JOIN mdl_user_enrolments eu2_ue ON eu2_ue.userid = eu2_u.id
JOIN mdl_enrol eu2_e ON (eu2_e.id = eu2_ue.enrolid AND eu2_e.courseid = $1)
WHERE eu2_u.deleted = 0 AND eu2_u.id <> $2) je ON je.id = u.id
JOIN (
SELECT DISTINCT ra.userid
FROM mdl_role_assignments ra
WHERE ra.roleid = $3
AND ra.contextid IN (9623,9274,1)
) rainner ON rainner.userid = u.id
LEFT JOIN mdl_grade_grades gg
ON (gg.itemid = gi.id AND gg.userid = u.id AND gg.finalgrade IS NOT NULL AND gg.hidden = 0)

WHERE gi.courseid = $4
AND u.deleted = 0
AND gg.finalgrade IS NULL

GROUP BY gi.id
[array (
0 => '92',
1 => '1',
2 => '5',
3 => 92,
)]
Stack trace:
  • line 394 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 232 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
  • line 678 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
  • line 670 of /grade/report/user/lib.php: call to pgsql_native_moodle_database->get_records_sql()
  • line 217 of /grade/report/user/lib.php: call to grade_report_user->calculate_averages()
  • line 142 of /grade/report/user/index.php: call to grade_report_user->__construct()
--------------------------------------------------------------------------------------------------------------------
Alguien me puede dar una luz sobre como solucionarlo?
Muchas gracias 
Promedio de valoraciones: -