. /** * This file contains call to feedback settings * * @package core * @copyright 2020 Shamim Rezaie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); if ($hassiteconfig) { $userfeedback->add(new admin_setting_configcheckbox('enableuserfeedback', new lang_string('enableuserfeedback', 'admin'), new lang_string('enableuserfeedback_desc', 'admin'), 0, 1, 0)); $options = [ core_userfeedback::REMIND_AFTER_UPGRADE => new lang_string('userfeedbackafterupgrade', 'admin'), core_userfeedback::REMIND_PERIODICALLY => new lang_string('userfeedbackperiodically', 'admin'), core_userfeedback::REMIND_NEVER => new lang_string('never'), ]; $userfeedback->add(new admin_setting_configselect('userfeedback_nextreminder', new lang_string('userfeedbacknextreminder', 'admin'), new lang_string('userfeedbacknextreminder_desc', 'admin'), 1, $options)); $userfeedback->hide_if('userfeedback_nextreminder', 'enableuserfeedback'); $userfeedback->add(new admin_setting_configtext('userfeedback_remindafter', new lang_string('userfeedbackremindafter', 'admin'), new lang_string('userfeedbackremindafter_desc', 'admin'), 90, PARAM_INT)); $userfeedback->hide_if('userfeedback_remindafter', 'enableuserfeedback'); $userfeedback->hide_if('userfeedback_remindafter', 'userfeedback_nextreminder', 'eq', 3); }