Step 3 of 3 in Keeping track of changes
Sample data, read from content-sdk
Viewing recent activity
You look after the Science curriculum, and you want to see what's happened in it recently. Lesson 2 no longer shows to readers, Seeds Slides has been removed, and a Spanish Teach Book has been published. The lessons' saved versions show only part of this: publishing and unpublishing don't save a version, and a removed resource's saved versions go with it.
content-sdk keeps an audit log: a list with one entry for every change made to the content. Each entry says who made the change, who it was made on behalf of, and what it reached. Saving, publishing, unpublishing, and deleting each add an entry; opening or reading something adds none. An administrator can read the log, and so can someone given a role that only reads it, which is how this site reads it.
An entry records that a change was made, not what the text said before or after. When a resource is removed, its entry keeps the resource's title, so the removal can still be found by name.
Try it: find the change Ben Carter made on behalf of Lucía Fernández, then find the entry that keeps Seeds Slides' title.
Each change is one entry, however much it reached. Unpublishing Lesson 2 also unpublished the two rows inside it, and the log lists them in that same entry. Deleting Seeds Slides also deleted its row in Lesson 2. Ben published the Spanish Plants Teach Book on Lucía's behalf, and the entry names them both. Plants Teach Book is a resource Science's outline places, so this example counts its changes as Science's activity. Seeds Slides has no saved versions left, but its title is still in the log, so you can still find that it was removed. The log also records when each change was made; the sample's changes were all made at once, when the sample was set up, so this example leaves times out. To see what the text said, open a lesson's saved versions while it still exists.