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:
jerome mouneyrac 2010-06-02 09:45:46 +00:00
parent 06d4578c60
commit edb2fe7cba
2 changed files with 12 additions and 1 deletions

View File

@ -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;

View File

@ -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');