From ad26af7da60c3965fe0ad4da5eddc3d374c2b968 Mon Sep 17 00:00:00 2001 From: Nithy1anand Date: Wed, 13 Sep 2023 12:23:01 +0530 Subject: [PATCH] Fixed the image URL field issue. --- classes/local/data_grid/data/field.php | 5 ++++- version.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/local/data_grid/data/field.php b/classes/local/data_grid/data/field.php index cf16367..b21938b 100644 --- a/classes/local/data_grid/data/field.php +++ b/classes/local/data_grid/data/field.php @@ -80,7 +80,10 @@ public function get_name() { * @return mixed|string */ public function get_value() { - return format_text($this->value, FORMAT_HTML); + if (!filter_var($this->value, FILTER_VALIDATE_URL)) { + return format_text($this->value, FORMAT_HTML); + } + return $this->value; } /** diff --git a/version.php b/version.php index 73ace36..fe4033e 100644 --- a/version.php +++ b/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2023090800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2023091300; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2021051700; // Requires this Moodle version. $plugin->component = 'block_dash'; // Full name of the plugin (used for diagnostics). $plugin->maturity = MATURITY_STABLE;