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

Build institutional book lists for institutional managers on open source networks #43

Open
2 tasks
SteelWagstaff opened this issue Feb 14, 2024 · 4 comments

Comments

@SteelWagstaff
Copy link
Member

SteelWagstaff commented Feb 14, 2024

As an institutional manager on a self-hosted open source PB network (i.e. one without pressbooks-network-analytics), I should see a book list with information specific to my institution, instead of the full network book list.

See https://www.figma.com/file/hAvkPJpDgJDDyh8g358AqR/PB-Site-Adjustments?type=design&node-id=34-10598&mode=design&t=6NpK2f6ILNHepftM-0

This should look like the current network book list, but with a new column called 'Institution'. As an institutional manager, I should only be presented with the books which belong to my institution. If I try to view the full network book list, I should see a 'you don't have permissions to do this' style message.

DoD:

  1. The default book list should have a new 'institution' column that displays when this plugin is active for all users
  2. When an institutional manager loads the book list, the list should only display information that is relevant to their institution
  3. Institutional managers should be able to the search feature of the existing book list without special restrictions. Bulk actions should only affect books in their book list.

Additional desired changes:

  • Change the URL that the users count points to from wp-admin/network/site-users.php?id=3 to SITETITLE/wp-admin/users.php
  • Remove the Edit link beneath the book title in the institutional manager's book list (both in pressbooks-network-analytics and the default WP book list)
    Screenshot from 2024-02-14 15-38-49
@fdalcin
Copy link
Contributor

fdalcin commented Apr 22, 2024

This has an open draft PR.

Currently, the PR includes the new column for each book listed in the network sites page.
The current state of the permissions blocks Institutional Managers from accessing the page though (you don't have permission to view this page).
We will need to improve our permission checks so it works when Pressbooks Network Analytics is active but also when it's not.

Working:

  • Book list displays a new column with the institution which the book is associated with
  • Users may sort by institution in ascending or descending order

There are some pending things to work on:

  • Add tests
  • Look for a better way to join tables while get the list of sites (I had to add a wp_cache_flush_group call which feels weird)
  • Fix permission so Institutional Managers are able to access the book list regardless of Pressbooks Network Analytics plugin being active

This task was underestimated since I already spent more effort that we anticipated for this task.
We decided to move this task to future sprints, so I will consider in our metrics that we spent 5 points, but I would estimate the remaining effort to be another 3 to 5 points.

@cmurtagh
Copy link

What's the status on this?

@SteelWagstaff
Copy link
Member Author

AFAIK, it still has an open draft PR and was never completed.

@cmurtagh
Copy link

Oh, right... I should have known this. Sorry.

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

No branches or pull requests

3 participants