I'm building a site for a charity which arranges one-to-one computer tuition for people with disabilities (see www.ucandoit.org.uk). I want to create a user account for each student, and a user account for each tutor. Making a student a "fan" of a given tutor would mean that that tutor is teaching that student.
The allocation of a student to a tutor would be done by an administrator rather than the tutor or the student themselves, so that's why I need the functionality of an administrator making a student a "fan" of a tutor. This relationship would then be used for reporting functions on the website.
More information can be found at http://drupal.org/node/328575, where I've been trying to work out how to do this using content_profile.module. I also tried another way, detailed at http://drupal.org/node/328327.
Comments
Comment #1
strangeways commentedI'd also like to see an administrator be able to create two-way relationships, for example by initiating the request for user A and accepting the request for user B.
This would be useful on sites where the users are not familiar with social networking and are being guided by an admin, or for whom internet access is difficult or expensive and an admin is setting up an initial account and network on their behalf.
Comment #2
alex.k commentedSorry for jumping in... @strangeways, http://drupal.org/project/masquerade should allow you to do all of this by masquerading as the requester or requestee, to perform the actions.
Comment #3
strangeways commentedThanks, Alex!
Comment #4
jim0203 commentedThanks Alex. Masquerade looks so cool!
Comment #5
mercmobily commentedHi,
Using Masquerading basically means that this request is no longer important... is that right?
Merc.
Comment #6
jim0203 commentedNot really - having had a look at masquerade it doesn't quite seem to solve the problem.
What I'm looking for is something like this: a page called "Create Third Party Friendship". On this page there are two fields/groups of fields that allow the user to search lists of other users. Once two users have been found, and the friendship type between them defined, then the user creating the friendship clicks submit and its all done.
Comment #7
mercmobily commentedHi,
"Once two users have been found, and the friendship type between them defined, then the user creating the friendship clicks submit and its all done."
Hummmm OK.
I think the sanest way to go about it is to have three boxes: two for two auto-completing user names, and one for the relation type. You submit, and the relation is created (or deleted, if a checkbox is entered).
Would something like this work?
Merc.
Comment #8
jim0203 commentedYes: that's exactly what I meant. That would be absolutely perfect for my uses and would, I think, be a useful feature for the community at large.
Comment #9
mercmobily commentedHi,
I honestly think the user base for this would be rather small. But I am often wrong...
Are you able to offer a bounty for this? Something around $200?
Bye,
Merc.
Comment #10
jim0203 commentedHi,
I may well be able to pay for this. I've got a guy putting together a quote for a module which would do precisely what I need (add a drop-down list to the form used to create user profiles of certain roles, kind of like nodeprofile did in D5) but if that falls through, or if his price is too high, I'll certainly come back to you.
--Jim
Comment #11
mercmobily commentedHi,
OK!
Merc.
Comment #12
jim0203 commentedJust in case anyone's tracking this, I've now written a module which adds a field to the user account creation/editing page; this field is a dropdown listing all the users of a certain type. If you want the code, drop me a line.
Comment #13
mercmobily commentedHi,
If you post eh code here, we will integrate in the main friendlist module...!
Merc.
Comment #14
irakli commentedJames,
I think what you really need is a batch relationship-administration page.
Here's quick specs of how I think this should/could work, let me know if this meets your requirements:
1) There's a special permission for batch-management of relationships that can be assigned to any user-defined group.
2) Users (Groups) with this permission can access a batch-management page which has two fields: user1 and user2. Both fields are autocomplete fields and you can thus unter usernames of two users.
3) There is a "Check Relationships" button, once you click it you will see the full names of the users + username (so you can make sure you picked the correct two people) + what relationships these users do already have amongst each-other in a multi-select box where you can add/remove relationships and click "save".
Comment #15
boardrider commentedHi
Yes this would be the right way to manage that and I'm very interested in this feature. Any plan to add this relationship-administration page / sub-module to friendlist since you're the new maintainer of the module ?
Regards.
Comment #16
jim0203 commentedIrakli:
Yeah, that sounds about right. In the end I wrote my own custom module to do this, so I don't need this anymore, but I'm sure it would be a really useful feature.
Comment #17
mercmobily commentedHi,
Jim: would you be willing to share your code, so that maybe t could become part of the module?
This would benefit all users, and the code would be maintained etc...
Merc.
Comment #18
jim0203 commentedYes, of course. I'm still working on it and extending it but it has the following basic functionality:
(1) Users of certain type(s) added to a drop-down box. User type(s) selected from an admin page.
(2) Drop-down box added to certain node type(s). Node type(s) selected from an admin page.
(3) Admin page can also be used to select certain user type(s) as super user(s), who have access to all other users in the drop-down box.
(4) Adds field called "Full Name" to user accounts.
(5) Exposes everything to Views so you can create views based on information relating to this module.
Where should I post the code?
Comment #19
mercmobily commentedHi,
If you post it here as a patch, I am sure the maintainer will give you a gold star :-D
Merc.
Comment #20
irakli commentedYes, very soon.
Bug fixes take priority over feature requests, for obvious reasons. We still have one possible bug in the queue that needs to be addressed and after that - this will be the #1 feature to get implemented/added.
Comment #21
mercmobily commentedIrakli,
That would be great. Seeing a release of FriendList would be such an achievement... And you will have done it!!!
Merc.
Comment #22
jim0203 commentedI ended up writing a custom module to do what I needed. I'm trying to get a CVS account so I can release the module properly, but in the meantime it can be downloaded from http://www.state68.com/node/1 if anyone's interested. The code is pretty rough and often specific to my uses - it uses words like "tutor" and "student" rather than more neutral terms, for example - but it does work.
If you've got any comments about the code or suggestions for future development it's probably best to comment on the node that the module is attached to on my site.
Comment #23
mercmobily commentedHi,
Jim, would you be at all interested in getting CVS access to FriendList and adding your module to FriendList? This will benefit Friendlist as well as more users, plus I will be happy to review your code, improve it, etc.
Thanks,
Merc.
Comment #24
jim0203 commentedHi Merc,
The short answer is yes. Give me a bit of time to get my own module in a better state than it is now (it needs a bit of generalisation) and to familiarise myself with the Friendlist code. I've now got a CVS account so I'll be uploading my module soonish.
--Jim
Comment #25
mercmobily commentedHi,
OK thanks a million,
By the way, I am about to do a huge commit that should keep everything as functional, but improving the code so that the code doesn't clash with the existing FriendList standards.
The blocks hopefully will work!
So, please do a CVS update :D
Merc.
Comment #26
mercmobily commentedHi,
I did a CVS update.
Please let me know if the blocks still work... I rewrote big chunks of it.
Thank you!
Merc.