Add custom profile fields

Bug #1661125 reported by Robert Lyon on 2017-02-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
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

Robert Lyon (robertl-9) on 2017-02-02
Changed in mahara:
importance: Undecided → Wishlist
assignee: nobody → Robert Lyon (robertl-9)
milestone: none → 17.04.0
status: New → In Progress

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) on 2017-03-31
Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
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.

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.

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>

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) on 2017-04-27
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers