From 34c0622d959acfea5135316d944911f542808cc1 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 31 Oct 2013 14:23:46 +0800 Subject: [PATCH] Created a dummy variable to avoid being redirected back to the upgrade settings page --- adminsetting.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/adminsetting.class.php b/adminsetting.class.php index 3b9438c..a5eb0cc 100644 --- a/adminsetting.class.php +++ b/adminsetting.class.php @@ -37,6 +37,9 @@ class mod_customcert_admin_setting_upload extends admin_setting_configtext { * @return string */ public function output_html($data, $query = '') { + // Create a dummy variable for this field to avoid being redirected back to the upgrade settings page. + $this->config_write($this->name, ''); + return format_admin_setting($this, $this->visiblename, html_writer::link(new moodle_url('/mod/customcert/upload_image.php'), get_string('upload')), $this->description, true, '', null, $query);