Title: Simple Course Timer data
Last modified: November 21, 2020

---

# Simple Course Timer data

 *  Resolved [ainstushar](https://wordpress.org/support/users/ainstushar/)
 * (@ainstushar)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/simple-course-timer-data/)
 * Hi there,
 * We are thinking about purchasing the simple course timer for our site. We need
   to access this data for further automated processing. Does simple course timer
   have API/filters/hooks that easily allow us to get total time a user has spent
   on course (without using shortcode).
 * Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Uncanny Owl](https://wordpress.org/support/users/uncannyowl/)
 * (@uncannyowl)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/simple-course-timer-data/#post-13709996)
 * Hi [@ainstushar](https://wordpress.org/support/users/ainstushar/) ,
 * It would be difficult to get the data you want; you’ll have to do some lookups,
   but the data itself is here.
 * Here’s the file where we store the records, in case you want to see how it’s 
   done:
 * wp-content/plugins/uncanny-toolkit-pro/src/includes/simple_timer_performance.
   php
 * Here’s how we do it:
 * $meta_key = ‘uo_timer_’ . $course_ID . ‘_’ . $post_ID;
    $q = “SELECT meta_value
   FROM $wpdb->usermeta WHERE meta_key = ‘{$meta_key}’ AND user_id = {$current_user-
   >ID}”;
 * Data is stored in the user_meta table. The meta is ‘uo_timer_’ . $course_ID .‘_’.
   $post_ID and if the user is on the course page then $post_id will the the $course_id,
   otherwise $post_id will be the lesson, topic, or quiz ID.
 * You could also take a look the code to see how our [uo_time] shortcode works;
   you could use the same method if you want to pull time data down for an entire
   course.
 * I hope that helps.
 *  Thread Starter [ainstushar](https://wordpress.org/support/users/ainstushar/)
 * (@ainstushar)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/simple-course-timer-data/#post-13778883)
 * Thank you! It does help!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Simple Course Timer data’ is closed to new replies.

 * ![](https://ps.w.org/uncanny-learndash-toolkit/assets/icon-256x256.jpg?rev=3400711)
 * [Uncanny Toolkit for LearnDash](https://wordpress.org/plugins/uncanny-learndash-toolkit/)
 * [Support Threads](https://wordpress.org/support/plugin/uncanny-learndash-toolkit/)
 * [Active Topics](https://wordpress.org/support/plugin/uncanny-learndash-toolkit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uncanny-learndash-toolkit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uncanny-learndash-toolkit/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ainstushar](https://wordpress.org/support/users/ainstushar/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/simple-course-timer-data/#post-13778883)
 * Status: resolved