I have a course that has 1 or more scorm packages in each section. The report must sum total time spent in all scorms in each section.
For example
Section name | Total time in section
unit title| 7:15"32
Can you please help me in this?
So far I tried to do
SELECT u.id idname, c.fullname Course, s.name name, STR_TO_DATE(st.VALUE,'PT%iM%sS') Total,st.element, cm.module, s.id, cm.visible
FROM prefix_scorm_scoes_track st
inner JOIN prefix_user AS u ON st.userid=u.id
INNER JOIN prefix_scorm as sc ON st.scormid=sc.id
INNER JOIN prefix_course AS c ON c.id=sc.course
INNER JOIN prefix_course_sections AS s ON s.course=c.id
INNER JOIN prefix_course_modules AS cm ON cm.course=c.id
WHERE st.ELEMENT="cmi.total_time" AND s.visible='1' AND cm.module=18 AND STR_TO_DATE(st.VALUE,'PT%iM%sS') is not null
GROUP BY s.id
ORDER BY s.id, c.fullname, s.name
But the results are not correct.
Any suggestions?