mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Community block MDL-19314 add CSS for the hub image + display error page if no site not registered when try to publish a course
This commit is contained in:
parent
06d4578c60
commit
edb2fe7cba
@ -6,6 +6,7 @@
|
||||
#page-blocks-community-communitycourse .hubadditionaldesc { color: #666666;
|
||||
font-size: 90%;
|
||||
}
|
||||
#page-blocks-community-communitycourse .hubscreenshot {margin-right: 10px;}
|
||||
#page-blocks-community-communitycourse .trusted {
|
||||
font-size: 90%;
|
||||
color: #006633;
|
||||
|
@ -38,7 +38,7 @@ require_login($course);
|
||||
if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE, $id))) {
|
||||
|
||||
$hubmanager = new hub();
|
||||
$confirmmessage = '';
|
||||
$confirmmessage = '';
|
||||
|
||||
//update the courses status
|
||||
$updatestatusid = optional_param('updatestatusid', false, PARAM_INT);
|
||||
@ -81,6 +81,16 @@ if (has_capability('moodle/course:publish', get_context_instance(CONTEXT_COURSE,
|
||||
$PAGE->set_title(get_string('course') . ': ' . $course->fullname);
|
||||
$PAGE->set_heading($course->fullname);
|
||||
|
||||
//if the site os registered on no hub display an error page
|
||||
$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();
|
||||
}
|
||||
|
||||
$renderer = $PAGE->get_renderer('core', 'publish');
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user