Okay
  Public Ticket #2435701
How group leaders can see editable tables
Closed

Comments

  • Erica Michelsson started the conversation

    I am looking for a plugin that allows me to collect short essay/string responses and make a table from them. Course attendees (Learndash) would only see their own responses, but Group leaders would see everyone's responses, although only concerning those that are in their group (I use the uncanny groups plugin to view responses). You seem to have a neat way to make editable tables, but how would the responses be seen in the uncanny groups group administration? Is there a way to allow group leaders to see their groups responses but not others?

  •  2,572
    Aleksandar replied

    Hello Erica

    Thank you for your interest in our plugin.

    We have a feature Users see and edit only own data, which allows you to select an integer column, which would be used as the ID column of user's WordPress user IDs.

    If the dependency is a user role, for example, we could make it work.

    If I have this table:

    5458776907.png

    This is a manual table which has manually entered IDs from wp_users and roles from wp_usermeta:

    7855603551.png
    6462766399.png
    7686895681.png

    So, then I go to create an SQL query based table which will display entries based on user roles using this query:

    SELECT  new_table.id AS ID,
            new_table.role AS Role,
            new_table.product AS Product,
            new_table.amount AS Amount
    FROM wp_wpdatatable_6 AS new_table
    JOIN wp_usermeta AS new_table_1
    ON new_table_1.user_id = %CURRENT_USER_ID%
    AND new_table_1.meta_value LIKE CONCAT('%', new_table.role, '%')
    

    When I'm logged in with user ID = 1, I see this:

    9999185249.png

    When I'm logged in with user ID = 4, I see the same thing. And when I'm logged in as one of the subscribers, I can only see the rows where role = subscriber:

    2907856651.png

    The only difference is that as subscriber I don't have access to back-end, so this confirms it is working on both front and back.

    So, we're only left with hiding unnecessary columns, adding names, and so on.

    Hope this helps.

    If you purchase the plugin, and we figure out we can't get it to match your idea, you can ask for a refund within 15 days of purchase.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables