Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adminops: Add "recent activity by all users" tool #1284

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

alice-blue
Copy link
Contributor

@alice-blue alice-blue commented Feb 15, 2025

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, please adjust the days parameter in the URL based on how old the available data is. E.g. if the newest available data is 80 days old, and you want to show three days of data, set it to 83.

Known issues:

  1. 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.
  2. 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.
  3. The review helpfulness votes section doesn't work, doesn't show the voter, and I don't know how to test it (that voter data is not public).
  4. I haven't tried to tackle or test anonymous poll votes.
  5. To me the amount of text to scroll through might be less overwhelming if it didn't wrap so much, but I'm not sure what to do about that. Possibly a smaller font size in conjunction with wider lines of text would make it so that many of the individual items could fit on a single line, and then you could more easily compare one line to the next and look for patterns.
  6. The limit on the reviewvotes query (currently in line 207) should probably be removed after the createdate column in the reviewvotes table gets sorted out.

@alice-blue
Copy link
Contributor Author

I experimented with anonymous poll votes, creating a test poll with anonymous voting to test it.

The recent activity code is now set up so that if the poll is anonymous, the user id is shown instead of the voter name (but mods can click through to see the name).

@dfabulich I was guessing that when the flags column in the vote table says 1, that means the poll is anonymous, but you can tell me if that's wrong.

I see this in util.php

define("POLL_FLAG_ANONYMOUS", 0x0001);

and I see this in poll:

$anonymous = $flags & POLL_FLAG_ANONYMOUS;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mod tools should include 'recent activity' with all activity listed
1 participant