Version 15.225.1

This commit is contained in:
Antonio Cañas Vargas 2016-06-14 23:52:22 +02:00
parent 5d584f8fad
commit 87da14688a
4 changed files with 57 additions and 12 deletions

View File

@ -120,7 +120,6 @@
// TODO: In social refreshing via AJAX, an error occurs when session expirates
// TODO: Messages in msg_content_deleted older than a certain time should be deleted to ensure the protection of personal data
// TODO: FIX BUG: A teacher uploads a document in course documents zone, then he/she unregister from course, then he/she search for his/her documents, a document is shown in results but he/she can not view it
// TODO: Teachers should have a button to report a student as probably duplicated. System admin should view a list of users reported and, for each of them, a small list with the possible duplicated (people with the same ID, the same name, etc.)
// TODO: Modify WS function getUsers changing: userRole to indicate all users, and a new parameter filter (search string (name, @nickname, mail)) to restring number of users
// TODO: Add a new WS function to count the nunmber of users to return in call to function getUsers
@ -129,13 +128,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.225 (2016-06-15)"
#define Log_PLATFORM_VERSION "SWAD 15.225.1 (2016-06-14)"
#define CSS_FILE "swad15.224.3.css"
#define JS_FILE "swad15.216.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
/*
Version 15.225.1: Jun 14, 2016 New option in user administration to report a user as possible duplicated. Not finished. (202468 lines)
Version 15.225: Jun 14, 2016 Removing a user's photo now requires confirmation. (202425 lines)
5 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1574','es','N','Preguntar si eliminar foto otro usr.');

View File

@ -865,6 +865,7 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
extern const char *Txt_Modify_user_in_the_course_X;
extern const char *Txt_Register_me_in_X;
extern const char *Txt_Register_USER_in_the_course_X;
extern const char *Txt_Report_possible_duplicate_user;
extern const char *Txt_Register_USER_as_an_administrator_of_the_degree_X;
extern const char *Txt_Register_USER_as_an_administrator_of_the_centre_X;
extern const char *Txt_Register_USER_as_an_administrator_of_the_institution_X;
@ -1005,6 +1006,22 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
}
}
/***** Report user as possible duplicate *****/
if (!ItsMe && Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER)
{
fprintf (Gbl.F.Out,"<li>"
"<input type=\"radio\" name=\"RegRemAction\" value=\"%u\"",
(unsigned) Enr_REPORT_USR_AS_POSSIBLE_DUPLICATE);
if (!OptionChecked)
{
fprintf (Gbl.F.Out," checked=\"checked\"");
OptionChecked = true;
}
fprintf (Gbl.F.Out," />%s</li>",Txt_Report_possible_duplicate_user);
NumOptionsShown++;
}
/***** Remove user from the course *****/
if (UsrBelongsToCrs)
{
@ -3730,6 +3747,12 @@ void Enr_ModifyUsr (void)
else
Error = true;
break;
case Enr_REPORT_USR_AS_POSSIBLE_DUPLICATE:
if (!ItsMe && Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER)
Lay_ShowAlert (Lay_INFO,"Option under development."); // TODO: Program this!
else
Error = true;
break;
case Enr_REMOVE_ONE_USR_FROM_CRS:
if (ItsMe || Gbl.Usrs.Me.LoggedRole >= Rol_TEACHER)
Enr_ReqRemUsrFromCrs ();

View File

@ -49,18 +49,19 @@ typedef enum
Enr_SET_ACCEPTED_TO_TRUE,
} Enr_KeepOrSetAccepted_t;
#define Enr_NUM_ACTIONS_REG_REM_ONE_USR 9
#define Enr_NUM_ACTIONS_REG_REM_ONE_USR 10
typedef enum
{
Enr_REGISTER_MODIFY_ONE_USR_IN_CRS = 0,
Enr_REGISTER_ONE_DEGREE_ADMIN = 1,
Enr_REGISTER_ONE_CENTRE_ADMIN = 2,
Enr_REGISTER_ONE_INSTITUTION_ADMIN = 3,
Enr_REMOVE_ONE_USR_FROM_CRS = 4,
Enr_REMOVE_ONE_DEGREE_ADMIN = 5,
Enr_REMOVE_ONE_CENTRE_ADMIN = 6,
Enr_REMOVE_ONE_INSTITUTION_ADMIN = 7,
Enr_ELIMINATE_ONE_USR_FROM_PLATFORM = 8,
Enr_REGISTER_MODIFY_ONE_USR_IN_CRS = 0,
Enr_REGISTER_ONE_DEGREE_ADMIN = 1,
Enr_REGISTER_ONE_CENTRE_ADMIN = 2,
Enr_REGISTER_ONE_INSTITUTION_ADMIN = 3,
Enr_REPORT_USR_AS_POSSIBLE_DUPLICATE = 4,
Enr_REMOVE_ONE_USR_FROM_CRS = 5,
Enr_REMOVE_ONE_DEGREE_ADMIN = 6,
Enr_REMOVE_ONE_CENTRE_ADMIN = 7,
Enr_REMOVE_ONE_INSTITUTION_ADMIN = 8,
Enr_ELIMINATE_ONE_USR_FROM_PLATFORM = 9,
} Enr_RegRemOneUsrAction_t;
/*****************************************************************************/

View File

@ -30923,6 +30923,27 @@ const char *Txt_Reply_message = // "Reply" as a noun, not as a verb
"Mensagem de resposta";
#endif
const char *Txt_Report_possible_duplicate_user =
#if L==1
"Informar possible usuari duplicat";
#elif L==2
"Melden Sie die doppelte Benutzer";
#elif L==3
"Report possible duplicate user";
#elif L==4
"Informar de posible usuario duplicado";
#elif L==5
"Signaler possible utilisateur en double";
#elif L==6
"Informar de posible usuario duplicado"; // Okoteve traducción
#elif L==7
"Segnalare eventuali utente duplicato";
#elif L==8
"Zg&lstrok;o&sacute; mo&zdot;liwy duplikat u&zdot;ytkownika";
#elif L==9
"Denunciar poss&iacute;vel usu&aacute;rio duplicado";
#endif
const char *Txt_Requester =
#if L==1
"Sol&middot;licitant";