Hi,
I am looking for a little bit of guidance in adding Book stats into the MyStats Block available: http://docs.moodle.org/25/en/My_stats_block
I am assuming the Dev of this plugin hasnt logged in Moodle since long, so its useless messaging him. So i wonder if i can find someone who could help me out figure this one out,
I see the file block_mystats.php and can see the functions defined there, I have the query i need to know for the Book completion which is:
SELECT
cm.`instance`,
cmc.`completionstate`,
cmc.`timemodified`,
b.`name`,
u.`firstname`
FROM
`mdl_course_modules_completion` cmc INNER JOIN `mdl_course_modules` cm ON cmc.`coursemoduleid` = cm.`id`
INNER JOIN `mdl_book` b ON cm.`instance` = b.`id`
INNER JOIN `mdl_user` u ON cmc.`userid` = u.`id`
WHERE
cmc.completionstate = '1'
cmc.userid= ‘2’
---
Gives me something like:
Module Completion Report for Selena
The student has completed
Level 3 Module 15: Review of Multiplication
on 28th July 2013 10:16:41 PM (PDT)
Level 3 Module 16: Review of Division
on 28th July 2013 10:17:01 PM (PDT)
Level 3 Module 17: Zero in Multiplication
on 28th July 2013 10:18:24 PM (PDT)
Level 3 Module 18: Word Problems
on 28th July 2013 10:18:35 PM (PDT)