MIDDAG for Moodle

revision_service_interface

Contract for the revision service responsible for recording state transitions (create, update, delete) of items.

A revision always represents a transition between two states:

  • CREATE: old = null, new = item
  • UPDATE: old = item, new = item
  • DELETE: old = item, new = null

Implementations of this interface MUST:

  • Never modify the item state
  • Never block the CRUD operation
  • Persist only audit/revision data
  • Be deterministic and idempotent when possible

Table of Contents

Methods

create_revision()  : void
Records a revision according to the previous and new state.

Methods


        
On this page

Search results