Quantcast
Viewing all articles
Browse latest Browse all 49221

Create an action to flag a referenced node -- How?

I have a content-type called "assignment" and another called "worksheet". When a user creates a worksheet, the assignment node is node-referenced to display on top (using Node Reference URL).

I also have a flag called "completed".

After the user creates/saves his worksheet, I would like to automatically flag the referenced assignment node.

I want to use the flags to keep track of which assignments have been completed (i.e. which assignments resulted in a completed worksheet).

My problem is, there is an action for "flag created content" and another for "load referenced node", but there is no action for "flag referenced node".

As I understand it, if I want to write a new action, I have to create a module. I understand the basics of writing a module (I made a very simple one before, with a lot of help), but I have no idea how to write the code for this specific action.

If anyone can help I would really appreciate it. Thanks in advance.


Viewing all articles
Browse latest Browse all 49221

Trending Articles