get list of feedback completed of course

get list of feedback completed of course

by Luis Gonzales -
Number of replies: 6

how i can get the list of feedback completed of the course, I've searched a lot, but I can't find anything.

Thanks

Average of ratings: -
In reply to Luis Gonzales

Re: get list of feedback completed of course

by Randy Thornton -
Picture of Documentation writers
In reply to Randy Thornton

Re: get list of feedback completed of course

by Luis Gonzales -
i try , but with this sql i get only one feedback , with the result, and i only need if the feedback is completed, thanks for response
In reply to Luis Gonzales

Re: get list of feedback completed of course

by Thomas Stanley-Jones -
I don't see an example of your SQL. Try pasting it in this forum again so I can see what you're doing.
In reply to Thomas Stanley-Jones

Re: get list of feedback completed of course

by Luis Gonzales -


i try this sql, but i get the item and dont get the status of feedback of the course,

SELECT  crs.fullname as "Course name", f.name AS "Journal name", CONCAT(u.firstname,' ',UPPER(u.lastname)) as "Participant", 

DATE_FORMAT(FROM_UNIXTIME(c.timemodified),'%W %e %M, %Y') as "Answer Date",

CASE i.typ WHEN 'label' THEN i.presentation ELSE i.name END as "Topic",  /* usually labels are used as section titles, so you'd want them present in the recordset */

v.value as "My Answer"

FROM prefix_feedback AS f

INNER JOIN prefix_course as crs on crs.id=f.course %%FILTER_COURSES:f.course%%

INNER JOIN prefix_feedback_item AS i ON f.id=i.feedback

INNER JOIN prefix_feedback_completed AS c on f.id=c.feedback %%FILTER_COURSEUSER:c.userid%%

LEFT JOIN prefix_feedback_value AS v on v.completed=c.id AND v.item=i.id

INNER JOIN prefix_user AS u on c.userid=u.id

WHERE c.id = %%COURSEID%% 

ORDER BY f.id, c.timemodified, i.id

In reply to Thomas Stanley-Jones

Re: get list of feedback completed of course

by Luis Gonzales -

this sql i want , but i dont know why dont get all feedbacks of the courses,


SELECT
u.id AS "ID",
c.id AS 'Course ID',
CONCAT(u.firstname ,' ', u.lastname)  as "Usuario",

CASE
    WHEN m.name = 'feedback'  THEN (SELECT name FROM prefix_feedback WHERE id = cm.instance)
END AS Activityname,

CASE
   WHEN cmc.completionstate = 0 THEN 'No completado'
   WHEN cmc.completionstate = 1 THEN 'Completado'
   WHEN cmc.completionstate = 2 THEN 'Completado con ayuda'
   WHEN cmc.completionstate = 3 THEN 'Completado con fallos'
   ELSE 'Unknown'
END AS 'Estado'



FROM prefix_course_modules_completion cmc
JOIN prefix_user u ON cmc.userid = u.id
JOIN prefix_course_modules cm ON cmc.coursemoduleid = cm.id
JOIN prefix_course c ON cm.course = c.id
JOIN prefix_modules m ON cm.module = m.id

ORDER BY u.username

In reply to Luis Gonzales

Re: get list of feedback completed of course

by Randy Thornton -
Picture of Documentation writers
Luis,

Ah, now I understand. You want just the completion status.

The query you are using, based on one of mine, is a good start. What you need to do is then restrict it to only the feedback modules. One way to do is to JOIN the course_modules to the feedback table and then add a WHERE clause restricting it. Otherwise you are getting a whole bunch of other modules from the course_modules table.

Try adding these lines to the end of the other JOINs.

JOIN prefix_feedback f ON f.id = cm.instance
WHERE m.name = 'feedback'
Average of ratings: Useful (2)