Example #1
0
            foreach ($results as $result) {
                $html .= '<tr>' . "\n" . '<td>' . '<a href="../phpbb/viewtopic.php?topic=' . $result['topic_id'] . '">' . $result['topic_title'] . '</a>' . '</td>' . "\n" . '<td align="right">' . $result['last_message'] . '</td>' . "\n" . '</tr>' . "\n";
            }
            $html .= '</tbody>' . "\n";
        } else {
            $html .= '<tfoot>' . "\n" . '<tr>' . "\n" . '<td align="center">' . get_lang('No result') . '</td>' . "\n" . '</tr>' . "\n" . '</tfoot>' . "\n";
        }
        $html .= '</table>' . "\n";
        return $html;
    }
    protected function renderFooter()
    {
        return '';
    }
}
TrackingRendererRegistry::registerCourse('CLFRM_CourseTrackingRenderer');
/*
 * 
 */
class CLFRM_UserTrackingRenderer extends UserTrackingRenderer
{
    private $tbl_course_tracking_event;
    public function __construct($courseId, $userId)
    {
        $this->courseId = $courseId;
        $this->userId = (int) $userId;
        $tbl_cdb_names = claro_sql_get_course_tbl(claro_get_course_db_name_glued($this->courseId));
        $this->tbl_bb_topics = $tbl_cdb_names['bb_topics'];
        $this->tbl_bb_posts = $tbl_cdb_names['bb_posts'];
    }
    protected function renderHeader()
                // FIXME check that claro_get_tool_name returns a toolname... check that tool exists
                $thisToolName = claro_get_tool_name(claro_get_tool_id_from_course_tid($thisTid));
                $html .= '<tr>' . "\n" . '<td>' . '<a href="tool_access_details.php?toolId=' . $thisTid . '">' . $thisToolName . '</a></td>' . "\n" . '<td align="right"><a href="user_access_details.php?cmd=tool&amp;id=' . $thisTid . '">' . (int) $result['nbr_distinct_users_access'] . '</a></td>' . "\n" . '<td align="right">' . (int) $result['nbr_access'] . '</td>' . "\n" . '</tr>' . "\n\n";
            }
        } else {
            $html .= '<tr>' . "\n" . '<td colspan="3"><div align="center">' . get_lang('No result') . '</div></td>' . "\n" . '</tr>' . "\n";
        }
        $html .= '</tbody>' . '</table>' . "\n";
        return $html;
    }
    protected function renderFooter()
    {
        return '';
    }
}
TrackingRendererRegistry::registerCourse('CLTRACK_CourseToolAccess');
/*
 *
 */
class CLTRACK_userCourseAccess extends UserTrackingRenderer
{
    private $tbl_course_tracking_event;
    public function __construct($courseId, $userId)
    {
        $this->courseId = $courseId;
        $this->userId = (int) $userId;
        $tbl_cdb_names = claro_sql_get_course_tbl(claro_get_course_db_name_glued($this->courseId));
        $this->tbl_course_tracking_event = $tbl_cdb_names['tracking_event'];
    }
    protected function renderHeader()
    {