Allow Instructors to edit any course

Is there a way to allow an instructor to edit any course in CoursePress Pro regardless if they are the author of the course?

I'm wanting to allow the instructors or a subset of instructors the ability to edit some of the other courses while not being assigned as an instructor. This would be similar to the "Editor" role in core WP as opposed to the "Author" role. I have not been able to find a way to get this accomplished without making the user an "Administrator" in WP. Making them an "Editor" in WP doesn't seem to grant them the correct privileges. I've played around with the settings in CoursePress a little bit, and here is the resulting privileges for a user that is an "Editor" with Instructor privileges:
read_private_courses, read_private_units, read_private_modules, read_private_module_responses, read_private_notifications, read_private_discussions, can_edit_posts, read, upload_files, coursepress_dashboard_cap, coursepress_courses_cap, coursepress_instructors_cap, coursepress_students_cap, coursepress_create_course_cap, coursepress_update_course_cap, coursepress_create_course_unit_cap, coursepress_update_course_unit_cap, coursepress_delete_course_units_cap, coursepress_change_course_unit_status_cap, coursepress_course_categories_manage_terms_cap, coursepress_course_categories_edit_terms_cap, coursepress_delete_course_cap, coursepress_change_course_status_cap, coursepress_view_all_units_cap, coursepress_assign_and_assign_instructor_course_cap

I may just be missing a setting somewhere.

Thanks

  • Susan

    Any ideas as to why my Editors are not able to view and edit other instructors courses? As a note I am also using this code below to grant any user with the 'edit_others_posts' capability Instructor Capabilities.

    function odet_assign_drop_instructor($user_login, $user) {
        global $coursepress;
        if(user_can($user->ID, 'edit_others_posts')) {
            $coursepress->assign_instructor_capabilities($user->ID);
        } else {
            $coursepress->drop_instructor_capabilities($user->ID);
        }
    }
    add_action('wp_login', 'odet_assign_drop_instructor', 90, 2);

    Thanks again.

  • calvinrogercanas

    Hey there @Susan,

    Hope you're well! :slight_smile:

    I think you still need to assign the instructor to the course if you want to let that specific instructor to edit that course.

    Any ideas as to why my Editors are not able to view and edit other instructors courses? As a note I am also using this code below to grant any user with the 'edit_others_posts' capability Instructor Capabilities.

    Eventhough you elevate the role of user; you still need to assign that specific user to the course so that he/she can edit / modify it.

    Let me know if it helps! :slight_smile:

    Best Regards,
    Calvin

    • Susan

      I think you still need to assign the instructor to the course if you want to let that specific instructor to edit that course.

      So this just seems to be counter-intuitive. It does not follow the standard WordPress Roles and Capabilities. An editor is not described as the Author of a post, but can make changes and updates to said post.

      The scenario I have is that we have a select group of instructors that put together the course content. However, publication and potential changes are made by a group of reviewers. These reviewers quite possibly had nothing to do with the actual content of the course, they are simple responsible to doing a manual review (editing, spellcheck, etc...) and then publishing the course. Hopefully you can see why I would NOT want them to be listed as a course instructor, but would still need to have access to perform all necessary functions regarding the course.

      I guess it would just be nice if there was some sort of correlation between core WordPress and CoursePress. It seems like there has been so much disconnect in areas (Categories, Tags, Authorship...). While progress is being made to align these feature sets, it seems as though these core features should have been available from the outset.

  • Ash

    Hello @Susan

    I hope you are well today.

    I have just went through the code again, it will need a fair amount of custom code make this working. Lots of files need to be edited. I am marking this as a feature request.

    Also, if you need to customise this then you can post a job in our job board where you can hire a developer to assist further: https://premium.wpmudev.org/wpmu-jobs/ Please note that, no WPMU official staff is available in the job board.

    Cheers
    Ash

  • Tyler Postle

    Hey Susan,

    Hope you're doing well today.

    I've just looked further into this and when I applied certain capabilities I was able to edit other instructors courses without any issues :slight_smile:

    I first assigned the Editor role to a user then used the User Role Editor plugin and applied all the CoursePress capabilities illustrated in my screenshot.

    After that I was able to edit the settings, overview, and units of any of the courses.

    Would that work for you? Hope this helps!

    Cheers,
    Tyler

  • Anang

    Hi @Susan

    Trying to help here :slight_smile:

    You can revoke Instructor capabilities for each Instructor when you edit that user through admin. Users - All Users - (find editor-instructor user) - Edit . You will find an option called "capabilities" and choose "Revoked Instructor Capabilities" .

    Your Instructor should be can manage other courses too now :slight_smile:

    Let me know the result :slight_smile:

    Best Regards

    • Susan

      So let me confirm what you're saying. I should give them all the Instructor capabilities through the User Role Editor plugin, and then make sure that CoursePress has the Instructor Capabilities revoked. Am I understanding correctly?

      If that is the case, I hope it's starting to become obvious how broken this is. In my humble opinion, a plugin should not be breaking Core WordPress functionality (Editor role allows for "editing" of other Authors content). It should, however, extend that functionality (An Author is given Instructor rights and can create/edit their OWN courses, An Editor also has Instructor rights, but can also edit other Author's courses).

      If CoursePress is wanting to completely separate itself from the WP Roles, then mimic the functionality. Allow an Instructor to have elevated capabilities to where they can edit other Courses without being made an Administrator.

      Ok, sorry my rant is now over.

  • Michelle Shull

    Hi, Susan!

    The way CoursePress is designed, to limit instructors from editing more than their own courses, was intentional, our research showed that the non-WP courseware solutions we want to compete with restricted access of instructors to their own courses only. This does differ from the standard WP paradigm of subscriber - contributor - author - editor - admin, but it's also a lot more user-friendly to those who are not used to the WP user role hierarchy. I do understand your frustration, but I wouldn't go so far as to say CoursePress breaks WordPress. It just works differently, in a way that is more akin to other courseware solutions.

    I'm happy to add a feature request to include a role between instructors and administrators that matches the native WordPress editor role.

    Thanks for your feedback!

  • Susan

    If I make a user an Editor in WordPress and grant them Instructor capabilities, then the expected behavior (in my opinion) would be that the user can edit any course.

    If I make a user an Author in WordPress and grant them Instructor capabilities, then the expected behavior (in my opinion) would be that the user can edit only their own courses.

    If no Instructor capabilities are granted then there is no ability to edit/manage any courses. In other words, by adding Instructor capabilities, the only thing that changes from the current WordPress roles is that the user can now edit/create courses. The rest of the capabilities (editing others courses) would remain intact.

    What bothers me is that it seems that some WordPress functionality was adopted (Administrators can do whatever they want in CoursePress) but other functionality was completely dropped. This is poor design/implementation from my point of view, especially since there is no documentation explaining that the Core WordPress roles and capabilities are disregarded by CoursePress.

    I would love to have this feature addressed and added as a Feature Request. However, as was stated be another member of the staff, this requires significant code changes and so I won't hold my breath.

    (As a side note, I'm very happy with CoursePress and what it had allowed us to do. There are just these last few oddities that are tripping us up.)

    Our sites are now live by the way...
    https://elearning.novell.com
    https://elearning.netiq.com
    https://elearning.suse.com

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.