diff --git a/main/calendar/agenda.inc.php b/main/calendar/agenda.inc.php
index 72a2cfdc3e..4ec6b551eb 100644
--- a/main/calendar/agenda.inc.php
+++ b/main/calendar/agenda.inc.php
@@ -1,4 +1,4 @@
-';
+ // attachment list
+ $attachment_list=get_attachment($myrow['id']);
+
+ if (!empty($attachment_list)) {
+
+ $realname=$attachment_list['path'];
+ $user_filename=$attachment_list['filename'];
+ $full_file_name = 'download.php?file='.$realname;
+ echo Display::return_icon('attachment.gif',get_lang('Attachment'));
+ echo ' '.$user_filename.' ';
+ echo ''.$attachment_list['comment'].' ';
+
+ }
+
+ echo '';
+
/*--------------------------------------------------
display: the added resources
@@ -1740,7 +1756,6 @@ function display_agenda_items()
$event_list.=$myrow['id'].',';
$counter++;
-
/*--------------------------------------------------
display: jump-to-top icon
--------------------------------------------------*/
@@ -1768,6 +1783,25 @@ function display_agenda_items()
"";
}
+/**
+ * Show a list with all the attachments according to the post's id
+ * @param the post's id
+ * @return array with the post info
+ * @author Christian Fasanando
+ * @version November 2008, dokeos 1.8.6
+ */
+
+function get_attachment($agenda_id) {
+ $agenda_table_attachment = Database::get_course_table(TABLE_AGENDA_ATTACHMENT);
+ $row=array();
+ $sql = 'SELECT path, filename,comment FROM '. $agenda_table_attachment.' WHERE agenda_id = '.(int)$agenda_id.'';
+ $result=api_sql_query($sql, __FILE__, __LINE__);
+ if (Database::num_rows($result)!=0) {
+ $row=Database::fetch_array($result);
+ }
+ return $row;
+}
+
/**
* Displays only 1 agenda item. This is used when an agenda item is added to the learning path.
* @author Patrick Cool , Ghent University
@@ -1996,7 +2030,6 @@ function show_add_form($id = '')
}
else
{
-
// we are coming from the resource linker so there might already have been some information in the form.
// When we clicked on the button to add resources we stored every form information into a session and now we
// are doing the opposite thing: getting the information out of the session and putting it into variables to
@@ -2018,8 +2051,7 @@ function show_add_form($id = '')
$to=$form_elements['to'];
$repeat = $form_elements['repeat'];
}
-
-
+
// switching the send to all/send to groups/send to users
if ($_POST['To'])
{
@@ -2041,7 +2073,6 @@ function show_add_form($id = '')
$repeat = !empty($_POST['repeat'])?true:false;
}
-
// if the id is set then we are editing an agenda item
if (is_int($id))
{
@@ -2067,7 +2098,6 @@ function show_add_form($id = '')
// we start a completely new item, we do not come from the resource linker
if ($_GET['originalresource']!=="no" and $_GET['action']=="add")
{
-
$_SESSION["formelements"]=null;
unset_session_resources();
}
@@ -2105,7 +2135,6 @@ function show_add_form($id = '')
}
else
{
-
?>