mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-69004-master' of git://github.com/rezaies/moodle
This commit is contained in:
commit
057db49265
@ -902,6 +902,9 @@ $overridetossl = !empty($CFG->overridetossl);
|
||||
// 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');
|
||||
@ -910,4 +913,4 @@ echo $output->admin_notifications_page($maturity, $insecuredataroot, $errorsdisp
|
||||
$maintenancemode, $availableupdates, $availableupdatesfetch, $buggyiconvnomb,
|
||||
$registered, $cachewarnings, $eventshandlers, $themedesignermode, $devlibdir,
|
||||
$mobileconfigured, $overridetossl, $invalidforgottenpasswordurl, $croninfrequent,
|
||||
$showcampaigncontent);
|
||||
$showcampaigncontent, $showfeedbackencouragement);
|
||||
|
@ -283,6 +283,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
* @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.
|
||||
*/
|
||||
@ -291,7 +292,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$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 = '';
|
||||
@ -315,6 +316,7 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
$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);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -2178,4 +2180,21 @@ class core_admin_renderer extends plugin_renderer_base {
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ if ($hassiteconfig) {
|
||||
|
||||
$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'),
|
||||
|
@ -546,7 +546,7 @@ $string['enablesearchareas'] = 'Enable search areas';
|
||||
$string['enablestats'] = 'Enable statistics';
|
||||
$string['enabletrusttext'] = 'Enable trusted content';
|
||||
$string['enableuserfeedback'] = 'Enable feedback about this software';
|
||||
$string['enableuserfeedback_desc'] = 'If enabled, a \'Give feedback about this software\' link is displayed in a Dashboard alert and in the footer for users to give feedback about Moodle 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 about this software\' link in the footer.';
|
||||
$string['enablewebservices'] = 'Enable web services';
|
||||
$string['enablewsdocumentation'] = 'Web services documentation';
|
||||
$string['enrolinstancedefaults'] = 'Enrolment instance defaults';
|
||||
@ -1416,6 +1416,9 @@ $string['user'] = 'User';
|
||||
$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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user