mirror of https://github.com/acanas/swad-core.git
Version 22.47.1: Oct 15, 2022 Removed unused code.
This commit is contained in:
parent
5b4a928226
commit
3263490ff1
|
@ -1783,8 +1783,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("class=\"%s LT\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"%s LT\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2993,8 +2992,7 @@ static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3165,8 +3163,7 @@ static void Att_ListAttEventsForAStd (struct Att_Events *Events,
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"RM %s\"",
|
HTM_TD_Begin ("colspan=\"2\" class=\"RM %s\"",
|
||||||
The_GetColorRows ());
|
The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
||||||
|
|
|
@ -3235,8 +3235,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct Usr_Data *UsrDat)
|
||||||
/***** Show user's photo *****/
|
/***** Show user's photo *****/
|
||||||
HTM_TD_Begin ("class=\"OWNER_WORKS_PHOTO\"");
|
HTM_TD_Begin ("class=\"OWNER_WORKS_PHOTO\"");
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Begin form to send a message to this user *****/
|
/***** Begin form to send a message to this user *****/
|
||||||
|
@ -5473,8 +5472,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod)
|
||||||
if (ShowUsr)
|
if (ShowUsr)
|
||||||
/***** Show photo *****/
|
/***** Show photo *****/
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
else
|
else
|
||||||
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
|
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape]);
|
ClassPhoto[Gbl.Prefs.PhotoShape]);
|
||||||
|
@ -8026,8 +8024,7 @@ void Brw_ShowFileMetadata (void)
|
||||||
{
|
{
|
||||||
/* Show photo */
|
/* Show photo */
|
||||||
Pho_ShowUsrPhotoIfAllowed (&PublisherUsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&PublisherUsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
|
|
||||||
/* Write name */
|
/* Write name */
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
||||||
|
|
||||||
TODO: Attach pdf files in multimedia.
|
TODO: Attach pdf files in multimedia.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.47 (2022-10-15)"
|
#define Log_PLATFORM_VERSION "SWAD 22.47.1 (2022-10-15)"
|
||||||
#define CSS_FILE "swad22.46.css"
|
#define CSS_FILE "swad22.46.css"
|
||||||
#define JS_FILE "swad21.100.js"
|
#define JS_FILE "swad21.100.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.47.1: Oct 15, 2022 Removed unused code. (333126 lines)
|
||||||
Version 22.47: Oct 15, 2022 Code optimization related to forms. (333227 lines)
|
Version 22.47: Oct 15, 2022 Code optimization related to forms. (333227 lines)
|
||||||
Version 22.46.3: Oct 15, 2022 Code refactoring submiting forms. (333211 lines)
|
Version 22.46.3: Oct 15, 2022 Code refactoring submiting forms. (333211 lines)
|
||||||
Version 22.46.2: Oct 14, 2022 Changes in anchors behavior in project listing. (333228 lines)
|
Version 22.46.2: Oct 14, 2022 Changes in anchors behavior in project listing. (333228 lines)
|
||||||
|
|
|
@ -174,11 +174,6 @@ void Con_ShowGlobalConnectedUsrs (void)
|
||||||
|
|
||||||
/***** Number of sessions *****/
|
/***** Number of sessions *****/
|
||||||
/* Link to view more details about connected users */
|
/* Link to view more details about connected users */
|
||||||
/*
|
|
||||||
Frm_BeginFormUnique (ActLstCon); // Must be unique because
|
|
||||||
// the list of connected users
|
|
||||||
// is dynamically updated via AJAX
|
|
||||||
*/
|
|
||||||
Frm_BeginForm (ActLstCon);
|
Frm_BeginForm (ActLstCon);
|
||||||
HTM_BUTTON_Submit_Begin (Txt_Connected_users,"class=\"BT_LINK\"");
|
HTM_BUTTON_Submit_Begin (Txt_Connected_users,"class=\"BT_LINK\"");
|
||||||
|
|
||||||
|
@ -329,11 +324,6 @@ void Con_ShowConnectedUsrsBelongingToCurrentCrs (void)
|
||||||
|
|
||||||
/***** Number of connected users who belong to course *****/
|
/***** Number of connected users who belong to course *****/
|
||||||
/* Link to view more details about connected users */
|
/* Link to view more details about connected users */
|
||||||
/*
|
|
||||||
Frm_BeginFormUnique (ActLstCon); // Must be unique because
|
|
||||||
// the list of connected users
|
|
||||||
// is dynamically updated via AJAX
|
|
||||||
*/
|
|
||||||
Frm_BeginForm (ActLstCon);
|
Frm_BeginForm (ActLstCon);
|
||||||
HTM_BUTTON_Submit_Begin (Txt_Connected_users,"class=\"BT_LINK\"");
|
HTM_BUTTON_Submit_Begin (Txt_Connected_users,"class=\"BT_LINK\"");
|
||||||
Str_Copy (CourseName,Gbl.Hierarchy.Crs.ShrtName,sizeof (CourseName) - 1);
|
Str_Copy (CourseName,Gbl.Hierarchy.Crs.ShrtName,sizeof (CourseName) - 1);
|
||||||
|
@ -420,11 +410,6 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
|
||||||
{
|
{
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TD_Begin ("colspan=\"3\" class=\"CM\"");
|
HTM_TD_Begin ("colspan=\"3\" class=\"CM\"");
|
||||||
/*
|
|
||||||
Frm_BeginFormUnique (ActLstCon); // Must be unique because
|
|
||||||
// the list of connected users
|
|
||||||
// is dynamically updated via AJAX
|
|
||||||
*/
|
|
||||||
Frm_BeginForm (ActLstCon);
|
Frm_BeginForm (ActLstCon);
|
||||||
Sco_PutParamScope ("ScopeCon",HieLvl_CRS);
|
Sco_PutParamScope ("ScopeCon",HieLvl_CRS);
|
||||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"ellipsis-h.svg",
|
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"ellipsis-h.svg",
|
||||||
|
@ -605,8 +590,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
||||||
/***** Show photo *****/
|
/***** Show photo *****/
|
||||||
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
true);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write full name and link *****/
|
/***** Write full name and link *****/
|
||||||
|
@ -615,11 +599,6 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
||||||
HTM_TD_Begin ("class=\"%s %s\"",ClassTxt,The_GetColorRows ());
|
HTM_TD_Begin ("class=\"%s %s\"",ClassTxt,The_GetColorRows ());
|
||||||
if (!NextAction[Role])
|
if (!NextAction[Role])
|
||||||
Err_WrongRoleExit ();
|
Err_WrongRoleExit ();
|
||||||
/*
|
|
||||||
Frm_BeginFormUnique (NextAction[Role]); // The form must be unique because
|
|
||||||
// the list of connected users
|
|
||||||
// is dynamically updated via AJAX
|
|
||||||
*/
|
|
||||||
Frm_BeginForm (NextAction[Role]);
|
Frm_BeginForm (NextAction[Role]);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||||
|
|
||||||
|
@ -715,8 +694,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
||||||
/***** Show photo *****/
|
/***** Show photo *****/
|
||||||
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write full name and link *****/
|
/***** Write full name and link *****/
|
||||||
|
|
|
@ -2245,8 +2245,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
||||||
HTM_TD_Begin ("class=\"CT DAT_%s\" style=\"width:22px;\"",
|
HTM_TD_Begin ("class=\"CT DAT_%s\" style=\"width:22px;\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** User name *****/
|
/***** User name *****/
|
||||||
|
|
|
@ -1554,8 +1554,7 @@ void ExaRes_ShowExamResultUser (struct Usr_Data *UsrDat)
|
||||||
HTM_TxtF (", %s",UsrDat->FrstName);
|
HTM_TxtF (", %s",UsrDat->FrstName);
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Row end *****/
|
/***** Row end *****/
|
||||||
|
|
|
@ -610,8 +610,7 @@ static void Fol_ShowFollowedOrFollower (struct Usr_Data *UsrDat)
|
||||||
HTM_TD_Begin ("class=\"FOLLOW_PHOTO\"");
|
HTM_TD_Begin ("class=\"FOLLOW_PHOTO\"");
|
||||||
if (Visible)
|
if (Visible)
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Show user's name and icon to follow/unfollow *****/
|
/***** Show user's name and icon to follow/unfollow *****/
|
||||||
|
@ -673,8 +672,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct Usr_Data *UsrDat)
|
||||||
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"CON_PHOTO %s\"",The_GetColorRows ());
|
||||||
if (Visible)
|
if (Visible)
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** User's name *****/
|
/***** User's name *****/
|
||||||
|
|
21
swad_form.c
21
swad_form.c
|
@ -80,28 +80,7 @@ void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,con
|
||||||
snprintf (Gbl.Form.Id,sizeof (Gbl.Form.Id),"form_%d",Gbl.Form.Num);
|
snprintf (Gbl.Form.Id,sizeof (Gbl.Form.Id),"form_%d",Gbl.Form.Num);
|
||||||
Frm_BeginFormInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session)
|
Frm_BeginFormInternal (NextAction,true,Gbl.Form.Id,Anchor,OnSubmit); // Do put now parameter location (if no open session)
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
void Frm_BeginFormUnique (Act_Action_t NextAction)
|
|
||||||
{
|
|
||||||
Frm_BeginFormUniqueAnchor (NextAction,NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor)
|
|
||||||
{
|
|
||||||
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
|
|
||||||
snprintf (Gbl.Form.UniqueId,sizeof (Gbl.Form.UniqueId),"form_%s_%d",
|
|
||||||
Gbl.UniqueNameEncrypted,Gbl.Form.Num);
|
|
||||||
Frm_BeginFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,NULL); // Do put now parameter location (if no open session)
|
|
||||||
}
|
|
||||||
|
|
||||||
void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit)
|
|
||||||
{
|
|
||||||
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
|
|
||||||
snprintf (Gbl.Form.UniqueId,sizeof (Gbl.Form.UniqueId),"form_%s_%d",
|
|
||||||
Gbl.UniqueNameEncrypted,Gbl.Form.Num);
|
|
||||||
Frm_BeginFormInternal (NextAction,true,Gbl.Form.UniqueId,Anchor,OnSubmit); // Do put now parameter location (if no open session)
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id)
|
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id)
|
||||||
{
|
{
|
||||||
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
|
Gbl.Form.Num++; // Initialized to -1. The first time it is incremented, it will be equal to 0
|
||||||
|
|
|
@ -50,10 +50,7 @@ void Frm_BeginFormGoTo (Act_Action_t NextAction);
|
||||||
void Frm_BeginForm (Act_Action_t NextAction);
|
void Frm_BeginForm (Act_Action_t NextAction);
|
||||||
void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit);
|
void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit);
|
||||||
void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
|
void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
|
||||||
// void Frm_BeginFormUnique (Act_Action_t NextAction);
|
|
||||||
void Frm_BeginFormAnchor (Act_Action_t NextAction,const char *Anchor);
|
void Frm_BeginFormAnchor (Act_Action_t NextAction,const char *Anchor);
|
||||||
// void Frm_BeginFormUniqueAnchor (Act_Action_t NextAction,const char *Anchor);
|
|
||||||
// void Frm_BeginFormUniqueAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit);
|
|
||||||
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id);
|
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id);
|
||||||
void Frm_BeginFormNoAction (void);
|
void Frm_BeginFormNoAction (void);
|
||||||
void Frm_SetParamsForm (char ParamsStr[Frm_MAX_BYTES_PARAMS_STR],Act_Action_t NextAction,
|
void Frm_SetParamsForm (char ParamsStr[Frm_MAX_BYTES_PARAMS_STR],Act_Action_t NextAction,
|
||||||
|
|
|
@ -79,7 +79,6 @@ struct Globals
|
||||||
{
|
{
|
||||||
int Num; // Number of form, used in form submit links
|
int Num; // Number of form, used in form submit links
|
||||||
char Id[32]; // Identifier string used in forms
|
char Id[32]; // Identifier string used in forms
|
||||||
// char UniqueId[32 + Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 10 + 1]; // Unique identifier string used in forms
|
|
||||||
bool Inside; // Set to true inside a form to avoid nested forms
|
bool Inside; // Set to true inside a form to avoid nested forms
|
||||||
} Form;
|
} Form;
|
||||||
struct
|
struct
|
||||||
|
|
|
@ -1155,8 +1155,7 @@ void MchRes_ShowOneMchResult (void)
|
||||||
HTM_TxtF (", %s",UsrDat->FrstName);
|
HTM_TxtF (", %s",UsrDat->FrstName);
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -492,8 +492,7 @@ static void Msg_ShowOneUniqueRecipient (void)
|
||||||
|
|
||||||
/***** Show user's photo *****/
|
/***** Show user's photo *****/
|
||||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
|
|
||||||
/****** Write user's IDs ******/
|
/****** Write user's IDs ******/
|
||||||
HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s_%s\"",
|
HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s_%s\"",
|
||||||
|
@ -2328,8 +2327,7 @@ void Msg_WriteMsgAuthor (struct Usr_Data *UsrDat,bool Enabled)
|
||||||
HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\"");
|
HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\"");
|
||||||
if (WriteAuthor)
|
if (WriteAuthor)
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
else
|
else
|
||||||
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
|
Ico_PutIcon ("usr_bl.jpg",Ico_UNCHANGED,Txt_Unknown_or_without_photo,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape]);
|
ClassPhoto[Gbl.Prefs.PhotoShape]);
|
||||||
|
@ -2470,8 +2468,7 @@ static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
|
||||||
/***** Put user's photo *****/
|
/***** Put user's photo *****/
|
||||||
HTM_TD_Begin ("class=\"CM\" style=\"width:30px;\"");
|
HTM_TD_Begin ("class=\"CM\" style=\"width:30px;\"");
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Write user's name *****/
|
/***** Write user's name *****/
|
||||||
|
@ -2614,8 +2611,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
||||||
false);
|
false);
|
||||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||||
NULL,
|
NULL,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Write user's name */
|
/* Write user's name */
|
||||||
|
@ -2921,8 +2917,7 @@ void Msg_ListBannedUsrs (void)
|
||||||
/* Show photo */
|
/* Show photo */
|
||||||
HTM_TD_Begin ("class=\"LM\" style=\"width:30px;\"");
|
HTM_TD_Begin ("class=\"LM\" style=\"width:30px;\"");
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Write user's full name */
|
/* Write user's full name */
|
||||||
|
|
22
swad_photo.c
22
swad_photo.c
|
@ -416,8 +416,7 @@ void Pho_ReqRemoveMyPhoto (void)
|
||||||
|
|
||||||
/* Show current photo */
|
/* Show current photo */
|
||||||
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,
|
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
|
||||||
false);
|
|
||||||
|
|
||||||
/* End alert */
|
/* End alert */
|
||||||
Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,
|
Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,
|
||||||
|
@ -505,8 +504,7 @@ void Pho_ReqRemoveUsrPhoto (void)
|
||||||
|
|
||||||
/* Show current photo */
|
/* Show current photo */
|
||||||
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,
|
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
|
||||||
false);
|
|
||||||
|
|
||||||
/* End alert */
|
/* End alert */
|
||||||
Ale_ShowAlertAndButton2 (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs],NULL,NULL,
|
Ale_ShowAlertAndButton2 (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs],NULL,NULL,
|
||||||
|
@ -942,15 +940,14 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
||||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
const char *ClassPhoto,Pho_Zoom_t Zoom)
|
||||||
bool FormUnique)
|
|
||||||
{
|
{
|
||||||
char PhotoURL[PATH_MAX + 1];
|
char PhotoURL[PATH_MAX + 1];
|
||||||
bool ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
bool ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (UsrDat,PhotoURL);
|
||||||
|
|
||||||
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
Pho_ShowUsrPhoto (UsrDat,ShowPhoto ? PhotoURL :
|
||||||
NULL,
|
NULL,
|
||||||
ClassPhoto,Zoom,FormUnique);
|
ClassPhoto,Zoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1247,8 +1244,7 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
const char *ClassPhoto,Pho_Zoom_t Zoom)
|
||||||
bool FormUnique)
|
|
||||||
{
|
{
|
||||||
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
Act_BrowserTab_t BrowserTab = Act_GetBrowserTab (Gbl.Action.Act);
|
||||||
bool BrowserTabIs1stTab = (BrowserTab == Act_BRW_1ST_TAB ||
|
bool BrowserTabIs1stTab = (BrowserTab == Act_BRW_1ST_TAB ||
|
||||||
|
@ -1262,12 +1258,8 @@ void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||||
/***** Begin form to go to public profile *****/
|
/***** Begin form to go to public profile *****/
|
||||||
if (PutLinkToPublicProfile)
|
if (PutLinkToPublicProfile)
|
||||||
{
|
{
|
||||||
if (FormUnique)
|
Frm_BeginForm (ActSeeOthPubPrf);
|
||||||
// Frm_BeginFormUnique (ActSeeOthPubPrf);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||||
Frm_BeginForm (ActSeeOthPubPrf);
|
|
||||||
else
|
|
||||||
Frm_BeginForm (ActSeeOthPubPrf);
|
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
|
||||||
HTM_BUTTON_Submit_Begin (NULL,"class=\"BT_LINK\"");
|
HTM_BUTTON_Submit_Begin (NULL,"class=\"BT_LINK\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,8 +116,7 @@ void Pho_UpdateUsrPhoto2 (void);
|
||||||
unsigned Pho_UpdateMyClicksWithoutPhoto (void);
|
unsigned Pho_UpdateMyClicksWithoutPhoto (void);
|
||||||
|
|
||||||
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
||||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
const char *ClassPhoto,Pho_Zoom_t Zoom);
|
||||||
bool FormUnique);
|
|
||||||
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
||||||
char PhotoURL[PATH_MAX + 1]);
|
char PhotoURL[PATH_MAX + 1]);
|
||||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[PATH_MAX + 1]);
|
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[PATH_MAX + 1]);
|
||||||
|
@ -127,8 +126,7 @@ void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||||
char **ImgStr,
|
char **ImgStr,
|
||||||
char **CaptionStr);
|
char **CaptionStr);
|
||||||
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
const char *ClassPhoto,Pho_Zoom_t Zoom);
|
||||||
bool FormUnique);
|
|
||||||
|
|
||||||
bool Pho_RemovePhoto (struct Usr_Data *UsrDat);
|
bool Pho_RemovePhoto (struct Usr_Data *UsrDat);
|
||||||
void Pho_UpdatePhotoName (struct Usr_Data *UsrDat);
|
void Pho_UpdatePhotoName (struct Usr_Data *UsrDat);
|
||||||
|
|
|
@ -1329,8 +1329,7 @@ static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank,bool Its
|
||||||
if (Visible)
|
if (Visible)
|
||||||
/***** User's photo *****/
|
/***** User's photo *****/
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Put form to go to public profile *****/
|
/***** Put form to go to public profile *****/
|
||||||
|
|
|
@ -2042,8 +2042,7 @@ static void Prj_ShowProjectMembersWithARole (struct Prj_Projects *Projects,
|
||||||
/* Put user's photo */
|
/* Put user's photo */
|
||||||
HTM_TD_Begin ("class=\"PRJ_MEMBER_PHO\"");
|
HTM_TD_Begin ("class=\"PRJ_MEMBER_PHO\"");
|
||||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Write user's name */
|
/* Write user's name */
|
||||||
|
|
|
@ -2585,8 +2585,7 @@ static void Rec_ShowPhoto (struct Usr_Data *UsrDat)
|
||||||
/***** User's photo *****/
|
/***** User's photo *****/
|
||||||
HTM_TD_Begin ("rowspan=\"3\" class=\"REC_C3_TOP CT\"");
|
HTM_TD_Begin ("rowspan=\"3\" class=\"REC_C3_TOP CT\"");
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1375,8 +1375,7 @@ static void Sta_ShowNumHitsPerUsr (Sta_CountType_t CountType,
|
||||||
/* Show the photo */
|
/* Show the photo */
|
||||||
HTM_TD_Begin ("class=\"CT %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"CT %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Write the user's ID if user is a student in current course */
|
/* Write the user's ID if user is a student in current course */
|
||||||
|
|
|
@ -2275,8 +2275,7 @@ void TstPrn_ShowOnePrint (void)
|
||||||
HTM_TxtF (", %s",Gbl.Usrs.Other.UsrDat.FrstName);
|
HTM_TxtF (", %s",Gbl.Usrs.Other.UsrDat.FrstName);
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
|
@ -199,8 +199,7 @@ static void TmlCom_ShowAuthorPhoto (struct Usr_Data *UsrDat)
|
||||||
|
|
||||||
/* Author's photo */
|
/* Author's photo */
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
true); // Use unique id
|
|
||||||
|
|
||||||
/* End container */
|
/* End container */
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
@ -617,7 +616,6 @@ static void TmlCom_WriteAuthorName (const struct Usr_Data *UsrDat) // Author
|
||||||
|
|
||||||
/***** Show user's name inside form to go to user's public profile *****/
|
/***** Show user's name inside form to go to user's public profile *****/
|
||||||
/* Begin form */
|
/* Begin form */
|
||||||
// Frm_BeginFormUnique (ActSeeOthPubPrf);
|
|
||||||
Frm_BeginForm (ActSeeOthPubPrf);
|
Frm_BeginForm (ActSeeOthPubPrf);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,6 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
||||||
ParamStr,
|
ParamStr,
|
||||||
Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0)
|
Gbl.Usrs.Other.UsrDat.EnUsrCod) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
// Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,"timeline",OnSubmit);
|
|
||||||
Frm_BeginFormAnchorOnSubmit (ActUnk,"timeline",OnSubmit);
|
Frm_BeginFormAnchorOnSubmit (ActUnk,"timeline",OnSubmit);
|
||||||
free (OnSubmit);
|
free (OnSubmit);
|
||||||
Ico_PutIconLink (Form->Icon,Form->Color,
|
Ico_PutIconLink (Form->Icon,Form->Color,
|
||||||
|
@ -239,7 +238,6 @@ void TmlFrm_FormFavSha (const struct Tml_Form *Form)
|
||||||
Gbl.Session.Id,
|
Gbl.Session.Id,
|
||||||
ParamStr) < 0)
|
ParamStr) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
// Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,NULL,OnSubmit);
|
|
||||||
Frm_BeginFormAnchorOnSubmit (ActUnk,NULL,OnSubmit);
|
Frm_BeginFormAnchorOnSubmit (ActUnk,NULL,OnSubmit);
|
||||||
free (OnSubmit);
|
free (OnSubmit);
|
||||||
Ico_PutIconLink (Form->Icon,Form->Color,
|
Ico_PutIconLink (Form->Icon,Form->Color,
|
||||||
|
@ -301,7 +299,6 @@ void TmlFrm_FormToShowHiddenComms (long NotCod,
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
Anchor = NULL;
|
Anchor = NULL;
|
||||||
}
|
}
|
||||||
// Frm_BeginFormUniqueAnchorOnSubmit (ActUnk,Anchor,OnSubmit);
|
|
||||||
Frm_BeginFormAnchorOnSubmit (ActUnk,Anchor,OnSubmit);
|
Frm_BeginFormAnchorOnSubmit (ActUnk,Anchor,OnSubmit);
|
||||||
free (OnSubmit);
|
free (OnSubmit);
|
||||||
|
|
||||||
|
|
|
@ -273,7 +273,7 @@ static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
|
||||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
|
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
|
||||||
|
|
||||||
/***** Left top: author's photo *****/
|
/***** Left top: author's photo *****/
|
||||||
TmlNot_ShowAuthorPhoto (&UsrDat,true); // Use unique id
|
TmlNot_ShowAuthorPhoto (&UsrDat);
|
||||||
|
|
||||||
/***** Right top: author's name, time, and content *****/
|
/***** Right top: author's name, time, and content *****/
|
||||||
TmlNot_WriteAuthorTimeAndContent (Not,&UsrDat);
|
TmlNot_WriteAuthorTimeAndContent (Not,&UsrDat);
|
||||||
|
@ -289,7 +289,7 @@ static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
|
||||||
/*********************** Show photo of author of a note **********************/
|
/*********************** Show photo of author of a note **********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique)
|
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat)
|
||||||
{
|
{
|
||||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||||
{
|
{
|
||||||
|
@ -304,8 +304,7 @@ void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique)
|
||||||
|
|
||||||
/***** Photo *****/
|
/***** Photo *****/
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
FormUnique);
|
|
||||||
|
|
||||||
/***** End container *****/
|
/***** End container *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
@ -352,7 +351,6 @@ void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
|
||||||
|
|
||||||
/***** Show user's name inside form to go to user's public profile *****/
|
/***** Show user's name inside form to go to user's public profile *****/
|
||||||
/* Begin form */
|
/* Begin form */
|
||||||
// Frm_BeginFormUnique (ActSeeOthPubPrf);
|
|
||||||
Frm_BeginForm (ActSeeOthPubPrf);
|
Frm_BeginForm (ActSeeOthPubPrf);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||||
|
|
||||||
|
@ -624,7 +622,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
{
|
{
|
||||||
case TmlNot_INS_DOC_PUB_FILE:
|
case TmlNot_INS_DOC_PUB_FILE:
|
||||||
case TmlNot_INS_SHA_PUB_FILE:
|
case TmlNot_INS_SHA_PUB_FILE:
|
||||||
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
|
||||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||||
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
|
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
|
||||||
|
@ -632,7 +629,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
break;
|
break;
|
||||||
case TmlNot_CTR_DOC_PUB_FILE:
|
case TmlNot_CTR_DOC_PUB_FILE:
|
||||||
case TmlNot_CTR_SHA_PUB_FILE:
|
case TmlNot_CTR_SHA_PUB_FILE:
|
||||||
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
|
||||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||||
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
|
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
|
||||||
|
@ -640,7 +636,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
break;
|
break;
|
||||||
case TmlNot_DEG_DOC_PUB_FILE:
|
case TmlNot_DEG_DOC_PUB_FILE:
|
||||||
case TmlNot_DEG_SHA_PUB_FILE:
|
case TmlNot_DEG_SHA_PUB_FILE:
|
||||||
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
|
||||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||||
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
|
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
|
||||||
|
@ -648,7 +643,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
break;
|
break;
|
||||||
case TmlNot_CRS_DOC_PUB_FILE:
|
case TmlNot_CRS_DOC_PUB_FILE:
|
||||||
case TmlNot_CRS_SHA_PUB_FILE:
|
case TmlNot_CRS_SHA_PUB_FILE:
|
||||||
// Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
|
||||||
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
Frm_BeginForm (Tml_DefaultActions[Not->Type]);
|
||||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||||
|
@ -656,8 +650,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
break;
|
break;
|
||||||
case TmlNot_CALL_FOR_EXAM:
|
case TmlNot_CALL_FOR_EXAM:
|
||||||
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
||||||
// Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
|
|
||||||
// Anchor); // Locate on this specific exam
|
|
||||||
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],
|
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],
|
||||||
Anchor); // Locate on this specific exam
|
Anchor); // Locate on this specific exam
|
||||||
Frm_FreeAnchorStr (Anchor);
|
Frm_FreeAnchorStr (Anchor);
|
||||||
|
@ -668,7 +660,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
case TmlNot_POST: // Not applicable
|
case TmlNot_POST: // Not applicable
|
||||||
return;
|
return;
|
||||||
case TmlNot_FORUM_POST:
|
case TmlNot_FORUM_POST:
|
||||||
// Frm_BeginFormUnique (For_ActionsSeeFor[Forums->Forum.Type]);
|
|
||||||
Frm_BeginForm (For_ActionsSeeFor[Forums->Forum.Type]);
|
Frm_BeginForm (For_ActionsSeeFor[Forums->Forum.Type]);
|
||||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||||
1, // Page of posts = first
|
1, // Page of posts = first
|
||||||
|
@ -682,8 +673,6 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
break;
|
break;
|
||||||
case TmlNot_NOTICE:
|
case TmlNot_NOTICE:
|
||||||
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
||||||
// Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
|
|
||||||
// Anchor);
|
|
||||||
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],Anchor);
|
Frm_BeginFormAnchor (Tml_DefaultActions[Not->Type],Anchor);
|
||||||
Frm_FreeAnchorStr (Anchor);
|
Frm_FreeAnchorStr (Anchor);
|
||||||
Not_PutHiddenParamNotCod (Not->Cod);
|
Not_PutHiddenParamNotCod (Not->Cod);
|
||||||
|
|
|
@ -93,7 +93,7 @@ void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
|
||||||
const struct TmlNot_Note *Not,
|
const struct TmlNot_Note *Not,
|
||||||
Tml_TopMessage_t TopMessage,
|
Tml_TopMessage_t TopMessage,
|
||||||
long PublisherCod);
|
long PublisherCod);
|
||||||
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique);
|
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat);
|
||||||
void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
|
void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
|
||||||
const char *Class);
|
const char *Class);
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@ void TmlPst_PutPhotoAndFormToWriteNewPost (struct Tml_Timeline *Timeline)
|
||||||
HTM_LI_Begin ("class=\"Tml_WIDTH\"");
|
HTM_LI_Begin ("class=\"Tml_WIDTH\"");
|
||||||
|
|
||||||
/***** Left: write author's photo (my photo) *****/
|
/***** Left: write author's photo (my photo) *****/
|
||||||
TmlNot_ShowAuthorPhoto (&Gbl.Usrs.Me.UsrDat,false); // Don't use unique id
|
TmlNot_ShowAuthorPhoto (&Gbl.Usrs.Me.UsrDat);
|
||||||
|
|
||||||
/***** Right: author's name, time, textarea *****/
|
/***** Right: author's name, time, textarea *****/
|
||||||
TmlPst_PutFormToWriteNewPost (Timeline);
|
TmlPst_PutFormToWriteNewPost (Timeline);
|
||||||
|
|
|
@ -225,8 +225,7 @@ static void TmlUsr_ListSharersOrFavers (MYSQL_RES **mysql_res,
|
||||||
|
|
||||||
/* User's photo */
|
/* User's photo */
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
true); // Use unique id
|
|
||||||
|
|
||||||
/* End container */
|
/* End container */
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
26
swad_user.c
26
swad_user.c
|
@ -1384,8 +1384,7 @@ void Usr_WriteLoggedUsrHead (void)
|
||||||
|
|
||||||
/***** Show my photo *****/
|
/***** Show my photo *****/
|
||||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Me.UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Me.UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
|
|
||||||
/***** User's name *****/
|
/***** User's name *****/
|
||||||
if (Gbl.Usrs.Me.UsrDat.FrstName[0])
|
if (Gbl.Usrs.Me.UsrDat.FrstName[0])
|
||||||
|
@ -2208,8 +2207,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
||||||
/***** Show user's photo *****/
|
/***** Show user's photo *****/
|
||||||
HTM_TD_Begin ("class=\"CM %s\"",BgColor);
|
HTM_TD_Begin ("class=\"CM %s\"",BgColor);
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2260,8 +2258,7 @@ static void Usr_WriteRowGstAllData (struct Usr_Data *UsrDat)
|
||||||
/***** Show guest's photo *****/
|
/***** Show guest's photo *****/
|
||||||
HTM_TD_Begin ("class=\"%s LM\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"%s LM\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2355,8 +2352,7 @@ static void Usr_WriteRowStdAllData (struct Usr_Data *UsrDat,char *GroupNames)
|
||||||
/***** Show student's photo *****/
|
/***** Show student's photo *****/
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2465,8 +2461,7 @@ static void Usr_WriteRowTchAllData (struct Usr_Data *UsrDat)
|
||||||
/***** Show teacher's photo *****/
|
/***** Show teacher's photo *****/
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_NO_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2550,8 +2545,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct Usr_Data *UsrDat)
|
||||||
/***** Show administrator's photo *****/
|
/***** Show administrator's photo *****/
|
||||||
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6162,8 +6156,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
||||||
|
|
||||||
/***** Show photo *****/
|
/***** Show photo *****/
|
||||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||||
ClassPhoto[ClassPhotoType][Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[ClassPhotoType][Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
|
|
||||||
/***** Photo foot *****/
|
/***** Photo foot *****/
|
||||||
HTM_DIV_Begin ("class=\"CLASSPHOTO_CAPTION CLASSPHOTO_%s\"",
|
HTM_DIV_Begin ("class=\"CLASSPHOTO_CAPTION CLASSPHOTO_%s\"",
|
||||||
|
@ -6357,7 +6350,7 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
|
||||||
/***** Show photo *****/
|
/***** Show photo *****/
|
||||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||||
NULL,
|
NULL,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,false);
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
|
|
||||||
/***** Write name *****/
|
/***** Write name *****/
|
||||||
HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s_%s\"",
|
HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s_%s\"",
|
||||||
|
@ -6398,8 +6391,7 @@ void Usr_ShowTableCellWithUsrData (struct Usr_Data *UsrDat,unsigned NumRows)
|
||||||
else
|
else
|
||||||
HTM_TD_Begin ("class=\"LT LINE_BOTTOM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LT LINE_BOTTOM %s\"",The_GetColorRows ());
|
||||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||||
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM,
|
ClassPhoto[Gbl.Prefs.PhotoShape],Pho_ZOOM);
|
||||||
false);
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** User's IDs and name *****/
|
/***** User's IDs and name *****/
|
||||||
|
|
Loading…
Reference in New Issue