skala
Julio Montoya 14 years ago
commit ec0779b720
  1. 2
      main/document/showinframes.php
  2. 2
      main/document/slideshow.php
  3. 15
      main/inc/lib/course.lib.php
  4. 5
      main/inc/lib/message.lib.php
  5. 16
      main/inc/lib/online.inc.php
  6. 19
      main/inc/lib/sortabletable.class.php
  7. 2
      main/inc/lib/usermanager.lib.php
  8. 4
      main/lang/spanish/admin.inc.php
  9. 8
      main/lang/spanish/userInfo.inc.php
  10. 12
      main/lang/spanish/work.inc.php
  11. 8
      main/messages/new_message.php
  12. 37
      main/user/user.php
  13. 16
      main/user/userInfo.php
  14. 9
      whoisonline.php

@ -126,7 +126,7 @@ $htmlHeadXtra[] = '<script type="text/javascript">
HeaderHeight = document.getElementById("header").offsetHeight;
FooterHeight = document.getElementById("footer").offsetHeight;
docHeight = document.body.clientHeight;
document.getElementById("mainFrame").style.height = ((docHeight-(parseInt(HeaderHeight)+parseInt(FooterHeight)))-60)+"px";
document.getElementById("mainFrame").style.height = ((docHeight-(parseInt(HeaderHeight)+parseInt(FooterHeight)))+60)+"px";
};
// Fixes the content height of the frame

@ -135,7 +135,7 @@ if ($slide_id != 'all') {
}
// Exit the slideshow
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png').get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>&nbsp;';
echo '<a href="document.php?action=exit_slideshow&curdirpath='.$pathurl.'">'.Display::return_icon('back.png',get_lang('BackTo').' '.get_lang('DocumentsOverview')).get_lang('BackTo').' '.get_lang('DocumentsOverview').'</a>&nbsp;';
// Show thumbnails
if ($slide_id != 'all') {

@ -970,7 +970,7 @@ class CourseManager {
* @return array
*/
public static function get_user_list_from_course_code($course_code, $with_session = true, $session_id = 0, $limit = '', $order_by = '') {
global $_configuration;
// variable initialisation
$session_id = intval($session_id);
$users = array();
@ -1008,11 +1008,20 @@ class CourseManager {
AND course_rel_user.course_code="'.$course_code.'"';
$where[] = ' course_rel_user.course_code IS NOT NULL ';
}
if ($_configuration['multiple_access_urls']) {
$sql .= ' LEFT JOIN '.Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER).' au ON (au.user_id = user.user_id) ';
}
$sql .= ' WHERE '.implode(' OR ', $where);
if ($_configuration['multiple_access_urls']) {
$current_access_url_id = api_get_current_access_url_id();
$sql .= " AND (access_url_id = $current_access_url_id ) ";
}
$sql .= ' '.$order_by.' '.$limit;
$rs = Database::query($sql);
while ($user = Database::fetch_array($rs)) {

@ -296,8 +296,9 @@ class MessageManager
}
}
return $result;
}
return false;
} else {
return get_lang('UserDoesNotExist');
}
}
/**

@ -138,14 +138,7 @@ function who_is_online($valid, $friends = false) {
//$query = "SELECT login_user_id,login_date FROM ".$track_online_table ." WHERE DATE_ADD(login_date,INTERVAL $valid MINUTE) >= '".$current_date."' "; //WHERE DATE_ADD(login_date,INTERVAL $valid MINUTE) >= '".$current_date."'
$query = "SELECT login_user_id,login_date FROM ".$track_online_table ." e INNER JOIN ".$table_user ." u ON (u.user_id=e.login_user_id) WHERE DATE_ADD(login_date,INTERVAL $valid MINUTE) >= '".$current_date."' ORDER BY picture_uri DESC";
}
/*
//This query will show all registered users. Only for dev purposes.
$query = "SELECT DISTINCT u.user_id as login_user_id, login_date
FROM ".$track_online_table ." e , $table_user u
GROUP by u.user_id ORDER BY picture_uri DESC";
}*/
global $_configuration;
if ($_configuration['multiple_access_urls']) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
@ -164,7 +157,12 @@ function who_is_online($valid, $friends = false) {
}
}
}
/*
//This query will show all registered users. Only for dev purposes.
$query = "SELECT DISTINCT u.user_id as login_user_id, login_date
FROM ".$track_online_table ." e , $table_user u
GROUP by u.user_id ORDER BY picture_uri DESC";
*/
$result = @Database::query($query);
//@todo why we dont believe in db query results?
if (count($result)>0) {

@ -310,17 +310,22 @@ class SortableTable extends HTML_Table {
.grid_selectbox { width:30%; float:left;}
.grid_title { width:30%; float:left;}
.grid_nav { }
</style>';
// @todo This also must be moved
// Show only navigations if there are more than 1 page
$my_pager = $this->get_pager();
$html .= '<div class="main-grid">';
$html .= '<div class="sub-header">';
$html .= '<div class="grid_selectbox">'.$form.'</div>';
$html .= '<div class="grid_title">'.$this->get_table_title().'</div>';
$html .= '<div class="grid_nav">'.$nav.'</div>';
$html .= '</div>';
if ($my_pager->numPages() > 1) {
$html .= '<div class="sub-header">';
$html .= '<div class="grid_selectbox">'.$form.'</div>';
$html .= '<div class="grid_title">'.$this->get_table_title().'</div>';
$html .= '<div class="grid_nav">'.$nav.'</div>';
$html .= '</div>';
}
$html .= '<div class="clear"></div>';
if (count($this->form_actions) > 0) {

@ -2786,7 +2786,7 @@ class UserManager
<div id="search_label">
<b>'.get_lang('Search').'</b > ('.get_lang('UsersGroups').')
<div>
<input type="text" size="30" value="'.Security::remove_XSS($query).'" name="q"/><br />
<input type="text" size="30" value="'.Security::remove_XSS($query).'" name="q"/> &nbsp;
<button class="search" type="submit" value="search">'.get_lang('Search').'</button>
</div>
</td>

@ -1254,8 +1254,8 @@ $Social = "Social";
$BackupCreated = "Copia de seguridad generada";
$NotInserted = "No insertado";
$phone = "Teléfono";
$ResetLP = "Reestablecer ruta de aprendizaje";
$LPWasReset = "La ruta de aprendizaje fue reestablecida para el estudiante";
$ResetLP = "Restablecer secuencia de aprendizaje";
$LPWasReset = "La secuencia de aprendizaje fue restablecida para el alumno";
$AnnouncementVisible = "Anuncio visible";
$AnnouncementInvisible = "Anuncio invisible";
$GlossaryDeleted = "Glosario borrado";

@ -137,8 +137,8 @@ $DeleteModerator = "Dar de baja como moderador";
$UserChangeToModerator = "Usuario convertido en moderador";
$IamAModerator = "Moderador";
$ThisIsACloseGroup = "Grupo privado";
$IamAReader = "Usuario estándard";
$UserChangeToReader = "Usuario convertido en usuario estándard";
$IamAReader = "Usuario base";
$UserChangeToReader = "Usuario convertido en miembro base";
$AddModerator = "Agregar como moderador";
$UserDeleted = "Los usuarios seleccionados han sido dados de baja en el grupo";
$JoinGroup = "Unirse al grupo";
@ -179,7 +179,7 @@ $UserAdded = "El usuario ha sido añadido";
$FilesSizeExceedsX = "Tamaña del archivo excedido";
$YouShouldWriteASubject = "Debe escribir el asunto";
$Topics = "Temas";
$StatusInThisGroup = "Mi función en el grupo";
$StatusInThisGroup = "Mi estatus en el grupo";
$FriendsOnline = "Amigos en línea";
$GroupDescription = "Descripción del grupo";
$MyProductions = "Mis producciones";
@ -188,7 +188,7 @@ $ClickHereToSeeMessageGroup = "Clic aquí para ver el mensaje de grupo";
$OrCopyPasteTheFollowingUrl = "o copie y pegue la siguiente url:";
$ThereIsANewMessageInTheGroupX = "Hay un nuevo mensaje en el grupo %s";
$UserIsAlreadySubscribedToThisGroup = "El usuario ya pertenece a este grupo";
$AddNormalUser = "Agregar como un usuario estándard";
$AddNormalUser = "Agregar como usuario base";
$DenyEntry = "Denegar la entrada";
$YouNeedToHaveFriendsInYourSocialNetwork = "Necesita tener amigos en su red social";
$SeeAllMyGroups = "Ver todos mis grupos";

@ -18,7 +18,7 @@ $langWorkConfirmDelete = "¿ Seguro que quiere eliminar este archivo ?";
$langAllFiles = "Todos los archivos";
$lang_default_upload = "Configuración de visibilidad por defecto para los documentos que se envíen";
$lang_new_visible = "Los documentos serán visibles por todos los usuarios";
$lang_new_unvisible = "Los documentos sólo serán visibles por el profesor(es)";
$lang_new_unvisible = "Los documentos sólo serán visibles por los profesores";
$lang_doc_unvisible = "Este documento sólo es visible por el profesor (es).";
$langDelLk = "¿ Está seguro de querer desactivar esta herramienta ?";
$langMustBeRegisteredUser = "Sólo los usuarios inscritos en este curso pueden enviar sus tareas";
@ -36,7 +36,7 @@ $ValidateChanges = "Confirmar los cambios";
$FolderUpdated = "Folder actualizado";
$EndsAt = "Acaba en (cerrado completamente)";
$QualificationOfAssignment = "Calificación de la tarea";
$MakeQualifiable = "Permitir calificar en la herramienta de Evaluaciones";
$MakeQualifiable = "Permitir calificar en la herramienta de evaluaciones";
$QualificationNumberOver = "Calificación sobre";
$WeightInTheGradebook = "Ponderación en el promedio de la evaluación";
$DatesAvailables = "Fechas disponibles";
@ -51,7 +51,7 @@ $EnableEndDate = "Activar fecha de finalización";
$IsNotPosibleSaveTheDocument = "La tarea no ha podido ser enviada";
$EndDateCannotBeBeforeTheExpireDate = "La fecha de finalización no puede ser anterior a la fecha de vencimiento";
$SelectAFilter = "Seleccionar filtro";
$FilterByNotExpired = "Filtrar por no vencidas";
$FilterByNotExpired = "Filtrar por No vencidas";
$FilterAssignments = "Filtrar tareas";
$WeightNecessary = "Peso necesario";
$QualificationOver = "Calificación sobre";
@ -71,7 +71,7 @@ $ButtonCreateAssignment = "Crear tarea";
$AssignmentName = "Nombre de la tarea";
$CreateAssignment = "Crear una tarea";
$FolderEdited = "Tarea modificada";
$UpdateWork = "Actualizar la tarea";
$UpdateWork = "Modificar";
$MakeAllPapersInvisible = "Ocultar todos los documentos";
$MakeAllPapersVisible = "Hacer todos los documentos visibles";
$TheDocumentHasBeenDeleted = "El documento ha sido borrado.";
@ -83,10 +83,10 @@ $ReminderToSubmitPendingTask = "Se le recuerda que tiene una tarea pendiente";
$MessageConfirmSendingOfTask = "Este es un mensaje para confirmar el envío de su tarea";
$DataSent = "Fecha de envío";
$DownloadLink = "Enlace de descarga";
$ViewUsersWithTask = "Ya presentaron la tarea";
$ViewUsersWithTask = "Ver alumnos que han enviado la tarea";
$ReminderMessage = "Enviar un recordatorio";
$DateSent = "Fecha de envío";
$ViewUsersWithoutTask = "Faltan presentar la tarea";
$ViewUsersWithoutTask = "Ver alumnos que no han enviado la tarea";
$HomeworkCreated = "La tarea ha sido creada";
$HomeworkHasBeenCreatedForTheCourse = "Se ha creado una nueva tarea en el curso";
$PleaseCheckHomeworkPage = "Por favor, consulte la página de tareas.";

@ -15,7 +15,7 @@
*/
/* INIT SECTION */
// name of the language file that needs to be included
$language_file= array('messages','userInfo');
$language_file= array('messages','userInfo', 'admin');
$cidReset = true;
require_once '../inc/global.inc.php';
@ -224,6 +224,7 @@ function manage_form ($default, $select_from_user_list = null) {
if ($form->validate()) {
$check = Security::check_token('post');
if ($check) {
$values = $default;
$user_list = $values['users'];
@ -233,11 +234,12 @@ function manage_form ($default, $select_from_user_list = null) {
$group_id = $values['group_id'];
$parent_id = $values['parent_id'];
if (is_array($user_list) && count($user_list)> 0) {
//all is well, send the message
foreach ($user_list as $user) {
$res = MessageManager::send_message($user, $title, $content, $_FILES, $file_comments, $group_id, $parent_id);
if ($res) {
if (is_string($res)) {
Display::display_error_message($res);
@ -246,6 +248,8 @@ function manage_form ($default, $select_from_user_list = null) {
}
}
}
} else {
Display::display_error_message('ErrorSendingMessage');
}
}
Security::clear_token();

@ -41,6 +41,8 @@ require_once api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
global $_configuration;
//CHECK KEYS
if (!isset ($_cid)) {
header('location: '.api_get_path(WEB_PATH));
@ -91,20 +93,34 @@ if (api_is_allowed_to_edit(null, true)) {
$data = array();
$a_users = array();
if ($_configuration['multiple_access_urls']) {
$current_access_url_id = api_get_current_access_url_id();
}
// users subscribed to the course through a session
if (api_get_setting('use_session_mode') == 'true') {
$session_id = intval($_SESSION['id_session']);
$table_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
$sql_query = "SELECT DISTINCT user.user_id, ".($is_western_name_order ? "user.firstname, user.lastname" : "user.lastname, user.firstname").", user.email, user.official_code
FROM $table_session_course_user as session_course_user, $table_users as user
WHERE `course_code` = '$currentCourseID' AND session_course_user.id_user = user.user_id ";
FROM $table_session_course_user as session_course_user, $table_users as user ";
if ($_configuration['multiple_access_urls']) {
$sql_query .= ' , '.Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER).' au ';
}
$sql_query .="WHERE course_code = '$currentCourseID' AND session_course_user.id_user = user.user_id ";
if ($session_id != 0) {
$sql_query .= ' AND id_session = '.$session_id;
}
}
if ($_configuration['multiple_access_urls']) {
$sql_query .= " AND user.user_id = au.user_id AND access_url_id = $current_access_url_id ";
}
$sql_query .= $sort_by_first_name ? ' ORDER BY user.firstname, user.lastname' : ' ORDER BY user.lastname, user.firstname';
$rs = Database::query($sql_query);
while ($user = Database:: fetch_array($rs, 'ASSOC')) {
$data[] = $user;
//$user_infos = Database :: get_user_info_from_id($user['user_id']);
@ -116,7 +132,17 @@ if (api_is_allowed_to_edit(null, true)) {
// users directly subscribed to the course
$table_course_user = Database :: get_main_table(TABLE_MAIN_COURSE_USER);
$sql_query = "SELECT DISTINCT user.user_id, ".($is_western_name_order ? "user.firstname, user.lastname" : "user.lastname, user.firstname").", user.email, user.official_code
FROM $table_course_user as course_user, $table_users as user WHERE `course_code` = '$currentCourseID' AND course_user.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND course_user.user_id = user.user_id ".($sort_by_first_name ? "ORDER BY user.firstname, user.lastname" : "ORDER BY user.lastname, user.firstname");
FROM $table_course_user as course_user, $table_users as user";
if ($_configuration['multiple_access_urls']) {
$sql_query .= ' , '.Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER).' au ';
}
$sql_query .= "WHERE course_code = '$currentCourseID' AND course_user.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND course_user.user_id = user.user_id ";
if ($_configuration['multiple_access_urls']) {
$sql_query .= " AND user.user_id = au.user_id AND access_url_id = $current_access_url_id ";
}
$sql_query .= ($sort_by_first_name ? "ORDER BY user.firstname, user.lastname" : "ORDER BY user.lastname, user.firstname");
$rs = Database::query($sql_query);
while ($user = Database::fetch_array($rs, 'ASSOC')) {
$data[] = $user;
@ -270,6 +296,7 @@ if ($origin != 'learnpath') {
$tool_name = get_lang('SearchResults');
} else {
$tool_name = get_lang('Users');
$origin = 'users';
}
Display::display_header($tool_name, "User");
} else {

@ -59,6 +59,7 @@ if ($tool_info['visibility'] == 1 ) {
if ($origin != 'learnpath')
{ //so we are not in learnpath tool
Display :: display_header($nameTools, "User");
$origin = Security::remove_XSS($_GET['origin']);
}
else
{
@ -238,7 +239,13 @@ if ($allowedToEditContent) {
if (api_is_allowed_to_edit(null, true)) {
echo '<div class="actions">';
echo '<a href="user.php?'.api_get_cidreq().'&amp;origin='.$origin.'">'.Display::return_icon('back.png',get_lang('BackUser')).get_lang('BackUser').'</a>';
if($origin=='users'){
echo '<a href="user.php?'.api_get_cidreq().'&amp;origin='.$origin.'">'.Display::return_icon('back.png',get_lang('BackUser')).get_lang('BackUser').'</a>';
}
else{
echo '<a href="javascript:history.back(1)">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
}
if (!is_numeric($_GET['editMainUserInfo'])) {
if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') {
echo '<a href="userInfo.php?'.api_get_cidreq().'&amp;origin='.$origin.'&amp;editMainUserInfo='.$userIdViewed.'">'.Display::return_icon('edit.gif',get_lang('EditUser')).get_lang('EditUser').'</a>';
@ -253,7 +260,12 @@ if (api_is_allowed_to_edit(null, true)) {
} else {
if ($tool_info['visibility'] == 1 ) {
echo '<div class="actions">';
echo '<a href="user.php?'.api_get_cidreq().'&amp;origin='.$origin.'">'.Display::return_icon('back.png',get_lang('BackUser')).get_lang('BackUser').'</a>';
if($origin=='users'){
echo '<a href="user.php?'.api_get_cidreq().'&amp;origin='.$origin.'">'.Display::return_icon('back.png',get_lang('BackUser')).get_lang('BackUser').'</a>';
}
else{
echo '<a href="javascript:history.back(1)">'.Display::return_icon('back.png',get_lang('Back')).get_lang('Back').'</a>';
}
echo '</div>';
}
}

@ -148,13 +148,20 @@ if ((api_get_setting('showonline', 'world') == 'true' && !$_user['user_id']) ||
if (!isset($_GET['id'])) {
if (api_get_setting('allow_social_tool') == 'true') {
echo '<div id="social-content-right">';
echo '<div class="social-box-container2">';
//this include the social menu div
if (!api_is_anonymous()) {
echo UserManager::get_search_form($_GET['q']);
}
}
SocialManager::display_user_list($user_list);
echo '</div>';
if (api_get_setting('allow_social_tool') == 'true') {
echo '</div>';
echo '</div>';
}
} else {
//individual user information - also displays header info
SocialManager::display_individual_user(Security::remove_XSS($_GET['id']));

Loading…
Cancel
Save