claroline/claroline/announcements/lib/announcement.lib.php File Reference

Go to the source code of this file.

Namespaces

namespace  CLANN

Functions

 announcement_get_course_item_list ($thisCourse, $limit=null, $startTime=null, $visibleOnly=true)
 announcement_get_course_item_list_portlet ($thisCourse, $limit=null, $startTime=null, $visibleOnly=true)
 announcement_get_items_portlet ($personnalCourseList)
 announcement_get_item_list ($context, $order='DESC')
 announcement_delete_item ($id, $course_id=NULL)
 announcement_delete_all_items ($course_id=NULL)
 announcement_add_item ($title='', $content='', $visibility='SHOW', $time=NULL, $course_id=NULL)
 announcement_update_item ($announcement_id, $title=NULL, $content=NULL, $visibility=NULL, $time=NULL, $course_id=NULL)
 announcement_get_item ($announcement_id, $course_id=NULL)
 announcement_set_item_visibility ($announcement_id, $visibility, $course_id=NULL)
 move_entry ($item_id, $cmd, $course_id=NULL)

Function Documentation

announcement_add_item ( title = '',
content = '',
visibility = 'SHOW',
time = NULL,
course_id = NULL 
)

add an new announcement in the given or current course

Parameters:
string $title title of the new item
string $content content of the new item
date $time publication dat of the item def:now
course_code $course_id sysCode of the course (leaveblank for current course)
Returns:
id of the new item
Since:
1.7
Todo:
convert to param date timestamp

Definition at line 197 of file announcement.lib.php.

announcement_delete_all_items ( course_id = NULL  ) 

Delete an announcement in the given or current course

Parameters:
integer $announcement_id id the requested announcement
string $course_id sysCode of the course (leaveblank for current course)
Returns:
result of deletion query
Since:
1.7

Definition at line 177 of file announcement.lib.php.

announcement_delete_item ( id,
course_id = NULL 
)

Delete an announcement in the given or current course

Parameters:
integer $announcement_id id the requested announcement
string $course_id sysCode of the course (leaveblank for current course)
Returns:
result of deletion query
Since:
1.7

Definition at line 159 of file announcement.lib.php.

announcement_get_course_item_list ( thisCourse,
limit = null,
startTime = null,
visibleOnly = true 
)

get list of all announcements in the given or current course

Parameters:
string $order 'ASC' || 'DESC' : ordering of the list.
string $course_id sysCode of the course (leaveblank for current course)
Returns:
array of array(id, title, content, time, visibility, rank)
Since:
1.7

Definition at line 40 of file announcement.lib.php.

announcement_get_course_item_list_portlet ( thisCourse,
limit = null,
startTime = null,
visibleOnly = true 
)

Definition at line 62 of file announcement.lib.php.

announcement_get_item ( announcement_id,
course_id = NULL 
)

return data for the announcement of the given id of the given or current course

Parameters:
integer $announcement_id id the requested announcement
string $course_id sysCode of the course (leaveblank for current course)
Returns:
array(id, title, content, visibility, rank) of the announcement
Since:
1.7

Definition at line 266 of file announcement.lib.php.

announcement_get_item_list ( context,
order = 'DESC' 
)

Definition at line 136 of file announcement.lib.php.

announcement_get_items_portlet ( personnalCourseList  ) 

Definition at line 84 of file announcement.lib.php.

announcement_set_item_visibility ( announcement_id,
visibility,
course_id = NULL 
)

Definition at line 284 of file announcement.lib.php.

announcement_update_item ( announcement_id,
title = NULL,
content = NULL,
visibility = NULL,
time = NULL,
course_id = NULL 
)

Update an announcement in the given or current course

Parameters:
string $title title of the new item
string $content content of the new item
date $time publication dat of the item def:now
string $course_id sysCode of the course (leaveblank for current course)
Returns:
handler of query
Since:
1.7
Todo:
convert to param date timestamp

Definition at line 238 of file announcement.lib.php.

move_entry ( item_id,
cmd,
course_id = NULL 
)

function move_entry($entryId,$cmd)

Parameters:
integer $entryId an valid id of announcement.
string $cmd 'UP' or 'DOWN'
Returns:
true;
Author:
Christophe Gesché <moosh@claroline.net>

Definition at line 305 of file announcement.lib.php.

Generated on Tue Jun 8 12:28:36 2010 for Claroline API by  doxygen 1.6.3