0

Every day people are expected to post 1 node of content type "Article" on my site. If they missed to post such article, then I need to somehow produce a message "Your article is pending" to those users.

Additionally, I need to be able to check which date a user did not submitted such article.So how can I get all users who did not submit articles? And also filter them on which date they have missed the submission of an article node?

  • Welcome to Drupal Answers :) Requests for tutorials to build vaguely specified features are off topic here, as there isn't a single, objective answer that can be provided. Take some time to write a detailed question, which lists all of the context that's currently missing, and makes this into a much narrower, unambiguous, request. Please also include your own research efforts so far, so people know what you've tried, what went wrong, errors you've seen, etc, so people have a chance to advise properly without guessing. Many thanks – Clive May 26 '16 at 14:38
0

Part 1 - Create an appropriate list of users

You could use an approach similar to my answer to "How to create a list of users who did not submit some webform?", i.e.:

  1. Use the Flag module to introduce an article submission flag (similar to Step 1 in the above answer).
  2. Register article submissions, using a Rules Event like "After saving content (of type article)", probably you don't need any special Rules Conditions.
  3. List the users who have yes or no flagged "an" article with the flag from Step 1, using Views (similar to Step 3 in the above answer).

The above steps will allow you to create a list that is close to what you're looking for.

Part 2 - Filtering the list

To also filter them on which date they have missed the submission of an article node (as in your question), you would need to further enhance the view created in step 3. For that, there are various ways to do so. One of the possibilities is to use the DataTables module, and use its on-the-fly-filtering facility. This facility becomes available after you enable the "search" widget (somewhere within the datatables settings for your view). Refer to my answer to "How to display the data of a View in table format?" for way more details about DataTables.

Part 3 - Producing a message

To produce a message "Your article is pending" to those users (as in your question), you could enhance the view by adding the Views Bulk Operations (VBO) module to it, so that for the selected users you trigger a Rules Component which actually sends an appropriate eMail to those users. For an example of such rules component, refer to my answer to How to send an email notification when a subcription renewal is due? (within Step 2 of it).

If you're not familiar with how to do so, have a look at the video about Using Rules components with VBO.

  • Comments are not for extended discussion; this conversation has been moved to chat. – Clive May 27 '16 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.