newviews blocktype shows grouphomepage views

Bug #619168 reported by Andrew Nicols
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

If you create a new group, and then delete it, it's views are not deleted.
As a result, they are still shown on the newviews blocktype, and trying to view that view results in various errors because the owner does not exist.

Not sure whether the view should be deleted, or whether the newviews blocktype needs to ignore deleted groups.

Revision history for this message
Andrew Nicols (dobedobedoh) wrote :

Looking at the way in which groups are deleted, or rather marked as deleted, I don't think that the views associated with that group should be deleted.

Speaking with Penny, I'm beginning to think that perhaps grouphomepage views shouldn't be displayed in the newviews blocktype.

summary: - Deleting a group doesn't delete it's views
+ newviews blocktype shows grouphomepage views
Changed in mahara:
assignee: nobody → Andrew Robert Nicols (dobedobedoh)
Revision history for this message
Andrew Nicols (dobedobedoh) wrote :

So we want to remove grouphomepage views from the newviews block type (where they shouldn't be displayed).
newviews/lib.php uses View::view_search()

However, the grouphomepage views should be visible to group admins on view/groupviews.php for editting etc and view/groupviews.php also uses View::view_search()

Since they're only ever shown to admins, it doesn't really matter if a grouphomepage view is shown in the newviews blocktype.

I've also pushed a fix to ensure that deleted group views are not displayed; and a fix to display_title when using grouphomepages.

Revision history for this message
Andrew Nicols (dobedobedoh) wrote :

I've pushed the above fixes. I'll leave this for others to decide whether the newviews blocktype should display grouphomepage views.

Changed in mahara:
assignee: Andrew Robert Nicols (dobedobedoh) → nobody
Changed in mahara:
status: New → Opinion
Revision history for this message
Richard Mansfield (richard-mansfield) wrote :

I don't think they should be in the newviews block, but yeah, I agree it's not super high priority because it's only admin's that see them. Maybe we could pass a view type filter to the view_search function. It would make that function even more hairy and indecipherable, but it could be the easiest way to fix this.

Changed in mahara:
importance: High → Medium
Changed in mahara:
status: Opinion → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.