diff --git a/settings.php b/settings.php index cc3bbda1..312753d4 100755 --- a/settings.php +++ b/settings.php @@ -115,11 +115,11 @@ $settings->add(new admin_setting_configtext_int_only('turnitintooltwo/accountid', get_string("turnitinaccountid", "turnitintooltwo"), - get_string("turnitinaccountid_desc", "turnitintooltwo"), '')); + get_string("turnitinaccountid_desc", "turnitintooltwo"), 0)); $settings->add(new admin_setting_config_tii_secret_key('turnitintooltwo/secretkey', get_string("turnitinsecretkey", "turnitintooltwo"), - get_string("turnitinsecretkey_desc", "turnitintooltwo"), '', 'PARAM_TEXT')); + get_string("turnitinsecretkey_desc", "turnitintooltwo"), '')); $testoptions = array( 'https://api.turnitin.com' => 'https://api.turnitin.com', @@ -137,7 +137,7 @@ $settings->add(new admin_setting_configselect('turnitintooltwo/apiurl', get_string("turnitinapiurl", "turnitintooltwo"), get_string("turnitinapiurl_desc", "turnitintooltwo").$offlinecomment.$testconnection, - 0, $testoptions)); + 'https://api.turnitin.com', $testoptions)); // Miscellaneous settings. $settings->add(new admin_setting_heading('turnitintooltwo_debugginglogs', diff --git a/settingslib.php b/settingslib.php index e1d3d011..4cd861d0 100644 --- a/settingslib.php +++ b/settingslib.php @@ -78,7 +78,7 @@ public function validate($data) { } $cleaned = clean_param($data, $this->paramtype); - if ("$data" === "$cleaned" && strlen($data) > 0) { // Implicit conversion to string is needed to do exact comparison. + if ("$data" === "$cleaned") { // Implicit conversion to string is needed to do exact comparison. return true; } else { return get_string('validateerror', 'admin');