maxlayoutrows is too low

Bug #1766833 reported by Nicolas Dunand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Unassigned

Bug Description

The maximum number of rows for a view is arbitrarily set to 6 in lib/view.php ($maxlayoutrows), which may be too small for some uses.

The code also references some file (layoutpreview.php) which is not present (as an explanation for this limitation ?).

Discussion on https://mahara.org/interaction/forum/topic.php?id=6413 has Robert Lyon and Aaron Wells stating (back in 2014-2015) that this could be changed.

Therefore I propose a small modification, which :

1. raises this limit to 20
2. shows smaller preview rows for layouts having >= 60 rows

Attached patch for Mahara 17.x-18.04

Revision history for this message
Nicolas Dunand (ndunand) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Thank you for the patch, Nicolas. We'll add it into the code review system for review and discussion whether this can be included into Mahara core or not.

Changed in mahara:
status: New → In Progress
importance: Undecided → Wishlist
milestone: none → 18.10.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/8813

Revision history for this message
Steven (stevens-q) wrote :

Launchpad: https://bugs.launchpad.net/mahara/+bug/1766833
Gerrit: https://reviews.mahara.org/#/c/8813/
Bug description: increase maxlayoutrows
--------------------------------------------------------------
Environment tested: Master
Browser tested: Chrome

===================
Acceptance Criteria:

1. Portfolio / Group page "Layout" - max rows = 20 rows
2. Shows smaller preview rows for layouts having >= 60 rows
3. Page displays correctly when copied by other users
Page displays correctly when exported to Standalone HTML website
Page displays correctly when exported to Leap2A

===================
Manual Test Script
===================

Preconditions:
1. "Group 101" exists (Admin group) and has the following
 a. page is SHARED WITH = public
 b. Advanced options > Allow copying = yes
2. "User1" exists and has the following
 a. Belongs to "A1 Institution"
 b. Is owner of "Group 101"
3. "User1" exists and has the following
 a. Belongs to "A1 Institution"
 b. Is owner of "Group 101"

Test Script:
1. Log in as User1
2. Browse to Main menu > Portfolio > Pages and collections >
3. Add a page - Name = "max 20 layout rows (new)"
4. open "Layout" accordion tab
5. Scroll to "Create custom layout" (bottom of page)
6. Add as many single column rows as is possible
7. Confirm that the maximum rows allowed is 20 rows ✔
8. Click the create new layout button to create you 20 row custom layout
9. Confirm that an icon depicting the 20 row
custom layout is displayed and has a radio button that can be selected ✔
10. Select the radio button on the
20 row custom layout icon and click the save button
11. Confirm that the Newly created page has 20 rows available ✔
12. Add a text block to each of the rows
13. Share the page with public and allow copying
14. Create a Page for Group 101 and follow the above steps
15. Confirm that the page displays as expected
 a. Confirm page displays text blocks in each of the 20 rows ✔
16. Login as User 2
17. Browse to Admin's portfolio page "max layout rows 20 (new)"
18. Copy the page and rename it to "User1 max layout rows 20 (new)"
19. Confirm that the page displays as expected
 a. Confirm page displays text blocks in each of the 20 rows ✔
20. Export the page to a
Standalone HTML website
21. Confirm the html page
displays text blocks in each of the 20 rows ✔
22. Export the page
to Leap2A file
23. Import the file into User3 portfolio
24. Confirm that when the imported page
displays text blocks in each of the 20 rows ✔
25. Confirm the settings for the imported page are the same as the original ✔
Catalyst QA Approved ✔

Revision history for this message
Steven (stevens-q) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/8813
Committed: https://git.mahara.org/mahara/mahara/commit/4d812254aadb91d6f50141ddd610deaeccd8ccc1
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 4d812254aadb91d6f50141ddd610deaeccd8ccc1
Author: Nicolas Dunand <email address hidden>
Date: Fri Apr 27 09:33:19 2018 +1200

Bug 1766833: increase maxlayoutrows

1. raises this limit to 20
2. shows smaller preview rows for layouts having >= 60 rows

behatnotneeded

Change-Id: I4aabed614a6c2a649d62eca38f1f70e3a1bc7853

Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Nicolas Dunand

Thank you for the patch - it has been tested and merged into the core codebase and will be available in the next release

Cheers
Robert

Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Nicolas Dunand (ndunand) wrote :

Hi Robert Lyon,

Thanks for pushing this so quickly. Minor correction to comments above: "60" should read "6" (my mistake initially).

Will this be integrated into Mahara 18.04.1, or only 18.10 ?

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Nicolas,

This will only go into 18.10 as it is a new feature. You can backport it to 18.04 though.

Cheers
Kristina

tags: added: nominatedfeature
Revision history for this message
Nicolas Dunand (ndunand) wrote :

Hi Kristina,

Thank for your answer.

Cheers,

Nicolas

Robert Lyon (robertl-9)
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.