Commit ac18d6a0 by David Baumgold

Merge pull request #3141 from edx/db/doc-xblock-signature

Doc: update xblock publish() function signature
parents 08538e89 c6200a48
......@@ -21,7 +21,7 @@ These are properties and methods available on ``self.runtime`` when a view or ha
that the block is being executed in. The same student in two different courses
will have two different ids.
* publish(event): Emit events to the surrounding system. Events are dictionaries that can contain arbitrary data.
* publish(block, event_type, event): Emit events to the surrounding system. Events are dictionaries that can contain arbitrary data.
XBlocks can publish events by calling ``self.runtime.publish(self, event_type, event)``. The ``event_type`` parameter
enables downstream processing of the event since it uniquely identifies the schema. This call will cause the runtime
to save the event data in the application event stream. XBlocks should publish events whenever a significant state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment