sql : SELECT USER.id AS Uid, username, course.id AS Cid,
course.fullname As NombreCurso, firstname, lastname, email, city, country,shortname,
(SELECT data FROM ssbiobio_moodle_old.mdl_user_info_data
WHERE userid = USER.id AND fieldid='5') AS Genero,
(SELECT data FROM ssbiobio_moodle_old.mdl_user_info_data
WHERE userid = USER.id AND fieldid='4') AS Ley,
(SELECT data FROM ssbiobio_moodle_old.mdl_user_info_data
WHERE userid = USER.id AND fieldid='1') AS Dependencia,
(SELECT data FROM ssbiobio_moodle_old.mdl_user_info_data
WHERE userid = USER.id AND fieldid='2') AS EE,
(SELECT data FROM ssbiobio_moodle_old.mdl_user_info_data
WHERE userid = USER.id AND fieldid='6') AS CalidadJuridica,
(SELECT data FROM ssbiobio_moodle_old.mdl_user_info_data
WHERE userid = USER.id AND fieldid='7') AS Cargo
FROM ssbiobio_moodle_old.mdl_role_assignments AS asg
JOIN ssbiobio_moodle_old.mdl_context AS context ON asg.contextid = context.id AND context.contextlevel = 50
JOIN ssbiobio_moodle_old.mdl_user AS USER ON USER.id = asg.userid
JOIN ssbiobio_moodle_old.mdl_course AS course ON context.instanceid = course.id
WHERE asg.roleid = 5
AND (course.id='0')
ORDER BY course.id, USER.lastname
Curso | Inicio | Fin | Rut | Nombres | Apellidos | Genero | Ley | Dependencia | Establecimiento | Calidad Juridica | Cargo | Nota Final | Estado |
---|