Sharing collection with a group not showing on group homepage list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Cecilia Vela Gurovic | ||
15.10 |
Fix Released
|
High
|
Unassigned | ||
16.04 |
Fix Released
|
High
|
Unassigned | ||
16.10 |
Fix Released
|
High
|
Unassigned |
Bug Description
Sometimes when a user shares a collection with a group they belong to that collection doesn't show in the list for 'Collections shared with this group' in the Group pages block.
The reason for this is because the sql for the list only fetches the collection_view page with displayorder = 0
This is so it fetches the first page so can get the url for collection and also limit the results to once per collection.
The problem occurs when one deletes the first page from a collection via the edit collections views page.
It doesn't reset the collection views display order and so there is no displayorder = 0
A workaround for this could be to change the line in lib/view.php for get_sharedcolle
from
AND (cv.displayorder = 0 OR cv.displayorder IS NULL)
to
AND (cv.displayorder = (SELECT MIN(displayorder) FROM collection_view WHERE collection = c.id) OR cv.displayorder IS NULL)
where it fetches the minimum display order value
Or fix up the deletion of views from collection so that the displayorder is reset correctly
Changed in mahara: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → 17.04.0 |
Changed in mahara: | |
assignee: | nobody → Cecilia Vela Gurovic (ceciliavg) |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
It looks like we need to call the Collection- >set_viewdispla yorder( ) function after the Collection- >remove_ view() one
Or better jet have the call to updating display order within the remove_view() one