Skip to content

Commit

Permalink
ndunand#65 - No longer displays no profile fields message if plugin i…
Browse files Browse the repository at this point in the history
…s disabled.
  • Loading branch information
michael-milette committed Jan 17, 2025
1 parent 5565183 commit 1728f1c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
$settings->add(new admin_setting_configmultiselect('enrol_attributes/profilefields',
get_string('profilefields', 'enrol_attributes'), get_string('profilefields_desc', 'enrol_attributes'),
[], $customfields));
} else if (!(defined('PHPUNIT_TEST') && PHPUNIT_TEST)) {
} else if (!(defined('PHPUNIT_TEST') && PHPUNIT_TEST) && enrol_is_enabled('attributes')) {
// The warning needs to be given only if unit tests are not running.
// Otherwise some core tests might fail.
\core\notification::warning(get_string('no_custom_field', 'enrol_attributes',$CFG->wwwroot . '/user/profile/index.php'));
Expand All @@ -92,4 +92,3 @@
PARAM_TEXT, 60, 10));
}
}

0 comments on commit 1728f1c

Please sign in to comment.