adminops: Add "recent activity by all users" tool #1284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #834
This PR adds a tool to the admin panel that shows recent activity for all users in five categories: ratings/reviews, poll votes, page edits, tags, and 'helpful' review votes.
Activity that is anonymous on the live site (adding tags, and voting on how helpful reviews are) is shown with a userid instead of a user name on the activity page (but mods can click on the link to the user page if they need to look up the username).
When testing in the dev environment, if you want to see any recent activity, you'll have to adjust the
days
parameter in the URL based on how old the data dump is. E.g. if the data dump is 80 days old, and you want to show three days of that data, set it to 83.Known issues:
Before merging, $recent_days should be changed to 3, since that's how many days of recent activity the mods requested.I've now made this a parameter instead, so it shouldn't be necessary to change the code.There's supposed to be a "no [type of activity] was found" message that displays when there is no activity of that type to show, and it doesn't always display, even if you reduce $days to the point that there's no activity to show. I don't know why.This seems to work now.The review helpfulness votes sectiondoesn't work,doesn't show the voter, and I don't know how to test it (that voter data is not public).I haven't tried to tackle or test anonymous poll votes.ORDER BY reviewvotes.createdate DESC LIMIT 100', [$recent_days]);
exists only because of this problem. The limit should probably be removed after the createdate column in the reviewvotes table gets sorted out.