• Resolved Thomas Villain

    (@anybodesign)


    Hello,
    Is there a way to allow a user with a specific custom role to check the results of the activities without allowing him to edit the activities?
    Hope I’m clear enough ^^
    I tried something with the plugin’s capabilities (edit_h5p_content), but checking results and editing activities seems linked together
    Thanks!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author icc0rz

    (@icc0rz)

    Hi,
    Unfortunately, there is no separate permission for this. Though, adding this to the plugin should not be that difficult.

    Thread Starter Thomas Villain

    (@anybodesign)

    Ok thanks ??
    unfortunatly I’m not skilled enough in PHP to do that ^^

    @icc0rz @anybodesign
    If I understand correctly, you basically require a “view_h5p_contents” capability that’s checked before checking the “edit_h5p_contents” capability – thus allowing to at least see the list of H5P contents. Then, if “view_h5p_results” is allowed, the results button would be visible?

    Since I added a different capability lately and I am still hoping for it to be merged in soon (wink at @icc0rz), I could add a “view_h5p_contents” capability as described above, hopefully increasing the chances of the other stuff to be released soon, because there’s even more new functionality for the users ??

    Thread Starter Thomas Villain

    (@anybodesign)

    @otacke yes! it’s exactly what I’d like to do ?? It would be awesome, thanks!

    @anybodesign Alright! I’ll see when I’ll find an hour to squeeze it in. As @icc0rz mentioned, it’s should not be difficult.

    Thread Starter Thomas Villain

    (@anybodesign)

    Thanks a lot, it’s very nice of you

    Plugin Author icc0rz

    (@icc0rz)

    @otacke That would be great! Will review it with the rest of your changes.

    Thread Starter Thomas Villain

    (@anybodesign)

    Thanks a lot @otacke!

    Thread Starter Thomas Villain

    (@anybodesign)

    Hi @otacke ??
    sorry I’ve been away for a while
    I’ve updated the H5P plugin but it’s still impossible for non-admin users to see the activities. Is there something I should do?
    I’m using User Role Editor to manage my custom roles and capabilities

    @anybodesign Have you set the view_h5p_contents capability (required to see content at all) and the view_others_h5p_contents capability (required to view content that’s not your own) as needed?

    Thread Starter Thomas Villain

    (@anybodesign)

    I’m afraid I didn’t. I do not see these capabilities in user role editor options… or what do you mean by setting these caps?
    Is it something I have to set in functions.php with add_cap filter ?

    @anybodesign Yes, those capabilities should there to choose from without any extra setting. I run “User Role Editor”, and when I go to the Menu User->User Role Editor, I can select/deselect them for each role.

    Thread Starter Thomas Villain

    (@anybodesign)

    I do not have these ?? I’ll send a screenshot tomorrow.

    Thread Starter Thomas Villain

    (@anybodesign)

    Hi!
    Once again the error was between the chair and the keyboard ^^
    I forgot to say it was on a multisite install… H5P plugin was not “network activated” but only on a couple of sites.
    If not “network activated” the new capabilities do not show up.
    Maybe it’s something to fix?
    But it’s now working perfectly ??
    Thanks for your time!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘User role capabilities’ is closed to new replies.