Skip to content

Instantly share code, notes, and snippets.

@mikebuchanon
Created July 24, 2013 20:57
Show Gist options
  • Save mikebuchanon/6074492 to your computer and use it in GitHub Desktop.
Save mikebuchanon/6074492 to your computer and use it in GitHub Desktop.
Find who deleted a forum post in ANGEL based on course_id
select dl.coursecontext [course_id],
a.LoginName [user_who_deleted_post],
dl.actiondate [date_post_deleted],
a2.loginname [user_who_made_post],
dp.PostDate [date_posted],
dp.Subject [post subject],
dp.Body [post]
from DiscussionLog dl (nolock)
join ACCOUNTS a (nolock) on a.USERNAME=dl.UserId
join DiscussionPost dp (nolock) on dp.PostId=dl.PostId
join ACCOUNTS a2 (nolock) on a2.USERNAME=dp.AuthorId
where dl.CourseContext='course_id'
and ActionId='3' --3 is delete action
order by dl.ActionDate asc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment