diff --git a/admin/registration/forms.php b/admin/registration/forms.php index 326d06d6836..8843c29a761 100644 --- a/admin/registration/forms.php +++ b/admin/registration/forms.php @@ -175,6 +175,7 @@ class site_registration_form extends moodleform { $options[SITELINKPUBLISHED] = $hub->get_site_privacy_string(SITELINKPUBLISHED); $mform->addElement('select', 'privacy', get_string('siteprivacy', 'hub'), $options); $mform->setDefault('privacy', $privacy); + $mform->addHelpButton('privacy', 'privacy', 'hub'); unset($options); $mform->addElement('textarea', 'description', get_string('description'), array('rows'=>10)); @@ -199,15 +200,17 @@ class site_registration_form extends moodleform { $mform->setDefault('address', $address); //TODO: use the region array I generated - $mform->addElement('select', 'region', get_string('selectaregion'), array('-' => '-')); - $mform->setDefault('region', $region); +// $mform->addElement('select', 'region', get_string('selectaregion'), array('-' => '-')); +// $mform->setDefault('region', $region); + $mform->addElement('hidden', 'regioncode', '-'); $countries = get_string_manager()->get_list_of_countries(); - $mform->addElement('select', 'country', get_string('selectacountry'), $countries); - $mform->setDefault('country', $country); + $mform->addElement('select', 'countrycode', get_string('selectacountry'), $countries); + $mform->setDefault('countrycode', $country); $mform->addElement('text','geolocation' , get_string('geolocation')); $mform->setDefault('geolocation', $geolocation); + $mform->addHelpButton('geolocation', 'geolocation', 'hub'); $mform->addElement('text', 'contactname', get_string('administrator')); $mform->addRule('contactname', $strrequired, 'required', null, 'client'); @@ -216,6 +219,7 @@ class site_registration_form extends moodleform { $mform->addElement('text','contactphone' , get_string('phone')); $mform->setType('contactphone', PARAM_TEXT); + $mform->addHelpButton('contactphone', 'contactphone', 'hub'); $mform->addElement('text', 'contactemail', get_string('email')); $mform->addRule('contactemail', $strrequired, 'required', null, 'client'); @@ -227,6 +231,7 @@ class site_registration_form extends moodleform { $options[1] = get_string("registrationcontactyes"); $mform->addElement('select', 'contactable', get_string('registrationcontact'), $options); $mform->setDefault('contactable', $contactable); + $mform->addHelpButton('contactable', 'contactable', 'hub'); unset($options); $options = array(); @@ -234,11 +239,13 @@ class site_registration_form extends moodleform { $options[1] = get_string("registrationyes"); $mform->addElement('select', 'emailalert', get_string('registrationemail'), $options); $mform->setDefault('emailalert', $emailalert); + $mform->addHelpButton('emailalert', 'emailalert', 'hub'); unset($options); - $mform->addElement('text','imageurl' , get_string('logourl', 'hub')); - $mform->setType('imageurl', PARAM_URL); - $mform->setDefault('imageurl', $imageurl); +// $mform->addElement('text','imageurl' , get_string('logourl', 'hub')); +// $mform->setType('imageurl', PARAM_URL); +// $mform->setDefault('imageurl', $imageurl); +// $mform->addHelpButton('imageurl', 'imageurl', 'hub'); /// Display statistic that are going to be retrieve by the hub $coursecount = $DB->count_records('course')-1; diff --git a/admin/registration/register.php b/admin/registration/register.php index 26d112d8060..80d38761653 100644 --- a/admin/registration/register.php +++ b/admin/registration/register.php @@ -82,8 +82,8 @@ if (!empty($fromform) and confirm_sesskey()) { set_config('site_imageurl_'.$cleanhuburl, $fromform->imageurl, 'hub'); set_config('site_privacy_'.$cleanhuburl, $fromform->privacy, 'hub'); set_config('site_address_'.$cleanhuburl, $fromform->address, 'hub'); - set_config('site_region_'.$cleanhuburl, $fromform->region, 'hub'); - set_config('site_country_'.$cleanhuburl, $fromform->country, 'hub'); + set_config('site_region_'.$cleanhuburl, $fromform->regioncode, 'hub'); + set_config('site_country_'.$cleanhuburl, $fromform->countrycode, 'hub'); set_config('site_geolocation_'.$cleanhuburl, $fromform->geolocation, 'hub'); set_config('site_contactable_'.$cleanhuburl, $fromform->contactable, 'hub'); set_config('site_emailalert_'.$cleanhuburl, $fromform->emailalert, 'hub'); diff --git a/lang/en/hub.php b/lang/en/hub.php index b5412c275c6..bde1bc2404e 100644 --- a/lang/en/hub.php +++ b/lang/en/hub.php @@ -38,8 +38,12 @@ $string['audienceadmins'] = 'Administators'; $string['badurlformat'] = 'Bad URL format'; $string['community'] = 'Community'; $string['confirmregistration'] = 'Confirm registration'; +$string['contactable'] = 'Contact from the public'; +$string['contactable_help'] = 'Set to yes, the hub will display your email address.'; $string['contactemail'] = 'Contact email'; $string['contactname'] = 'Contact name'; +$string['contactphone'] = 'Phone'; +$string['contactphone_help'] = 'Phone numbers are displayed to the Hub administrator only. There are not communicated on the hub list or anywhere else.'; $string['contributornames'] = 'Contributor names'; $string['coursemap'] = 'Course map'; $string['coursename'] = 'Name'; @@ -62,11 +66,16 @@ $string['edulevelother'] = 'Other'; $string['edulevelprimary'] = 'Primary'; $string['edulevelsecondary'] = 'Secondary'; $string['eduleveltertiary'] = 'Tertiary'; +$string['emailalert'] = 'Email notifications'; +$string['emailalert_help'] = 'Set to yes, the hub administrator will send you emails about security issues and other important news.'; $string['enrollable'] = 'Enrollable'; $string['errorbadimageheightwidth'] = 'The image should have a maximum size of {$a->width} X {$a->height}'; $string['errorlangnotrecognized'] = 'Language code is unknown by Moodle. Please contact {$a}'; +$string['geolocation'] = 'latitude - longitude'; +$string['geolocation_help'] = 'A geolocation code like you can find on Google Map or Twitter (example: -31.947884,115.871285)'; $string['hub'] = 'Hub'; $string['imageurl'] = 'Image url'; +$string['imageurl_help'] = 'This image will be displayed on the hub. This image must be available from the hub at any moment. The image should have a maximum size of {$a->width} X {$a->height}'; $string['information'] = 'Information'; $string['language'] = 'Language'; $string['logourl'] = 'Logo URL'; @@ -90,6 +99,7 @@ $string['postaladdress'] = 'Postal address'; $string['postsnumber'] = 'Number of posts ({$a})'; $string['prioritise'] = 'Prioritise'; $string['privacy'] = 'Privacy'; +$string['privacy_help'] = 'You can either choose to not display your site on the hub site list, either to display only your site general information, either to display your site general information + a link to your site.'; $string['private'] = 'Private'; $string['privatehuburl'] = 'Private hub URL'; $string['publicationinfo'] = 'Course publication information';