diff --git a/blocks/community/styles.css b/blocks/community/styles.css index 4c6aa59ec5e..e93ea130b66 100644 --- a/blocks/community/styles.css +++ b/blocks/community/styles.css @@ -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; diff --git a/course/publish/index.php b/course/publish/index.php index 25aa9775e21..bada6ecfefd 100644 --- a/course/publish/index.php +++ b/course/publish/index.php @@ -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');