registration MDL-25116 change some wording on the main registration page

This commit is contained in:
jerome mouneyrac
2010-11-09 07:58:54 +00:00
parent 5fd9e28505
commit 29ca816c1b
3 changed files with 16 additions and 7 deletions
+9 -4
View File
@@ -144,11 +144,16 @@ if (empty($cancel) and $unregistration and !$confirm) {
}
$siteunregistrationform->display();
} else {
echo $OUTPUT->heading(get_string('registeron', 'hub'), 3, 'main');
echo $renderer->registrationselector();
$registeredonmoodleorg = false;
$moodleorghub = $registrationmanager->get_registeredhub(HUB_MOODLEORGHUBURL);
if (!empty($moodleorghub)) {
$registeredonmoodleorg = true;
}
if (extension_loaded('xmlrpc')) {
echo $OUTPUT->heading(get_string('registeron', 'hub'), 3, 'main');
echo $renderer->registrationselector($registeredonmoodleorg);
if (extension_loaded('xmlrpc')) {
$hubs = $registrationmanager->get_registered_on_hubs();
if (!empty($hubs)) {
echo $OUTPUT->heading(get_string('registeredon', 'hub'), 3, 'main');
+5 -2
View File
@@ -45,7 +45,7 @@ class core_register_renderer extends plugin_renderer_base {
/**
* Display the page to register on Moodle.org or on a specific hub
*/
public function registrationselector() {
public function registrationselector($updatemoodleorg = false) {
global $CFG;
$table = new html_table();
$table->head = array(get_string('moodleorg', 'hub'), get_string('specifichub', 'hub'));
@@ -71,7 +71,7 @@ class core_register_renderer extends plugin_renderer_base {
array('sesskey' => sesskey(), 'huburl' => HUB_MOODLEORGHUBURL
, 'hubname' => 'Moodle.org'));
$registeronmoodleorgbutton = new single_button($registeronmoodleorgurl,
get_string('registeronmoodleorg', 'hub'));
$updatemoodleorg ? get_string('updatesite', 'hub', 'Moodle.org') : get_string('registeronmoodleorg', 'hub'));
$registeronmoodleorgbutton->class = 'centeredbutton';
$registeronmoodleorgbuttonhtml = $this->output->render($registeronmoodleorgbutton);
$moodleorgcell = $registeronmoodleorgbuttonhtml;
@@ -103,6 +103,9 @@ class core_register_renderer extends plugin_renderer_base {
$table->size = array('80%', '20%');
foreach ($hubs as $hub) {
if ($hub->huburl == HUB_MOODLEORGHUBURL) {
$hub->hubname = get_string('registeredmoodleorg', 'hub', $hub->hubname);
}
$hublink = html_writer::tag('a', $hub->hubname, array('href' => $hub->huburl));
$hublinkcell = html_writer::tag('div', $hublink, array('class' => 'registeredhubrow'));
+2 -1
View File
@@ -164,10 +164,11 @@ $string['questionsnumber'] = 'Number of questions ({$a})';
$string['registeredcourses'] = 'Registered courses';
$string['registeredsites'] = 'Registered sites';
$string['registrationinfo'] = 'Registration information';
$string['registeredmoodleorg'] = 'Moodle.org ({$a})';
$string['registeredon'] = 'Registered with';
$string['registersite'] = 'Register with {$a}';
$string['registeron'] = 'Register your site';
$string['registeronmoodleorg'] = 'Register with Moodle.org now';
$string['registeronmoodleorg'] = 'Register with Moodle.org (MOOCH)';
$string['registeronspecifichub'] = 'Register with a specific hub';
$string['registrationconfirmed'] = 'Site registration confirmed';
$string['registrationconfirmedon'] = 'You are now registered on the hub {$a}. You are now able to publish courses to this hub, using the "Publish" link in course administration menus';