Skip to:
Content
Pages
Categories
Search
Top
Bottom

User Roles

  • Avatar of larrysmith1000
    larrysmith1000
    Member

    @larrysmith1000

    Hoping to provide help here.

    User Roles in courseware are a bit confusing since we are dealing with WP roles, BP group roles, and as well as courseware roles (teacher/student). This gives us three realms of roles and they seem to be confusing and conflicting.

    For example, as it is now, anybody can create a BP group and thus a class or course, but we may not want students to be able to create a classes or course.

    It may be better to integrate the teacher and student roles as global roles, so teachers stay teachers, and student stay students in all realms. See the “members” plugin, which may be helpful for creating capabilities for new WP user roles.

    Then, use these global roles in the realm of buddypress to allow ONLY teachers to create courses. And, possibly other capabilities.

    Then, create a “course management” capability that is specific to each class or course (this is what you currently have as the teacher role now). When a teacher creates a course, they become the “course manager” by default. The teacher, as course manager, would be able to give course management capabilities to other course managers. They could give management capability to other teachers or even students (e.g. teaching assistants).

    Does that make sense?

Viewing 18 replies - 1 through 18 (of 18 total)
  • Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    First, there’s no such role Teacher and Student. Courseware doesn’t use roles at all. What you mentioned are just some `labels/tags`.

    What about the described workflow, please read the handbook:
    test this option: http://i.imgur.com/9lrQR.png

    Disabling Courseware globally, will mean, you will have to set it per group manually.

    Avatar of larrysmith1000
    larrysmith1000
    Member

    @larrysmith1000

    Sorry for all the suggestions, I am just trying to give constructive feedback to help improve courseware for user need.

    I understand that teacher and students are implemented by using labels in the profile, which is what is complicating for the users, since “teacher” and “student” sound like roles with different capabilities.

    The problem is, who gets to manage a courses and who gets to create courses? As it is now, everybody gets to create courses, which is not desirable. And, nobody can manage the content of the courses except super admins, and making people super admins just so they can manage a course is less than desirable.

    In a nutshell, hooking into wp global roles to manage user capabilities for courseware would be great.

    For example:
    Courseware wide capabilities (based on wp user roles):
    Capability 1: create_courses
    Capability 2: delete_courses
    Capability 3: edit_all_courses
    Capability 4: assign_courseware_capabilities_to_users

    Course Specific Capabilities
    Capability 1: edit_assignments
    Capability 2: edit_grades
    Capability 3: …etc…
    Capability n: assign_course_user_capabilities (for collaborators)

    Hope that clarifies what I was trying to say

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    It’s ok, I welcome your feedback, just trying to clarify things out.

    I recorded a video explaining all the details:
    http://dl.dropbox.com/u/20301790/cw_caps.mkv

    As you mentioned, Courseware uses capabilities, but it will never going to use roles or that kind of user management, since roles are not welcomed anymore in the developers community (rumors say those will be ditched asap).

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    ?? How can Roles not be welcomed by the developer community? How do you assign capabilities then and to what You wouldn’t want to assign capabilities to each and every user on a per required basis, be impossible to administer and prone to errors, capabilities are assigned to a role and a role assigned to a user.

    If roles are to be ditched what replaces them? Or am I just missing some salient point here?

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    @hnla, I discussed this before writing the plugin. Creating a certain role, isn’t as flexible as having capabilities. Right now Courseware handles capabilities dynamically. Also BuddyPress doesn’t use roles to manage the content, and will likely never going to use since there’s no need of that. Also, having roles exposed to a role-management plugin, can lead into wrong usage by a user, or a complete deletion (unrecoverable by the way). This and already available user levels in group, were better received as a possible solution compared to creating roles.

    If you wan’t I can link you to my discussion on IRC back in may 2010. From a BuddyPress developer point of view I will never encourage user roles.

    Sorry about “ditched” I think I was referring to user levels.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Ah ‘ditched’ == ‘user levels’ I understand, they are deprecated as such -that was what was probably causing me puzzlement.

    I take the point about exposing ‘Roles’ via plugins although the basic paradigm of a series of capabilities that are assigned to a user role and in turn a user role assigned to a user is a fairly standard one I thought, but I may be taking things off on a tangent :)

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Thanks for pointing to this, so I didn’t get misunderstood ;)

    Avatar of larrysmith1000
    larrysmith1000
    Member

    @larrysmith1000

    So, by dynamic capabilities, do you me that hnla’s model of

    capabilities –> user roles –> user

    is going away and being replaced by

    capabilities –> user

    That is, every user has his own set of capabilities, and some of the capabilities may be the ability to assign capabilities to other users?

    If that is the case, my original question is still relevant, which is this:

    It would be nice to have a user capabilities settings area where users with the authority can set the capabilities of other courseware users. Furthermore, the settings would occur in two scopes within courseware. 1. Courseware wide capabilities; 2 Course/Class specific capabilities;

    For example:
    Courseware wide capabilities (based on wp user roles):
    Capability 1: create_courses
    Capability 2: delete_courses
    Capability 3: edit_all_courses
    Capability 4: assign_courseware_capabilities_to_users

    Course Specific Capabilities
    Capability 1: edit_assignments
    Capability 2: edit_grades
    Capability 3: …etc…
    Capability n: assign_course_user_capabilities

    Now, any user could be “dynamically” assigned any combination of capabilities.

    I mainly want to be able to restrict certain users (students) from being able to create courses. However, this post is speaking in a more general sense because others may want to have control of other user capabilities that I may have not mentioned.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    In a nutshell, you just want an ordinary user to be able to make another user a teacher?
    If that is so, I can add this request to the queue, but I will implement that my way :)

    Most probably I would add an option where teachers can make other users teachers, this doesn’t bring any overhead to the workflow. I just want things dead simple.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Or just map an existing role to be able to do that, like editors or etc…

    Avatar of larrysmith1000
    larrysmith1000
    Member

    @larrysmith1000

    Mapping a wp role like editors to be able to assign users as teachers would be ideal for me. Additionally, mapping a wp roles in some way to restrict the ability of certain user from creating class/courses. As it is now, any user can create a course.

    Avatar of larrysmith1000
    larrysmith1000
    Member

    @larrysmith1000

    Perhaps a better place for courseware user role management would be to create a courseware section under groups –> admin –> manage members.

    Also, a good way to map wp roles to courseware capabilities would be to use wordpress function “current_user_can” to determine their wordpress role and tie it to a courseware capability.

    Let me know what you think about this.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Hmm…
    I think you can just extend current code:
    https://github.com/scholarpress/buddypress-courseware/blob/master/roles/bpsp-roles.class.php#L90

    And if that user is Editor, to not hide the Teacher option from him. Or, add a new button in `/members/` page listing that will upgrade user to Teacher.

    Whenever method you choose, your code should call this action:
    `do_action( ‘courseware_new_teacher_added’, $user_id );`
    This does all the magic with dynamic capabilities.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Also working with users is way easier in WordPress 3.1.
    To see if a user is editor, you can just `get_users()` with `’role’ => ‘editor’` and `’search’ => $user_id/$username`.

    Avatar of Dr. Ron Suarez
    Dr. Ron Suarez
    Participant

    @ronsuarez

    Sorry to ask a much lower level question in this thread, but I can’t find any docs for the additional user roles that come with BuddyPress.

    First, I’d like to not have to guess what privileges they bestow.

    Second, I would like to understand how they interact with the original WordPress roles: subscriber, author, contributor, editor and administrator. When I add a new user to a WordPress/ BuddyPress site, I can only assign one role. The WordPress roles make sense and hierarchically bestow more privileges. How do BuddyPress roles interact with the WordPress roles?

    Who has documented this? It is something very basic that people need to know.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    It’s simple, they don’t.
    There’re no BuddyPress roles and will likely never gonna be. The Courseware follows BuddyPress implementation and the only thing it uses are additional capabilities to manage post types.

    Here’s an example hook Courseware uses to update the caps for a new teacher:
    https://github.com/scholarpress/buddypress-courseware/blob/master/courses/bpsp-courses.class.php#L32

    Courseware tends to be as modular as it’s possible, that’s one of the other reasons too where roles would just grow the lines of code someone will have to write gaining the same functionality.

    Avatar of Dr. Ron Suarez
    Dr. Ron Suarez
    Participant

    @ronsuarez

    OK, when I install WordPress and add a user, the role choices for adding a new user are: “Subscriber, Administrator, Editor, Author, Contributor”

    After installing BuddyPress the additional roles appearing in the choices are: “Key Master, Moderator, Member, Inactive, Blocked.” Are these bbPress roles? Whether they are bbPress or not where are they documented?

    One of the most basic things a newbie administrator will do is to add a new user and this needs a little documentation. I would help to write docs if I can get some answers.

    Avatar of Stas Sușcov
    Stas Su?cov
    Participant

    @sushkov

    Afaik,
    Key Master, Moderator, Member -> bbPress
    Inactive, Blocked -> Were added to help with spammers and other oddities.

Viewing 18 replies - 1 through 18 (of 18 total)

You must be logged in to reply to this topic.