Project

General

Profile

Feature #14457

Toggle for Public Sites in Course Directory

Added by Laurie Hurson 5 months ago. Updated 8 days ago.

Status:
Testing Required
Priority name:
Normal
Assignee:
Category name:
Courses
Target version:
Start date:
2021-05-14
Due date:
% Done:

0%

Estimated time:

Description

HI All,

Adding this ticket following up the commons meeting today. Would it be possible to add a toggle to the search filter in the courses directory to allow users to filter and view only public groups and sites?

Do we want to think about the placement/function of this "view public courses" toggle along site the possible addition of an OER metadata tag and toggle?

Screenshot_2021-05-25_15-51-52.png (14.9 KB) Screenshot_2021-05-25_15-51-52.png Boone Gorges, 2021-05-25 11:59 AM
Screenshot_2021-05-25_15-58-05.png (14.8 KB) Screenshot_2021-05-25_15-58-05.png Boone Gorges, 2021-05-25 11:59 AM
Screenshot_2021-05-25_15-51-52.png (16.2 KB) Screenshot_2021-05-25_15-51-52.png Sonja Leix, 2021-05-25 12:44 PM
Screenshot_2021-10-05_10-29-19.png (39.7 KB) Screenshot_2021-10-05_10-29-19.png Boone Gorges, 2021-10-05 11:29 AM
cac-fill-blog-public-courses.php (883 Bytes) cac-fill-blog-public-courses.php Boone Gorges, 2021-10-05 11:34 AM

Related issues

Related to CUNY Academic Commons - Bug #14437: Deleted Sites Show Up On Courses TabTesting Required2021-05-10

History

#1 Updated by Boone Gorges 5 months ago

Adding Sonja to get her brief thoughts.

#2 Updated by Sonja Leix 5 months ago

Boone Gorges wrote:

Adding Sonja to get her brief thoughts.

Sorry for the late response to this. I took a look and since this is a toggle vs. the various drop down menus we have in our filter UI, I'd recommend to add a simple check box below the line of filters to toggle this feature on/off. It could read something like "Show public courses only"

#3 Updated by Laurie Hurson 5 months ago

Thanks for your insight Sonja. This sounds like a good plan to me.

Would the check box be located in the gray filter box or below where the number of sites are listed? I think within the gray filter box might be more obvious.

#4 Updated by Sonja Leix 5 months ago

Laurie Hurson wrote:

Thanks for your insight Sonja. This sounds like a good plan to me.

Would the check box be located in the gray filter box or below where the number of sites are listed? I think within the gray filter box might be more obvious.

Yes agreed, they should be part of the grey filter box. I suggest in the line below the other filters.

#5 Updated by Boone Gorges 5 months ago

Thanks all. Agreed that a simple checkbox is fine.

I mocked up putting it in a second line. IMO it becomes confusing - it seems like it's tied to the search box, and it's no longer clear that the 'Filter' and 'Reset' buttons apply to this input.

I tried a second version that involved moving the action buttons to the second row. It's not visually great but it retains the distinction between filters and action buttons.

It's also worth flagging here that my mockups in #14170 suggest making other changes to this filter interface (though perhaps not on the Courses directory) and we risk mucking up an interface that we worked hard to keep clean and easy to understand.

#6 Updated by Sonja Leix 5 months ago

Thanks Boone,
Since the user has to click "filter" after they check the new "public sites" checkbox, it makes more sense to drop the action buttons below the filter options. We might want to add a 1px separator between the action buttons and the filter options so it's clear, see rough adjusted mockup attached.

#7 Updated by Laurie Hurson 5 months ago

  • Target version deleted (1.19.0)

Looks good to me, I like the 1px line separation.

#8 Updated by Boone Gorges 5 months ago

  • Assignee set to Boone Gorges
  • Target version set to 1.19.0

Thanks, Sonja. Breaking the action buttons into a separate line gives us more flexibility in general, since we'll have more screen real estate to deal with. I'll see what I can do about working up a prototype.

#9 Updated by Boone Gorges 5 months ago

  • Category name set to Courses

#10 Updated by Colin McDonald about 1 month ago

I just wanted to bump this. Boone, did you end up working on a prototype? Is there anything else we can pass your way to help putting that together? We discussed on Friday that this ticket could be good to include in our regular package of release items related to teaching and course improvements.

#11 Updated by Boone Gorges about 1 month ago

No, I haven't worked anything up, but I'll try to take a look in the next week or so.

#12 Updated by Boone Gorges 15 days ago

I've built a first pass at this, and it's ready for testing on cdev. A screenshot is also attached.

Fairly substantial changes were required to make this work. Here's a rundown, for posterity:
- Group 'status' and site 'blog_public' are stored in separate tables, in a way that could not be joined as part of the course query. As such, I needed to write routines to mirror these 'public' flags to postmeta, where I could use WP's meta_query.
- Some of the mirroring routines require a switch_to_blog(), because users can change their blog_public value while on the subsite. This means registering and unregistering certain taxonomies and post types on the fly, so that course queries work (WP doesn't handle this well natively; see https://core.trac.wordpress.org/ticket/20541)
- Because of the subsite issue, I also needed to change the plugin to be 'Network: true' so that it would detect blog_public changes on subsites. A side benefit of this change is that it's now possible to fix #14437, which I've done as part of my work here.
- I've written a CLI script to fill in the 'public' postmeta for existing courses, attached here. I'll need to run this after the release.

#13 Updated by Boone Gorges 15 days ago

  • Related to Bug #14437: Deleted Sites Show Up On Courses Tab added

#14 Updated by Colin McDonald 15 days ago

Thanks Boone, I checked it out on cdev and it worked well for me. One simple thing, sorry if it's come up before, but when I searched "english" the first result is "scott test group creation" and it has a public group and private site. After hitting the public courses only filter, that result is still there. Is that expected behavior, that we'd rather show the public group even if it has a private site? Makes sense to not hide both altogether?

#15 Updated by Boone Gorges 15 days ago

I've interpreted 'public' as "has either a public site or a public group". This can be changed if there's consensus that it should mean "has no private site or private group".

#16 Updated by Colin McDonald 15 days ago

That interpretation tracks for me too. Adding a couple other watchers here in case they want to weigh in.

#17 Updated by Matt Gold 15 days ago

As someone who teaches with a public site and private group, that makes sense to me

#18 Updated by Laurie Hurson 8 days ago

Yes, this make sense to me too. If either the group or site is public, the course should be visible when "view public courses" is checked.

Also available in: Atom PDF