]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12640 - if $CFG->country is set, use it for signup default
authorpoltawski <poltawski>
Thu, 27 Dec 2007 11:18:55 +0000 (11:18 +0000)
committerpoltawski <poltawski>
Thu, 27 Dec 2007 11:18:55 +0000 (11:18 +0000)
merged from MOODLE_19_STABLE

login/signup_form.php

index f34e33c3b70086b8c534d783879c70d7f1ff43cc..fc6e9ea87e12b2be4f0725a7342b4ab3a0e00cad 100644 (file)
@@ -56,7 +56,12 @@ class login_signup_form extends moodleform {
         $country = array_merge($default_country, $country);
         $mform->addElement('select', 'country', get_string('country'), $country);
         $mform->addRule('country', get_string('missingcountry'), 'required', null, 'server');
-        $mform->setDefault('country', '');
+
+        if( !empty($CFG->country) ){
+            $mform->setDefault('country', $CFG->country);
+        }else{
+            $mform->setDefault('country', '');
+        }
 
         profile_signup_fields($mform);