Beispiel #1
0
    function echoMyCourses($option, $Itemid, &$my_courses)
    {
        global $JLMS_CONFIG;
        ?>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="<?php 
        echo JLMSCSS::_('jlmslist', 'jlms_homepage_list');
        ?>
" style="margin-top:0; margin-bottom:0;">
		<tr><<?php 
        echo JLMSCSS::tableheadertag();
        ?>
 class="<?php 
        echo JLMSCSS::_('sectiontableheader');
        ?>
" align="center" style="text-align:center"><?php 
        echo _JLMS_HOME_COURSES_TITLE;
        ?>
</<?php 
        echo JLMSCSS::tableheadertag();
        ?>
></tr>
	<?php 
        $k = 1;
        if (count($my_courses)) {
            $my_courses_teach = array();
            $my_courses_enroll = array();
            foreach ($my_courses as $my_course) {
                if ($my_course->user_course_role == 1) {
                    $my_courses_teach[] = $my_course;
                } else {
                    $my_courses_enroll[] = $my_course;
                }
            }
            if (count($my_courses_teach)) {
                echo "<tr class='" . JLMSCSS::_('sectiontableentry' . $k) . "'><td align='left'>" . _JLMS_COURSE_FP_COURSES_TEACH . "</td></tr>";
                $k = 3 - $k;
                foreach ($my_courses_teach as $my_course) {
                    $link = sefRelToAbs("index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=details_course&amp;id=" . $my_course->id);
                    $description =& joomla_lms_html::PrepareDescription($my_course->course_description);
                    $title = JLMS_txt2overlib($my_course->course_name);
                    echo "<tr class='sectiontableentry{$k}" . ($k % 2 ? ' odd' : ' even') . "'><td>\n\t\t\t\t\t" . JLMS_toolTip($title, $description, $link) . "\n\t\t\t\t\t</td></tr>";
                    $k = 3 - $k;
                }
            }
            if (count($my_courses_enroll)) {
                echo "<tr class='" . JLMSCSS::_('sectiontableentry' . $k) . "'><td align='left'>" . _JLMS_COURSE_FP_COURSES_ENROLL . "</td></tr>";
                $k = 3 - $k;
                foreach ($my_courses_enroll as $my_course) {
                    $link = sefRelToAbs("index.php?option=" . $option . "&amp;Itemid=" . $Itemid . "&amp;task=details_course&amp;id=" . $my_course->id);
                    $description =& joomla_lms_html::PrepareDescription($my_course->course_description);
                    $title = JLMS_txt2overlib($my_course->course_name);
                    echo "<tr class='sectiontableentry{$k}" . ($k % 2 ? ' odd' : ' even') . "'><td>\n\t\t\t\t\t" . JLMS_toolTip($title, $description, $link) . "\n\t\t\t\t\t</td></tr>";
                    $k = 3 - $k;
                }
            }
        } else {
            echo "<tr class='sectiontableentry{$k}" . ($k % 2 ? ' odd' : ' even') . "'><td>" . _JLMS_HOME_COURSES_NO_ITEMS . "</td></tr>";
        }
        ?>
	</table>
	<?php 
    }
Beispiel #2
0
function JLMS_showMyDropBox($option, $Itemid, &$my_dropbox, &$lists)
{
    global $JLMS_CONFIG;
    $ret_str = '	<table width="100%" cellpadding="0" cellspacing="0" border="0">' . "\r\n" . '		<tr><td class="sectiontableheader" align="center" colspan="2">' . str_replace('{Y}', $lists['dropbox_total'], str_replace('{X}', $lists['dropbox_total_new'], _JLMS_HOME_DROPBOX_TITLE)) . '</td></tr>' . "\r\n";
    $k = 1;
    if (count($my_dropbox)) {
        foreach ($my_dropbox as $my_dropboxitem) {
            $link = sefRelToAbs("index.php?option=" . $option . "&Itemid=" . $Itemid . "&task=dropbox&id=" . $my_dropboxitem->course_id);
            $description =& joomla_lms_html::PrepareDescription($my_dropboxitem->drp_description);
            $add_info = '';
            if (isset($my_dropboxitem->course_name) && $my_dropboxitem->course_name) {
                $add_info = "&nbsp;(" . $my_dropboxitem->course_name . ")";
            }
            //$title = JLMS_txt2overlib($my_dropboxitem->drp_name);
            $title = $my_dropboxitem->drp_name;
            $ret_str .= "<tr class='sectiontableentry{$k}'><td width='16'>" . "<img class='JLMS_png' src=\"" . $JLMS_CONFIG->get('live_site') . "/components/com_joomla_lms/lms_images/toolbar/tlb_dropbox.png\" width='16' height='16' border='0' alt='dropbox' />" . "</td><td>" . JLMS_toolTip($title, $description, $title, $link) . $add_info . "</td></tr>";
            $k = 3 - $k;
        }
    } else {
        $ret_str .= "<tr class='sectiontableentry{$k}'><td colspan='2'>" . _JLMS_HOME_DROPBOX_NO_ITEMS . "</td></tr>";
    }
    $ret_str .= '	</table>';
    return $ret_str;
}