Closed (fixed)
Project:
Minutes
Version:
4.7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
25 Jun 2006 at 17:31 UTC
Updated:
12 Dec 2006 at 00:45 UTC
Jump to comment: Most recent file
Comments
Comment #1
lenzjo commentedHi there,
I too would like this feature and as it hasn't been followed up yet, I thought I would take a stab at it and this is the result. It works for what I want, an event for a single group, I want it so that I can take "register" for classes. I don't need multi-group events... yet.
What I did was rename the _minutes_valid_users function (at the bottom of the module) to _oldminutes_valid_users() (just incase) then I added the following:
And then up around line 185 in the attendee's form bit
changed to:
This works (on my limited 4.7.3 testing tonite) on both group and non-group events, HTH
Comment #2
pukku commentedHi! Thanks for this. When I get around to actually doing this, I'll be glad to make use of your code. My plan is to actually allow minutes to have a number of ways to get a list of users (we have an internal module called excluded_users that we use) that you can choose between.
Ricky
Comment #3
pukku commentedHi! So there are a few issues with this that I need to work through.
I don't use OG, so I can't test this code (I use my module OI instead, which fills a similar though very different need :-)
Your test to see if the event is a part of a group isn't good enough — testing the {node_access} table will tell you that some node access module is interested in the node, but won't tell you which.
I need to figure out how I want to determine how to grab the correct user list, and whether it should be some kind of administrator thing, or whether I should try to magically determine what group restricting modules are available.
Comment #4
pukku commentedHi! I've started working on this. So far, I've modified the module so that it is possible to select how the users list is made, and made a few hooks to allow it to be extended. I've only got one right now, which doesn't do you much good, but is a start. Next I'll work on OI integration, because I can test that, then I'll write up docs so that someone who is using OG (or, if I find the time, I) can submit the code required.
Comment #5
david lesieur commentedHere is a patch that allows for OG integration. It implements a more flexible hook to filter the list of potential attendees in Minutes. This patch:
In fact, I did not see how to integrate OG cleanly without making these changes.
For the actual OG integration, I created a new og_minutes module which requires this patch.
I'll also submit a patch for excluded_users that works with this hook. It's fun to see excluded_users and og_minutes play together nicely.
I hope you'll like this stuff.
Comment #6
david lesieur commentedSee http://drupal.org/node/93351 for the patch for excluded_users.
Comment #7
pukku commentedHi! I'm about to leave on a two-week vacation, so I'm very busy at home and at work trying to get everything ready. I will look at this when I get back.
Thanks!
Ricky
Comment #8
pukku commentedHi! As per your private email, I've given you CVS access to this module, so you can apply changes.
Looking over what you're proposing, it seems ok to me -- I may make a few changes when I get back and get a chance to see it all in one place.
A few things, though:
1) could you implement a "default" hook_minutes_attendees? Something like:
This basically implements what the excluded_users stuff was supposed to do when excluded_users isn't present (I realized last night that it doesn't actually work, which is kind of stupid on my part, but it was supposed to...). This attendees list would then become the default one.
2) could you add an update function to minutes.install which will add any new variables needed to default to what the previous behaviour would have been, so that already existing installations will be able to update and have things work, and then make changes.
3) I will deal with making excluded_users work with this when I get back. For my own site, this update is not any kind of priority because minutes was designed to work in our environment, so I can worry about this when I get back.
4) Please update the CHANGELOG.txt file when you commit changes.
Thanks very much for these improvements — getting it to work with OG is great, and since I don't use it, it's very hard for me to do it.
Comment #9
pukku commentedHi! Sorry, I just realized, I would prefer it to be called
hook_minutes_event_attendees()— what we're getting is the event attendees, not the minutes attendees...Thanks,
Ricky
Comment #10
david lesieur commentedHi Ricky! Thanks a lot for the CVS access. I'll integrate your requirements before committing anything. Regarding excluded_users, this patch should make it work, unless I missed something. ;-)
Comment #11
david lesieur commentedCommitted to DRUPAL-4-7.
Ricky, regarding your comment:
I don't think it is necessary. If no hook is enabled, it means that all users are considered as potential attendees, as before.
Comment #12
david lesieur commentedNote: To benefit from these changes, interested users need to install the small OG Minutes module.
Comment #13
pukku commentedHi! The reason to have a default "minutes" version of the hook is to exclude user zero, which otherwise messes things up. However, perhaps your check that the status=1 does the same — once I get settled back into things, I'll see what happens.
Thanks,
Ricky
Comment #14
david lesieur commentedExactly, the status=1 condition prevents user 0 from appearing in the attendees. ;-)
Comment #15
(not verified) commented