From: poltawski Date: Thu, 27 Dec 2007 11:18:55 +0000 (+0000) Subject: MDL-12640 - if $CFG->country is set, use it for signup default X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cbc54f2c67b9ec6804f3b188d33d25986aec60ad;p=moodle.git MDL-12640 - if $CFG->country is set, use it for signup default merged from MOODLE_19_STABLE --- diff --git a/login/signup_form.php b/login/signup_form.php index f34e33c3b7..fc6e9ea87e 100644 --- a/login/signup_form.php +++ b/login/signup_form.php @@ -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);