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.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1661125

Title:
  Add custom profile fields

Status in Mahara:
  Fix Committed

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1661125/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : mahara-contributors@lists.launchpad.net
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to