This module is the result of the conversation in http://www.ubercart.org/forum/support/9952/need_remove_role_purchase.
Use case
- We have a product Silver associated with a Silver role and a product Gold associated with a Gold role. We also have other roles in our site independent of memberships.
- A user buys a Silver Membership.
- A few days later, before the actual expiration of the Silver Membership, the user decides to buy the Gold Membership.
- By default, the user will have both Silver and Gold roles.
- UC Clear Roles is responsible for fixing exactly this by removing the Silver role. Ubercart does the rest.
Notice:
In the example above, the user loses all days he would normally be allowed to remain as Silver and immediately changes to Gold as a new membership and not as a renewal..
In case a Gold user buys another Gold membership product before the actual expiration of the first package, this module does nothing and expiration time gets appended(and not resetted).
This module also respects other roles that may exist in your system but are independent of memberships(ex. admin, article-writer, editor). For choosing which roles are memberships and which are not, an administration page exists for the administrator to choose.
UC Clear Roles works with Conditional Actions and not with Rules. Therefore, it is only applicable to Ubercart 2.x and Drupal 6.x. There is no plan right now to make a port to D7.
Reviewed the following projects:
Taxonomy Term Google Maps: http://drupal.org/node/1799766#comment-6542330
HTTP proxy: http://drupal.org/node/1797090#comment-6542120
User Request Name: http://drupal.org/node/1784544#comment-6542238
Advanced Forum Basic Subscription: http://drupal.org/node/1466090#comment-6547012
GC-Code: http://drupal.org/node/1532408#comment-6546828
Deep Survery: http://drupal.org/node/1236914#comment-6546924
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | drupalcs-result.txt | 2.78 KB | klausi |
Comments
Comment #1
ccardea commentedPlease provide a link to your sandbox project.
Comment #2
vensiresLink is:http://drupal.org/sandbox/vensires/1219984. "UC Clear Roles" in my first post is actually a link to my sandbox project.
Comment #3
vensiresComment #4
ccardea commentedThe only thing in the repository is the .info file, which has only the name of your project. You need to push your code to the repository. Also it looks like you need to identify yourself to git. The author of your initial commit is unknown
Comment #5
vensiresThank you ccardea! Now it's all done. Check it out!
Comment #6
vensiresComment #7
davisbenHi vensires,
You should run your module through Coder with the minor setting selected. This will help you fix some problems that I noticed. After doing that, set this back to Needs Review, and I'll go through and do a more thorough review.
Comment #8
nyleve101 commentedHi,
this seems great, is it still in development?
Hope you're well,
Evelyn
Comment #9
vensiresHi Evelyn!
Actually, even if it's not entitled by Drupal a full project, it is actually ready and you can download it from http://drupal.org/sandbox/vensires/1219984. As for further development, besides the coder module suggestions that I have not yet implemented, I do not think I have anything else to do. If you want anything more though, please file a feature request in the project issue queue and let's discuss it there.
Comment #10
nyleve101 commentedVensires,
thanks for getting back to me. I'll check it out right away. Thanks for your hard work!
Evelyn
Comment #11
vensiresModule code is now fixed with coding standards. So 10oclock (or anyone else) if you might test it please :D
Comment #12
klausiIt appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Go and review some other project applications, so we can get back to yours sooner.
manual review:
Comment #13
misc commented@vensires has been contacted to ask if the application is abandoned.
http://drupal.org/node/894256
Comment #14
vensiresSorry for the huge delay. The application isn't abandoned. But due to heavy work, it has been left a little behind and it will have to wait a little while longer.
Comment #15
vensiresI think I have done all the needed changes to the code. Could you please check it once again?
Comment #16
klausiYou need to set the status to "needs review" if you want to get a review.
We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)
Comment #17
vensiresYou are quite right klausi. I will do my best when I go home.
Comment #18
caiovlp commentedPlease document the requirements and dependencies on your project page. I had to read the .info file to see what it needs to work.
t() shouldn't be used in the hook_menu titles.
Also found a few coding standard issues. Please use the following tool to validate your project: http://ventral.org/pareview
Comment #19
vensiresIt took some time but I think that finally everything is the way it should be. Could you please check once again?
Comment #20
vensiresReviewed the following projects:
Taxonomy Term Google Maps: http://drupal.org/node/1799766#comment-6542330
HTTP proxy: http://drupal.org/node/1797090#comment-6542120
User Request Name: http://drupal.org/node/1784544#comment-6542238
Comment #21
klausiPlease don't remove the security tag, we keep that for statistical purposes and to show examples of security problems.
Comment #22
vensiresI'm sorry klausi. Removed by accident!
Comment #23
klausiThanks for your reviews, just make sure that you pick the oldest applications first. When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).
Please add all your reviews to the issue summary as indicated in #1410826: [META] Review bonus.
manual review:
But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #24
vensiresThank you for your kind comments and advices klausi! Since it hurt you, I restored the comments in the code, in their own line of course :-)
I also created a .install file to variable_del() the variable I used in the module.
Also, thanks to you and your idea of "adding the comments back", I found out that the module assumed (in most cases correctly but...) that each product is associated with one and only role and fixed it to work with multiple roles per product.
PAReview.sh keeps returning 0 errors and 0 warning, so the process can keep going. Thank you for voting +1 RTBC for me!
Comment #24.0
vensiresAdded the projects I have reviewed.
Comment #25
vensiresLatest reviews (added to summary too):
Advanced Forum Basic Subscription: http://drupal.org/node/1466090#comment-6547012
GC-Code: http://drupal.org/node/1532408#comment-6546828
Deep Survery: http://drupal.org/node/1236914#comment-6546924
Comment #26
patrickd commentedComment #27
patrickd commented.install
Don't implement hooks that do nothing.
Thanks for your contribution!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #28
vensiresThank you very much all of you for your patience, your comments, your suggestions and everything! I'll try to remember all these things while programming and giving back to the community! I hope we will each other around Drupal.org :-)
PatrickD thanks for giving the final blow for this project to become full. :)
Klausi, I also have a thanks for you and I end this little speech with you since you were the guide here for me in this vast Drupalopoly!
Comment #29.0
(not verified) commentedAdded latest reviews of other projects.