Created a dummy variable to avoid being redirected back to the upgrade settings page

This commit is contained in:
Mark Nelson 2013-10-31 14:23:46 +08:00
parent 43b91df8ec
commit 34c0622d95

View file

@ -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);