So in your local/lib/artefact_internal.php file you would need something like so:
class PluginArtefactInternalLocal extends PluginArtefactInternal { public static function get_artefact_types() { return array( 'cat', 'dog', ); } public static function get_profile_artefact_types() { return array( 'cat', 'dog', ); } public static function get_contactinfo_artefact_types() { return array( 'cat', 'dog', ); } public static function get_webservice_options() { return array( 'cat' => new external_value(PARAM_TEXT, 'Cat name', VALUE_OPTIONAL), 'dog' => new external_value(PARAM_TEXT, 'Dog name', VALUE_OPTIONAL), ); } } class ArtefactTypeProfileLocal extends ArtefactTypeProfile { public static function get_all_fields() { $out = array( 'cat' => 'text', 'dog' => 'text', ); return $out; } } class ArtefactTypeCat extends ArtefactTypeProfileField {} class ArtefactTypeDog extends ArtefactTypeProfileField {} ** Changed in: mahara Milestone: None => 20.10.0 ** Changed in: mahara Status: New => In Progress -- 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/1892794 Title: Allow local custom profile fileds also be accessible via webservices Status in Mahara: In Progress Bug description: What is wanted: Have the mahara_user_external.php webservice function be able to set / fetch the information for local custom fields. Currently we have to hardcode in the extra fields in the _parameters() or _returns() functions It would be better if the local/lib/artefact_internal.php had a function to call to fetch webservice info for the local profile fields To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1892794/+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