MDL-69965 moodlenet: show moodlenet in profile only if it is enabled

Amended to use plain get_config() condition.
This commit is contained in:
Daniel Neis Araujo 2020-10-16 10:48:12 -03:00 committed by Eloy Lafuente (stronk7)
parent 3f99bf0efe
commit 24e5c29008

View file

@ -301,9 +301,11 @@ function useredit_shared_definition(&$mform, $editoroptions, $filemanageroptions
$mform->setDefault('maildisplay', core_user::get_property_default('maildisplay'));
$mform->addHelpButton('maildisplay', 'emaildisplay');
if (get_config('tool_moodlenet', 'enablemoodlenet')) {
$mform->addElement('text', 'moodlenetprofile', get_string('moodlenetprofile', 'user'));
$mform->setType('moodlenetprofile', PARAM_NOTAGS);
$mform->addHelpButton('moodlenetprofile', 'moodlenetprofile', 'user');
}
$mform->addElement('text', 'city', get_string('city'), 'maxlength="120" size="21"');
$mform->setType('city', PARAM_TEXT);