function nextComment()
 {
     if (!$this->_continue) {
         return false;
     }
     $this->_continue = list(, $comment_data) = each($this->_data);
     if (!$this->_continue) {
         return false;
     }
     $this->profile->setIdUser($comment_data[AJCOMM_AUTHOR]);
     $this->profile->manualLoadUserData($this->_authors[$comment_data[AJCOMM_AUTHOR]]);
     $html = '<div class="ajcom_comment">';
     $html .= '<h2>' . $this->profile->getUserPhotoOrAvatar('micro') . ' ' . $this->profile->resolveUsername() . ' <span class="ajcom_date">' . createDateDistance($comment_data[AJCOMM_POSTED], $this->_module, true) . '</span></h2>';
     $html .= '<p id="comment_' . $comment_data[AJCOMM_ID] . '" class="ajcom_textof">' . $comment_data[AJCOMM_TEXTOF] . '</p>';
     if ($this->_with_reply) {
     }
     if (Docebo::user()->getUserLevelId() == "/framework/level/godadmin") {
         $html .= '<p><a href="javascript:;" onclick="delComment(' . $comment_data[AJCOMM_ID] . ',' . $comment_data[AJCOMM_EXTKEY] . ')">' . '<img src="' . getPathImage() . 'standard/delete.png" alt="' . Lang::t('_DEL', 'standard', 'framework') . '" />' . '</a></p>';
     }
     $html .= '</div>';
     return $html;
 }
Exemple #2
0
function dashmycourse(&$url, $lang, &$subscription, $cinfo, $index)
{
    require_once $GLOBALS['where_lms'] . '/lib/lib.levels.php';
    $lvl = CourseLevel::getLevels();
    $arr_status = array(_CUS_RESERVED => $lang->def('_T_USER_STATUS_RESERVED'), _CUS_WAITING_LIST => $lang->def('_WAITING_USERS'), _CUS_CONFIRMED => $lang->def('_T_USER_STATUS_CONFIRMED'), _CUS_SUBSCRIBED => $lang->def('_T_USER_STATUS_SUBS'), _CUS_BEGIN => $lang->def('_T_USER_STATUS_BEGIN'), _CUS_END => $lang->def('_T_USER_STATUS_END'));
    DoceboLanguage::createInstance('course', 'lms');
    $arr_coursestatus = array(CST_PREPARATION => $lang->def('_CST_PREPARATION', 'course', 'lms'), CST_AVAILABLE => $lang->def('_CST_AVAILABLE', 'course', 'lms'), CST_EFFECTIVE => $lang->def('_CST_CONFIRMED', 'course', 'lms'), CST_CONCLUDED => $lang->def('_CST_CONCLUDED', 'course', 'lms'), CST_CANCELLED => $lang->def('_CST_CANCELLED', 'course', 'lms'));
    $course_type = $cinfo['course_type'];
    $there_material = array();
    if ($cinfo['img_othermaterial'] != '') {
        $there_material[] = '&id_course=' . $cinfo['idCourse'];
    }
    // course title -----------------------------------------------------
    $cinfo = array_merge($cinfo, $subscription['course'][$cinfo['idCourse']]);
    // -----------------------------------------------------------------
    $courseuser_st = -10;
    $html = '';
    $intest = '';
    if (!isset($subscription['edition'][$cinfo['idCourse']])) {
        $access = Man_Course::canEnterCourse($cinfo);
        $lb_param = "";
        if ($cinfo['first_is_scorm'][0] != '' && $cinfo['first_is_scorm'][0] != '0') {
            $lb_param .= ";width=" . $cinfo['first_is_scorm'][0] . "";
        }
        if ($cinfo['first_is_scorm'][1] != '' && $cinfo['first_is_scorm'][1] != '0') {
            $lb_param .= ";height=" . $cinfo['first_is_scorm'][1] . "";
        }
        $intest .= '<h2>';
        if ($access['can']) {
            $intest .= '' . ($cinfo['lang_code'] && $cinfo['lang_code'] != 'none' ? '<img src="' . getPathImage('cms') . 'language/' . $cinfo['lang_code'] . '.png" alt="' . $cinfo['lang_code'] . '" /> ' : '') . '<a class="course_enter" href="index.php?modname=course&amp;op=aula&amp;idCourse=' . $cinfo['idCourse'] . '" ' . ($cinfo['direct_play'] == 1 && $cinfo['level'] <= 3 && $cinfo['first_is_scorm'] ? ' rel="shadowbox' . $lb_param . '" title="' . $cinfo['name'] . '"' : ' title="' . $lang->def('_ENTER') . '"') . '>' . $cinfo['name'] . '</a>';
        } else {
            $intest .= '<img class="image_lock" id="locked_' . $cinfo['idCourse'] . '" src="' . getPathImage() . 'course/lock.gif" alt="' . $lang->def('_NOENTER') . '" />' . ($cinfo['lang_code'] && $cinfo['lang_code'] != 'none' ? '<img src="' . getPathImage('cms') . 'language/' . $cinfo['lang_code'] . '.png" alt="' . $cinfo['lang_code'] . '" /> ' : '') . $cinfo['name'] . '';
        }
        $intest .= '</h2>';
        // not editon
        //if($cinfo['level'] >= 4) {
        $intest .= '<p class="course_support_info">' . str_replace(array('[course_type]', '[create_date]', '[enrolled]', '[course_status]'), array($course_type, createDateDistance($cinfo['create_date'], 'catalogue', true), isset($cinfo['enrolled'][0]) ? $cinfo['enrolled'][0] : 0, $arr_coursestatus[$cinfo['course_status']]), $lang->def('_COURSE_INTRO')) . ($cinfo['date_begin'] != '0000-00-00' || $cinfo['date_end'] != '0000-00-00' ? str_replace(array('[date_begin]', '[date_end]'), array(Format::date($cinfo['date_begin'], 'date'), Format::date($cinfo['date_end'], 'date')), $lang->def('_COURSE_DATE')) : '') . '</p>';
        //}
        if ($cinfo['classrooms'] != '') {
            $intest .= '<p class="course_support_info">' . str_replace(array('[classrooms_name]', '[classrooms_location]'), array($cinfo['classrooms']['classroom'], $cinfo['classrooms']['location']), $lang->def('_IN_THE_CLASSROOM')) . '</p>';
        }
        $intest .= '<p class="course_support_info">' . $arr_status[$cinfo['user_status']] . ($cinfo['level'] >= 4 ? str_replace('[level]', $lvl[$cinfo['level']], $lang->def('_USER_LVL')) . ' ' . (trim($cinfo['code']) != '' ? '<br />[' . $cinfo['code'] . '] ' : '') : '') . '</p>';
        if (isset($access['expiring_in']) && $access['expiring_in'] != false && $access['expiring_in'] < 30) {
            $intest .= '<p class="course_support_info">' . str_replace('[expiring_in]', $access['expiring_in'], $lang->def('_EXPIRING_IN')) . '</p>';
        }
        if ($cinfo['show_result'] && $cinfo['user_status'] > _CUS_SUBSCRIBED && $cinfo['user_status'] < _CUS_SUSPEND) {
            $intest .= '<p class="course_support_info show_results">' . '<a href="index.php?modname=course&amp;op=aula&amp;idCourse=' . $cinfo['idCourse'] . '&amp;showresult=1">' . $lang->def('_SHOW_RESULTS') . '</a>' . '</p>';
        }
        $courseuser_st = $cinfo['user_status'];
    } elseif (count($subscription['edition'][$cinfo['idCourse']]) == 1) {
        // edition unique--------------------------------------------------------------------------------
        list($ed_id, $sub_info) = each($subscription['edition'][$cinfo['idCourse']]);
        $ed_info =& $cinfo['edition_list'][$ed_id];
        $cinfo['date_begin'] = $ed_info['date_begin'];
        $cinfo['date_end'] = $ed_info['date_end'];
        $access = Man_Course::canEnterCourse($cinfo);
        if ($ed_info['date_begin'] == '0000-00-00') {
            $ed_info['date_begin'] = '';
        }
        if ($ed_info['date_end'] == '0000-00-00') {
            $ed_info['date_end'] = '';
        }
        $intest = '<h2>';
        if ($access['can']) {
            $intest .= '<a class="course_enter" href="index.php?modname=course&amp;op=aula&amp;idCourse=' . $cinfo['idCourse'] . '&amp;id_e=' . $ed_id . '" ' . 'title="' . $lang->def('_ENTER') . '">' . ($cinfo['lang_code'] && $cinfo['lang_code'] != 'none' ? '<img src="' . getPathImage('cms') . 'language/' . $cinfo['lang_code'] . '.png" alt="' . $cinfo['lang_code'] . '" /> ' : '') . $ed_info['name'] . ($ed_info['date_begin'] != '' || $ed_info['date_end'] != '' ? ' <span>( ' . Format::date($ed_info['date_begin'], 'date') . ' ' . Format::date($ed_info['date_end'], 'date') . ' )</span> ' : '') . '</a>';
        } else {
            $intest .= '<img id="locked_' . $cinfo['idCourse'] . '" src="' . getPathImage() . 'course/lock.gif" alt="' . $lang->def('_NOENTER') . '" />' . ($cinfo['lang_code'] && $cinfo['lang_code'] != 'none' ? '<img src="' . getPathImage('cms') . 'language/' . $cinfo['lang_code'] . '.png" alt="' . $cinfo['lang_code'] . '" /> ' : '') . (trim($ed_info['code']) != '' ? '[' . $ed_info['code'] . '] ' : '') . $ed_info['name'] . ($ed_info['date_begin'] != '' || $ed_info['date_end'] != '' ? ' <span>( ' . Format::date($ed_info['date_begin'], 'date') . ' ' . Format::date($ed_info['date_end'], 'date') . ' )</span> ' : '');
        }
        $intest .= '</h2>';
        //if($sub_info['level'] >= 4) {
        $intest .= '<p class="course_support_info">' . str_replace(array('[course_type]', '[create_date]', '[enrolled]', '[course_status]'), array($ed_info['edition_type'], createDateDistance($cinfo['create_date'], 'catalogue', true), $cinfo['enrolled'][$ed_id], $arr_coursestatus[$ed_info['status']]), $lang->def('_COURSE_INTRO')) . '</p>';
        //}
        if ($ed_info['classrooms'] != '') {
            $intest .= '<p class="course_support_info">' . str_replace(array('[classrooms_name]', '[classrooms_location]'), array($ed_info['classrooms']['classroom'], $ed_info['classrooms']['location']), $lang->def('_IN_THE_CLASSROOM')) . '</p>';
        }
        $intest .= '<p class="course_support_info">' . $arr_status[$sub_info['user_status']] . str_replace('[level]', $lvl[$sub_info['level']], $lang->def('_USER_LVL')) . ' ' . (trim($cinfo['code']) != '' && $sub_info['level'] >= 4 ? '<br />[' . $cinfo['code'] . '] ' : '') . '</p>';
        if ($access['expiring_in'] != false && $access['expiring_in'] < 30) {
            $intest .= '<p class="course_support_info">' . str_replace('[expiring_in]', $access['expiring_in'], $lang->def('_EXPIRING_IN')) . '</p>';
        }
        $courseuser_st = $sub_info['user_status'];
    } else {
        // more than one edition ------------------------------------------------------------------------
        foreach ($subscription['edition'][$cinfo['idCourse']] as $ed_id => $sub_info) {
            //list($ed_id, $sub_info)  = each($subscription['edition'][$cinfo['idCourse']]);
            $ed_info =& $cinfo['edition_list'][$ed_id];
            $cinfo['date_begin'] = $ed_info['date_begin'];
            $cinfo['date_end'] = $ed_info['date_end'];
            $access = Man_Course::canEnterCourse($cinfo);
            if ($ed_info['date_begin'] == '0000-00-00') {
                $ed_info['date_begin'] = '';
            }
            if ($ed_info['date_end'] == '0000-00-00') {
                $ed_info['date_end'] = '';
            }
            $intest .= '<h2>';
            if ($access['can']) {
                $intest .= '<a class="course_enter" href="index.php?modname=course&amp;op=aula&amp;idCourse=' . $cinfo['idCourse'] . '&amp;id_e=' . $ed_id . '" ' . 'title="' . $lang->def('_ENTER') . '">' . ($cinfo['lang_code'] && $cinfo['lang_code'] != 'none' ? '<img src="' . getPathImage('cms') . 'language/' . $cinfo['lang_code'] . '.png" alt="' . $cinfo['lang_code'] . '" /> ' : '') . $ed_info['name'] . ($ed_info['date_begin'] != '' || $ed_info['date_end'] != '' ? ' <span>( ' . Format::date($ed_info['date_begin'], 'date') . ' ' . Format::date($ed_info['date_end'], 'date') . ' )</span> ' : '') . '</a>';
            } else {
                $intest .= '<img id="locked_' . $cinfo['idCourse'] . '" src="' . getPathImage() . 'course/lock.gif" alt="' . $lang->def('_NOENTER') . '" />' . ($cinfo['lang_code'] && $cinfo['lang_code'] != 'none' ? '<img src="' . getPathImage('cms') . 'language/' . $cinfo['lang_code'] . '.png" alt="' . $cinfo['lang_code'] . '" /> ' : '') . (trim($ed_info['code']) != '' ? '[' . $ed_info['code'] . '] ' : '') . $ed_info['name'] . ($ed_info['date_begin'] != '' || $ed_info['date_end'] != '' ? ' <span>( ' . Format::date($ed_info['date_begin'], 'date') . ' ' . Format::date($ed_info['date_end'], 'date') . ' )</span> ' : '');
            }
            $intest .= '</h2>';
            //if($sub_info['level'] >= 4) {
            $intest .= '<p class="course_support_info">' . str_replace(array('[course_type]', '[create_date]', '[enrolled]', '[course_status]'), array($ed_info['edition_type'], createDateDistance($cinfo['create_date'], 'catalogue', true), $cinfo['enrolled'][$ed_id], $arr_coursestatus[$ed_info['status']]), $lang->def('_COURSE_INTRO')) . '</p>';
            //}
            if ($ed_info['classrooms'] != '') {
                $intest .= '<p class="course_support_info">' . str_replace(array('[classrooms_name]', '[classrooms_location]'), array($ed_info['classrooms']['classroom'], $ed_info['classrooms']['location']), $lang->def('_IN_THE_CLASSROOM')) . '</p>';
            }
            $intest .= '<p class="course_support_info">' . $arr_status[$sub_info['user_status']] . str_replace('[level]', $lvl[$sub_info['level']], $lang->def('_USER_LVL')) . (trim($cinfo['code']) != '' && $sub_info['level'] >= 4 ? '<br />[' . $cinfo['code'] . '] ' : '') . '</p>';
        }
        if ($access['expiring_in'] != false && $access['expiring_in'] < 30) {
            $intest .= '<p class="course_support_info">' . str_replace('[expiring_in]', $access['expiring_in'], $lang->def('_EXPIRING_IN')) . '</p>';
        }
        $courseuser_st = $courseuser_st < $sub_info['user_status'] ? $sub_info['user_status'] : $courseuser_st;
    }
    // -----------------------------------------------------------------------------------------
    $html = '<div class="course_container' . (Get::sett('use_social_courselist') == 'on' ? ' double_height' : '') . ($index == 0 ? ' course_container_first' : '') . ($courseuser_st == _CUS_SUBSCRIBED ? ' cc_inprogress' : '') . ($courseuser_st == _CUS_BEGIN ? ' cc_begin' : '') . '">';
    if ($cinfo['use_logo_in_courselist'] == '1' && $cinfo['img_course'] != '' || Get::sett('use_social_courselist') == 'on') {
        $html .= '<div class="course_info_container">';
    }
    if ($cinfo['use_logo_in_courselist'] == '1' && $cinfo['img_course'] != '') {
        $html .= '<ul class="course_score"><li>';
        $html .= '<img height="70" src="' . $GLOBALS['where_files_relative'] . '/doceboLms/' . Get::sett('pathcourse') . $cinfo['img_course'] . '" alt="' . $lang->def('_COURSE_LOGO') . '" />';
        $html .= '</li></ul>';
    }
    $html .= $intest;
    $li = '';
    $li .= '<li class="advice_to_read">' . '<img src="' . getPathImage('lms') . 'coursecatalogue/' . ($cinfo['to_read']['advice'] != 0 ? 'adv_advice' : 'no_advice') . '.jpg" ' . ' title="' . str_replace('[advice]', $cinfo['to_read']['advice'], $lang->def('_ADVERT_ADVICE')) . '" ' . ' alt="' . str_replace('[advice]', $cinfo['to_read']['advice'], $lang->def('_ADVERT_ADVICE')) . '" />' . '</li>';
    $li .= '<li class="forum_to_read">' . '<img src="' . getPathImage('lms') . 'coursecatalogue/' . ($cinfo['to_read']['forum'] != 0 ? 'adv_forum' : 'no_forum') . '.jpg" ' . ' title="' . str_replace('[forum]', $cinfo['to_read']['forum'], $lang->def('_ADVERT_FORUM')) . '" ' . ' alt="' . str_replace('[forum]', $cinfo['to_read']['forum'], $lang->def('_ADVERT_FORUM')) . '" />' . '</li>';
    $li .= '<li class="lobj_to_read">' . '<img src="' . getPathImage('lms') . 'coursecatalogue/' . ($cinfo['to_read']['lobj'] != 0 ? 'adv_lobj' : 'no_lobj') . '.jpg" ' . ' title="' . str_replace('[lobj]', $cinfo['to_read']['lobj'], $lang->def('_ADVERT_LOBJ')) . '" ' . ' alt="' . str_replace('[lobj]', $cinfo['to_read']['lobj'], $lang->def('_ADVERT_LOBJ')) . '" />' . '</li>';
    if ($li != '') {
        $html .= '<ul class="course_advertising">' . $li . '</ul>';
    }
    // course related extra option -------------------------------------------------------------
    if (Get::sett('use_social_courselist') == 'on' || !empty($there_material)) {
        $li = '';
        if (Get::sett('use_social_courselist') == 'on') {
            $li .= '<li class="course_comment">' . '<a href="javascript:;" onclick="openComment(\'' . $cinfo['idCourse'] . '\'); return false;">' . '<span>' . $lang->def('_COMMENTS') . ' (' . (isset($cinfo['comment_count']) ? $cinfo['comment_count'] : '0') . ')</span></a>' . '</li>';
        }
        // the course material -----------------------------------------------------------------
        if (!empty($there_material)) {
            if (count($there_material) == 1) {
                // direct download of material -------------------------------------------------
                $li .= '<li class="course_materials">' . '<a href="' . $url->getUrl('op=donwloadmaterials' . array_pop($there_material)) . '">' . '<span>' . $lang->def('_MATERIALS') . '</span></a>' . '</li>';
            } else {
                // popup download of material --------------------------------------------------
                $li .= '<li class="course_materials">' . '<a href="javascript:;" onclick="openWindowWithAction(\'' . $cinfo['idCourse'] . '\', \'course_materials\'); return false;">' . '<span>' . $lang->def('_MATERIALS') . '</span></a>' . '</li>';
            }
        }
        if ($li != '') {
            $html .= '<ul class="course_related_actions">' . $li . '</ul>';
        }
    }
    /*if ($cinfo['direct_play'] == 1) {
    		$html .= '<p class="showresults">'
    			.'<a href="index.php?modname=course&amp;op=showresults&amp;id_course='.$cinfo['idCourse'].'">'
    			.'<span>'.$lang->def('_SHOW_RESULTS').'</span></a>'
    			.'</p>';
    	}*/
    // score and subscribe action ------------------------------------------------------------
    if (Get::sett('use_social_courselist') == 'on') {
        $html .= '<ul class="course_score">';
        $html .= '<li class="current_score"><span>' . $lang->def('_SCORE') . '</span><br />' . '<strong id="course_score_' . $cinfo['idCourse'] . '">' . $cinfo['course_vote'] . '</strong></li>';
        if ($cinfo['waiting'] == 0) {
            $html .= '<li class="score_it">' . '<a class="good" href="javascript:;" ' . 'onclick="course_vote(\'' . $cinfo['idCourse'] . '\', \'good\'); return false;" ' . 'title="' . $lang->def('_VOTE_GOOD_TITLE') . '">' . '<img id="score_image_good_' . $cinfo['idCourse'] . '" src="' . getPathImage() . 'coursecatalogue/good' . ($cinfo['user_score'] == '1' ? '_grey' : '') . '.png" alt="' . $lang->def('_VOTE_GOOD_ALT') . ' : ' . strip_tags($cinfo['name']) . '" />' . '</a> ' . '<a class="bad" href="javascript:;" ' . 'onclick="course_vote(\'' . $cinfo['idCourse'] . '\', \'bad\'); return false;" ' . 'title="' . $lang->def('_VOTE_BAD_TITLE') . '">' . '<img id="score_image_bad_' . $cinfo['idCourse'] . '" src="' . getPathImage() . 'coursecatalogue/bad' . ($cinfo['user_score'] == '-1' ? '_grey' : '') . '.png" alt="' . $lang->def('_VOTE_BAD_ALT') . ' : ' . strip_tags($cinfo['name']) . '" />' . '</a>' . '</li>';
        } else {
            $li .= '<li class="score_it" id="score_action_' . $cinfo['idCourse'] . '">' . '<img src="' . getPathImage() . 'coursecatalogue/good_grey.png" alt="' . $lang->def('_VOTE_GOOD_ALT') . ' : ' . strip_tags($cinfo['name']) . '" /> ' . '<img src="' . getPathImage() . 'coursecatalogue/bad_grey.png" alt="' . $lang->def('_VOTE_BAD_ALT') . ' : ' . strip_tags($cinfo['name']) . '" />' . '</li>';
        }
        $html .= '</ul>';
    }
    if ($cinfo['use_logo_in_courselist'] == '1' && $cinfo['img_course'] != '' || Get::sett('use_social_courselist') == 'on') {
        $html .= '</div>';
    }
    $html .= '</div>';
    return $html;
}
function getCourseEditionTable($course_id)
{
    $res = "";
    require_once _base_ . '/lib/lib.table.php';
    require_once $GLOBALS['where_lms'] . '/lib/lib.course.php';
    $lang_c =& DoceboLanguage::createInstance('catalogue');
    $lang =& DoceboLanguage::createInstance('course');
    /*
    	$qtxt ="SELECT name FROM ".$GLOBALS["prefix_lms"]."_course ";
    	$qtxt.="WHERE idCourse = '".(int)$course_id."'";
    	list($course_name)=sql_fetch_row(sql_query($qtxt));
    */
    $man_course = new Man_Course();
    $course = $man_course->getCourseInfo($course_id);
    $course_name = $course["name"];
    $subs_lang = array(0 => $lang->def('_COURSE_S_GODADMIN'), 1 => $lang->def('_COURSE_S_MODERATE'), 2 => $lang->def('_COURSE_S_FREE'), 3 => $lang->def('_COURSE_S_SECURITY_CODE'));
    $tab = new Table(0, $lang->def('_EDITIONS') . ": " . $course_name, $lang->def('_EDITIONS'));
    $tab->setTableStyle('edition_block');
    $cont_h[] = $lang->def('_CODE');
    $type_h[] = 'code_course';
    $cont_h[] = $lang->def('_COURSE');
    $type_h[] = '';
    $cont_h[] = $lang->def('_SUBSCRIBE_METHOD');
    $type_h[] = 'image nowrap';
    $cont_h[] = $lang->def('_ENROL_COUNT');
    $type_h[] = 'image nowrap';
    $cont_h[] = $lang->def('_CREATION_DATE');
    $type_h[] = 'image nowrap';
    $cont_h[] = $lang->def('_SUBSCRIPTION', 'course');
    $type_h[] = 'image nowrap';
    $tab->setColsStyle($type_h);
    $tab->addHead($cont_h);
    $qtxt = "SELECT t1.*, COUNT(t2.idUser) as enrolled ";
    $qtxt .= "FROM " . $GLOBALS["prefix_lms"] . "_course_edition as t1 ";
    $qtxt .= "\tLEFT JOIN " . $GLOBALS['prefix_lms'] . "_courseuser AS t2 ON ( t1.idCourseEdition = t2.edition_id ) ";
    $qtxt .= "WHERE t1.idCourse='" . (int) $course_id . "' ";
    $qtxt .= "\tAND t1.status <> '" . CST_PREPARATION . "' ";
    $qtxt .= "GROUP BY t1.idCourseEdition  ";
    $qtxt .= "ORDER BY t1.date_begin ";
    //$res.=$qtxt;
    $q = sql_query($qtxt);
    if ($q && mysql_num_rows($q) > 0) {
        while ($row = mysql_fetch_assoc($q)) {
            $cont = array();
            $cont[] = $row["code"];
            $edition_id = $row["idCourseEdition"];
            $url = "index.php?modname=coursecatalogue&amp;op=editiondetails&amp;edition_id=" . $edition_id;
            $url .= "&amp;course_id=" . $course_id;
            $cont[] = '<a href="' . $url . '">' . $row["name"] . "</a>\n";
            $cont[] = $subs_lang[$course["subscribe_method"]];
            $cont[] = $row["enrolled"];
            $cont[] = createDateDistance($course["create_date"], "coursecatalogue");
            $cont[] = getSubscribeActionLink($course_id, $course, $lang, $edition_id);
            $tab->addBody($cont);
        }
        $res .= $tab->getTable();
    } else {
        $res = FALSE;
    }
    return $res;
}