Moderation on Edit

asp - November 27, 2007 - 21:15
Project:modr8
Version:5.x-2.3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I cannot get the modr8 module to moderate edits. It works great for submissions but I don't want users to be able to edit the nodes without admin approval.

The specific application for this is a meeting list. Where users submit meeting list additions, changes, and deletions, but they only actually happen by an admin after review.

Please let me know what I am doing wrong here since intuitively it seems like modr8 should apply to edits also.

Thanks!
Aaron

#1

pwolanin - November 27, 2007 - 22:26

This module does not set the moderation flag back on edit - nor is it intended to. I suppose you could make that a feature request - otherwise this could be handled with a few lines of code in a custom module.

#2

asp - November 28, 2007 - 03:29

Hi,

Thanks a lot for the info. Maybe this is specific to what I am trying to do so a feature request would be overboard but of course I can see how it would benefit :)! Could you point me in the right direction with respect to the custom code? Or do you think I should just modify the module directly? I haven't done this before but I am proficient with respect to php.

Is this where you mean?

case 'update' :
case 'insert' :
db_query('UPDATE {node} SET moderate = %d WHERE nid = %d', $node->moderate, $node->nid);
if ($node->moderate) { //cut this?
theme('modr8_message', FALSE, $node->type, $op);
}
break;

Thanks!
Aaron

#3

asp - November 28, 2007 - 04:58

HI,

Well this does the trick

...modr8.module...

case 'update' :
db_query('UPDATE {node} SET moderate = %d WHERE nid = %d', 1, $node->nid);
if ($node->moderate) { //cut this?
theme('modr8_message', FALSE, $node->type, $op);
}
break;
case 'insert' :
db_query('UPDATE {node} SET moderate = %d WHERE nid = %d', $node->moderate, $node->nid);
if ($node->moderate) { //cut this?
theme('modr8_message', FALSE, $node->type, $op);
}
break;

Not sure if this is the best approach :) since it puts everything into the moderation queue. I suppose I will just be patient and wait for some guidance!

Thanks again,
Aaron

#4

pwolanin - November 28, 2007 - 14:16

Well - that's certainly a reasonable approach - you could add an additional conditional to not put the post pack in moderation - for example, if the user has the moderator permission.

#5

asp - November 28, 2007 - 16:33

Cool. Thanks for the input!

I am sort of torn now because of found the revisions moderation module. I would still use modr8 for moderation on initial node creation and then revisions moderation for the updates. I am torn because I would rather not use two separate modules to manage what I consider to be one thing. Site admins would definitely find it confusing and even to me it seems like it could be simplified but that is for me to figure out :).

One feature that I really like about the modr8 module is the email it can send (or not send) to users. Thanks again for your help!

Aaron

#6

pwolanin - December 13, 2007 - 03:33
Status:active» closed

#7

ariana - February 12, 2008 - 19:10

This is not specific to just what you are trying to do, I thought this is what modr8 did too and need this as well. The revisions module does not accomplish this because it doesn't throw the pages back into the moderate content area, so like you said it's two workflows..

I would love to know what the conditional code would be to check and see if the user has moderator permission!

#8

ariana - February 12, 2008 - 20:42

Sorry, one more thing..

I was able to add the conditional statement to check for moderator status (I hope its correct, i'm not a php coder!)
break;
if (user_access !=('moderate content')) {
};
case 'update' :
db_query('UPDATE {node} SET moderate = %d WHERE nid = %d', 1, $node->nid);
if ($node->moderate) { //cut this?
theme('modr8_message', FALSE, $node->type, $op);
break;
}
case 'insert' :
db_query('UPDATE {node} SET moderate = %d WHERE nid = %d', $node->moderate, $node->nid);
if ($node->moderate) { //cut this?
theme('modr8_message', FALSE, $node->type, $op);
}
break;

But with or without that condition, there is still a problem that if the person is the page author, the content of that page gets changed. The only thing this patch is doing is showing the message that the page is in moderation. It doesn't actually hold off on changing the page until its been approved by the moderator.

Any ideas how to accomplish that?

#9

asp - February 13, 2008 - 02:49

Ariana,

I will take a look at this again, but it may take me a day or to (work has been busy) and I haven't looked at this for awhile. I will let you know when I do...

#10

ariana - February 13, 2008 - 14:37

Thanks Aaron that would be great!

#11

ericinwisconsin - August 18, 2008 - 17:24

I also would like this feature, although it doesn't matter to me if the edit changes are not reversible. I've seen the code snippet above, but don't know where to place it. Any help would be appreciated.

#12

matherion - August 20, 2008 - 14:10

If it is of any value to anyone: I would also like this :-)

#13

Grayside - October 1, 2008 - 18:01

I don't even understand the use case for initial moderation without revision moderation.

#14

Todd Nienkerk - December 11, 2008 - 19:36

+1. The ability to moderate changes to a node would be a big, big plus. (Of course, rejecting a change should not result in the deletion of the entire node -- just its revision.)

UPDATE: The Revision Moderation module may do the trick.

#15

eddified - June 5, 2009 - 21:38

I also would like a feature that allows a node being thrown back into the moderation queue on edit/update. Has a feature request been written up for this? It seems a significant number of people want this..

#16

eddified - June 5, 2009 - 21:48

I found an existing feature request for this: http://drupal.org/node/310723

 
 

Drupal is a registered trademark of Dries Buytaert.