|
|
|
@ -759,12 +759,11 @@ if ($display_form) { |
|
|
|
|
echo '<script>toggle_sendto();</script>'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} // displayform |
|
|
|
|
} // end of displayform for announcement creation/edition |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
DISPLAY ANNOUNCEMENT LIST |
|
|
|
|
/** |
|
|
|
|
* Announcements list display |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
$course_id = api_get_course_int_id(); |
|
|
|
|
|
|
|
|
|
//if ($display_announcement_list && !$surveyid) { |
|
|
|
@ -962,7 +961,7 @@ if ($display_announcement_list) { |
|
|
|
|
$iterator = 1; |
|
|
|
|
$bottomAnnouncement = $announcement_number; |
|
|
|
|
|
|
|
|
|
echo '<table width="100%" class="data_table">'; |
|
|
|
|
echo '<table width="100%" class="data_table announcements-list">'; |
|
|
|
|
$ths = Display::tag('th', get_lang('Title')); |
|
|
|
|
$ths .= Display::tag('th', get_lang('By') ); |
|
|
|
|
$ths .= Display::tag('th', get_lang('LastUpdateDate') ); |
|
|
|
@ -997,7 +996,7 @@ if ($display_announcement_list) { |
|
|
|
|
$style = ''; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
echo "<tr>"; |
|
|
|
|
echo '<tr class="announcements-list-line">'; |
|
|
|
|
|
|
|
|
|
// show attachment list |
|
|
|
|
$attachment_list = array(); |
|
|
|
@ -1009,14 +1008,14 @@ if ($display_announcement_list) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* TITLE */ |
|
|
|
|
$title = Display::url($title.$attachment_icon, '?action=view&id='.$myrow['id']); |
|
|
|
|
echo Display::tag('td', Security::remove_XSS($title), array('class' => $style)); |
|
|
|
|
$title = Display::url($title.$attachment_icon, api_get_self().'?'.api_get_cidreq().'&action=view&id='.$myrow['id']); |
|
|
|
|
echo Display::tag('td', Security::remove_XSS($title), array('class' => 'announcements-list-line-title '.$style)); |
|
|
|
|
|
|
|
|
|
$user_info = api_get_user_info($myrow['insert_user_id']); |
|
|
|
|
$username = sprintf(get_lang("LoginX"), $user_info['username']); |
|
|
|
|
$username_span = Display::tag('span', api_get_person_name($user_info['firstName'], $user_info['lastName']), array('title'=>$username)); |
|
|
|
|
echo Display::tag('td', $username_span); |
|
|
|
|
echo Display::tag('td', api_convert_and_format_date($myrow['insert_date'], DATE_TIME_FORMAT_LONG)); |
|
|
|
|
echo Display::tag('td', $username_span, array('class' => 'announcements-list-line-by-user')); |
|
|
|
|
echo Display::tag('td', api_convert_and_format_date($myrow['insert_date'], DATE_TIME_FORMAT_LONG), array('class' => 'announcements-list-line-datetime')); |
|
|
|
|
|
|
|
|
|
// we can edit if : we are the teacher OR the element belongs to the session we are coaching OR the option to allow users to edit is on |
|
|
|
|
$modify_icons = ''; |
|
|
|
@ -1051,7 +1050,7 @@ if ($display_announcement_list) { |
|
|
|
|
"</a>"; |
|
|
|
|
} |
|
|
|
|
$iterator ++; |
|
|
|
|
echo Display::tag('td', $modify_icons); |
|
|
|
|
echo Display::tag('td', $modify_icons, array('class' => 'announcements-list-line-actions')); |
|
|
|
|
} |
|
|
|
|
echo "</tr>"; |
|
|
|
|
} |
|
|
|
|