// Check if moodle campaign content setting is enabled or not.
$showcampaigncontent = !isset($CFG->showcampaigncontent) || $CFG->showcampaigncontent;
+// Encourage admins to enable the user feedback feature if it is not enabled already.
+$showfeedbackencouragement = empty($CFG->enableuserfeedback);
+
admin_externalpage_setup('adminnotifications');
$output = $PAGE->get_renderer('core', 'admin');
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
$registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir,
$mobileconfigured, $overridetossl, $invalidforgottenpasswordurl, $croninfrequent,
- $showcampaigncontent);
+ $showcampaigncontent, $showfeedbackencouragement);
* @param bool $invalidforgottenpasswordurl Whether the forgotten password URL does not link to a valid URL.
* @param bool $croninfrequent If true, warn that cron hasn't run in the past few minutes
* @param bool $showcampaigncontent Whether the campaign content should be visible or not.
+ * @param bool $showfeedbackencouragement Whether the feedback encouragement content should be displayed or not.
*
* @return string HTML to output.
*/
$buggyiconvnomb, $registered, array $cachewarnings = array(), $eventshandlers = 0,
$themedesignermode = false, $devlibdir = false, $mobileconfigured = false,
$overridetossl = false, $invalidforgottenpasswordurl = false, $croninfrequent = false,
- $showcampaigncontent = false) {
+ $showcampaigncontent = false, bool $showfeedbackencouragement = false) {
global $CFG;
$output = '';
$output .= $this->registration_warning($registered);
$output .= $this->mobile_configuration_warning($mobileconfigured);
$output .= $this->forgotten_password_url_warning($invalidforgottenpasswordurl);
+ $output .= $this->userfeedback_encouragement($showfeedbackencouragement);
$output .= $this->campaign_content($showcampaigncontent);
//////////////////////////////////////////////////////////////////////////////////////////////////
return $this->output->box($out);
}
+
+ /**
+ * Display message about benefits of enabling the user feedback feature.
+ *
+ * @param bool $showfeedbackencouragement Whether the encouragement content should be displayed or not
+ * @return string
+ */
+ protected function userfeedback_encouragement(bool $showfeedbackencouragement): string {
+ $output = '';
+
+ if ($showfeedbackencouragement) {
+ $settingslink = new moodle_url('/admin/settings.php', ['section' => 'userfeedback']);
+ $output .= $this->warning(get_string('userfeedbackencouragement', 'admin', $settingslink->out()), 'info');
+ }
+
+ return $output;
+ }
}
$userfeedback->add(new admin_setting_configcheckbox('enableuserfeedback',
new lang_string('enableuserfeedback', 'admin'),
- new lang_string('enableuserfeedback_desc', 'admin'), 1, 1, 0));
+ new lang_string('enableuserfeedback_desc', 'admin'), 0, 1, 0));
$options = [
core_userfeedback::REMIND_AFTER_UPGRADE => new lang_string('userfeedbackafterupgrade', 'admin'),
$string['enablestats'] = 'Enable statistics';
$string['enabletrusttext'] = 'Enable trusted content';
$string['enableuserfeedback'] = 'Enable feedback about Moodle';
-$string['enableuserfeedback_desc'] = 'If enabled, a \'Give feedback\' link is displayed in a Dashboard alert and in the footer for users to give feedback about the Moodle LMS to Moodle HQ. The Dashboard alert also has a \'Remind me later\' option.';
+$string['enableuserfeedback_desc'] = 'If enabled, a \'Give feedback about this software\' link is displayed in the footer for users to give feedback about the Moodle software to Moodle HQ. If the \'Next feedback reminder\' option is set, the user is also shown a reminder on the Dashboard at the specified interval. Setting \'Next feedback reminder\' to \'Never\' disables the Dashboard reminder, while leaving the \'Give feedback\' link in the footer.';
$string['enablewebservices'] = 'Enable web services';
$string['enablewsdocumentation'] = 'Web services documentation';
$string['enrolinstancedefaults'] = 'Enrolment instance defaults';
$string['userbulk'] = 'Bulk user actions';
$string['userbulkdownload'] = 'Export users as';
$string['userfeedbackafterupgrade'] = 'After every major upgrade';
+$string['userfeedbackencouragement'] = '<p>Moodle 3.9 includes a new feature that gives users the option to provide feedback about the Moodle software to Moodle HQ via an external survey site hosted by Moodle HQ. No user-identifying information is forwarded to the survey site.</p>
+<p>Moodle HQ strives to be open and transparent about its data collection practices. Thus, we want to make sure that you are aware and in control of this functionality.</p>
+<p>Feedback from users will greatly assist Moodle HQ in improving the Moodle software. To enable this feature, please go to <a href="{$a}">Feedback settings</a>.</p>';
$string['userfeedbacknextreminder'] = 'Next feedback reminder';
$string['userfeedbacknextreminder_desc'] = 'When should we ask the user to give feedback again?';
$string['userfeedbackperiodically'] = 'Periodically';