Add custom profile fields

Bug #1661125 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Robert Lyon

Bug Description

Allow the adding of custom profile fields via a local/lib/artefact_internal.php file that extends the ArtefactInternal one

Have

PluginArtefactInternalLocal::get_artefact_types()
PluginArtefactInternalLocal::get_profile_artefact_types()
PluginArtefactInternalLocal::get_contactinfo_artefact_types()

extend their PluginArtefactInternal equivalents

Have
ArtefactTypeProfileLocal::get_all_fields()
extend the ArtefactTypeProfile equivalent

Have
ArtefactTypeProfileLocal::get_desired_fields()

To fetch info about which tab the custom field should go in and their order on the Content -> Profile page

Also added hooks for profile artefacttypes so that we can fetch custom info for
- getoptions() - get select options for field
- defaultoption() - get default value for field
- format_result() - to human readable info (useful for 'select' fields)
- usersearch_column_structure() - info about which column template to use for admin users search list for custom field
- get_special_data() - in case data is not saved in the 'artefact' table fetch it from where it lives

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/7433

Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → Wishlist
assignee: nobody → Robert Lyon (robertl-9)
milestone: none → 17.04.0
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7433
Committed: https://git.mahara.org/mahara/mahara/commit/c03266f20b39d89a8ac502f845f9ab516e376c22
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit c03266f20b39d89a8ac502f845f9ab516e376c22
Author: Robert Lyon <email address hidden>
Date: Thu Feb 2 11:27:10 2017 +1300

Bug 1661125: Allow custom profile fields via /local/lib/

Lets one have a custom profile field that can be used to record data
against

behatnotneeded

Change-Id: I39de0e6f1aa5b1e29a3bf5604ee88612ccff5478
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Revision history for this message
Dominique-Alain JAN (dajan) wrote :

Would it be possible to leave an example in a readme file, so programmers could copy-paste and be inspired when customizing users' profile.

Or add the example in the Mahara Manual.

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

An example (might need a bit of cleaning up as it was a quick one for testing purposes) is available at https://reviews.mahara.org/7434 until we've documented it more properly.

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

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

commit 3c640c9efbe47df34f243b713b8dca2bc51bf1c9
Author: Robert Lyon <email address hidden>
Date: Thu Apr 20 07:17:36 2017 +1200

Bug 1684267: Adding new templates to the raw_old theme

As well as adding some changes to raw_old that make sense to be there
from these bugs:
Bug 1681588
Bug 1451263
Bug 1675213
Bug 1674801
Bug 1661125
Bug 1658389

behatnotneeded

Change-Id: I62042f1279ca96ac17c8e2fef11f60ecbcaf04c6
Signed-off-by: Robert Lyon <email address hidden>

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

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/7673

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

Reviewed: https://reviews.mahara.org/7673
Committed: https://git.mahara.org/mahara/mahara/commit/f7be63ab0a7cdf0b356de14952ee06cb11bb00f2
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit f7be63ab0a7cdf0b356de14952ee06cb11bb00f2
Author: Robert Lyon <email address hidden>
Date: Thu Apr 20 07:17:36 2017 +1200

Bug 1684267: Adding new templates to the raw_old theme

As well as adding some changes to raw_old that make sense to be there
from these bugs:
Bug 1681588
Bug 1451263
Bug 1675213
Bug 1674801
Bug 1661125
Bug 1658389

behatnotneeded

Change-Id: I62042f1279ca96ac17c8e2fef11f60ecbcaf04c6
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 3c640c9efbe47df34f243b713b8dca2bc51bf1c9)

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.