As of QSM 6.4.6 a user having role of “Editor” or “Author” can manage the quizz.
A user having role of “Author” can only manage the quizzes created by themselves. Whereas a user having a role of “Editor” can manage all quizzes.If you are creating a custom role, you can assign the capabilties corresponding to one of these roles as per your requirements.
Example:
For “Editor’ level custom role you can assign {capability_name}
For “Admin’ level custom role you can assign {capability_name}
Here is a sample code snippet for the same
function xx__update_custom_roles() {
if ( get_option( ‘custom_roles_version’ ) < 1 ) {
add_role( ‘custom_role’, ‘Custom Subscriber’, get_role( ‘editor’ )->capabilities );
update_option( ‘custom_roles_version’, 1 );
}
if ( get_option( ‘custom_roles_author_version’ ) < 1 ) {
add_role( ‘custom_author’, ‘Custom Author’, get_role( ‘author’ )->capabilities );
update_option( ‘custom_roles_author_version’, 1 );
}
}
add_action( ‘init’, ‘xx__update_custom_roles’ );