MDL-82289 mod_feedback: correct comparison of current $course.

This commit is contained in:
Paul Holden 2024-06-25 17:05:09 +01:00
parent 5aef789ac6
commit d4ebc6644e
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -54,7 +54,7 @@ class responses_action_bar extends base_action_bar {
$options[$reporturl->out(false)] = get_string('show_entries', 'feedback');
$selected = $this->currenturl->compare($reporturl, URL_MATCH_BASE) ? $reporturl : $this->currenturl;
if ($this->feedback->anonymous == FEEDBACK_ANONYMOUS_NO && $this->course != SITEID) {
if ($this->feedback->anonymous == FEEDBACK_ANONYMOUS_NO && $this->course->id != SITEID) {
$nonrespondenturl = new moodle_url('/mod/feedback/show_nonrespondents.php', $this->urlparams);
$options[$nonrespondenturl->out(false)] = get_string('show_nonrespondents', 'feedback');
$selected = $this->currenturl->compare($nonrespondenturl, URL_MATCH_BASE) ? $nonrespondenturl : $this->currenturl;;