skala
Julio Montoya 13 years ago
commit 16b75ba183
  1. 7
      main/admin/class_information.php
  2. 14
      main/announcements/announcements.inc.php
  3. 6
      main/announcements/announcements.php

@ -50,22 +50,21 @@ if (count($users) > 0) {
$table_header[] = array (get_lang('LastName'), true);
$table_header[] = array (get_lang('FirstName'), true);
}
$table_header[] = array (get_lang('LoginName'), true);
$table_header[] = array (get_lang('Email'), true);
$table_header[] = array (get_lang('Status'), true);
$table_header[] = array ('', false);
$data = array();
foreach($users as $index => $user) {
$username = sprintf(get_lang('LoginX'), $user['username']);
$row = array ();
$row[] = $user['official_code'];
if ($is_western_name_order) {
$row[] = $user['firstname'];
$row[] = $user['lastname'];
$row[] = "<span title='$username'>".$user['lastname']."</span>";
} else {
$row[] = $user['lastname'];
$row[] = "<span title='$username'>".$user['lastname']."</span>";
$row[] = $user['firstname'];
}
$row[] = $user['username'];
$row[] = Display :: encrypted_mailto_link($user['email'], $user['email']);
$row[] = $user['status'] == 5 ? get_lang('Student') : get_lang('Teacher');
$row[] = '<a href="user_information.php?user_id='.$user['user_id'].'">'.Display::return_icon('synthese_view.gif').'</a>';

@ -572,7 +572,7 @@ class AnnouncementManager {
echo "<select name=\"not_selected_form[]\" size=5 style=\"width:200px\" multiple>";
$group_users = GroupManager::get_subscribed_users($group_id);
foreach ($group_users as $user){
echo '<option value="'.$user['user_id'].'">'.api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')'.'</option>';
echo '<option value="'.$user['user_id'].'" title="'.sprintf(get_lang('LoginX'), $user['username']).'" >'.api_get_person_name($user['firstname'], $user['lastname']).'</option>';
}
echo '</select>';
echo "</td>";
@ -623,8 +623,8 @@ class AnnouncementManager {
if (is_array($to_already_selected)) {
if (!in_array("USER:".$this_user['user_id'],$to_already_selected)) // $to_already_selected is the array containing the users (and groups) that are already selected
{
echo "<option value=\"USER:".$this_user['user_id']."\">",
"", api_get_person_name($this_user['firstname'], $this_user['lastname'])." (".$this_user['username'].")",
echo "<option value=\"USER:".$this_user['user_id']."\" title='".sprintf(get_lang('LoginX'), $this_user['username'])."'>",
"", api_get_person_name($this_user['firstname'], $this_user['lastname']),
"</option>";
}
}
@ -664,7 +664,7 @@ class AnnouncementManager {
} else {
foreach($ref_array_users as $key=>$value){
if($value['user_id']==$id){
echo "<option value=\"".$groupuser."\">".api_get_person_name($value['firstname'], $value['lastname'])." (".$value['username'].")</option>";
echo "<option value=\"".$groupuser."\" title='".sprintf(get_lang('LoginX'), $value['username'])."'>".api_get_person_name($value['firstname'], $value['lastname'])."</option>";
break;
}
}
@ -688,8 +688,8 @@ class AnnouncementManager {
foreach($ref_array_users as $this_user) {
if (!is_array($to_already_selected) || !in_array("USER:".$this_user['user_id'],$to_already_selected)) // $to_already_selected is the array containing the users (and groups) that are already selected
{
echo "<option value=\"USER:",$this_user['user_id'],"\">",
"", api_get_person_name($this_user['firstname'], $this_user['lastname'])." (".$this_user['username'].")",
echo "<option value=\"USER:",$this_user['user_id'],"\" title='".sprintf(get_lang('LoginX'), $user['username'])."'>",
"", api_get_person_name($this_user['firstname'], $this_user['lastname']),
"</option>";
}
}
@ -991,7 +991,7 @@ class AnnouncementManager {
if (is_array($sent_to_array['users'])) {
foreach ($sent_to_array['users'] as $user_id) {
$user_info = api_get_user_info($user_id);
$output[] = api_get_person_name($user_info['firstname'], $user_info['lastname'])." (".$user_info['username'].")";
$output[] = '<span title="'.sprintf(get_lang('LoginX'), $user_info).'"'.api_get_person_name($user_info['firstname'], $user_info['lastname'])." (".$user_info['username'].")";
}
}
}

@ -1136,8 +1136,10 @@ if ($display_announcement_list) {
$title = Display::url($title.$attachment_icon, '?action=view&id='.$myrow['id']);
echo Display::tag('td', Security::remove_XSS($title), array('class' => $style));
$user_info = api_get_user_info($myrow['insert_user_id']);
echo Display::tag('td', api_get_person_name($user_info['firstName'], $user_info['lastName']).' ('.$user_info['username'].')');
$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));
// 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

Loading…
Cancel
Save