Feature #14969
closed'Campus' filter support for the activity directory
0%
Description
Hi Ray - I came across this while making some changes today: https://github.com/cuny-academic-commons/cac/blob/07f5167714bc7bfbcf159de0fd6d43e8bb78f341/wp-content/themes/bp-nelo/parts/home/activity.php#L176
How can we add '?campus=' support to the activity directory? It's going to be ugly. Something like:
'filter_query' => [ 'relation' => 'OR', 'campus_members' => [ 'column' => 'user_id', 'value' => members_of_campus( $campus ), 'compare' => 'IN', ], 'campus_groups' => [ 'relation' => 'AND', [ 'column' => 'item_id', 'value' => groups_of_campus( $campus ), 'compare' => 'IN', ], [ 'column' => 'component', 'value' => 'groups', ] ], 'campus_sites' => [ 'relation' => 'AND', [ 'column' => 'item_id', 'value' => sites_of_campus( $campus ), 'compare' => 'IN', ], [ 'column' => 'component', 'value' => 'blogs', ] ], ]
Does this seem like the right approach? Can you have a go at it? Or are we going to have to scrap it for 1.19.0?
Files
Updated by Raymond Hoh about 3 years ago
- Status changed from New to Testing Required
I've implemented a "My Campus(es)" filter on My Commons. This is available for testing on cdev. (Commits: https://github.com/cuny-academic-commons/cac/compare/07f5167...e4953e1)
When on the logged-in homepage, click on the "More Activity From Your Campus" link at the bottom of the "Activity From Your Campus(es)" block.
I felt that My Commons was a more appropriate place for this than the News page, which we haven't really utilized for this type of information.
If we want to move this over to the News page, let me know.
Updated by Boone Gorges about 3 years ago
Awesome, thank you for the quick turnaround on this!
Updated by Colin McDonald almost 3 years ago
- File my-commons-campuses.mov my-commons-campuses.mov added
I put some related feedback and a screencast in #14181 -- I'm seeing this work pretty well with campus support in My Commons, better than the Campus Activity side of the logged-in homepage.
However, I'm not seeing group forum posts or new groups from the last hour, when I've created a few new groups and posts. That should be there, right? Sites activity seems ok. I'm attaching another, different screencast here to show the discrepancy a bit between the different My Commons tabs.
Not sure if this would be because I belong to two different campuses, GC and Brooklyn College. Everything I created recently I marked for Brooklyn College. But just now I tried removing GC so that I'm ONLY a Brooklyn College affiliation, and My Commons looked the same as in the video except it's My Campus not My Campuses.
Updated by Raymond Hoh almost 3 years ago
Thanks for finding this bug, Colin.
As I mentioned here, I incorrectly entered in the wrong activity types for new groups and forum activity, which was causing these activity items to not be displayed. Fixed in https://github.com/cuny-academic-commons/cac/commit/53c24eb2c4a4b7ac9a6f42b8571d890fc406ce4d and https://github.com/cuny-academic-commons/cac/commit/53e5e271cd70270e54708681655f4fe5334b60f8.
Updated by Colin McDonald almost 3 years ago
Thanks, Ray. I think the work we're tying up in #14181 will cover the issues at play here.
Updated by Boone Gorges almost 3 years ago
- Status changed from Testing Required to Staged for Production Release
Updated by Boone Gorges almost 3 years ago
- Status changed from Staged for Production Release to Resolved