Roles mixed up
-
I tested the 0.1-beta version which gave dashboard errors so I deactivated and deleted it.
Now I installed release 0.1 (and upgraded to 0.1.1) but the roles are mixed up as follow:
- no matter set as student or not, there is *no* problem with student role, but
- the teacher role (after setting group admin to teacher) does *not* show any “Add/create Assignment” feature throughout the entire courseware *but* the “Add a schedule” is there.As reference:
The student’s dashboard image is identical to mine, and the teacher’s as well *except* for the “Add Assignment” links missing everywhere.
http://scholarpress.github.com/buddypress-courseware/handbook.html#dashboard
(Also no green button hightlighting if that matters, not sure)
-
Hi @andremartin,
can you repeat the adding teacher role to a user and check back if it work?
http://scholarpress.github.com/buddypress-courseware/handbook.html#rolesAs a way to see if it works, go into wp-admin, as teacher user logged in and on you profile page, at the bottom of the page you should see the `Additional Capabilities` list, post it here please.
But first retry adding role to the teacher by resetting it, and adding again.Thanks.
P.S.: It works for me, that’s why I’m asking you to double check.
As per your request:
1) As site admin I went to the BP profile page (see handbook), then courseware tab, to apply “teacher” role to a new user (previously not in contact with courseware).
2) Then logout admin, login user, /wp-admin shows that user’s (first registered) blog dashboard:
Under “Users > Your Profile” is all the usual stuff but *nothing* about “Additional Capabilities” at all (only Personal Options, Name, Contact Info, About Yourself).I’ve done some more testing with strange results:
{Given I do *not* have courseware globally enabled and I do *not* have “allow all teachers” enabled so only group admins can work with their own group’s courseware after manually activating. Also, call troublesome user (my initial post) userA and the one used in this post userB.}
Observations:
Now suddenly for both users, the courseware dashboard shows some links in green (see handbook screenshot) and the “Add Assignment” link is on the courseware dashboard frontpage but still not available as a tab menu. Furthermore, clicking “Add Assignment” or changing “Course Description” result (still) in “BuddyPress Courseware Error while forbidden user tried to update the course”.
While I expect userB not to have those permissions, it shouldn’t be for userA (the initial problem) but it’s also confusing me why now the dashboard shows green colors and at least in *some* places the “Add Assignment” versus none so before I added the teacher role to another user.Assuming some options for userA might have been messed up with version 0.1-beta, I disabled courseware, deleted the group, recreated it but all the same.
I created a new group for userB and enabled courseware but all issues are identical to userA.
Playing with courseware admin options Global / Collaboration Settings doesn’t change anything (neither display nor errors).
Ok @andremartin, I think I got it.
There’s really a bug there, but not related to roles (I’m almost sure).Try enabling Collaboration settings option in wp-admin, after you added teacher role to a user, should work.
Or, make the same user with teacher role, group admin.
Now I’m not typing from my pc, so I will commit the bugfix asap along with the updated handbook readme regarding roles/group admins relationship.
Please report back.I already tried your suggestions in my previous post but it didn’t change anything.
(referring to “Playing with courseware admin options Global / Collaboration Settings doesn’t change anything (neither display nor errors).”)- I tried collaboration setting after creating userB today to see if they could cross-work (in each other’s courseware) but that failed.
- userA and userB were already group admin of their own groups before courseware was installed and their teacher role applied.
(Note: they are only admin of their own group, as in userA=groupA, thus they are only default user (guest or joined) of other group).So in summary:
- Any user without a role sees the group as a student (that’s what is supposed to, if I understand right).
- Each teacher sees own group as teacher except for the “Add Assignment” link.
- *But* no matter collaboration setting or not, each teacher sees the other group (where is not group admin) same as own group (Add Schedule …) although of course the error of no permission appears.Sorry if I may sound confusing, I just report 1-1 the steps I do and results I get. I hope it helps. Let me know what else I could try or report.
This is what I wanted to say:
http://scholarpress.github.com/buddypress-courseware/handbook.html#roles-warningOk, if you say you can’t see teacher links for managing courseware, can you please post me the capabilities list you will find by going to `wp-admin/profile.php`, you should find them in the bottom of that page, unde “Additional Capabilities”
Really weird, I just installed a clean Courseware and had it working right from the very beginning. If nothing works, could you please do a complete reinstall to get rid of 0.1-beta possible bugs.
Thanks.
Like I said before, I did all those things.
- “… a user to have teacher role and to be group admin …”:
That’s what both userA and userB are (both are teacher and admin of their own group where they themselves enabled courseware and were made teacher by site admin, as per manual’s instruction)- Furthermore, I do *not* have “Additional Capabilities” listed on wp-admin/profile.php.
What bothers me is the lack of “Additional Capabilities”.
Could it be that courseware failed in beta install (0.1-beta) and botched up with settings not removed when uninstall/delete it before installing 0.1 release? I had plenty of errors on (only) the home dashboard of courseware with beta and the same problems as now (no “Add Assignment”…).
Steps taken: I installed 0.1-beta and activated. Didn’t work (errors) so deactivated, deleted. Waited for 0.1 and installed, activated that one. Redid everything as per manual. Then problems explained in this thread appeared. Upgraded to 0.1.1 and all still the same.PS: I do not have any role management plugin installed in case that might conflict.
Hmm,
the capabilities allocation is hooked after a user gets approved for teacher role.
A teacher role is basically a custom profile field, you should find it in `wp-admin/admin.php?page=bp-profile-setup`, the field name is `Role`. Before reinstalling Courseware, you can delete it and then try again role assignment procedure. Please report back if you get the caps listed after this.
Thanks.In short: failed.
Step by step:
1. userA & userB disabled courseware in their groups.
2. siteadmin disabled courseware plugin, then deleted.
3. siteadmin deleted BP custom field “Role” and group “Courseware” (bp-profile-setup).
4. siteadmin installed plugin and activated; new BP custom field created.
5. userA activated courseware in own group.
6. userA checked role status: neutral (student / apply teacher).
7. siteadmin went to userA profile page “Editing ‘Courseware’ Profile Group”, applied “Teacher” role.
8. userA checked role status: “Teacher” (“apply” option gone).
9. userA opened Courseware tab in group and all is same as before (no “Add Assignments” tab but dashboard link (gives permission error), “new schedule” creation results in green “no schedule exists” error and “Update course” also gives forbidden error.Ok,
so the only thing left is to try a clean install.
I will also do it, if you can handle it, that would be cool.Thanks.
A clean install as in “new WP & BP”? That is unfortunately not possible.
However, I could manually remove all files and DB entries if I would know what to look for.Ok, there’s something weird with your install.
I did a clean install, here’s the video:
http://stas.nerd.ro/pub/stuff/cw.ogv (30MB)I’ll try to figure what exactly causes the problem.
Sorry for the late reply.
Meanwhile, here my active plugin list in case that might be helpful:Network (site-wide)
——————-Add Users Sidebar Widget
Backend Login Logo
Blogger Importer
BP Blog Author Profile Link
BuddyPress
BuddyPress Announce Group
BuddyPress Community Stats
BuddyPress Follow
BuddyPress Forums Extras – Add CSS classes for Posts/Topics per user level
BuddyPress Forums Extras – Forums Index
BuddyPress Forums Extras – RSS Feeds
BuddyPress Group Forum Extras
BuddyPress Group Tags
Buddypress Humanity
BuddyPress Like
BuddyPress Moderation
BuddyPress Profile Privacy
CD BuddyPress Avatar Bubble
Edit Category Slug
Exclude Pages from Navigation
Jet Event System for BuddyPress
LiveJournal Importer
Movable Type and TypePad Importer
OPML Importer
RSS Importer
SI CAPTCHA Anti-Spam
Use Google Libraries
Widget Logic
WordPress Hashcash
WordPress ImporterLocal (only the main site)
————————–Add All Nav Links to BP Adminbar
BuddyPress Mass Messaging
BuddyPress Rate Forum Posts
BuddyPress ScholarPress Courseware
Fast Secure Contact Form
Featured blogs
Flash Photo Gallery
Gigya Socialize
Import from Ning
Jet Site Unit Could
MapPress Easy Google Maps
Share and Follow
Sociable
Theme Browser
Video Sidebar Widgets
WordPress.com Stats
WP Activate Users
WP Snap Preview AnywhereTMPlugin
WP-Mail-SMTP
WPMU-Block-Spam-By-Math
Yet Another Related Posts Plugin@ebar also has some sort of problem, but the list of the plugins is too large to allow me test everyone in part.
We need some time to get more feedback, sorry
@andremartin, can you update to 0.1.3 and report if it works now?
Thanks.
With the courseware plugin disabled, I updated to 0.1.3 and then did the steps below:
1. upgrade (deactivated) courseware, reactivate
2. create new group by some userC
3. admin assigns “teacher” role to userC
4. userC enables courseware
5. userC opens courseware dashboard, clicks “update course”
6. confirmation “new course was added” appears.
We are now at position 7.17 in your video.
And here it is where my setup fails. While you will see “New Assignment” menu and have respective permissions from now on, I do not. I just do not get the necessary permissions to see “New Assignment” and execute teacher-role actions.It looks like a botched permission management to me. Is there anything I could check, do or copy that would be helpful in this matter?
Please note that the site’s admin has no particular courseware role set in the profile settings but *does* see the “New Assignment” link and can successfully load that tab without permission error. So the siteadmin (God-mode) works correctly (has all permissions for everything) and it shows the courseware plugin works in general, only that the teacher role is not recognized. So the question is what handles and could prevent the role management for ordinary users?
@andremartin, can you check in `wp-admin` the details for UserC.
In the bottom you should see listed all the additional privileges:
http://is.gd/eULw7Make a screenshot so I could check it, basically you should find there:
`*_assignment(s)` capabilities.The “Additional Capabilities” for userC are not visible by userC but when siteadmin opens userC profile to edit (wp-admin/user-edit.php?user_id=462). Please find below all listed capabilities for userC:
view_courses, publish_courses, manage_courses, edit_course, edit_courses, delete_course, assign_courses, manage_group_id, upload_files, edit_files, view_assignments, publish_assignments, manage_assignments, edit_assignment, edit_assignments, delete_assignment, assign_assignments, manage_course_id, view_gradebooks, publish_gradebooks, manage_gradebooks, edit_gradebook, edit_gradebooks, delete_gradebook, assign_gradebooks, manage_assignment_id, view_bibs, manage_bibs, edit_bib, edit_bibs, view_schedules, publish_schedules, manage_schedules, edit_schedule, edit_schedules, delete_schedule, assign_schedules
- *_assignment(s) is listed
- however the capabilities only visible to siteadmin, not user him-/herselfLooks ok for me.
UserC is that group admin?
Yes, userC
- has created that group,
- is listed as group admin,
- got role “teacher” from siteadmin,
- enabled courseware for that group,
- updated courseware (no error).
But has no teacher role when accessing courseware thereafter.The same applies to both existing and new groups.
It looks like there is just no teacher role acknowledged when accessing courseware although it’s been assigned (see “Additional Capabilities”).
Btw, is it supposed to be that only siteadmin can see the “Additional Capabilities”?The point is not in who sees Capabilities, but in why you have the caps and can’t use the Courseware.
Ok, I’m out of ideas, could you send me a copy of db dump, and a zipball with current install?
My email is stas@nerd.ro I will try to debug it locally, thanks in advance.Ok @andremartin, should be fixed now.
The problem was generated by a MS install and an obsolete capability I was using.
After a short chat with @boonebgorges, we removed it.The commit:
http://github.com/scholarpress/buddypress-courseware/commit/7d15fa1b101ca999150bd65ec569af119a0100ddThe changes will come along with 0.1.4 release, which I hope will be the final stable version, after what I will start working on feature requests.
Thanks for allowing me to test this on your install.
Thanks a lot for the fix of the plugin, it works now

Additional note for other admins with the same problem:
- re-apply the roles (open users’ profile (courseware) group page and click save)Great closing this too.

You must be logged in to reply to this topic.