mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-68931-master' of git://github.com/rezaies/moodle
This commit is contained in:
commit
1495cf837e
3 changed files with 49 additions and 2 deletions
|
@ -96,7 +96,7 @@ class core_userfeedback {
|
|||
public static function should_display_reminder(): bool {
|
||||
global $CFG;
|
||||
|
||||
if ($CFG->enableuserfeedback && isloggedin() && !isguestuser()) {
|
||||
if (static::can_give_feedback()) {
|
||||
$give = get_user_preferences('core_userfeedback_give');
|
||||
$remind = get_user_preferences('core_userfeedback_remind');
|
||||
|
||||
|
@ -145,6 +145,17 @@ class core_userfeedback {
|
|||
return $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the current can give feedback.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function can_give_feedback(): bool {
|
||||
global $CFG;
|
||||
|
||||
return $CFG->enableuserfeedback && isloggedin() && !isguestuser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last major upgrade time
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue