mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
publication MDL-19315 display message when no hub can be selected
This commit is contained in:
parent
a65fa92a9f
commit
544501449d
@ -38,6 +38,16 @@ $PAGE->set_pagelayout('course');
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
$hubmanager = new hub();
|
||||
$registeredhubs = $hubmanager->get_registered_on_hubs();
|
||||
if (empty($registeredhubs)) {
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading(get_string('publishon', 'hub'), 3, 'main');
|
||||
echo $OUTPUT->box(get_string('notregisteredonhub', 'hub'));
|
||||
echo $OUTPUT->footer();
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$share = optional_param('share', false, PARAM_BOOL);
|
||||
$advertise = optional_param('advertise', false, PARAM_BOOL);
|
||||
|
@ -112,7 +112,7 @@ $string['name_help'] = 'This name will be showing in the course listing.';
|
||||
$string['no'] = 'No';
|
||||
$string['nohubselected'] = 'No hub selected';
|
||||
$string['nosearch'] = 'Don\'t publish hub or courses';
|
||||
$string['notregisteredonhub'] = 'Your administrator needs to register this site with at least one hub before you can use this option.';
|
||||
$string['notregisteredonhub'] = 'Your administrator needs to register this site with at least one hub before you can publish a course. Contact your site administrator.';
|
||||
$string['notregisteredonmoodleorg'] = 'Your administrator needs to register this site with moodle.org.';
|
||||
$string['operation'] = 'Actions';
|
||||
$string['orenterprivatehub'] = 'Alternatively, enter a private hub URL:';
|
||||
|
Loading…
x
Reference in New Issue
Block a user