• 2 quick questions, my players are starting to track their practice using your plugin, which is great. Each week they need to start over. is there a way that I from the admin side can delete their progress?

    Also, Lets say they practice 10 out of the 20 minutes required. Is there a way to make it show a percentage? Or is a all or nothing. thanks

    https://www.danfordgolfinstruction.com

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Alex Furr

    (@alexfurr)

    Hi,
    I’m glad you’re finding it of use. Currently there isn’t an interface to delete progress data. However, if you’re PHP competent and fancy a quick edit you can add the following to the class-progress-tracker.php page. Make sure its in the main class i.e. before the last “}”

    function deleteAllUserData ( $userID  )
    	{
    		global $wpdb;
    		$result = $wpdb->query( 
    			$wpdb->prepare( 
    				"DELETE FROM " . $wpdb->prefix . $this->dbTable_users . " WHERE user_id = %d",
    					$userID 
    				)
    		);
    		
    		return ( $result === false ) ? false : true;
    	}

    Then to delete all data for a user you can call the following function, for example on the settings-tabs.php page:
    $P_TRACKER -> deleteAllUserData(1);

    That will delete all data for user ID 1.
    I’m working on adding this to the next release but I’ve just got a new job so it may be a little while.

    Regarding your second point, I don’t quite understand the 10 of 20 minutes question.
    Its based on if they’ve been to a page, not how long they’ve spent on a page.

    Alex

Viewing 1 replies (of 1 total)
  • The topic ‘manually delete progress’ is closed to new replies.