Ejemplo n.º 1
0
require_once 'include/course_settings.php';
require_once 'modules/sharing/sharing.php';

if ($blog_type == 'course_blog') {
    $user_id = 0;
    
    define_rss_link();
    $navigation[] = array("url" => "index.php?course=$course_code", "name" => $langBlog);
    $toolName = $langBlog;
    
    //check if commenting is enabled for course blogs
    $comments_enabled = setting_get(SETTING_BLOG_COMMENT_ENABLE, $course_id);
    //check if rating is enabled for course blogs
    $ratings_enabled = setting_get(SETTING_BLOG_RATING_ENABLE, $course_id);
    
    $sharing_allowed = is_sharing_allowed($course_id);
    $sharing_enabled = setting_get(SETTING_BLOG_SHARING_ENABLE, $course_id);
    
    $url_params = "course=$course_code";
} elseif ($blog_type == 'perso_blog') {
    if (!get_config('personal_blog')) {
        $tool_content = "<div class='alert alert-danger'>$langPersoBlogDisabled</div>";
        draw($tool_content, 1);
        exit;
    }
    
    $course_id = 0;
    
    $is_blog_editor = false;
    
    if (isset($_GET['user_id'])) {
Ejemplo n.º 2
0
}
$main_content .= "</div>";

if (!empty($addon)) {
    $main_content .= "<div class='course_info'><h1>$langCourseAddon</h1><p>$addon</p></div>";
}
if (setting_get(SETTING_COURSE_COMMENT_ENABLE, $course_id) == 1) {
    commenting_add_js();
    $comm = new Commenting('course', $course_id);
    $main_content .= $comm->put($course_code, $is_editor, $uid);
}
if (setting_get(SETTING_COURSE_RATING_ENABLE, $course_id) == 1) {
    $rating = new Rating('fivestar', 'course', $course_id);
    $rating_content = $rating->put($is_editor, $uid, $course_id);
}
if (is_sharing_allowed($course_id)) {
    if (setting_get(SETTING_COURSE_SHARING_ENABLE, $course_id) == 1) {
        $social_content = print_sharing_links($urlServer."courses/$course_code", $currentCourseName);
    }
}
$panel_footer = "";
if(isset($rating_content) || isset($social_content)) {
    $panel_footer .= "                
                <div class='panel-footer'>
                    <div class='row'>";
    if(isset($rating_content)){
     $panel_footer .=
            "<div class='col-sm-6'>
                $rating_content
            </div>";       
    }