Ability to reset a workbook - remove all submitted answers

I need to be able to reset a student's workbook. Removing them and re-enrolling all of the previous answers are still saved/submitted.

For purposes of doing Demo/Walkthroughs I want to be able to reset all answers on a workbook and start fresh without creating a new user.

  • Michael Bissett

    Hey @QuickenLoans, Michael here!

    To accomplish this, we'd need to use a SQL queries here (which could be executed inside of phpMyAdmin).

    (please have a backup of your database handy before doing this, you could use our Snapshot Pro plugin to create such a backup)

    Assuming the following:
    - the user ID is "5"
    - the course ID is "5"
    - you've left your database prefix as "wp_"

    Then the following queries could be used inside of phpMyAdmin:

    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_key LIKE  '%course_5%'
    LIMIT 0 , 30
    
    SELECT *
    FROM wp_posts
    WHERE post_author LIKE  '5'
    AND post_type LIKE  'module_response'
    LIMIT 0 , 30
    
    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_key LIKE  '%visited_unit%'
    LIMIT 0 , 30
    
    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_key LIKE  '%visited_course%'
    LIMIT 0 , 30
    
    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_key LIKE  '%enrolled_course_date_5%'
    LIMIT 0 , 30
    
    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_key LIKE  '%enrolled_course_class_5%'
    LIMIT 0 , 30
    
    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_key LIKE  '%enrolled_course_group_5%'
    LIMIT 0 , 30
    
    SELECT *
    FROM  wp_usermeta
    WHERE user_id LIKE '5'
    AND  meta_value LIKE  '%course_completion%'
    LIMIT 0 , 30

    You would need to execute each one separately, and delete the results displayed, but once you've done so, and once you've logged out & logged back in with your test user, you should find that your test user's course progress has been completed wiped out. :slight_smile:

    Let me know if this helps please!

    Kind Regards,
    Michael

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.