| [ Index ] |
|
Code source de Claroline 188 |
1 <?php // $Id: rss.write.cnr.php,v 1.6 2006/12/18 19:07:22 moosh Exp $ 2 if ( count( get_included_files() ) == 1 ) die( '---' ); 3 /** 4 * CLAROLINE 5 * 6 * @version 1.8 $Revision: 1.6 $ 7 * 8 * @copyright (c) 2001-2006 Universite catholique de Louvain (UCL) 9 * 10 * @license http://www.gnu.org/copyleft/gpl.html (GPL) GENERAL PUBLIC LICENSE 11 * 12 * @package CLANN 13 * @subpackage CLRSS 14 * 15 * @author Claro Team <cvs@claroline.net> 16 */ 17 18 function CLANN_write_rss($context) 19 { 20 if (is_array($context) && count($context)>0) 21 { 22 $courseId = (array_key_exists(CLARO_CONTEXT_COURSE,$context)) ? $context[CLARO_CONTEXT_COURSE] : claro_get_current_course_id(); 23 } 24 25 require_once dirname(__FILE__) . '/../lib/announcement.lib.php'; 26 27 $toolNameList = claro_get_tool_name_list(); 28 $announcementList = announcement_get_item_list($context, 'DESC'); 29 30 $rssList = array(); 31 foreach ($announcementList as $announcementItem) 32 { 33 if('SHOW' == $announcementItem['visibility']) 34 { 35 $rssList[] = array( 'title' => trim($announcementItem['title']) 36 , 'category' => trim($toolNameList['CLANN']) 37 , 'guid' => get_path('rootWeb') .'claroline/' . 'announcements/announcements.php?cidReq=' . $courseId . '&l#ann'.$announcementItem['id'] 38 , 'link' => get_path('rootWeb') .'claroline/' . 'announcements/announcements.php?cidReq=' . $courseId . '&l#ann'.$announcementItem['id'] 39 , 'description' => trim(str_replace('<!-- content: html -->','',$announcementItem['content'])) 40 , 'pubDate' => date('r', stripslashes(strtotime($announcementItem['time']))) 41 //, 'author' => $_course['email'] 42 ); 43 } 44 } 45 return $rssList; 46 } 47 48 49 50 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Thu Nov 29 14:38:42 2007 | par Balluche grâce à PHPXref 0.7 |
|