Add a text block in Dashboard page using TestingDataGenerator.php

Bug #1879410 reported by Aatharsh Girishwar Vijaya Sugumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
19.04
Fix Released
High
Unassigned
19.10
Fix Released
High
Unassigned
20.04
Fix Released
High
Unassigned
20.10
Fix Released
High
Aatharsh Girishwar Vijaya Sugumar

Bug Description

Data generator scripts are used to auto-populate cloud instances (Mahara QA sites) with pre-defined test data.

Modification of the create_block() function of TestingDataGenerator.php is required to add a Text block in the Dashboard page.

Test instructions:
A site created with pre-populated data using the data population script should have a Text block in the dashboard page of every people with info like group count, group admin count, group member count.

When logged in as People1 the text block on dashboard will have
Group Count:2 Group Admin:2 Group member:0
and for People101
Group Count:2 Group Admin:1 Group member:1

Changed in mahara:
assignee: nobody → Aatharsh Girishwar Vijaya Sugumar (aatharshsugumar)
status: New → In Progress
Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → Medium
milestone: none → 20.10.0
description: updated
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/10983

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

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

commit d811cd3c6c820655697c2a2c5ad7d875d4709b78
Author: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
Date: Tue May 19 13:56:41 2020 +1200

Bug 1879410: Add a text block in Dashboard page using TestingDataGenerator.php

Modified create_block() functionality of TestingDataGenerator.php to generate
blocks in the Dashboard page

Modified code based on review comments - moved sql query to else block, used list
instead of array and added type='dashboard' in sql query, modified dashboard
str match from preg match

Change-Id: I8880226008217b0bc3ed9b97301ad060c998d058
Signed-off-by: Aatharsh Girishwar Vijaya Sugumar <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/10987

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "19.10_STABLE" branch: https://reviews.mahara.org/10988

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "19.04_STABLE" branch: https://reviews.mahara.org/10989

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

Reviewed: https://reviews.mahara.org/10987
Committed: https://git.mahara.org/mahara/mahara/commit/4cff0886363f94ff4edbf2e4e660c9088d2e24d5
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.04_STABLE

commit 4cff0886363f94ff4edbf2e4e660c9088d2e24d5
Author: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
Date: Tue May 19 13:56:41 2020 +1200

Bug 1879410: Add a text block in Dashboard page using TestingDataGenerator.php

Modified create_block() functionality of TestingDataGenerator.php to generate
blocks in the Dashboard page

Modified code based on review comments - moved sql query to else block, used list
instead of array and added type='dashboard' in sql query, modified dashboard
str match from preg match

Change-Id: I8880226008217b0bc3ed9b97301ad060c998d058
Signed-off-by: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
(cherry picked from commit d811cd3c6c820655697c2a2c5ad7d875d4709b78)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10988
Committed: https://git.mahara.org/mahara/mahara/commit/20452b45df73e5af66201cc18055b12d9c8a2f27
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit 20452b45df73e5af66201cc18055b12d9c8a2f27
Author: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
Date: Tue May 19 13:56:41 2020 +1200

Bug 1879410: Add a text block in Dashboard page using TestingDataGenerator.php

Modified create_block() functionality of TestingDataGenerator.php to generate
blocks in the Dashboard page

Modified code based on review comments - moved sql query to else block, used list
instead of array and added type='dashboard' in sql query, modified dashboard
str match from preg match

Change-Id: I8880226008217b0bc3ed9b97301ad060c998d058
Signed-off-by: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
(cherry picked from commit d811cd3c6c820655697c2a2c5ad7d875d4709b78)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10989
Committed: https://git.mahara.org/mahara/mahara/commit/3a2c008244afe09fc402dba2906a929052947df3
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit 3a2c008244afe09fc402dba2906a929052947df3
Author: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
Date: Tue May 19 13:56:41 2020 +1200

Bug 1879410: Add a text block in Dashboard page using TestingDataGenerator.php

Modified create_block() functionality of TestingDataGenerator.php to generate
blocks in the Dashboard page

Modified code based on review comments - moved sql query to else block, used list
instead of array and added type='dashboard' in sql query, modified dashboard
str match from preg match

Change-Id: I8880226008217b0bc3ed9b97301ad060c998d058
Signed-off-by: Aatharsh Girishwar Vijaya Sugumar <email address hidden>
(cherry picked from commit d811cd3c6c820655697c2a2c5ad7d875d4709b78)

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
Revision history for this message
Robert Lyon (robertl-9) wrote :

The change done here was allowing some custom scripts to be able to select and create a block for the correct personal page, eg the dashboard rather than the any page they owned.

The change that went into core was for the test data generator system- used by behat / phpunit

So in core there is not anything using this currently - but is useful if we want to add a block to the dashboard page only

no longer affects: mahara
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.