From 97cec031cd72db9007d39da83284d63212ffed4d Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Sat, 23 Apr 2016 14:13:28 +0800 Subject: [PATCH] Fixed references to non-existent constants --- mod_form.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mod_form.php b/mod_form.php index 9297d7c..d28c697 100644 --- a/mod_form.php +++ b/mod_form.php @@ -69,18 +69,16 @@ class mod_customcert_mod_form extends moodleform_mod { * @param array $defaultvalues */ public function data_preprocessing(&$defaultvalues) { - global $DB; - if (!empty($defaultvalues['protection'])) { $protection = explode(', ', $defaultvalues['protection']); // Set the values in the form to what has been set in database. - if (in_array(PROTECTION_PRINT, $protection)) { + if (in_array(\mod_customcert\certificate::PROTECTION_PRINT, $protection)) { $defaultvalues['protection_print'] = 1; } - if (in_array(PROTECTION_MODIFY, $protection)) { + if (in_array(\mod_customcert\certificate::PROTECTION_MODIFY, $protection)) { $defaultvalues['protection_modify'] = 1; } - if (in_array(PROTECTION_COPY, $protection)) { + if (in_array(\mod_customcert\certificate::PROTECTION_COPY, $protection)) { $defaultvalues['protection_copy'] = 1; } }