mirror of https://github.com/acanas/swad-core.git
Version 17.5
This commit is contained in:
parent
c8d62fe570
commit
ffe019a50a
|
@ -252,13 +252,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 17.4.3 (2017-09-21)"
|
#define Log_PLATFORM_VERSION "SWAD 17.5 (2017-09-21)"
|
||||||
#define CSS_FILE "swad17.0.css"
|
#define CSS_FILE "swad17.0.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 17.5: Sep 21, 2017 Users can be added to a project. (230250 lines)
|
||||||
Version 17.4.3: Sep 21, 2017 Changes in listing and edition of projects. (230222 lines)
|
Version 17.4.3: Sep 21, 2017 Changes in listing and edition of projects. (230222 lines)
|
||||||
Version 17.4.2: Sep 20, 2017 Changes in listing and edition of projects. (230203 lines)
|
Version 17.4.2: Sep 20, 2017 Changes in listing and edition of projects. (230203 lines)
|
||||||
Version 17.4.1: Sep 20, 2017 Changes adding users to a project. Not finished. (230141 lines)
|
Version 17.4.1: Sep 20, 2017 Changes adding users to a project. Not finished. (230141 lines)
|
||||||
|
|
|
@ -743,12 +743,63 @@ void Prj_AddRev (void)
|
||||||
|
|
||||||
static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
|
static void Prj_AddUsrToProject (Prj_RoleInProject_t RoleInProject)
|
||||||
{
|
{
|
||||||
|
extern const char *Txt_THE_USER_X_has_been_enroled_in_the_project;
|
||||||
|
extern const char *Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z;
|
||||||
|
extern const char *Txt_User_not_found_or_you_do_not_have_permission_;
|
||||||
|
long PrjCod;
|
||||||
|
struct ListUsrCods ListUsrCods;
|
||||||
|
unsigned NumUsr;
|
||||||
|
char Query[512];
|
||||||
|
|
||||||
/***** Get project code *****/
|
/***** Get project code *****/
|
||||||
if ((Gbl.Prjs.PrjCodToEdit = Prj_GetParamPrjCod ()) == -1L)
|
if ((PrjCod = Prj_GetParamPrjCod ()) == -1L)
|
||||||
Lay_ShowErrorAndExit ("Code of project is missing.");
|
Lay_ShowErrorAndExit ("Code of project is missing.");
|
||||||
|
|
||||||
if (RoleInProject != Prj_ROLE_UNK) // TODO: Remove
|
/***** Use user's ID to identify the user(s) to be enroled /removed *****/
|
||||||
Ale_ShowAlert (Ale_WARNING,"Not yet implemented.");
|
Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (&ListUsrCods);
|
||||||
|
|
||||||
|
if (ListUsrCods.NumUsrs) // User(s) found with the ID
|
||||||
|
{
|
||||||
|
/***** For each user found... *****/
|
||||||
|
for (NumUsr = 0;
|
||||||
|
NumUsr < ListUsrCods.NumUsrs;
|
||||||
|
NumUsr++)
|
||||||
|
{
|
||||||
|
/* Get user's data */
|
||||||
|
Gbl.Usrs.Other.UsrDat.UsrCod = ListUsrCods.Lst[NumUsr];
|
||||||
|
Usr_GetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||||
|
|
||||||
|
/* Check if this user belongs to the current course */
|
||||||
|
if (Usr_CheckIfUsrBelongsToCurrentCrs (&Gbl.Usrs.Other.UsrDat))
|
||||||
|
{
|
||||||
|
/***** Add user to project *****/
|
||||||
|
sprintf (Query,"REPLACE INTO prj_usr"
|
||||||
|
" (PrjCod,RoleInProject,UsrCod)"
|
||||||
|
" VALUES"
|
||||||
|
" (%ld,%u,%ld)",
|
||||||
|
PrjCod,(unsigned) RoleInProject,Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||||
|
DB_QueryREPLACE (Query,"can not add user to project");
|
||||||
|
|
||||||
|
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_has_been_enroled_in_the_project,
|
||||||
|
Gbl.Usrs.Other.UsrDat.FullName);
|
||||||
|
Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt);
|
||||||
|
}
|
||||||
|
else // User does not belong to the current course
|
||||||
|
{
|
||||||
|
sprintf (Gbl.Alert.Txt,Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_course_Z,
|
||||||
|
Gbl.Usrs.Other.UsrDat.FullName,Cfg_PLATFORM_SHORT_NAME,Gbl.CurrentCrs.Crs.FullName);
|
||||||
|
Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** Free list of users' codes *****/
|
||||||
|
Usr_FreeListUsrCods (&ListUsrCods);
|
||||||
|
}
|
||||||
|
else // No users found
|
||||||
|
Ale_ShowAlert (Ale_WARNING,Txt_User_not_found_or_you_do_not_have_permission_);
|
||||||
|
|
||||||
|
/***** Put form to edit project again *****/
|
||||||
|
Prj_RequestCreatOrEditPrj (PrjCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
62
swad_text.c
62
swad_text.c
|
@ -47504,6 +47504,27 @@ const char *Txt_THE_USER_X_already_exists_in_Y_but_is_not_yet_enroled_in_the_cou
|
||||||
" in the course <strong>%s</strong>."; // Necessita de tradução
|
" in the course <strong>%s</strong>."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_THE_USER_X_has_been_enroled_in_the_project = // Warning: it is very important to include %s in the following sentences
|
||||||
|
#if L==1
|
||||||
|
"<strong>%s</strong> ha estat afegit/da al projecte.";
|
||||||
|
#elif L==2
|
||||||
|
"<strong>%s</strong> hat sich im Projekt eingeschrieben.";
|
||||||
|
#elif L==3
|
||||||
|
"<strong>%s</strong> has been enroled in the project.";
|
||||||
|
#elif L==4
|
||||||
|
"<strong>%s</strong> ha sido añadido/a al proyecto.";
|
||||||
|
#elif L==5
|
||||||
|
"<strong>%s</strong> a été inscrit dans le projet.";
|
||||||
|
#elif L==6
|
||||||
|
"<strong>%s</strong> ha sido añadido/a al proyecto."; // Okoteve traducción
|
||||||
|
#elif L==7
|
||||||
|
"<strong>%s</strong> è stato registrato/a nel progetto.";
|
||||||
|
#elif L==8
|
||||||
|
"<strong>%s</strong> został zapisany do projektu.";
|
||||||
|
#elif L==9
|
||||||
|
"<strong>%s</strong> foi matriculado/a no projeto.";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y = // Warning: it is very important to include two %s in the following sentences
|
const char *Txt_THE_USER_X_has_been_enroled_as_administrator_of_Y = // Warning: it is very important to include two %s in the following sentences
|
||||||
#if L==1
|
#if L==1
|
||||||
"<strong>%s</strong> ha sido inscrito/a"
|
"<strong>%s</strong> ha sido inscrito/a"
|
||||||
|
@ -47539,7 +47560,7 @@ const char *Txt_THE_USER_X_has_been_enroled_in_the_course_Y = // Warning: it is
|
||||||
"<strong>%s</strong> ha estat afegit/da"
|
"<strong>%s</strong> ha estat afegit/da"
|
||||||
" a l'assignatura <strong>%s</strong>.";
|
" a l'assignatura <strong>%s</strong>.";
|
||||||
#elif L==2
|
#elif L==2
|
||||||
"<strong>%s</strong> hat sich im"
|
"<strong>%s</strong> hat sich"
|
||||||
" im Kurs <strong>%s</strong> eingeschrieben.";
|
" im Kurs <strong>%s</strong> eingeschrieben.";
|
||||||
#elif L==3
|
#elif L==3
|
||||||
"<strong>%s</strong> has been enroled"
|
"<strong>%s</strong> has been enroled"
|
||||||
|
@ -48575,45 +48596,6 @@ const char *Txt_There_is_no_user_with_ID_nick_or_email_X = // Warning: it is ver
|
||||||
" with ID, nick or email <strong>%s</strong>."; // Necessita de tradução
|
" with ID, nick or email <strong>%s</strong>."; // Necessita de tradução
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *Txt_There_is_no_user_with_ID_nick_or_e_mail_X_in_the_course_Y = // Warning: it is very important to include two %s in the following sentences
|
|
||||||
#if L==1
|
|
||||||
"No existe ningún usuario"
|
|
||||||
" con ID (DNI/cédula), apodo o correo <strong>%s</strong>"
|
|
||||||
" en la asignatura <strong>%s</strong>."; // Necessita traduccio
|
|
||||||
#elif L==2
|
|
||||||
"There is no user"
|
|
||||||
" with ID, nick or email <strong>%s</strong>"
|
|
||||||
" in the course <strong>%s</strong>."; // Übersetzung notwendig
|
|
||||||
#elif L==3
|
|
||||||
"There is no user"
|
|
||||||
" with ID, nick or email <strong>%s</strong>"
|
|
||||||
" in the course <strong>%s</strong>.";
|
|
||||||
#elif L==4
|
|
||||||
"No existe ningún usuario"
|
|
||||||
" con ID (DNI/cédula), apodo o correo <strong>%s</strong>"
|
|
||||||
" en la asignatura <strong>%s</strong>.";
|
|
||||||
#elif L==5
|
|
||||||
"There is no user"
|
|
||||||
" with ID, nick or email <strong>%s</strong>"
|
|
||||||
" in the course <strong>%s</strong>."; // Besoin de traduction
|
|
||||||
#elif L==6
|
|
||||||
"No existe ningún usuario"
|
|
||||||
" con ID (DNI/cédula), apodo o correo <strong>%s</strong>"
|
|
||||||
" en la asignatura <strong>%s</strong>."; // Okoteve traducción
|
|
||||||
#elif L==7
|
|
||||||
"Non c'è alcun utente"
|
|
||||||
" con ID, nome utente o email <strong>%s</strong>"
|
|
||||||
" nel corso <strong>%s</strong>.";
|
|
||||||
#elif L==8
|
|
||||||
"There is no user"
|
|
||||||
" with ID, nick or email <strong>%s</strong>"
|
|
||||||
" in the course <strong>%s</strong>."; // Potrzebujesz tlumaczenie
|
|
||||||
#elif L==9
|
|
||||||
"There is no user"
|
|
||||||
" with ID, nick or email <strong>%s</strong>"
|
|
||||||
" in the course <strong>%s</strong>."; // Necessita de tradução
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const char *Txt_There_is_no_user_with_nickname_X = // Warning: it is very important to include %s in the following sentences
|
const char *Txt_There_is_no_user_with_nickname_X = // Warning: it is very important to include %s in the following sentences
|
||||||
#if L==1
|
#if L==1
|
||||||
"No existe ningún usuario"
|
"No existe ningún usuario"
|
||||||
|
|
Loading…
Reference in New Issue