Project

General

Profile

Actions

Feature #14969

closed

'Campus' filter support for the activity directory

Added by Boone Gorges over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
Home Page
Target version:
Start date:
2021-11-16
Due date:
% Done:

0%

Estimated time:
Deployment actions:

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

my-commons-campuses.mov (43.8 MB) my-commons-campuses.mov Colin McDonald, 2021-12-10 09:59 AM
Actions #1

Updated by Raymond Hoh over 2 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.

Actions #2

Updated by Boone Gorges over 2 years ago

Awesome, thank you for the quick turnaround on this!

Actions #3

Updated by Colin McDonald over 2 years ago

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.

Actions #4

Updated by Raymond Hoh over 2 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.

Actions #5

Updated by Colin McDonald over 2 years ago

Thanks, Ray. I think the work we're tying up in #14181 will cover the issues at play here.

Actions #6

Updated by Boone Gorges over 2 years ago

  • Status changed from Testing Required to Staged for Production Release
Actions #7

Updated by Boone Gorges over 2 years ago

  • Status changed from Staged for Production Release to Resolved
Actions

Also available in: Atom PDF