Ejemplo n.º 1
0
	function display($tpl = null) {
	global $mainframe;

	$app        = JFactory::getApplication();
    $params = $app->getParams();
    $this->assignRef('params',              $params);


	$group_by_category = $params->get( 'group_by_category' );

	$user = JFactory::getUser();
	$username = $user->username;
	if ($group_by_category)
		$this->my_courses = JoomdleHelperContent::call_method ('my_courses', $username, 1);
	else
		$this->my_courses = JoomdleHelperContent::getMyCourses();

	$this->jump_url =  JoomdleHelperContent::getJumpURL ();

	$this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));

	$this->_prepareDocument();


	if ($group_by_category)
		$tpl =  "cats";

	if ($this->my_courses)
		parent::display($tpl);
	else
		echo $params->get('nocourses_text');
    }
Ejemplo n.º 2
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $params = $app->getParams();
     $this->assignRef('params', $params);
     $user = JFactory::getUser();
     $username = $user->username;
     $id = $params->get('course_id');
     if (!$id) {
         $id = JRequest::getVar('course_id');
     }
     $id = (int) $id;
     if (!$id) {
         echo JText::_('COM_JOOMDLE_NO_COURSE_SELECTED');
         return;
     }
     $this->course_info = JoomdleHelperContent::getCourseInfo($id, $username);
     // user not enroled and no guest access
     if (!$this->course_info['enroled'] && !$this->course_info['guest']) {
         return;
     }
     $this->events = JoomdleHelperContent::getCourseEvents($id);
     $this->jump_url = JoomdleHelperContent::getJumpURL();
     $document = JFactory::getDocument();
     $document->setTitle($this->course_info['fullname'] . ': ' . JText::_('COM_JOOMDLE_EVENTS'));
     $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
     parent::display($tpl);
 }
Ejemplo n.º 3
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $params = $app->getParams();
     $this->assignRef('params', $params);
     $this->my_news = JoomdleHelperContent::getMyNews();
     $this->jump_url = JoomdleHelperContent::getJumpURL();
     $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
     $this->_prepareDocument();
     parent::display($tpl);
 }
Ejemplo n.º 4
0
    $target = " target='_blank'";
} else {
    $target = "";
}
?>
<div class="joomdle-course<?php 
echo $this->pageclass_sfx;
?>
">

   <h1> <?php 
echo $this->course_info['fullname'];
?>
</h1>
<?php 
$jump_url = JoomdleHelperContent::getJumpURL();
$user = JFactory::getUser();
$username = $user->username;
$session = JFactory::getSession();
$token = md5($session->getId());
$course_id = $this->course_info['remoteid'];
$direct_link = 1;
$show_summary = $this->params->get('course_show_summary');
$show_topics_numbers = $this->params->get('course_show_numbers');
if ($this->course_info['guest']) {
    $this->is_enroled = true;
}
//skip intro
//array_shift ($this->mods);
if (is_array($this->mods)) {
    foreach ($this->mods as $tema) {