|
|
@ -1006,7 +1006,6 @@ class MessageManager |
|
|
|
$rows = self::get_messages_by_group_by_message($group_id, $topic_id); |
|
|
|
$rows = self::get_messages_by_group_by_message($group_id, $topic_id); |
|
|
|
$rows = self::calculate_children($rows, $topic_id); |
|
|
|
$rows = self::calculate_children($rows, $topic_id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$current_user_id = api_get_user_id(); |
|
|
|
$current_user_id = api_get_user_id(); |
|
|
|
|
|
|
|
|
|
|
|
$topics_per_page = 5; |
|
|
|
$topics_per_page = 5; |
|
|
@ -1016,7 +1015,6 @@ class MessageManager |
|
|
|
$html_messages = ''; |
|
|
|
$html_messages = ''; |
|
|
|
$query_vars = array('id' => $group_id, 'topic_id' => $topic_id , 'topics_page_nr' => 0); |
|
|
|
$query_vars = array('id' => $group_id, 'topic_id' => $topic_id , 'topics_page_nr' => 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Main message |
|
|
|
// Main message |
|
|
|
$html = ''; |
|
|
|
$html = ''; |
|
|
|
$user_link = ''; |
|
|
|
$user_link = ''; |
|
|
@ -1027,6 +1025,7 @@ class MessageManager |
|
|
|
$items_page_nr = null; |
|
|
|
$items_page_nr = null; |
|
|
|
|
|
|
|
|
|
|
|
echo Display::tag('h3', Security::remove_XSS($main_message['title'], STUDENT, true)); |
|
|
|
echo Display::tag('h3', Security::remove_XSS($main_message['title'], STUDENT, true)); |
|
|
|
|
|
|
|
|
|
|
|
$user_sender_info = UserManager::get_user_info_by_id($main_message['user_sender_id']); |
|
|
|
$user_sender_info = UserManager::get_user_info_by_id($main_message['user_sender_id']); |
|
|
|
$files_attachments = self::get_links_message_attachment_files($main_message['id']); |
|
|
|
$files_attachments = self::get_links_message_attachment_files($main_message['id']); |
|
|
|
$name = api_get_person_name($user_sender_info['firstname'], $user_sender_info['lastname']); |
|
|
|
$name = api_get_person_name($user_sender_info['firstname'], $user_sender_info['lastname']); |
|
|
@ -1068,6 +1067,7 @@ class MessageManager |
|
|
|
if (is_array($rows) && count($rows)> 0) { |
|
|
|
if (is_array($rows) && count($rows)> 0) { |
|
|
|
$topics = $rows; |
|
|
|
$topics = $rows; |
|
|
|
$array_html = array(); |
|
|
|
$array_html = array(); |
|
|
|
|
|
|
|
|
|
|
|
foreach ($topics as $index => $topic) { |
|
|
|
foreach ($topics as $index => $topic) { |
|
|
|
if (empty($topic['id'])) { |
|
|
|
if (empty($topic['id'])) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
@ -1124,11 +1124,11 @@ class MessageManager |
|
|
|
} |
|
|
|
} |
|
|
|
// grids for items with paginations |
|
|
|
// grids for items with paginations |
|
|
|
$options = array('hide_navigation' => false, 'per_page' => $items_per_page); |
|
|
|
$options = array('hide_navigation' => false, 'per_page' => $items_per_page); |
|
|
|
$order = array(true, true, true,false); |
|
|
|
$visibility = array(true, true, true, false); |
|
|
|
|
|
|
|
|
|
|
|
$style_class = array('item' => array('class'=>'group_social_item'), 'main' => array('class'=>'group_social_grid')); |
|
|
|
$style_class = array('item' => array('class'=>'group_social_item'), 'main' => array('class'=>'group_social_grid')); |
|
|
|
if (!empty($array_html_items)) { |
|
|
|
if (!empty($array_html_items)) { |
|
|
|
$html .= Display::return_sortable_grid('items_'.$topic['id'], array(), $array_html_items, $options, $query_vars, false, $order, false, $style_class); |
|
|
|
$html .= Display::return_sortable_grid('items_'.$topic['id'], array(), $array_html_items, $options, $query_vars, null, $visibility, false, $style_class); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$html .= '</div>'; |
|
|
|
$html .= '</div>'; |
|
|
|