USE OF %%FILTER_SEARCHTEXT:table.field%% configurable reports Moodle 2 (idioma: ingles y español) USO DE FILTRO

USE OF %%FILTER_SEARCHTEXT:table.field%% configurable reports Moodle 2 (idioma: ingles y español) USO DE FILTRO

by Lucas Jurado -
Number of replies: 3

Buenas tardes,

Good afternoon,

http://docs.moodle.org/24/en/ad-hoc_contributed_reports

En el enlace original de ad-hoc contributed reports leí que se pueden realizar FILTROS sobre los REPORTS (moodle 2) de la siguiente manera: 

Enrolled users,which did not login into the Course, even once (Moodle 2)
Designed forMoodle 2 table structure and uses special plugin filter : %%FILTER_SEARCHTEXT:table.field%%

Tengo la version 2.3.3 y He añadido un SEARCHFILTER a mi consulta SQL, pero ¿Cómo uso ahora ese filtro sino hay ningún desplegable para poder seleccionar o como introducir ese parámetro para que el filtro actúe ?

La consulta es la siguiente:

SELECT distinct u.firstname Nombre,u.lastname Apellido,c.shortname Curso, sc.name, FROM_UNIXTIME(st.timemodified,"%m-%d-%Y") Fecha, st.attempt Intento,st.value Tiempo
FROM prefix_scorm_scoes_track AS st
JOIN prefix_user AS u ON st.userid=u.id
JOIN prefix_scorm AS sc ON sc.id=st.scormid
JOIN prefix_course AS c ON c.id=sc.course
WHERE st.element like '%cmi.core.total_time%' or st.element like '%latency%' and u.firstname not like '%Administrador%' and u.lastname not like '%UAU%' and u.firstname not like '%Alumno%'
ORDER BY c.fullname, u.lastname,u.firstname, st.attempt, st.timemodified ASC
%%FILTER_YEARS:u.lastname%%

La consulta SQL se guarda correctamente en el sistema pero en la pestaña de filtros tampoco puedo añadir ningun filtro desplegable adicional y no se me ocurre cómo puedo introducir ese parámetro.

¿Cómo podría introducir el apellido por el que quiero filtrar?

Agradezco vuestra ayuda y además os cedo este informe que lo que hace es sacar las fechas de inicio y fin de matricula de todos los cursos y todos los usuarios.

Si nadie sabe manejar el filtro, al menos, ¿Cómo podría sacar este tipo de informe para alumnos en concreto? ¿Alguna idea? 

 

ENGLISH:

 The SQL query is stored correctly in the system but in the Filters tab I can not add any additional dropdown filter and I can not think how I can enter this parameter.

How could enter the name by which I filter?

I appreciate your help and also I give you this report does is draw the start and end dates of enrollment for all courses and all users.

If anyone knows how to handle the filter, at least, how could I get this kind of report for specific students? Any idea?

Average of ratings: -
In reply to Lucas Jurado

Re: USE OF %%FILTER_SEARCHTEXT:table.field%% configurable reports Moodle 2 (idioma: ingles y español) USO DE FILTRO

by Pedro H. Castelló -

Lucas, en relación a tu mensaje, revisa este SQL que he creado para saber las notas de todos los usuarios en todos los cuestionarios de todos los cursos.

Tiene 4 filtros.

Eso sí, hay que crear los 4 filtros tanto en el SQL (%%FILTER...) como en la pestaña filtros del configurable_reports (uso Moodle 2.4.1) (en este caso 3 filtros pues las fechas las considera agrupadas).

SELECT u.lastname AS 'Apellidos', u.firstname AS 'Nombre', c.fullname AS 'Curso', gi.itemname AS 'Cuestionario', ROUND(gg.finalgrade,2) AS 'Nota', ROUND(gg.rawgrademax,2) AS 'Max.',
FROM_UNIXTIME(gg.timecreated, '%d/%m/%Y %H:%i') AS 'Realizado'
 
FROM prefix_course AS c
JOIN prefix_context AS ctx ON c.id = ctx.instanceid
JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id
JOIN prefix_user AS u ON u.id = ra.userid
JOIN prefix_grade_grades AS gg ON gg.userid = u.id
JOIN prefix_grade_items AS gi ON gi.id = gg.itemid
JOIN prefix_course_categories AS cc ON cc.id = c.category
WHERE  gi.courseid = c.id AND gi.itemname != 'Attendance'

%%FILTER_COURSES:c.id%%
%%FILTER_USERS:u.firstname%%
%%FILTER_STARTTIME:gg.timecreated:>%%
%%FILTER_ENDTIME:gg.timecreated:<%%

ORDER BY `Apellidos` ASC,`Nombre` ASC

 

Como verás, la información que hay en en ad-hoc que comentabas (Designed forMoodle 2 table structure and uses special plugin filter : %%FILTER_SEARCHTEXT:table.field%%) no es válida en mi caso.

Pues he tenido que pelearme con la sintaxis para averiguar que el filtro de usuario funciona con %%FILTER_USERS:u.firstname%%

Espero que te sirva de algo esta información.

Saludos.

In reply to Pedro H. Castelló

Re: USE OF %%FILTER_SEARCHTEXT:table.field%% configurable reports Moodle 2 (idioma: ingles y español) USO DE FILTRO

by Lucas Jurado -

Buenos días Pedro,

Gracias por tu información. El problema es que no puedo añadir los filtros en la pestaña filtros, ya que solo me da la opcion de añadir filtro de curso, categorías o fechas, pero no de USUARIO.

 

En la vista del informe tampoco aparece el filtro.

¿A ti te aparecen más tipos de filtro en esa pestaña?

Tengo la version: Moodle 2.3.3+ (Build: 20121123) ¿Puede ser por esto?

Un saludo y gracias por tu ayuda.

 

In reply to Lucas Jurado

Re: USE OF %%FILTER_SEARCHTEXT:table.field%% configurable reports Moodle 2 (idioma: ingles y español) USO DE FILTRO

by Kimber Warden -

I was having the same problem until I downloaded the latest version of Configuration Reports. Are you using the most recent version?