Skip to content

Commit

Permalink
MDL-69965 moodlenet: show moodlenet in profile only if it is enabled
Browse files Browse the repository at this point in the history
Amended to use plain get_config() condition.
  • Loading branch information
danielneis authored and stronk7 committed Jan 18, 2022
1 parent 3f99bf0 commit 24e5c29
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions user/editlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,11 @@ function useredit_shared_definition(&$mform, $editoroptions, $filemanageroptions
$mform->setDefault('maildisplay', core_user::get_property_default('maildisplay'));
$mform->addHelpButton('maildisplay', 'emaildisplay');

$mform->addElement('text', 'moodlenetprofile', get_string('moodlenetprofile', 'user'));
$mform->setType('moodlenetprofile', PARAM_NOTAGS);
$mform->addHelpButton('moodlenetprofile', 'moodlenetprofile', 'user');
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);
Expand Down

0 comments on commit 24e5c29

Please sign in to comment.