示例#1
0
 function display($tpl = null)
 {
     global $mainframe;
     $app = JFactory::getApplication();
     $params = $app->getParams();
     $this->assignRef('params', $params);
     $username = JRequest::getVar('username');
     if (!$username) {
         $username = $params->get('username');
     }
     if (!$username) {
         echo JText::_('COM_JOOMDLE_NO_USER_SELECTED');
         return;
     }
     $this->courses = JoomdleHelperContent::call_method('teacher_courses', $username);
     $this->username = $username;
     $this->user_info = JoomdleHelperMappings::get_user_info_for_joomla($this->username);
     $document = JFactory::getDocument();
     $document->setTitle($this->user_info['name']);
     $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx'));
     parent::display($tpl);
 }
示例#2
0
    <?php 
if ($this->params->get('show_page_heading', 1)) {
    ?>
    <h1>
    <?php 
    echo $this->escape($this->params->get('page_heading'));
    ?>
    </h1>
    <?php 
}
?>

<?php 
if (is_array($this->teachers)) {
    foreach ($this->teachers as $teacher) {
        $user_info = JoomdleHelperMappings::get_user_info_for_joomla($teacher['username']);
        if (!count($user_info)) {
            //not a Joomla user
            continue;
        }
        ?>
        <div class="joomdle_user_list_item">
            <div class="joomdle_user_list_item_pic">
			<?php 
        // Use thumbs if available
        if (array_key_exists('thumb_url', $user_info) && $user_info['thumb_url'] != '') {
            $user_info['pic_url'] = $user_info['thumb_url'];
        }
        ?>
                <a href="<?php 
        echo JRoute::_("index.php?option=com_joomdle&view=teacher&username="******"&Itemid={$itemid}");
示例#3
0
echo $this->pageclass_sfx;
?>
">
    <h1>
        <?php 
echo $this->course_info['fullname'] . ': ';
?>
        <?php 
echo JText::_('COM_JOOMDLE_STUDENTS');
?>
    </h1>

<?php 
if (is_array($this->users)) {
    foreach ($this->users as $id => $student) {
        $user_info = JoomdleHelperMappings::get_user_info_for_joomla($student['username']);
        if (!count($user_info)) {
            //not a Joomla user
            continue;
        }
        ?>
    <div class="joomdle_user_list_item">
        <div class="joomdle_user_list_item_pic">
		<?php 
        // Use thumbs if available
        if (array_key_exists('thumb_url', $user_info) && $user_info['thumb_url'] != '') {
            $user_info['pic_url'] = $user_info['thumb_url'];
        }
        ?>
		<?php 
        if (array_key_exists('profile_url', $user_info) && $user_info['profile_url']) {