Version 18.1.4

This commit is contained in:
Antonio Cañas Vargas 2018-10-07 18:07:01 +02:00
parent 85cf1a28c0
commit e2844345f1
8 changed files with 65 additions and 77 deletions

View File

@ -355,10 +355,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.1.3 (2018-10-07)" #define Log_PLATFORM_VERSION "SWAD 18.1.4 (2018-10-07)"
#define CSS_FILE "swad17.25.4.css" #define CSS_FILE "swad17.25.4.css"
#define JS_FILE "swad17.17.1.js" #define JS_FILE "swad17.17.1.js"
/* /*
Version 18.1.4: Oct 07, 2018 Icon to change user's photo is moved to record card. (234955 lines)
Version 18.1.3: Oct 07, 2018 Changes in statistic graphs. (234965 lines) Version 18.1.3: Oct 07, 2018 Changes in statistic graphs. (234965 lines)
Version 18.1.2: Oct 07, 2018 Changes in statistic graphs. (234964 lines) Version 18.1.2: Oct 07, 2018 Changes in statistic graphs. (234964 lines)
Version 18.1.1: Oct 07, 2018 New colors in statistic graphs. (234963 lines) Version 18.1.1: Oct 07, 2018 New colors in statistic graphs. (234963 lines)

View File

@ -972,8 +972,8 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
extern const char *Txt_Register_USER_as_an_administrator_of_the_degree_X; 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_centre_X;
extern const char *Txt_Register_USER_as_an_administrator_of_the_institution_X; extern const char *Txt_Register_USER_as_an_administrator_of_the_institution_X;
extern const char *Txt_Remove_me_from_the_course_X; extern const char *Txt_Remove_me_from_THE_COURSE_X;
extern const char *Txt_Remove_USER_from_the_course_X; extern const char *Txt_Remove_USER_from_THE_COURSE_X;
extern const char *Txt_Remove_me_as_an_administrator_of_the_degree_X; extern const char *Txt_Remove_me_as_an_administrator_of_the_degree_X;
extern const char *Txt_Remove_USER_as_an_administrator_of_the_degree_X; extern const char *Txt_Remove_USER_as_an_administrator_of_the_degree_X;
extern const char *Txt_Remove_me_as_an_administrator_of_the_centre_X; extern const char *Txt_Remove_me_as_an_administrator_of_the_centre_X;
@ -1155,8 +1155,8 @@ bool Enr_PutActionsRegRemOneUsr (bool ItsMe)
if (UsrBelongsToCrs) if (UsrBelongsToCrs)
{ {
sprintf (Gbl.Alert.Txt, sprintf (Gbl.Alert.Txt,
ItsMe ? Txt_Remove_me_from_the_course_X : ItsMe ? Txt_Remove_me_from_THE_COURSE_X :
Txt_Remove_USER_from_the_course_X, Txt_Remove_USER_from_THE_COURSE_X,
Gbl.CurrentCrs.Crs.ShrtName); Gbl.CurrentCrs.Crs.ShrtName);
fprintf (Gbl.F.Out,"<li>" fprintf (Gbl.F.Out,"<li>"
"<label>" "<label>"
@ -3336,20 +3336,18 @@ static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
static void Enr_ShowFormToEditOtherUsr (void) static void Enr_ShowFormToEditOtherUsr (void)
{ {
/***** Buttons for edition *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
if (Usr_ICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat)) if (Usr_ICanEditOtherUsr (&Gbl.Usrs.Other.UsrDat))
{ {
/***** Buttons for edition *****/
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Pwd_PutLinkToChangeOtherUsrPassword (); // Put link (form) to change user's password Pwd_PutLinkToChangeOtherUsrPassword (); // Put link (form) to change user's password
Mai_PutLinkToChangeOtherUsrEmails (); // Put link (form) to change user's emails Mai_PutLinkToChangeOtherUsrEmails (); // Put link (form) to change user's emails
ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs ID_PutLinkToChangeUsrIDs (); // Put link (form) to change user's IDs
}
if (Pho_ICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
Pho_PutLinkToChangeOtherUsrPhoto (); // Put link (form) to change user's photo
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
}
/***** User's record *****/ /***** User's record *****/
Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_EXISTING_USR_FORM, Rec_ShowSharedUsrRecord (Rec_SHA_OTHER_EXISTING_USR_FORM,

View File

@ -80,10 +80,10 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
extern const char *Txt_Go_to_one_of_my_courses; extern const char *Txt_Go_to_one_of_my_courses;
extern const char *Txt_My_courses; extern const char *Txt_My_courses;
extern const char *Txt_Sign_up; extern const char *Txt_Sign_up;
extern const char *Txt_Remove_me_from_the_course_X; extern const char *Txt_Remove_me_from_THE_COURSE_X;
extern const char *Txt_Remove_me; extern const char *Txt_Remove_me;
extern const char *Txt_Register_me_in_X; extern const char *Txt_Register_me_in_X;
extern const char *Txt_Select_or_create_another_course_in_X; extern const char *Txt_Select_create_course_in_X;
extern const char *Txt_Select_or_create_one_course_in_X; extern const char *Txt_Select_or_create_one_course_in_X;
extern const char *Txt_Courses; extern const char *Txt_Courses;
extern const char *Txt_Select_or_create_another_degree_in_X; extern const char *Txt_Select_or_create_another_degree_in_X;
@ -144,7 +144,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
if (ActionsRemoveMe[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role] != ActUnk) if (ActionsRemoveMe[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role] != ActUnk)
{ {
/* Request my removing from this course */ /* Request my removing from this course */
sprintf (Gbl.Title,Txt_Remove_me_from_the_course_X, sprintf (Gbl.Title,Txt_Remove_me_from_THE_COURSE_X,
Gbl.CurrentCrs.Crs.ShrtName); Gbl.CurrentCrs.Crs.ShrtName);
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title, Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,
ActionsRemoveMe[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role], ActionsRemoveMe[Gbl.Usrs.Me.UsrDat.Roles.InCurrentCrs.Role],
@ -186,7 +186,7 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
if (Gbl.CurrentDeg.Deg.DegCod > 0) // Degree selected if (Gbl.CurrentDeg.Deg.DegCod > 0) // Degree selected
{ {
/* Select a course */ /* Select a course */
sprintf (Gbl.Title,Gbl.CurrentCrs.Crs.CrsCod > 0 ? Txt_Select_or_create_another_course_in_X : sprintf (Gbl.Title,Gbl.CurrentCrs.Crs.CrsCod > 0 ? Txt_Select_create_course_in_X :
Txt_Select_or_create_one_course_in_X, Txt_Select_or_create_one_course_in_X,
Gbl.CurrentDeg.Deg.ShrtName); Gbl.CurrentDeg.Deg.ShrtName);
Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title, Hlp_ShowRowHelpWhatWouldYouLikeToDo (Gbl.Title,

View File

@ -162,24 +162,6 @@ bool Pho_ICanChangeOtherUsrPhoto (const struct UsrData *UsrDat)
/********** Put a link to the action used to request user's photo ************/ /********** Put a link to the action used to request user's photo ************/
/*****************************************************************************/ /*****************************************************************************/
void Pho_PutLinkToChangeMyPhoto (void)
{
extern const char *Txt_Change_photo;
extern const char *Txt_Upload_photo;
const char *TitleText = Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo :
Txt_Upload_photo;
/***** Link for changing / uploading the photo *****/
Lay_PutContextualLink (ActReqMyPho,NULL,NULL,
"photo64x64.gif",
TitleText,TitleText,
NULL);
}
/*****************************************************************************/
/********** Put a link to the action used to request user's photo ************/
/*****************************************************************************/
void Pho_PutLinkToChangeOtherUsrPhoto (void) void Pho_PutLinkToChangeOtherUsrPhoto (void)
{ {
extern const char *Txt_Change_photo; extern const char *Txt_Change_photo;
@ -190,15 +172,22 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
Act_Action_t NextAction; Act_Action_t NextAction;
/***** Link for changing / uploading the photo *****/ /***** Link for changing / uploading the photo *****/
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me if (Gbl.Usrs.Me.UsrDat.UsrCod == Gbl.Record.UsrDat->UsrCod) // It's me
Pho_PutLinkToChangeMyPhoto ();
else // Not me
if (Pho_ICanChangeOtherUsrPhoto (&Gbl.Usrs.Other.UsrDat))
{ {
PhotoExists = Pho_BuildLinkToPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL); TitleText = Gbl.Usrs.Me.MyPhotoExists ? Txt_Change_photo :
Txt_Upload_photo;
Lay_PutContextualLink (ActReqMyPho,NULL,NULL,
"photo64x64.gif",
TitleText,NULL,
NULL);
}
else // Not me
if (Pho_ICanChangeOtherUsrPhoto (Gbl.Record.UsrDat))
{
PhotoExists = Pho_BuildLinkToPhoto (Gbl.Record.UsrDat,PhotoURL);
TitleText = PhotoExists ? Txt_Change_photo : TitleText = PhotoExists ? Txt_Change_photo :
Txt_Upload_photo; Txt_Upload_photo;
switch (Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs.Role) switch (Gbl.Record.UsrDat->Roles.InCurrentCrs.Role)
{ {
case Rol_STD: case Rol_STD:
NextAction = ActReqStdPho; NextAction = ActReqStdPho;
@ -211,10 +200,9 @@ void Pho_PutLinkToChangeOtherUsrPhoto (void)
NextAction = ActReqOthPho; NextAction = ActReqOthPho;
break; break;
} }
Lay_PutContextualLink (NextAction,NULL, Lay_PutContextualLink (NextAction,NULL,Rec_PutParamUsrCodEncrypted,
Usr_PutParamOtherUsrCodEncrypted,
"photo64x64.gif", "photo64x64.gif",
TitleText,TitleText, TitleText,NULL,
NULL); NULL);
} }
} }

View File

@ -84,7 +84,6 @@ typedef enum
/*****************************************************************************/ /*****************************************************************************/
bool Pho_ICanChangeOtherUsrPhoto (const struct UsrData *UsrDat); bool Pho_ICanChangeOtherUsrPhoto (const struct UsrData *UsrDat);
void Pho_PutLinkToChangeMyPhoto (void);
void Pho_PutLinkToChangeOtherUsrPhoto (void); void Pho_PutLinkToChangeOtherUsrPhoto (void);
void Pho_ReqMyPhotoWithContextLinks (void); void Pho_ReqMyPhotoWithContextLinks (void);
void Pho_ReqUsrPhotoWithContextualLinks (struct UsrData *UsrDat); void Pho_ReqUsrPhotoWithContextualLinks (struct UsrData *UsrDat);

View File

@ -100,7 +100,6 @@ static void Rec_ShowMyCrsRecordUpdated (void);
static bool Rec_CheckIfICanEditField (Rec_VisibilityRecordFields_t Visibility); static bool Rec_CheckIfICanEditField (Rec_VisibilityRecordFields_t Visibility);
static void Rec_PutIconsCommands (void); static void Rec_PutIconsCommands (void);
static void Rec_PutParamUsrCodEncrypted (void);
static void Rec_PutParamsWorks (void); static void Rec_PutParamsWorks (void);
static void Rec_PutParamsStudent (void); static void Rec_PutParamsStudent (void);
static void Rec_PutParamsMsgUsr (void); static void Rec_PutParamsMsgUsr (void);
@ -2117,7 +2116,6 @@ void Rec_ShowFormMySharedRecord (void)
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">"); fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department... Rec_PutLinkToChangeMyInsCtrDpt (); // Put link (form) to change my institution, centre, department...
Net_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks Net_PutLinkToChangeMySocialNetworks (); // Put link (form) to change my social networks
Pho_PutLinkToChangeMyPhoto (); // Put link (form) to change my photo
Pri_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy Pri_PutLinkToChangeMyPrivacy (); // Put link (form) to change my privacy
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
@ -2709,12 +2707,15 @@ static void Rec_PutIconsCommands (void)
NULL); // Put button to follow NULL); // Put button to follow
} }
/***** Button to change user's photo *****/
Pho_PutLinkToChangeOtherUsrPhoto ();
/***** End container *****/ /***** End container *****/
fprintf (Gbl.F.Out,"</div>"); fprintf (Gbl.F.Out,"</div>");
} }
} }
static void Rec_PutParamUsrCodEncrypted (void) void Rec_PutParamUsrCodEncrypted (void)
{ {
Usr_PutParamUsrCodEncrypted (Gbl.Record.UsrDat->EncryptedUsrCod); Usr_PutParamUsrCodEncrypted (Gbl.Record.UsrDat->EncryptedUsrCod);
} }

View File

@ -167,6 +167,7 @@ void Rec_ShowMySharedRecordUpd (void);
void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat); void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat);
void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView, void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
struct UsrData *UsrDat,const char *Anchor); struct UsrData *UsrDat,const char *Anchor);
void Rec_PutParamUsrCodEncrypted (void);
void Rec_UpdateMyRecord (void); void Rec_UpdateMyRecord (void);
Rol_Role_t Rec_GetRoleFromRecordForm (void); Rol_Role_t Rec_GetRoleFromRecordForm (void);

View File

@ -33267,25 +33267,25 @@ const char *Txt_Remove_me_from_this_project =
"Tirar me deste projeto"; "Tirar me deste projeto";
#endif #endif
const char *Txt_Remove_me_from_the_course_X = // Warning: it is very important to include %s in the following sentences const char *Txt_Remove_me_from_THE_COURSE_X = // Warning: it is very important to include %s in the following sentences
#if L==1 #if L==1
"Eliminarme de l'assignatura <strong>%s</strong>"; "Eliminarme de <strong>%s</strong>";
#elif L==2 #elif L==2
"Entfernen Sie mir aus dem Kurs <strong>%s</strong>"; "Entfernen Sie mir aus <strong>%s</strong>";
#elif L==3 #elif L==3
"Remove me from the course <strong>%s</strong>"; "Remove me from <strong>%s</strong>";
#elif L==4 #elif L==4
"Eliminarme de la asignatura <strong>%s</strong>"; "Eliminarme de <strong>%s</strong>";
#elif L==5 #elif L==5
"Enlever-moi de la mati&egrave;re <strong>%s</strong>"; "Enlever-moi de <strong>%s</strong>";
#elif L==6 #elif L==6
"Eliminarme de la asignatura <strong>%s</strong>"; // Okoteve traducción "Eliminarme de <strong>%s</strong>"; // Okoteve traducción
#elif L==7 #elif L==7
"Rimuovimi dal corso <strong>%s</strong>"; "Rimuovimi di <strong>%s</strong>";
#elif L==8 #elif L==8
"Usu&nacute; mnie w kurs <strong>%s</strong>"; "Usu&nacute; mnie w <strong>%s</strong>";
#elif L==9 #elif L==9
"Tirar me da disciplina <strong>%s</strong>"; "Tirar me de <strong>%s</strong>";
#endif #endif
const char *Txt_Remove_old_files = const char *Txt_Remove_old_files =
@ -33651,25 +33651,25 @@ const char *Txt_Remove_USER_as_an_administrator_of_the_institution_X = // Warnin
" da institu&ccedil;&atilde;o <strong>%s</strong>"; " da institu&ccedil;&atilde;o <strong>%s</strong>";
#endif #endif
const char *Txt_Remove_USER_from_the_course_X = // Warning: it is very important to include %s in the following sentences const char *Txt_Remove_USER_from_THE_COURSE_X = // Warning: it is very important to include %s in the following sentences
#if L==1 #if L==1
"Eliminar de l'assignatura <strong>%s</strong>"; "Eliminar de <strong>%s</strong>";
#elif L==2 #elif L==2
"Entfernen aus dem Kurs <strong>%s</strong>"; "Entfernen aus <strong>%s</strong>";
#elif L==3 #elif L==3
"Remove from the course <strong>%s</strong>"; "Remove from <strong>%s</strong>";
#elif L==4 #elif L==4
"Eliminar de la asignatura <strong>%s</strong>"; "Eliminar de <strong>%s</strong>";
#elif L==5 #elif L==5
"Enlever de la mati&egrave;re <strong>%s</strong>"; "Enlever de <strong>%s</strong>";
#elif L==6 #elif L==6
"Eliminar de la asignatura <strong>%s</strong>"; // Okoteve traducción "Eliminar de <strong>%s</strong>"; // Okoteve traducción
#elif L==7 #elif L==7
"Rimuovi dal corso <strong>%s</strong>"; "Rimuovi di <strong>%s</strong>";
#elif L==8 #elif L==8
"Usu&nacute; w kurs <strong>%s</strong>"; "Usu&nacute; w <strong>%s</strong>";
#elif L==9 #elif L==9
"Tirar da disciplina <strong>%s</strong>"; "Tirar de <strong>%s</strong>";
#endif #endif
const char *Txt_Reply = const char *Txt_Reply =
@ -38703,25 +38703,25 @@ const char *Txt_Select_or_create_another_centre_in_X = // Warning: it is very im
"Selecionar ou criar um outro centro da institu&ccedil;&atilde;o <strong>%s</strong>"; "Selecionar ou criar um outro centro da institu&ccedil;&atilde;o <strong>%s</strong>";
#endif #endif
const char *Txt_Select_or_create_another_course_in_X = // Warning: it is very important to include %s in the following sentences const char *Txt_Select_create_course_in_X = // Warning: it is very important to include %s in the following sentences
#if L==1 #if L==1
"Seleccionar o crear una altra assignatura en <strong>%s</strong>"; "Seleccionar/crear assignatura en <strong>%s</strong>";
#elif L==2 #elif L==2
"W&auml;hlen oder erstellen Sie einen anderen Kurs von <strong>%s</strong>"; "W&auml;hlen/erstellen Kurs von <strong>%s</strong>";
#elif L==3 #elif L==3
"Select or create another course in <strong>%s</strong>"; "Select/create in <strong>%s</strong>";
#elif L==4 #elif L==4
"Seleccionar o crear otra asignatura en <strong>%s</strong>"; "Seleccionar/crear asignatura en <strong>%s</strong>";
#elif L==5 #elif L==5
"S&eacute;lectionnez ou cr&eacute;ez une autre mati&egrave;re dans <strong>%s</strong>"; "S&eacute;lectionner/cr&eacute;er mati&egrave;re dans <strong>%s</strong>";
#elif L==6 #elif L==6
"Seleccionar o crear otra asignatura en <strong>%s</strong>"; // Okoteve traducción "Seleccionar/crear asignatura en <strong>%s</strong>"; // Okoteve traducción
#elif L==7 #elif L==7
"Selezionare o creare un altro corso di <strong>%s</strong>"; "Selezionare/creare corso di <strong>%s</strong>";
#elif L==8 #elif L==8
"Select or create another course in <strong>%s</strong>"; // Potrzebujesz tlumaczenie "Select/create course in <strong>%s</strong>"; // Potrzebujesz tlumaczenie
#elif L==9 #elif L==9
"Selecionar ou criar uma outra disciplina de <strong>%s</strong>"; "Selecionar/criar disciplina de <strong>%s</strong>";
#endif #endif
const char *Txt_Select_or_create_another_degree_in_X = // Warning: it is very important to include %s in the following sentences const char *Txt_Select_or_create_another_degree_in_X = // Warning: it is very important to include %s in the following sentences