Wondering if there is a possibility to add the 'Time Spent' statistic found in the front end Admin tab of a course for a single user somewhere else on the site. For example, putting that statistic on the Profile page so the user could see their Time Spent within each course on their Profile?
Thank you!
Hi,
Please share screenshot where you want to add Time Spent.
Hey Scott,
Here is a screenshot of where I am looking to add Time Spent:
https://imgur.com/a/poc0SLY
You will notice that I have the course progress widget on the Profile page and it include the Quiz Attempts for each course. I did both of these with custom code and am looking to achieve something similar to the Quiz Attempts where it lists the Time Spent for each course.
I could handle the placement of the Time Spent onto the widget I am just having trouble actually gathering the Time Spent statistics for each course for a user.
Thank you!
Well I can see that you have echoed a widget there in the profile to show courses and progresses .
But unfortunately there is no hook or filter available to show the time spent html there .
Either you need to re-register the whole widget again
Or you can wait upto next update till we add a hook there .
Please do share your valid ftp credentials to add the hook now along with the time spent code .
Hey Alex,
Is there any hook to show the time spent html at all? It doesn't necessarily have to be in the widget just on the profile page.
I believe I could manage to add the hook if there is one.
Hi,
Share your ftp and admin credential with us in private reply. We will add custom hook code for you.
This reply has been marked as private.
Ok,
We are working on it . After adding hook and function we will let you know.
Thank you Scott, appreciate it!
Hi,
It looks like you are doing something by yourself . We appreciate that.
Also we have added hook here :
http://prntscr.com/ok9nim
You can use this code in your customizer page :
https://gist.github.com/shubham-99fusion/9da23f2b4fd30b64dd27586e999fc9fd
Hey Scott,
Thank you so much the hook and action work perfectly, I was able to achieve exactly what I am looking for! You are awesome!
Have a great weekend!
Thanks for your precious response , we are closing this topic now as resolved.