mirror of https://github.com/acanas/swad-core.git
Version 17.3.13
This commit is contained in:
parent
d1d6cb5790
commit
99e973588d
|
@ -252,13 +252,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 17.3.12 (2017-09-20)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 17.3.13 (2017-09-20)"
|
||||
#define CSS_FILE "swad17.0.css"
|
||||
#define JS_FILE "swad16.206.3.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 17.3.13: Sep 20, 2017 Links to add users to a project. Not finished. (230058 lines)
|
||||
Version 17.3.12: Sep 20, 2017 Code refactoring in listing of projects. (229977 lines)
|
||||
Version 17.3.11: Sep 20, 2017 Code refactoring in listing of projects. (229981 lines)
|
||||
Version 17.3.10: Sep 19, 2017 New row in listing of projects for students. (230009 lines)
|
||||
|
|
|
@ -1031,6 +1031,27 @@ const char *Hlp_ASSESSMENT_Projects_edit_project =
|
|||
"ASSESSMENT.Projects.en#edit-project";
|
||||
#endif
|
||||
|
||||
const char *Hlp_ASSESSMENT_Projects_add_user =
|
||||
#if L==1
|
||||
"ASSESSMENT.Projects.es#add-user"; // TODO: Link in Spanish
|
||||
#elif L==2
|
||||
"ASSESSMENT.Projects.en#add-user";
|
||||
#elif L==3
|
||||
"ASSESSMENT.Projects.en#add-user";
|
||||
#elif L==4
|
||||
"ASSESSMENT.Projects.es#add-user"; // TODO: Link in Spanish
|
||||
#elif L==5
|
||||
"ASSESSMENT.Projects.en#add-user";
|
||||
#elif L==6
|
||||
"ASSESSMENT.Projects.es#add-user"; // TODO: Link in Spanish
|
||||
#elif L==7
|
||||
"ASSESSMENT.Projects.en#add-user";
|
||||
#elif L==8
|
||||
"ASSESSMENT.Projects.en#add-user";
|
||||
#elif L==9
|
||||
"ASSESSMENT.Projects.en#add-user";
|
||||
#endif
|
||||
|
||||
const char *Hlp_ASSESSMENT_Tests =
|
||||
#if L==1
|
||||
"ASSESSMENT.Tests.es";
|
||||
|
|
|
@ -84,6 +84,8 @@ static void Prj_ShowOneProjectTxtRow (struct Project *Prj,bool PrintView,
|
|||
static void Prj_ShowOneProjectUsrsRow (const struct Project *Prj,bool PrintView,
|
||||
const char *Label,Prj_RoleInProject_t RoleInProject);
|
||||
static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject);
|
||||
static void Prj_ReqAnotherUsrID (Prj_RoleInProject_t RoleInProject);
|
||||
|
||||
static void Prj_GetParamPrjOrder (void);
|
||||
|
||||
static void Prj_PutFormsToRemEditOnePrj (long PrjCod,bool Hidden);
|
||||
|
@ -533,6 +535,7 @@ static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject)
|
|||
{
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_ROLES_PLURAL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Add_user;
|
||||
char Query[2048];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -545,6 +548,13 @@ static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject)
|
|||
bool UsrValid;
|
||||
bool ShowPhoto;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
Act_Action_t ActionReqAddUsr[Prj_NUM_ROLES_IN_PROJECT] =
|
||||
{
|
||||
ActUnk, // Prj_ROLE_UNK, Unknown
|
||||
ActReqMdfOneStd, // Prj_ROLE_STD, Student
|
||||
ActReqMdfOneTch, // Prj_ROLE_TUT, Tutor
|
||||
ActReqMdfOneOth, // Prj_ROLE_REV, Reviewer
|
||||
};
|
||||
|
||||
/***** Get number of users in project from database *****/
|
||||
sprintf (Query,"SELECT COUNT(*) FROM prj_usr"
|
||||
|
@ -565,12 +575,12 @@ static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject)
|
|||
NumUsrsKnown = (unsigned) DB_QuerySELECT (Query,&mysql_res,
|
||||
"can not get users in project");
|
||||
|
||||
/***** Start table *****/
|
||||
fprintf (Gbl.F.Out,"<table>");
|
||||
|
||||
/***** Check number of users *****/
|
||||
if (NumUsrs)
|
||||
{
|
||||
/***** Start table *****/
|
||||
fprintf (Gbl.F.Out,"<table>");
|
||||
|
||||
/***** How many users will be shown? *****/
|
||||
NumUsrsToShow = NumUsrsKnown;
|
||||
|
||||
|
@ -624,15 +634,52 @@ static void Prj_WriteUsrs (long PrjCod,Prj_RoleInProject_t RoleInProject)
|
|||
|
||||
/***** Free memory used for user's data *****/
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** End table *****/
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
}
|
||||
|
||||
/***** Row to add a new user *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td colspan=\"3\" class=\"LEFT_MIDDLE\">");
|
||||
Lay_PutContextualLink (ActionReqAddUsr[RoleInProject],NULL,NULL,
|
||||
"plus64x64.png",
|
||||
Txt_Add_user,Txt_Add_user,
|
||||
NULL);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** End table *****/
|
||||
fprintf (Gbl.F.Out,"</table>");
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****** Write a form to request another user's ID, @nickname or email ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_ReqAnotherUsrID (Prj_RoleInProject_t RoleInProject)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Projects_add_user;
|
||||
extern const char *Txt_Add_user;
|
||||
Act_Action_t ActionAddUsr[Prj_NUM_ROLES_IN_PROJECT] =
|
||||
{
|
||||
ActUnk, // Prj_ROLE_UNK, Unknown
|
||||
ActReqMdfOneStd, // Prj_ROLE_STD, Student
|
||||
ActReqMdfOneTch, // Prj_ROLE_TUT, Tutor
|
||||
ActReqMdfOneOth, // Prj_ROLE_REV, Reviewer
|
||||
};
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Add_user,NULL,
|
||||
Hlp_ASSESSMENT_Projects_add_user,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write form to request another user's ID *****/
|
||||
Enr_WriteFormToReqAnotherUsrID (ActionAddUsr[RoleInProject]);
|
||||
|
||||
/***** End box *****/
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Get parameter with the type or order in list of projects **********/
|
||||
/*****************************************************************************/
|
||||
|
|
27
swad_text.c
27
swad_text.c
|
@ -2908,6 +2908,27 @@ const char *Txt_Add_this_ID =
|
|||
"Adicionar este nº identif.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Add_user =
|
||||
#if L==1
|
||||
"Afegir usuari";
|
||||
#elif L==2
|
||||
"Fügen Benutzer";
|
||||
#elif L==3
|
||||
"Add user";
|
||||
#elif L==4
|
||||
"Añadir usuario";
|
||||
#elif L==5
|
||||
"Ajouter utilisateur";
|
||||
#elif L==6
|
||||
"Añadir usuario"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Aggiungere utente";
|
||||
#elif L==8
|
||||
"Dodaj użytkownika";
|
||||
#elif L==9
|
||||
"Adicionar usuário";
|
||||
#endif
|
||||
|
||||
const char *Txt_Announcement_created =
|
||||
#if L==1
|
||||
"Anunci creat.";
|
||||
|
@ -9003,13 +9024,13 @@ const char *Txt_Do_you_really_want_to_completely_eliminate_your_user_account =
|
|||
#if L==1
|
||||
"¿Realmente desea eliminar completamente su cuenta de usuario/a?"; // Necessita traduccio
|
||||
#elif L==2
|
||||
"Do you really want to completely eliminate your user account?"; // Need Übersetzung
|
||||
"Do you really want to completely eliminate your user account?"; // Need Übersetzung
|
||||
#elif L==3
|
||||
"Do you really want to completely eliminate your user account?";
|
||||
#elif L==4
|
||||
"¿Realmente desea eliminar completamente su cuenta de usuario/a?";
|
||||
#elif L==5
|
||||
"Do you really want to completely eliminate your user account?"; // Besoin de traduction
|
||||
"Do you really want to completely eliminate your user account?"; // Besoin de traduction
|
||||
#elif L==6
|
||||
"¿Realmente desea eliminar completamente su cuenta de usuario/a?"; // Okoteve traducción
|
||||
#elif L==7
|
||||
|
@ -9017,7 +9038,7 @@ const char *Txt_Do_you_really_want_to_completely_eliminate_your_user_account =
|
|||
#elif L==8
|
||||
"Czy na pewno chcesz, aby calkowicie wyeliminowac konta uzytkownika?";
|
||||
#elif L==9
|
||||
"Do you really want to completely eliminate your user account?"; // Necessita de tradução
|
||||
"Do you really want to completely eliminate your user account?"; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_Do_you_really_want_to_delete_all_messages_received_from_USER_X_from_COURSE_Y = // Warning: it is very important to include two %s in the following sentences
|
||||
|
|
Loading…
Reference in New Issue