MDL-78475 communication: earlier install check for rendering links.

This commit is contained in:
Paul Holden 2023-06-14 12:34:21 +01:00
parent 71c36d2de1
commit a45f9d5076
No known key found for this signature in database
GPG key ID: A81A96D6045F6164

View file

@ -4275,7 +4275,7 @@ EOD;
* @return bool
*/
public function has_communication_links(): bool {
if (!core_communication\api::is_available()) {
if (during_initial_install() || !core_communication\api::is_available()) {
return false;
}
return !empty($this->communication_link());
@ -4287,11 +4287,6 @@ EOD;
* @return string
*/
public function communication_link(): string {
if (during_initial_install()) {
return '';
}
$link = $this->communication_url() ?? '';
$commicon = $this->pix_icon('t/messages-o', '', 'moodle', ['class' => 'fa fa-comments']);
$newwindowicon = $this->pix_icon('i/externallink', get_string('opensinnewwindow'), 'moodle', ['class' => 'ml-1']);