mirror of https://github.com/acanas/swad-core.git
Version 21.65: Dec 01, 2021 Selection of shape of user photos.
This commit is contained in:
parent
d2988d8895
commit
15607b19e5
|
@ -2120,16 +2120,36 @@ table.CELLS_PAD_10 > tbody > tr > td {padding:10px;}
|
|||
}
|
||||
|
||||
/******************************* User's photo ********************************/
|
||||
.PHOTO12x16 {width: 12px; height: 16px; border-radius:1px; vertical-align:middle; margin-top:-2px;}
|
||||
.PHOTO15x20 {width: 15px; height: 20px; border-radius:1px; vertical-align:middle;}
|
||||
.PHOTO15x20B {width: 15px; height: 20px; border-radius:1px; vertical-align:middle; display:block; margin:0 auto;}
|
||||
.PHOTO18x24 {width: 18px; height: 24px; border-radius:2px; vertical-align:middle;}
|
||||
.PHOTO21x28 {width: 21px; height: 28px; border-radius:2px; vertical-align:middle;}
|
||||
.PHOTO30x40 {width: 30px; height: 40px; border-radius:2px; vertical-align:middle;}
|
||||
.PHOTO42x56 {width: 42px; height: 56px; border-radius:3px; vertical-align:middle;}
|
||||
.PHOTO45x60 {width: 45px; height: 60px; border-radius:3px; vertical-align:middle;}
|
||||
.PHOTO60x80 {width: 60px; height: 80px; border-radius:3px; vertical-align:middle;}
|
||||
.PHOTO186x248 {width:186px; height:248px; border-radius:4px; vertical-align:middle;}
|
||||
.PHOTOC12x16 {width: 12px; height: 16px; clip-path: circle(50% at center); vertical-align:middle; margin-top:-2px;}
|
||||
.PHOTOC15x20 {width: 15px; height: 20px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
.PHOTOC15x20B {width: 15px; height: 20px; clip-path: circle(50% at center); vertical-align:middle; display:block; margin:0 auto;}
|
||||
.PHOTOC18x24 {width: 18px; height: 24px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
.PHOTOC21x28 {width: 21px; height: 28px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
.PHOTOC30x40 {width: 30px; height: 40px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
.PHOTOC45x60 {width: 45px; height: 60px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
.PHOTOC60x80 {width: 60px; height: 80px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
.PHOTOC186x248 {width:186px; height:248px; clip-path: circle(50% at center); vertical-align:middle;}
|
||||
|
||||
.PHOTOE12x16 {width: 12px; height: 16px; clip-path: ellipse(50% 50% at center); vertical-align:middle; margin-top:-2px;}
|
||||
.PHOTOE15x20 {width: 15px; height: 20px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
.PHOTOE15x20B {width: 15px; height: 20px; clip-path: ellipse(50% 50% at center); vertical-align:middle; display:block; margin:0 auto;}
|
||||
.PHOTOE18x24 {width: 18px; height: 24px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
.PHOTOE21x28 {width: 21px; height: 28px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
.PHOTOE30x40 {width: 30px; height: 40px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
.PHOTOE45x60 {width: 45px; height: 60px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
.PHOTOE60x80 {width: 60px; height: 80px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
.PHOTOE186x248 {width:186px; height:248px; clip-path: ellipse(50% 50% at center); vertical-align:middle;}
|
||||
|
||||
.PHOTOR12x16 {width: 12px; height: 16px; border-radius:1px; vertical-align:middle; margin-top:-2px;}
|
||||
.PHOTOR15x20 {width: 15px; height: 20px; border-radius:1px; vertical-align:middle;}
|
||||
.PHOTOR15x20B {width: 15px; height: 20px; border-radius:1px; vertical-align:middle; display:block; margin:0 auto;}
|
||||
.PHOTOR18x24 {width: 18px; height: 24px; border-radius:2px; vertical-align:middle;}
|
||||
.PHOTOR21x28 {width: 21px; height: 28px; border-radius:2px; vertical-align:middle;}
|
||||
.PHOTOR30x40 {width: 30px; height: 40px; border-radius:2px; vertical-align:middle;}
|
||||
.PHOTOR45x60 {width: 45px; height: 60px; border-radius:3px; vertical-align:middle;}
|
||||
.PHOTOR60x80 {width: 60px; height: 80px; border-radius:3px; vertical-align:middle;}
|
||||
.PHOTOR186x248 {width:186px; height:248px; border-radius:4px; vertical-align:middle;}
|
||||
|
||||
.IMG_USR
|
||||
{
|
||||
box-sizing:border-box;
|
|
@ -1291,6 +1291,7 @@ CREATE TABLE IF NOT EXISTS set_ip_settings (
|
|||
IconSet CHAR(16) NOT NULL,
|
||||
Menu TINYINT NOT NULL DEFAULT 0,
|
||||
SideCols TINYINT NOT NULL,
|
||||
UsrPhotos TINYINT NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY(IP),
|
||||
INDEX(UsrCod),
|
||||
INDEX(LastChange));
|
||||
|
@ -1625,6 +1626,7 @@ CREATE TABLE IF NOT EXISTS usr_data (
|
|||
Comments TEXT NOT NULL,
|
||||
Menu TINYINT NOT NULL DEFAULT 0,
|
||||
SideCols TINYINT NOT NULL DEFAULT 3,
|
||||
UsrPhotos TINYINT NOT NULL DEFAULT 0,
|
||||
ThirdPartyCookies ENUM('N','Y') NOT NULL DEFAULT 'N',
|
||||
NotifNtfEvents INT NOT NULL DEFAULT 0,
|
||||
EmailNtfEvents INT NOT NULL DEFAULT 0,
|
||||
|
@ -1645,6 +1647,7 @@ CREATE TABLE IF NOT EXISTS usr_data (
|
|||
INDEX(CtrCod),
|
||||
INDEX(Menu),
|
||||
INDEX(SideCols),
|
||||
INDEX(UsrPhotos),
|
||||
INDEX(ThirdPartyCookies));
|
||||
--
|
||||
-- Table usr_duplicated: stores informs of users possibly duplicated
|
||||
|
|
46
swad_ID.c
46
swad_ID.c
|
@ -405,23 +405,23 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs],Anchor);
|
||||
if (Gbl.Action.Original != ActUnk)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
|
||||
switch (Gbl.Action.Original)
|
||||
if (Gbl.Action.Original != ActUnk)
|
||||
{
|
||||
case ActSeeRecSevGst:
|
||||
case ActSeeRecSevStd:
|
||||
case ActSeeRecSevTch:
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
Par_PutHiddenParamLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (Gbl.Action.Original)); // Original action, used to know where we came from
|
||||
switch (Gbl.Action.Original)
|
||||
{
|
||||
case ActSeeRecSevGst:
|
||||
case ActSeeRecSevStd:
|
||||
case ActSeeRecSevTch:
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamString (NULL,"UsrID",UsrDat->IDs.List[NumID].ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamString (NULL,"UsrID",UsrDat->IDs.List[NumID].ID);
|
||||
|
||||
/***** Put link *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Confirm_ID,The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],NULL);
|
||||
|
@ -618,15 +618,15 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID)
|
|||
else
|
||||
{
|
||||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs].New,ID_ID_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
HTM_INPUT_TEXT ("NewID",ID_MAX_BYTES_USR_ID,
|
||||
UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID :
|
||||
"", // Show the most recent ID
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"NewID\" size=\"18\"");
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (Txt_Add_this_ID);
|
||||
HTM_INPUT_TEXT ("NewID",ID_MAX_BYTES_USR_ID,
|
||||
UsrDat->IDs.Num ? UsrDat->IDs.List[UsrDat->IDs.Num - 1].ID :
|
||||
"", // Show the most recent ID
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"NewID\" size=\"18\"");
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (Txt_Add_this_ID);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ static void MAC_PutFormToEditMACAddress (Act_Action_t NextAction,const char *Anc
|
|||
{
|
||||
/* Form to enter a new MAC address */
|
||||
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||
FuncParams (Args);
|
||||
FuncParams (Args);
|
||||
HTM_INPUT_TEXT ("NewMAC",MAC_LENGTH_MAC_ADDRESS,((struct MAC_Params *) Args)->MACstr,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"8\"");
|
||||
|
|
|
@ -308,7 +308,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
|
|||
/***** Button to login with this account *****/
|
||||
HTM_TD_Begin ("class=\"RT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Frm_BeginForm (ActLogInNew);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Btn_PutCreateButtonInline (Txt_Its_me);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
@ -890,8 +890,8 @@ void Acc_AskIfRemoveMyAccount (void)
|
|||
|
||||
/* Show form to request confirmation */
|
||||
Frm_BeginForm (ActRemMyAcc);
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
Btn_PutRemoveButton (Txt_Eliminate_my_user_account);
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
Btn_PutRemoveButton (Txt_Eliminate_my_user_account);
|
||||
Frm_EndForm ();
|
||||
|
||||
/* End alert */
|
||||
|
@ -919,9 +919,9 @@ static void Acc_AskIfRemoveOtherUsrAccount (void)
|
|||
|
||||
/* Show form to request confirmation */
|
||||
Frm_BeginForm (ActRemUsrGbl);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
Btn_PutRemoveButton (Txt_Eliminate_user_account);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
Btn_PutRemoveButton (Txt_Eliminate_user_account);
|
||||
Frm_EndForm ();
|
||||
|
||||
/* End alert */
|
||||
|
|
|
@ -115,7 +115,8 @@ long Acc_DB_CreateNewUsr (const struct UsrData *UsrDat)
|
|||
"CtyCod,"
|
||||
"LocalPhone,FamilyPhone,"
|
||||
"Birthday,Comments,"
|
||||
"Menu,SideCols,NotifNtfEvents,EmailNtfEvents)"
|
||||
"Menu,SideCols,UsrPhotos,"
|
||||
"NotifNtfEvents,EmailNtfEvents)"
|
||||
" VALUES"
|
||||
" ('%s','%s',"
|
||||
"'%s','%s','%s','%s',"
|
||||
|
@ -124,7 +125,8 @@ long Acc_DB_CreateNewUsr (const struct UsrData *UsrDat)
|
|||
"%ld,"
|
||||
"'%s','%s',"
|
||||
"%s,'%s',"
|
||||
"%u,%u,-1,0)",
|
||||
"%u,%u,%u,"
|
||||
"-1,0)",
|
||||
UsrDat->EnUsrCod,
|
||||
UsrDat->Password,
|
||||
UsrDat->Surname1,
|
||||
|
@ -146,7 +148,8 @@ long Acc_DB_CreateNewUsr (const struct UsrData *UsrDat)
|
|||
UsrDat->Comments ? UsrDat->Comments :
|
||||
"",
|
||||
(unsigned) Mnu_MENU_DEFAULT,
|
||||
(unsigned) Cfg_DEFAULT_COLUMNS);
|
||||
(unsigned) Cfg_DEFAULT_COLUMNS,
|
||||
(unsigned) Set_USR_PHOTOS_DEFAULT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1810,6 +1810,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActChgCol ] = { 674,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ChangeSideCols ,Set_EditSettings ,NULL},
|
||||
[ActChgIco ] = {1092,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ico_ChangeIconSet ,Set_EditSettings ,NULL},
|
||||
[ActChgMnu ] = {1243,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Mnu_ChangeMenu ,Set_EditSettings ,NULL},
|
||||
[ActChgUsrPho ] = {1917,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ChangeUsrPhotos ,Set_EditSettings ,NULL},
|
||||
[ActChgPriPho ] = { 774,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ChangePhotoVisibility ,NULL},
|
||||
[ActChgBasPriPrf ] = {1404,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeBasicProfileVis ,NULL},
|
||||
[ActChgExtPriPrf ] = {1765,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeExtendedProfileVis ,NULL},
|
||||
|
@ -3743,6 +3744,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActChgMch, // #1914
|
||||
ActFixMchSco, // #1915
|
||||
ActFixTstSco, // #1916
|
||||
ActChgUsrPho, // #1917
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -65,7 +65,7 @@ typedef enum
|
|||
|
||||
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||
|
||||
#define Act_MAX_ACTION_COD 1916
|
||||
#define Act_MAX_ACTION_COD 1917
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13
|
||||
|
||||
|
@ -1726,18 +1726,19 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActChgCol (ActSeeMyUsgRep + 52)
|
||||
#define ActChgIco (ActSeeMyUsgRep + 53)
|
||||
#define ActChgMnu (ActSeeMyUsgRep + 54)
|
||||
#define ActChgPriPho (ActSeeMyUsgRep + 55)
|
||||
#define ActChgBasPriPrf (ActSeeMyUsgRep + 56)
|
||||
#define ActChgExtPriPrf (ActSeeMyUsgRep + 57)
|
||||
#define ActChgCooPrf (ActSeeMyUsgRep + 58)
|
||||
#define ActChgNtfPrf (ActSeeMyUsgRep + 59)
|
||||
#define ActChgUsrPho (ActSeeMyUsgRep + 55)
|
||||
#define ActChgPriPho (ActSeeMyUsgRep + 56)
|
||||
#define ActChgBasPriPrf (ActSeeMyUsgRep + 57)
|
||||
#define ActChgExtPriPrf (ActSeeMyUsgRep + 58)
|
||||
#define ActChgCooPrf (ActSeeMyUsgRep + 59)
|
||||
#define ActChgNtfPrf (ActSeeMyUsgRep + 60)
|
||||
|
||||
#define ActPrnUsrQR (ActSeeMyUsgRep + 60)
|
||||
#define ActPrnUsrQR (ActSeeMyUsgRep + 61)
|
||||
|
||||
#define ActPrnMyTT (ActSeeMyUsgRep + 61)
|
||||
#define ActEdiTut (ActSeeMyUsgRep + 62)
|
||||
#define ActChgTut (ActSeeMyUsgRep + 63)
|
||||
#define ActChgMyTT1stDay (ActSeeMyUsgRep + 64)
|
||||
#define ActPrnMyTT (ActSeeMyUsgRep + 62)
|
||||
#define ActEdiTut (ActSeeMyUsgRep + 63)
|
||||
#define ActChgTut (ActSeeMyUsgRep + 64)
|
||||
#define ActChgMyTT1stDay (ActSeeMyUsgRep + 65)
|
||||
|
||||
#define Act_NUM_ACTIONS (ActChgMyTT1stDay + 1)
|
||||
|
||||
|
|
|
@ -223,12 +223,12 @@ static void Agd_ShowFormToSelPast__FutureEvents (const struct Agd_Agenda *Agenda
|
|||
(Agenda->Past__FutureEvents & (1 << PstFut)) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents ^ (1 << PstFut), // Toggle
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents ^ (1 << PstFut), // Toggle
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PstFut],
|
||||
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
|
||||
Frm_EndForm ();
|
||||
|
@ -260,12 +260,12 @@ static void Agd_ShowFormToSelPrivatPublicEvents (const struct Agd_Agenda *Agenda
|
|||
(Agenda->PrivatPublicEvents & (1 << PrvPub)) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents ^ (1 << PrvPub), // Toggle
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents ^ (1 << PrvPub), // Toggle
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[PrvPub],
|
||||
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
|
||||
Frm_EndForm ();
|
||||
|
@ -297,12 +297,12 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (const struct Agd_Agenda *Agenda
|
|||
(Agenda->HiddenVisiblEvents & (1 << HidVis)) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents ^ (1 << HidVis), // Toggle
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents ^ (1 << HidVis), // Toggle
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (Icon[HidVis],
|
||||
Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]);
|
||||
Frm_EndForm ();
|
||||
|
@ -622,13 +622,13 @@ static void Agd_WriteHeaderListEvents (const struct Agd_Agenda *Agenda,
|
|||
case Agd_MY_AGENDA_TODAY:
|
||||
case Agd_MY_AGENDA:
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
Pag_PutHiddenParamPagNum (Pag_MY_AGENDA,Agenda->CurrentPage);
|
||||
Pag_PutHiddenParamPagNum (Pag_MY_AGENDA,Agenda->CurrentPage);
|
||||
break;
|
||||
case Agd_ANOTHER_AGENDA_TODAY:
|
||||
case Agd_ANOTHER_AGENDA:
|
||||
Frm_BeginForm (ActSeeUsrAgd);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Pag_PutHiddenParamPagNum (Pag_ANOTHER_AGENDA,Agenda->CurrentPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Pag_PutHiddenParamPagNum (Pag_ANOTHER_AGENDA,Agenda->CurrentPage);
|
||||
break;
|
||||
}
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
|
@ -747,12 +747,12 @@ static void Agd_PutButtonToCreateNewEvent (const struct Agd_Agenda *Agenda)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActFrmNewEvtMyAgd);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
Agd_PutParamsMyAgenda (Agenda->Past__FutureEvents,
|
||||
Agenda->PrivatPublicEvents,
|
||||
Agenda->HiddenVisiblEvents,
|
||||
Agenda->SelectedOrder,
|
||||
Agenda->CurrentPage,
|
||||
-1L);
|
||||
|
||||
/***** Confirm button *****/
|
||||
Btn_PutConfirmButton (Txt_New_event);
|
||||
|
|
|
@ -434,10 +434,10 @@ void Ale_ShowAlertAndButton2 (Act_Action_t NextAction,const char *Anchor,const c
|
|||
{
|
||||
/* Begin form */
|
||||
Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,OnSubmit);
|
||||
if (FuncParams)
|
||||
{
|
||||
FuncParams (Args);
|
||||
}
|
||||
if (FuncParams)
|
||||
{
|
||||
FuncParams (Args);
|
||||
}
|
||||
|
||||
/* Put button */
|
||||
Btn_PutButton (Button,TxtButton);
|
||||
|
|
|
@ -164,7 +164,7 @@ static void Ann_PutButtonToAddNewAnnouncement (void)
|
|||
extern const char *Txt_New_announcement;
|
||||
|
||||
Frm_BeginForm (ActWriAnn);
|
||||
Btn_PutConfirmButton (Txt_New_announcement);
|
||||
Btn_PutConfirmButton (Txt_New_announcement);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -235,10 +235,10 @@ static void Asg_PutHeadForSeeing (struct Asg_Assignments *Assignments,
|
|||
{
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActSeeAsg);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Assignments->CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Order);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ASSIGNMENTS,Assignments->CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Order);
|
||||
|
||||
/* Begin link to select order */
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
|
@ -324,8 +324,8 @@ static void Asg_PutButtonToCreateNewAsg (void *Assignments)
|
|||
{
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActFrmNewAsg);
|
||||
((struct Asg_Assignments *) Assignments)->AsgCodToEdit = -1L;
|
||||
Asg_PutParams (Assignments);
|
||||
((struct Asg_Assignments *) Assignments)->AsgCodToEdit = -1L;
|
||||
Asg_PutParams (Assignments);
|
||||
|
||||
/* Button to create new assignment */
|
||||
Btn_PutConfirmButton (Txt_New_assignment);
|
||||
|
|
|
@ -265,10 +265,10 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
|||
HTM_TH_Begin (1,1,"LM");
|
||||
|
||||
Frm_BeginForm (ActSeeAtt);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events->CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Order);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events->CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Order);
|
||||
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
|
||||
|
@ -395,7 +395,7 @@ static void Att_PutButtonToCreateNewAttEvent (struct Att_Events *Events)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActFrmNewAtt);
|
||||
Att_PutParamsToCreateNewAttEvent (Events);
|
||||
Att_PutParamsToCreateNewAttEvent (Events);
|
||||
|
||||
/***** Button to create new event *****/
|
||||
Btn_PutConfirmButton (Txt_New_event);
|
||||
|
@ -852,17 +852,17 @@ void Att_AskRemAttEvent (void)
|
|||
|
||||
/***** Button of confirmation of removing *****/
|
||||
Frm_BeginForm (ActRemAtt);
|
||||
Att_PutParamAttCod (Event.AttCod);
|
||||
Dat_PutHiddenParamOrder (Events.SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
|
||||
Att_PutParamAttCod (Event.AttCod);
|
||||
Dat_PutHiddenParamOrder (Events.SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
|
||||
|
||||
/* Ask for confirmation of removing */
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
Event.Title);
|
||||
/* Ask for confirmation of removing */
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Do_you_really_want_to_remove_the_event_X,
|
||||
Event.Title);
|
||||
|
||||
Btn_PutRemoveButton (Txt_Remove_event);
|
||||
Btn_PutRemoveButton (Txt_Remove_event);
|
||||
Frm_EndForm ();
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
|
@ -1026,12 +1026,12 @@ void Att_RequestCreatOrEditAttEvent (void)
|
|||
else
|
||||
{
|
||||
Frm_BeginForm (ActChgAtt);
|
||||
Att_PutParamAttCod (Event.AttCod);
|
||||
Att_PutParamAttCod (Event.AttCod);
|
||||
}
|
||||
Dat_PutHiddenParamOrder (Events.SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Events.SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_ATT_EVENTS,Events.CurrentPage);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
if (ItsANewAttEvent)
|
||||
|
@ -1530,7 +1530,7 @@ static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event)
|
|||
if (Event->Open)
|
||||
{
|
||||
Frm_BeginForm (ActRecAttMe);
|
||||
Att_PutParamAttCod (Event->AttCod);
|
||||
Att_PutParamAttCod (Event->AttCod);
|
||||
}
|
||||
|
||||
/***** List students (only me) *****/
|
||||
|
@ -1611,8 +1611,8 @@ static void Att_ListAttStudents (struct Att_Events *Events,
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActRecAttStd);
|
||||
Att_PutParamAttCod (Event->AttCod);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Att_PutParamAttCod (Event->AttCod);
|
||||
Grp_PutParamsCodGrps ();
|
||||
|
||||
/* Begin table */
|
||||
HTM_TABLE_BeginWideMarginPadding (2);
|
||||
|
@ -1680,6 +1680,12 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
struct UsrData *UsrDat,
|
||||
struct Att_Event *Event)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
bool Present;
|
||||
char CommentStd[Cns_MAX_BYTES_TEXT + 1];
|
||||
char CommentTch[Cns_MAX_BYTES_TEXT + 1];
|
||||
|
@ -1749,7 +1755,9 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
|||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO45x60",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -1822,8 +1830,8 @@ static void Att_PutLinkAttEvent (struct Att_Event *AttEvent,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActSeeOneAtt);
|
||||
Att_PutParamAttCod (AttEvent->AttCod);
|
||||
Att_PutParamsCodGrps (AttEvent->AttCod);
|
||||
Att_PutParamAttCod (AttEvent->AttCod);
|
||||
Att_PutParamsCodGrps (AttEvent->AttCod);
|
||||
|
||||
/***** Link to view attendance event *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,Class,NULL);
|
||||
|
@ -2599,15 +2607,15 @@ static void Att_PutButtonToShowDetails (const struct Att_Events *Events)
|
|||
/***** Button to show more details *****/
|
||||
/* Begin form */
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_DETAILS_ID);
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
if (Events->StrAttCodsSelected)
|
||||
if (Events->StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"AttCods",Events->StrAttCodsSelected);
|
||||
Par_PutHiddenParamChar ("ShowDetails",'Y');
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
if (Events->StrAttCodsSelected)
|
||||
if (Events->StrAttCodsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"AttCods",Events->StrAttCodsSelected);
|
||||
|
||||
/* Button */
|
||||
Btn_PutConfirmButton (Txt_Show_more_details);
|
||||
/* Button */
|
||||
Btn_PutConfirmButton (Txt_Show_more_details);
|
||||
|
||||
/* End form */
|
||||
Frm_EndForm ();
|
||||
|
@ -2657,8 +2665,8 @@ static void Att_ListEventsToSelect (const struct Att_Events *Events,
|
|||
if (NormalView)
|
||||
{
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,Att_ATTENDANCE_TABLE_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
}
|
||||
|
||||
/***** Begin table *****/
|
||||
|
@ -2906,6 +2914,12 @@ static void Att_WriteTableHeadSeveralAttEvents (const struct Att_Events *Events)
|
|||
static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
|
||||
unsigned NumUsr,struct UsrData *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
unsigned NumAttEvent;
|
||||
bool Present;
|
||||
unsigned NumTimesPresent;
|
||||
|
@ -2924,7 +2938,9 @@ static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
|
|||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"LM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -3058,6 +3074,12 @@ static void Att_ListAttEventsForAStd (const struct Att_Events *Events,
|
|||
{
|
||||
extern const char *Txt_Student_comment;
|
||||
extern const char *Txt_Teachers_comment;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
unsigned NumAttEvent;
|
||||
unsigned UniqueId;
|
||||
char *Id;
|
||||
|
@ -3075,12 +3097,14 @@ static void Att_ListAttEventsForAStd (const struct Att_Events *Events,
|
|||
UsrDat->Accepted ? "DAT_N" :
|
||||
"DAT",
|
||||
Gbl.RowEvenOdd);
|
||||
HTM_TxtF ("%u:",NumUsr);
|
||||
HTM_TxtF ("%u:",NumUsr);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Show student's photo *****/
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"RM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
|
|
|
@ -62,12 +62,13 @@ struct ALn_Substring
|
|||
|
||||
struct ALn_Link
|
||||
{
|
||||
ALn_LinkType_t Type;
|
||||
struct ALn_Substring URLorNick;
|
||||
struct ALn_Substring NickAnchor[3];
|
||||
size_t AddedLengthUntilHere; // Total length of extra HTML code added until this link (included)
|
||||
struct ALn_Link *Prev;
|
||||
struct ALn_Link *Next;
|
||||
ALn_LinkType_t Type; // URL or nickname?
|
||||
struct ALn_Substring URLorNick; // Link text
|
||||
struct ALn_Substring NickAnchor[3]; // Pointer to anchors if nick
|
||||
size_t LengthAddedUpToHere; // Total length of extra HTML code
|
||||
// added up to this link (included)
|
||||
struct ALn_Link *Prev; // Pointer to previous link
|
||||
struct ALn_Link *Next; // Pointer to next link
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -144,7 +145,36 @@ action="https://localhost/swad/es" method="post">
|
|||
</form>
|
||||
|
||||
*/
|
||||
/*
|
||||
______ ______ ______ ______
|
||||
|______|<-- -->|______|<-- -->|______|<-- -->|______|<--- LastLink
|
||||
|______| \/ |______| \/ |______| \/ |______|
|
||||
|______| /\ |______| /\ |______| /\ |______|
|
||||
|_NULL_| / ---|_Prev_| / ---|_Prev_| / ---|_Prev_|
|
||||
|_Next_|-- |_Next_|-- |_Next_|-- |_NULL_|
|
||||
|
||||
1 Move forward the text after the link
|
||||
2 Copy the 3rd part of the anchor
|
||||
3 Move forward the link
|
||||
4 Copy the 2nd part of the anchor
|
||||
5 Copy the link into the anchor
|
||||
6 Copy the 1st part of the anchor
|
||||
|
||||
Hi @admin, can I use https://openswad.org for free?
|
||||
_______________________________
|
||||
|H|i|_|@|a|d|m|i|n|,|_|c|a|n|...|
|
||||
| | | | | | | | | | | | | | |
|
||||
| | | | | | | | | \_\_\_\_\_\______________________________________1____
|
||||
| | | \ \ \ \ \ \ \ \ \ \ \ \
|
||||
| | | \_\_\_\_\_\_________________________3____ | | | | | |
|
||||
| | | \ \ \ \ \ \ \ \ \ \ \ \ | | | | | |
|
||||
| | | \_\_\_\_\_\_5____ | | | | | | | | | | | |
|
||||
| | | \ \ \ \ \ \ | | | | | | | | | | | |
|
||||
| | | 6 | | | | | | 4 | | | | | | 2 | | | | | |
|
||||
v v v anchor#1 v v v v v v anchor#2 v v v v v v anchor#3 v v v v v v
|
||||
___________________________________________________________________________
|
||||
|H|i|_|<|_|_|_|_|@|a|d|m|i|n|_|_|_|_|>|@|a|d|m|i|n|<|_|_|_|_|>|,|_|c|a|n|...|
|
||||
*/
|
||||
void ALn_InsertLinks (char *Txt,unsigned long MaxLength,size_t MaxCharsURLOnScreen)
|
||||
{
|
||||
size_t TxtLength;
|
||||
|
@ -186,7 +216,7 @@ void ALn_InsertLinks (char *Txt,unsigned long MaxLength,size_t MaxCharsURLOnScre
|
|||
/***** Insert links from end to start of text,
|
||||
only if there is enough space available in text *****/
|
||||
TxtLength = strlen (Txt);
|
||||
if (TxtLength + LastLink->AddedLengthUntilHere <= MaxLength)
|
||||
if (TxtLength + LastLink->LengthAddedUpToHere <= MaxLength)
|
||||
for (Link = LastLink;
|
||||
Link;
|
||||
Link = Link->Prev)
|
||||
|
@ -213,14 +243,14 @@ void ALn_InsertLinks (char *Txt,unsigned long MaxLength,size_t MaxCharsURLOnScre
|
|||
to avoid overwriting source) *****/
|
||||
PtrSrc = (Link == LastLink) ? Txt + TxtLength :
|
||||
Link->Next->URLorNick.Str - 1,
|
||||
PtrDst = PtrSrc + Link->AddedLengthUntilHere,
|
||||
PtrDst = PtrSrc + Link->LengthAddedUpToHere ,
|
||||
Length = PtrSrc - (Link->URLorNick.Str + Link->URLorNick.Len - 1);
|
||||
for (i = 0;
|
||||
i < Length;
|
||||
i++)
|
||||
*PtrDst-- = *PtrSrc--;
|
||||
|
||||
/***** Step 2: Copy third part of anchor *****/
|
||||
/***** Step 2: Copy the third part of the anchor *****/
|
||||
ALn_CopySubstring (Anchor[2],&PtrDst);
|
||||
|
||||
/***** Step 3: Move forward the link (URL or nickname)
|
||||
|
@ -249,15 +279,15 @@ void ALn_InsertLinks (char *Txt,unsigned long MaxLength,size_t MaxCharsURLOnScre
|
|||
break;
|
||||
}
|
||||
|
||||
/***** Step 4: Copy second part of anchor *****/
|
||||
/***** Step 4: Copy the second part of the anchor *****/
|
||||
ALn_CopySubstring (Anchor[1],&PtrDst);
|
||||
|
||||
/***** Step 5: Copy link into directive A
|
||||
/***** Step 5: Copy the link into the anchor
|
||||
(it's mandatory to do the copy in reverse order
|
||||
to avoid overwriting source URL or nickname) *****/
|
||||
ALn_CopySubstring (&Link->URLorNick,&PtrDst);
|
||||
|
||||
/***** Step 6: Copy first part of anchor *****/
|
||||
/***** Step 6: Copy the first part of the anchor *****/
|
||||
ALn_CopySubstring (Anchor[0],&PtrDst);
|
||||
}
|
||||
}
|
||||
|
@ -399,11 +429,11 @@ static ALn_LinkType_t ALn_CheckURL (char **PtrSrc,char PrevCh,
|
|||
}
|
||||
|
||||
/***** Compute number of bytes added until here *****/
|
||||
(*Link)->AddedLengthUntilHere = (*Link)->Prev ? (*Link)->Prev->AddedLengthUntilHere :
|
||||
(*Link)->LengthAddedUpToHere = (*Link)->Prev ? (*Link)->Prev->LengthAddedUpToHere :
|
||||
0;
|
||||
(*Link)->URLorNick.Len = (size_t) (PtrEnd + 1 - (*Link)->URLorNick.Str);
|
||||
if ((*Link)->URLorNick.Len <= MaxCharsURLOnScreen)
|
||||
(*Link)->AddedLengthUntilHere += ALn_URL_ANCHOR_TOTAL_LENGTH +
|
||||
(*Link)->LengthAddedUpToHere += ALn_URL_ANCHOR_TOTAL_LENGTH +
|
||||
(*Link)->URLorNick.Len;
|
||||
else // If URL is too long to be displayed ==> short it
|
||||
{
|
||||
|
@ -411,7 +441,7 @@ static ALn_LinkType_t ALn_CheckURL (char **PtrSrc,char PrevCh,
|
|||
Err_NotEnoughMemoryExit ();
|
||||
strncpy (Limited,(*Link)->URLorNick.Str,(*Link)->URLorNick.Len);
|
||||
Limited[(*Link)->URLorNick.Len] = '\0';
|
||||
(*Link)->AddedLengthUntilHere += ALn_URL_ANCHOR_TOTAL_LENGTH +
|
||||
(*Link)->LengthAddedUpToHere += ALn_URL_ANCHOR_TOTAL_LENGTH +
|
||||
Str_LimitLengthHTMLStr (Limited,MaxCharsURLOnScreen);
|
||||
free (Limited);
|
||||
}
|
||||
|
@ -431,6 +461,12 @@ static ALn_LinkType_t ALn_CheckNickname (char **PtrSrc,char PrevCh,
|
|||
struct ALn_Link **LastLink)
|
||||
{
|
||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC12x16",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE12x16",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR12x16",
|
||||
};
|
||||
char Ch;
|
||||
size_t Length;
|
||||
char ParamsStr[Frm_MAX_BYTES_PARAMS_STR];
|
||||
|
@ -531,7 +567,7 @@ static ALn_LinkType_t ALn_CheckNickname (char **PtrSrc,char PrevCh,
|
|||
ShowPhoto = Pho_ShowingUsrPhotoIsAllowed (&UsrDat,PhotoURL);
|
||||
Pho_BuildHTMLUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
"PHOTO12x16",Pho_ZOOM,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
&CaptionStr,
|
||||
&ImgStr);
|
||||
if (asprintf (&(*Link)->NickAnchor[2].Str,
|
||||
|
@ -547,9 +583,9 @@ static ALn_LinkType_t ALn_CheckNickname (char **PtrSrc,char PrevCh,
|
|||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** Compute number of bytes added until here *****/
|
||||
(*Link)->AddedLengthUntilHere = (*Link)->Prev ? (*Link)->Prev->AddedLengthUntilHere :
|
||||
(*Link)->LengthAddedUpToHere = (*Link)->Prev ? (*Link)->Prev->LengthAddedUpToHere :
|
||||
0;
|
||||
(*Link)->AddedLengthUntilHere += (*Link)->NickAnchor[0].Len +
|
||||
(*Link)->LengthAddedUpToHere += (*Link)->NickAnchor[0].Len +
|
||||
(*Link)->URLorNick.Len +
|
||||
(*Link)->NickAnchor[1].Len +
|
||||
(*Link)->NickAnchor[2].Len;
|
||||
|
|
|
@ -455,7 +455,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
|||
/* Banner short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenBanSho);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
HTM_INPUT_TEXT ("ShortName",Ban_MAX_CHARS_SHRT_NAME,Ban->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -465,7 +465,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
|||
/* Banner full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenBanFul);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
HTM_INPUT_TEXT ("FullName",Ban_MAX_CHARS_FULL_NAME,Ban->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -475,7 +475,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
|||
/* Banner image */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgBanImg);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
HTM_INPUT_TEXT ("Img",Ban_MAX_CHARS_IMAGE,Ban->Img,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"12\"");
|
||||
|
@ -485,7 +485,7 @@ static void Ban_ListBannersForEdition (struct Ban_Banners *Banners)
|
|||
/* Banner WWW */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgBanWWW);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
Ban_PutParamBanCodToEdit (&Banners->BanCodToEdit);
|
||||
HTM_INPUT_URL ("WWW",Ban->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\""
|
||||
" required=\"required\"");
|
||||
|
@ -1031,8 +1031,8 @@ void Ban_WriteMenuWithBanners (void)
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActClkBan);
|
||||
Ban_PutParamBanCod (Banners.Lst[NumBan].BanCod);
|
||||
Par_PutHiddenParamString (NULL,"URL",Banners.Lst[NumBan].WWW);
|
||||
Ban_PutParamBanCod (Banners.Lst[NumBan].BanCod);
|
||||
Par_PutHiddenParamString (NULL,"URL",Banners.Lst[NumBan].WWW);
|
||||
|
||||
/* Banner image */
|
||||
HTM_INPUT_IMAGE (Cfg_URL_BANNER_PUBLIC,Banners.Lst[NumBan].Img,
|
||||
|
|
115
swad_browser.c
115
swad_browser.c
|
@ -3130,7 +3130,7 @@ static void Brw_FormToChangeCrsGrpZone (void)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Brw_ActChgZone[Gbl.FileBrowser.Type]);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
|
||||
/***** List start *****/
|
||||
HTM_UL_Begin ("class=\"LIST_LEFT\"");
|
||||
|
@ -3229,10 +3229,18 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
|
|||
[Rol_NET] = ActSeeRecOneTch,
|
||||
[Rol_TCH] = ActSeeRecOneTch,
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC60x80",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE60x80",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR60x80",
|
||||
};
|
||||
|
||||
/***** Show user's photo *****/
|
||||
HTM_TD_Begin ("class=\"OWNER_WORKS_PHOTO\"");
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO60x80",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Begin form to send a message to this user *****/
|
||||
|
@ -3243,7 +3251,7 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
|
|||
if (!NextAction[UsrDat->Roles.InCurrentCrs])
|
||||
Err_WrongRoleExit ();
|
||||
Frm_BeginForm (NextAction[UsrDat->Roles.InCurrentCrs]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
|
||||
/***** Show user's ID *****/
|
||||
ID_WriteUsrIDs (UsrDat,NULL);
|
||||
|
@ -3608,7 +3616,7 @@ static void Brw_PutButtonToShowEdit (void)
|
|||
if (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type] != ActUnk)
|
||||
{
|
||||
Frm_BeginForm (Brw_ActFromAdmToSee[Gbl.FileBrowser.Type]);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
Btn_PutConfirmButton (Txt_View);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -3617,7 +3625,7 @@ static void Brw_PutButtonToShowEdit (void)
|
|||
if (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type] != ActUnk)
|
||||
{
|
||||
Frm_BeginForm (Brw_ActFromSeeToAdm[Gbl.FileBrowser.Type]);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
Btn_PutConfirmButton (Txt_Edit);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -4872,7 +4880,7 @@ static void Brw_PutIconToExpandFolder (const char *FileBrowserId,const char *Row
|
|||
Frm_BeginFormAnchorOnSubmit (Brw_ActExpandFolder[Gbl.FileBrowser.Type],
|
||||
FileBrowserId,
|
||||
JavaScriptFuncToExpandFolder); // JavaScript function to unhide rows
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Ico_PutIconLink ("caret-right.svg",Txt_Expand);
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -4906,7 +4914,7 @@ static void Brw_PutIconToContractFolder (const char *FileBrowserId,const char *R
|
|||
Frm_BeginFormAnchorOnSubmit (Brw_ActContractFolder[Gbl.FileBrowser.Type],
|
||||
FileBrowserId,
|
||||
JavaScriptFuncToContractFolder); // JavaScript function to hide rows
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Ico_PutIconLink ("caret-down.svg",Txt_Contract);
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -5102,10 +5110,10 @@ static void Brw_PutIconFileWithLinkToViewMetadata (struct FileMetadata *FileMeta
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Brw_ActReqDatFile[Gbl.FileBrowser.Type]);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
FileMetadata->FilCod);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
FileMetadata->FilCod);
|
||||
|
||||
/***** Icon depending on the file extension *****/
|
||||
Brw_PutIconFile (FileMetadata->FilFolLnk.Type,FileMetadata->FilFolLnk.Name,
|
||||
|
@ -5227,7 +5235,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
|
|||
if (ICanEditFileOrFolder) // Can I rename this folder?
|
||||
{
|
||||
Frm_BeginForm (Brw_ActRenameFolder[Gbl.FileBrowser.Type]);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
}
|
||||
|
||||
/***** Write name of the folder *****/
|
||||
|
@ -5274,7 +5282,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
|
|||
HTM_NBSP ();
|
||||
|
||||
Frm_BeginForm (Brw_ActDowFile[Gbl.FileBrowser.Type]);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
/* Link to the form and to the file */
|
||||
if (asprintf (&Class,"BT_LINK FILENAME %s",Gbl.FileBrowser.TxtStyle) < 0)
|
||||
|
@ -5444,6 +5452,12 @@ static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata)
|
|||
static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod)
|
||||
{
|
||||
extern const char *Txt_Unknown_or_without_photo;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC15x20B",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE15x20B",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR15x20B",
|
||||
};
|
||||
bool ShowUsr = false;
|
||||
struct UsrData UsrDat;
|
||||
|
||||
|
@ -5463,9 +5477,12 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod)
|
|||
|
||||
if (ShowUsr)
|
||||
/***** Show photo *****/
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO15x20B",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
else
|
||||
Ico_PutIcon ("usr_bl.jpg",Txt_Unknown_or_without_photo,"PHOTO15x20B");
|
||||
Ico_PutIcon ("usr_bl.jpg",Txt_Unknown_or_without_photo,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos]);
|
||||
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -6829,7 +6846,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Brw_ActCreateFolder[Gbl.FileBrowser.Type]);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Create_folder,
|
||||
|
@ -6903,10 +6920,10 @@ static void Brw_PutFormToUploadFilesUsingDropzone (const char *FileNameToShow)
|
|||
|
||||
/***** Put button to refresh file browser after upload *****/
|
||||
Frm_BeginForm (Brw_ActRefreshAfterUploadFiles[Gbl.FileBrowser.Type]);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
-1L); // Not used
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
-1L); // Not used
|
||||
|
||||
/***** Button to send *****/
|
||||
Btn_PutConfirmButton (Txt_Done);
|
||||
|
@ -6940,7 +6957,7 @@ static void Brw_PutFormToUploadOneFileClassic (const char *FileNameToShow)
|
|||
|
||||
/***** Form to upload one files using the classic way *****/
|
||||
Frm_BeginForm (Brw_ActUploadFileClassic[Gbl.FileBrowser.Type]);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
/* File */
|
||||
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"*",
|
||||
|
@ -6968,7 +6985,7 @@ static void Brw_PutFormToPasteAFileOrFolder (const char *FileNameToShow)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Brw_ActPaste[Gbl.FileBrowser.Type]);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Paste,
|
||||
|
@ -7002,7 +7019,7 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Brw_ActCreateLink[Gbl.FileBrowser.Type]);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Create_link,
|
||||
|
@ -7826,6 +7843,12 @@ void Brw_ShowFileMetadata (void)
|
|||
extern const char *Txt_user[Usr_NUM_SEXS];
|
||||
extern const char *Txt_users[Usr_NUM_SEXS];
|
||||
extern const char *Txt_Save_file_properties;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC15x20",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE15x20",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR15x20",
|
||||
};
|
||||
struct FileMetadata FileMetadata;
|
||||
struct UsrData PublisherUsrDat;
|
||||
char FileNameToShow[NAME_MAX + 1];
|
||||
|
@ -7945,10 +7968,10 @@ void Brw_ShowFileMetadata (void)
|
|||
}
|
||||
|
||||
Frm_BeginForm (Brw_ActRecDatFile[Gbl.FileBrowser.Type]);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
FileMetadata.FilCod);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
FileMetadata.FilCod);
|
||||
}
|
||||
|
||||
/***** Begin box and table *****/
|
||||
|
@ -7989,7 +8012,9 @@ void Brw_ShowFileMetadata (void)
|
|||
if (FileHasPublisher)
|
||||
{
|
||||
/* Show photo */
|
||||
Pho_ShowUsrPhotoIfAllowed (&PublisherUsrDat,"PHOTO15x20",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&PublisherUsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
|
||||
/* Write name */
|
||||
HTM_NBSP ();
|
||||
|
@ -8517,12 +8542,12 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL,
|
|||
/* Form to see marks */
|
||||
Frm_BeginForm (Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ? ActSeeMyMrkCrs :
|
||||
ActSeeMyMrkGrp);
|
||||
Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,FileMetadata->FilFolLnk.Path,
|
||||
sizeof (Gbl.FileBrowser.FilFolLnk.Path) - 1);
|
||||
Str_Copy (Gbl.FileBrowser.FilFolLnk.Name,FileMetadata->FilFolLnk.Name,
|
||||
sizeof (Gbl.FileBrowser.FilFolLnk.Name) - 1);
|
||||
Gbl.FileBrowser.FilFolLnk.Type = FileMetadata->FilFolLnk.Type;
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Str_Copy (Gbl.FileBrowser.FilFolLnk.Path,FileMetadata->FilFolLnk.Path,
|
||||
sizeof (Gbl.FileBrowser.FilFolLnk.Path) - 1);
|
||||
Str_Copy (Gbl.FileBrowser.FilFolLnk.Name,FileMetadata->FilFolLnk.Name,
|
||||
sizeof (Gbl.FileBrowser.FilFolLnk.Name) - 1);
|
||||
Gbl.FileBrowser.FilFolLnk.Type = FileMetadata->FilFolLnk.Type;
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
|
||||
/* Begin link */
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Check_marks_in_the_file,"BT_LINK DAT",NULL);
|
||||
|
@ -9912,7 +9937,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
|||
if (InsCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeInsInf);
|
||||
Deg_PutParamDegCod (InsCod);
|
||||
Deg_PutParamDegCod (InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (InsShortName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -9928,7 +9953,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
|||
if (CtrCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeCtrInf);
|
||||
Deg_PutParamDegCod (CtrCod);
|
||||
Deg_PutParamDegCod (CtrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (CtrShortName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -9944,7 +9969,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
|||
if (DegCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (DegCod);
|
||||
Deg_PutParamDegCod (DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (DegShortName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -9960,7 +9985,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
|||
if (CrsCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (CrsShortName),"BT_LINK DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
HTM_Txt (CrsShortName);
|
||||
|
@ -10032,24 +10057,24 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
|||
if (CrsCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Crs_PutParamCrsCod (CrsCod); // Go to course
|
||||
if (GrpCod > 0)
|
||||
Grp_PutParamGrpCod (&GrpCod);
|
||||
Crs_PutParamCrsCod (CrsCod); // Go to course
|
||||
if (GrpCod > 0)
|
||||
Grp_PutParamGrpCod (&GrpCod);
|
||||
}
|
||||
else if (DegCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Deg_PutParamDegCod (DegCod); // Go to degree
|
||||
Deg_PutParamDegCod (DegCod); // Go to degree
|
||||
}
|
||||
else if (CtrCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Ctr_PutParamCtrCod (CtrCod); // Go to center
|
||||
Ctr_PutParamCtrCod (CtrCod); // Go to center
|
||||
}
|
||||
else if (InsCod > 0)
|
||||
{
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Ins_PutParamInsCod (InsCod); // Go to institution
|
||||
Ins_PutParamInsCod (InsCod); // Go to institution
|
||||
}
|
||||
else
|
||||
Frm_BeginForm (Action);
|
||||
|
@ -10117,7 +10142,7 @@ void Brw_AskRemoveOldFiles (void)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActRemOldBrf);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Remove_old_files,
|
||||
|
|
|
@ -127,7 +127,7 @@ void Bld_SeeBuildings (void)
|
|||
{
|
||||
HTM_TH_Begin (1,1,"LM");
|
||||
Frm_BeginForm (ActSeeBld);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_BUILDINGS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Buildings.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -442,7 +442,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
/* Building short name */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginFormAnchor (ActRenBldSho,Anchor);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Bld_MAX_CHARS_SHRT_NAME,Building->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -452,7 +452,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
/* Building full name */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginFormAnchor (ActRenBldFul,Anchor);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
HTM_INPUT_TEXT ("FullName",Bld_MAX_CHARS_FULL_NAME,Building->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -462,7 +462,7 @@ static void Bld_ListBuildingsForEdition (const struct Bld_Buildings *Buildings)
|
|||
/* Building location */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginFormAnchor (ActRenBldLoc,Anchor);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
Bld_PutParamBldCod (&Building->BldCod);
|
||||
HTM_INPUT_TEXT ("Location",Bld_MAX_CHARS_LOCATION,Building->Location,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\" class=\"INPUT_FULL_NAME\"");
|
||||
|
|
|
@ -127,14 +127,14 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,
|
|||
FirstDayOfWeek == Gbl.Prefs.FirstDayOfWeek ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FirstDayOfWeek",FirstDayOfWeek);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams (Args);
|
||||
snprintf (Icon,sizeof (Icon),"first-day-of-week-%u.png",FirstDayOfWeek);
|
||||
Ico_PutSettingIconLink (Icon,
|
||||
Str_BuildStringStr (Txt_First_day_of_the_week_X,
|
||||
Txt_DAYS_SMALL[FirstDayOfWeek]));
|
||||
Str_FreeString ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"FirstDayOfWeek",FirstDayOfWeek);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams (Args);
|
||||
snprintf (Icon,sizeof (Icon),"first-day-of-week-%u.png",FirstDayOfWeek);
|
||||
Ico_PutSettingIconLink (Icon,
|
||||
Str_BuildStringStr (Txt_First_day_of_the_week_X,
|
||||
Txt_DAYS_SMALL[FirstDayOfWeek]));
|
||||
Str_FreeString ();
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
|
|
@ -971,8 +971,8 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActRcvCfe,Anchor);
|
||||
if (ExaCod > 0) // Existing call for exam
|
||||
Cfe_PutHiddenParamExaCod (ExaCod);
|
||||
if (ExaCod > 0) // Existing call for exam
|
||||
Cfe_PutHiddenParamExaCod (ExaCod);
|
||||
}
|
||||
|
||||
/***** Begin table *****/
|
||||
|
|
|
@ -183,7 +183,7 @@ void Ctr_DrawCenterLogoAndNameWithLink (struct Ctr_Center *Ctr,Act_Action_t Acti
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Ctr_PutParamCtrCod (Ctr->CtrCod);
|
||||
Ctr_PutParamCtrCod (Ctr->CtrCod);
|
||||
|
||||
/***** Link to action *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Ctr->FullName),ClassLink,NULL);
|
||||
|
@ -805,7 +805,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgCtrPlc);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL\"");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",
|
||||
|
@ -833,7 +833,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenCtrSho);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ctr->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -848,7 +848,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenCtrFul);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ctr->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -863,7 +863,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgCtrWWW);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
Hie_PutParamOtherHieCod (&Ctr->CtrCod);
|
||||
HTM_INPUT_URL ("WWW",Ctr->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -1409,7 +1409,7 @@ static void Ctr_PutHeadCentersForSeeing (bool OrderSelectable)
|
|||
if (OrderSelectable)
|
||||
{
|
||||
Frm_BeginForm (ActSeeCtr);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_CENTERS_HELP_ORDER[Order],
|
||||
Order == Ctr_ORDER_BY_CENTER ? "BT_LINK LM TIT_TBL" :
|
||||
"BT_LINK RM TIT_TBL",
|
||||
|
|
|
@ -586,7 +586,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
|||
if (!PrintView)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
|
||||
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Ins.ShrtName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -757,7 +757,7 @@ static void CtrCfg_NumDegs (void)
|
|||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LB\"");
|
||||
Frm_BeginFormGoTo (ActSeeDeg);
|
||||
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
|
||||
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Degrees_of_CENTER_X,
|
||||
Gbl.Hierarchy.Ctr.ShrtName),
|
||||
"BT_LINK DAT",NULL);
|
||||
|
|
|
@ -602,13 +602,20 @@ TODO: FIX BUG, URGENT! En las fechas como par
|
|||
|
||||
TODO: En las encuestas, que los estudiantes no puedan ver los resultados hasta que no finalice el plazo.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.64.1 (2021-11-28)"
|
||||
#define CSS_FILE "swad21.59.css"
|
||||
#define Log_PLATFORM_VERSION "SWAD 21.65 (2021-12-01)"
|
||||
#define CSS_FILE "swad21.65.css"
|
||||
#define JS_FILE "swad21.59.js"
|
||||
/*
|
||||
TODO: Rename CENTRE to CENTER in help wiki.
|
||||
TODO: Rename ASSESSMENT.Announcements to ASSESSMENT.Calls_for_exams
|
||||
|
||||
Version 21.65: Dec 01, 2021 Selection of shape of user photos. (320755 lines)
|
||||
4 changes necessary in database:
|
||||
ALTER TABLE set_ip_settings ADD COLUMN UsrPhotos TINYINT NOT NULL DEFAULT 0 AFTER SideCols;
|
||||
UPDATE set_ip_settings SET UsrPhotos=2;
|
||||
ALTER TABLE usr_data ADD COLUMN UsrPhotos TINYINT NOT NULL DEFAULT 0 AFTER SideCols,ADD INDEX (UsrPhotos);
|
||||
UPDATE usr_data SET UsrPhotos=2;
|
||||
|
||||
Version 21.64.1: Nov 28, 2021 Code refactoring in link insertion. (320070 lines)
|
||||
Version 21.64: Nov 28, 2021 New module swad_autolink to insert links in texts. (320076 lines)
|
||||
Version 21.63: Nov 26, 2021 Fixing of corruption in test prints and match prints. (320010 lines)
|
||||
|
|
|
@ -417,7 +417,7 @@ static void Con_ShowConnectedUsrsWithARoleBelongingToCurrentCrsOnRightColumn (Ro
|
|||
Frm_BeginFormUnique (ActLstCon); // Must be unique because
|
||||
// the list of connected users
|
||||
// is dynamically updated via AJAX
|
||||
Sco_PutParamScope ("ScopeCon",HieLvl_CRS);
|
||||
Sco_PutParamScope ("ScopeCon",HieLvl_CRS);
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"ellipsis-h.svg",
|
||||
Txt_Connected_users,"ICO16x16");
|
||||
Frm_EndForm ();
|
||||
|
@ -556,6 +556,12 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
[Rol_NET] = ActSeeRecOneTch,
|
||||
[Rol_TCH] = ActSeeRecOneTch,
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
const char *ClassTxt;
|
||||
const char *ClassLink;
|
||||
long UsrCod;
|
||||
|
@ -587,7 +593,9 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
|
||||
/***** Show photo *****/
|
||||
HTM_TD_Begin ("class=\"CON_PHOTO COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,true);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
true);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write full name and link *****/
|
||||
|
@ -608,7 +616,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
if (!NextAction[Role])
|
||||
Err_WrongRoleExit ();
|
||||
Frm_BeginFormUnique (NextAction[Role]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
|
||||
HTM_DIV_Begin ("class=\"CON_NAME_NARROW\""); // Limited width
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_record_for_this_course,ClassLink,NULL);
|
||||
|
@ -649,6 +657,12 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
|||
[Rol_NET] = ActSeeRecOneTch,
|
||||
[Rol_TCH] = ActSeeRecOneTch,
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NumUsrs = 0; // Initialized to avoid warning
|
||||
|
@ -695,7 +709,9 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
|||
|
||||
/***** Show photo *****/
|
||||
HTM_TD_Begin ("class=\"CON_PHOTO COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write full name and link *****/
|
||||
|
@ -716,7 +732,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
|||
if (!NextAction[Role])
|
||||
Err_WrongRoleExit ();
|
||||
Frm_BeginForm (NextAction[Role]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
}
|
||||
|
||||
HTM_DIV_Begin ("class=\"CON_NAME_WIDE\""); // Limited width
|
||||
|
|
|
@ -360,7 +360,7 @@ static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable)
|
|||
if (OrderSelectable)
|
||||
{
|
||||
Frm_BeginForm (ActSeeCty);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_COUNTRIES_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Hierarchy.Ctys.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -499,7 +499,7 @@ void Cty_DrawCountryMapAndNameWithLink (struct Cty_Countr *Cty,Act_Action_t Acti
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Cty_PutParamCtyCod (Cty->CtyCod);
|
||||
Cty_PutParamCtyCod (Cty->CtyCod);
|
||||
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"%s\"",ClassContainer);
|
||||
|
@ -908,7 +908,7 @@ void Cty_WriteCountryName (long CtyCod,const char *ClassLink)
|
|||
{
|
||||
/***** Write country name with link to country information *****/
|
||||
Frm_BeginForm (ActSeeCtyInf);
|
||||
Cty_PutParamCtyCod (CtyCod);
|
||||
Cty_PutParamCtyCod (CtyCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeCtyInf),ClassLink,NULL);
|
||||
HTM_Txt (CtyName);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -1120,8 +1120,8 @@ static void Cty_ListCountriesForEdition (void)
|
|||
/* Name */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActRenCty);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
HTM_INPUT_TEXT ("Name",Cty_MAX_CHARS_NAME,Cty->Name[Lan],
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\"");
|
||||
|
@ -1131,8 +1131,8 @@ static void Cty_ListCountriesForEdition (void)
|
|||
/* WWW */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActChgCtyWWW);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
Cty_PutParamOtherCtyCod (&Cty->CtyCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
|
||||
HTM_INPUT_URL ("WWW",Cty->WWW[Lan],HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -370,16 +370,16 @@ static void CtyCfg_Platform (bool PrintView)
|
|||
if (!PrintView)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeSysInf);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Cfg_PLATFORM_SHORT_NAME),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Cfg_PLATFORM_SHORT_NAME),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
}
|
||||
Ico_PutIcon ("swad64x64.png",Cfg_PLATFORM_FULL_NAME,"ICO20x20");
|
||||
HTM_NBSP ();
|
||||
HTM_Txt (Cfg_PLATFORM_SHORT_NAME);
|
||||
if (!PrintView)
|
||||
{
|
||||
HTM_BUTTON_End ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
HTM_TD_End ();
|
||||
|
@ -472,7 +472,7 @@ static void CtyCfg_NumInss (void)
|
|||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LB\"");
|
||||
Frm_BeginFormGoTo (ActSeeIns);
|
||||
Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod);
|
||||
Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Institutions_of_COUNTRY_X,
|
||||
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]),
|
||||
"BT_LINK DAT",NULL);
|
||||
|
|
|
@ -190,7 +190,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
|||
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight :
|
||||
ClassNormal);
|
||||
Frm_BeginForm (ActMyCrs);
|
||||
Cty_PutParamCtyCod (-1L);
|
||||
Cty_PutParamCtyCod (-1L);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_System,
|
||||
Highlight ? ClassHighlight :
|
||||
ClassNormal,
|
||||
|
@ -223,7 +223,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
|||
IsLastItemInLevel[1] = (NumCty == NumCtys - 1);
|
||||
Lay_IndentDependingOnLevel (1,IsLastItemInLevel);
|
||||
Frm_BeginForm (ActMyCrs);
|
||||
Cty_PutParamCtyCod (Hie.Cty.CtyCod);
|
||||
Cty_PutParamCtyCod (Hie.Cty.CtyCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeCtyInf),
|
||||
Highlight ? ClassHighlight :
|
||||
ClassNormal,
|
||||
|
@ -258,7 +258,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
|||
IsLastItemInLevel[2] = (NumIns == NumInss - 1);
|
||||
Lay_IndentDependingOnLevel (2,IsLastItemInLevel);
|
||||
Frm_BeginForm (ActMyCrs);
|
||||
Ins_PutParamInsCod (Hie.Ins.InsCod);
|
||||
Ins_PutParamInsCod (Hie.Ins.InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeInsInf),
|
||||
Highlight ? ClassHighlight :
|
||||
ClassNormal,
|
||||
|
@ -293,7 +293,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
|||
IsLastItemInLevel[3] = (NumCtr == NumCtrs - 1);
|
||||
Lay_IndentDependingOnLevel (3,IsLastItemInLevel);
|
||||
Frm_BeginForm (ActMyCrs);
|
||||
Ctr_PutParamCtrCod (Hie.Ctr.CtrCod);
|
||||
Ctr_PutParamCtrCod (Hie.Ctr.CtrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeCtrInf),
|
||||
Highlight ? ClassHighlight :
|
||||
ClassNormal,
|
||||
|
@ -328,7 +328,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
|||
IsLastItemInLevel[4] = (NumDeg == NumDegs - 1);
|
||||
Lay_IndentDependingOnLevel (4,IsLastItemInLevel);
|
||||
Frm_BeginForm (ActMyCrs);
|
||||
Deg_PutParamDegCod (Hie.Deg.DegCod);
|
||||
Deg_PutParamDegCod (Hie.Deg.DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (ActSeeDegInf),
|
||||
Highlight ? ClassHighlight :
|
||||
ClassNormal,
|
||||
|
@ -363,7 +363,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
|||
IsLastItemInLevel[5] = (NumCrs == NumCrss - 1);
|
||||
Lay_IndentDependingOnLevel (5,IsLastItemInLevel);
|
||||
Frm_BeginForm (ActMyCrs);
|
||||
Crs_PutParamCrsCod (Hie.Crs.CrsCod);
|
||||
Crs_PutParamCrsCod (Hie.Crs.CrsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Hie.Crs.ShrtName),
|
||||
Highlight ? ClassHighlight :
|
||||
ClassNormal,
|
||||
|
@ -996,7 +996,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
|||
/* Course full name */
|
||||
HTM_TD_Begin ("class=\"%s LM %s\"",TxtClassStrong,BgColor);
|
||||
Frm_BeginFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||
Crs_PutParamCrsCod (Crs->CrsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs->FullName),
|
||||
TxtClassStrong,NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -1190,7 +1190,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgInsCrsCod);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
HTM_INPUT_TEXT ("InsCrsCod",Crs_MAX_CHARS_INSTITUTIONAL_CRS_COD,
|
||||
Crs->InstitutionalCrsCod,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_INS_CODE\"");
|
||||
|
@ -1205,7 +1205,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgCrsYea);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"OthCrsYear\" class=\"HIE_SEL_NARROW\"");
|
||||
for (YearAux = 0;
|
||||
|
@ -1228,7 +1228,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenCrsSho);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Crs->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -1243,7 +1243,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenCrsFul);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
Hie_PutParamOtherHieCod (&Crs->CrsCod);
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Crs->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -2129,7 +2129,7 @@ static void Crs_PutButtonToGoToCrs (void)
|
|||
if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod)
|
||||
{
|
||||
Frm_BeginForm (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs_EditingCrs->CrsCod);
|
||||
Crs_PutParamCrsCod (Crs_EditingCrs->CrsCod);
|
||||
Btn_PutConfirmButton (Hie_BuildGoToMsg (Crs_EditingCrs->ShrtName));
|
||||
Hie_FreeGoToMsg ();
|
||||
Frm_EndForm ();
|
||||
|
@ -2145,13 +2145,13 @@ static void Crs_PutButtonToRegisterInCrs (void)
|
|||
extern const char *Txt_Register_me_in_X;
|
||||
|
||||
Frm_BeginForm (ActReqSignUp);
|
||||
// If the course being edited is different to the current one...
|
||||
if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod)
|
||||
Crs_PutParamCrsCod (Crs_EditingCrs->CrsCod);
|
||||
// If the course being edited is different to the current one...
|
||||
if (Crs_EditingCrs->CrsCod != Gbl.Hierarchy.Crs.CrsCod)
|
||||
Crs_PutParamCrsCod (Crs_EditingCrs->CrsCod);
|
||||
|
||||
Btn_PutCreateButton (Str_BuildStringStr (Txt_Register_me_in_X,
|
||||
Crs_EditingCrs->ShrtName));
|
||||
Str_FreeString ();
|
||||
Btn_PutCreateButton (Str_BuildStringStr (Txt_Register_me_in_X,
|
||||
Crs_EditingCrs->ShrtName));
|
||||
Str_FreeString ();
|
||||
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -2454,7 +2454,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
and center short name (row[6]) *****/
|
||||
HTM_TD_Begin ("class=\"LT %s\"",BgColor);
|
||||
Frm_BeginFormGoTo (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (Deg.DegCod);
|
||||
Deg_PutParamDegCod (Deg.DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (row[2]),ClassLink,NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
Lgo_DrawLogo (HieLvl_DEG,Deg.DegCod,Deg.ShrtName,20,"CT",true);
|
||||
|
@ -2471,7 +2471,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
|||
/***** Write course full name (row[5]) *****/
|
||||
HTM_TD_Begin ("class=\"LT %s\"",BgColor);
|
||||
Frm_BeginFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (row[5]),ClassLink,NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
HTM_Txt (row[5]);
|
||||
|
|
|
@ -247,7 +247,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
|||
if (!PrintView)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
|
||||
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Deg.ShrtName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
|
|
@ -2689,20 +2689,21 @@ mysql> DESCRIBE ses_sessions;
|
|||
/***** Table set_ip_settings *****/
|
||||
/*
|
||||
mysql> DESCRIBE set_ip_settings;
|
||||
+----------------+------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+----------------+------------+------+-----+---------+-------+
|
||||
| IP | char(15) | NO | PRI | NULL | |
|
||||
| UsrCod | int(11) | NO | MUL | -1 | |
|
||||
| LastChange | datetime | NO | MUL | NULL | |
|
||||
| FirstDayOfWeek | tinyint(4) | NO | | 0 | |
|
||||
| DateFormat | tinyint(4) | NO | | 0 | |
|
||||
| Theme | char(16) | NO | | NULL | |
|
||||
| IconSet | char(16) | NO | | NULL | |
|
||||
| Menu | tinyint(4) | NO | | 0 | |
|
||||
| SideCols | tinyint(4) | NO | | NULL | |
|
||||
+----------------+------------+------+-----+---------+-------+
|
||||
9 rows in set (0,00 sec)
|
||||
+----------------+----------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+----------------+----------+------+-----+---------+-------+
|
||||
| IP | char(15) | NO | PRI | NULL | |
|
||||
| UsrCod | int | NO | MUL | -1 | |
|
||||
| LastChange | datetime | NO | MUL | NULL | |
|
||||
| FirstDayOfWeek | tinyint | NO | | 0 | |
|
||||
| DateFormat | tinyint | NO | | 0 | |
|
||||
| Theme | char(16) | NO | | NULL | |
|
||||
| IconSet | char(16) | NO | | NULL | |
|
||||
| Menu | tinyint | NO | | 0 | |
|
||||
| SideCols | tinyint | NO | | NULL | |
|
||||
| UsrPhotos | tinyint | NO | | 0 | |
|
||||
+----------------+----------+------+-----+---------+-------+
|
||||
10 rows in set (0,01 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS set_ip_settings ("
|
||||
"IP CHAR(15) NOT NULL," // Cns_MAX_BYTES_IP
|
||||
|
@ -2714,6 +2715,7 @@ mysql> DESCRIBE set_ip_settings;
|
|||
"IconSet CHAR(16) NOT NULL," // Ico_MAX_BYTES_ICON_SET_ID
|
||||
"Menu TINYINT NOT NULL DEFAULT 0,"
|
||||
"SideCols TINYINT NOT NULL,"
|
||||
"UsrPhotos TINYINT NOT NULL DEFAULT 0,"
|
||||
"PRIMARY KEY (IP),"
|
||||
"INDEX(UsrCod),"
|
||||
"INDEX(LastChange))");
|
||||
|
@ -3361,7 +3363,7 @@ mysql> DESCRIBE usr_data;
|
|||
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
||||
| UsrCod | int(11) | NO | PRI | NULL | auto_increment |
|
||||
| UsrCod | int | NO | PRI | NULL | auto_increment |
|
||||
| EncryptedUsrCod | char(43) | NO | UNI | | |
|
||||
| Password | char(86) | NO | | | |
|
||||
| Surname1 | varchar(511) | NO | | | |
|
||||
|
@ -3371,17 +3373,17 @@ mysql> DESCRIBE usr_data;
|
|||
| Theme | char(16) | NO | MUL | | |
|
||||
| IconSet | char(16) | NO | MUL | | |
|
||||
| Language | char(2) | NO | MUL | | |
|
||||
| FirstDayOfWeek | tinyint(4) | NO | MUL | 0 | |
|
||||
| DateFormat | tinyint(4) | NO | MUL | 0 | |
|
||||
| FirstDayOfWeek | tinyint | NO | MUL | 0 | |
|
||||
| DateFormat | tinyint | NO | MUL | 0 | |
|
||||
| Photo | char(43) | NO | | | |
|
||||
| PhotoVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||
| BaPrfVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||
| ExPrfVisibility | enum('unknown','user','course','system','world') | NO | MUL | unknown | |
|
||||
| CtyCod | int(11) | NO | MUL | -1 | |
|
||||
| InsCtyCod | int(11) | NO | MUL | -1 | |
|
||||
| InsCod | int(11) | NO | MUL | -1 | |
|
||||
| DptCod | int(11) | NO | MUL | -1 | |
|
||||
| CtrCod | int(11) | NO | MUL | -1 | |
|
||||
| CtyCod | int | NO | MUL | -1 | |
|
||||
| InsCtyCod | int | NO | MUL | -1 | |
|
||||
| InsCod | int | NO | MUL | -1 | |
|
||||
| DptCod | int | NO | MUL | -1 | |
|
||||
| CtrCod | int | NO | MUL | -1 | |
|
||||
| Office | varchar(2047) | NO | | | |
|
||||
| OfficePhone | char(16) | NO | | | |
|
||||
| LocalAddress | varchar(2047) | NO | | | |
|
||||
|
@ -3391,13 +3393,14 @@ mysql> DESCRIBE usr_data;
|
|||
| OriginPlace | varchar(2047) | NO | | | |
|
||||
| Birthday | date | YES | | NULL | |
|
||||
| Comments | text | NO | | NULL | |
|
||||
| Menu | tinyint(4) | NO | MUL | 0 | |
|
||||
| SideCols | tinyint(4) | NO | MUL | 3 | |
|
||||
| Menu | tinyint | NO | MUL | 0 | |
|
||||
| SideCols | tinyint | NO | MUL | 3 | |
|
||||
| UsrPhotos | tinyint | NO | MUL | 0 | |
|
||||
| ThirdPartyCookies | enum('N','Y') | NO | MUL | N | |
|
||||
| NotifNtfEvents | int(11) | NO | | 0 | |
|
||||
| EmailNtfEvents | int(11) | NO | | 0 | |
|
||||
| NotifNtfEvents | int | NO | | 0 | |
|
||||
| EmailNtfEvents | int | NO | | 0 | |
|
||||
+-------------------+--------------------------------------------------+------+-----+---------+----------------+
|
||||
35 rows in set (0.00 sec)
|
||||
36 rows in set (0,00 sec)
|
||||
*/
|
||||
DB_CreateTable ("CREATE TABLE IF NOT EXISTS usr_data ("
|
||||
"UsrCod INT NOT NULL AUTO_INCREMENT,"
|
||||
|
@ -3432,6 +3435,7 @@ mysql> DESCRIBE usr_data;
|
|||
"Comments TEXT NOT NULL," // Cns_MAX_BYTES_TEXT
|
||||
"Menu TINYINT NOT NULL DEFAULT 0,"
|
||||
"SideCols TINYINT NOT NULL DEFAULT 3,"
|
||||
"UsrPhotos TINYINT NOT NULL DEFAULT 0,"
|
||||
"ThirdPartyCookies ENUM('N','Y') NOT NULL DEFAULT 'N',"
|
||||
"NotifNtfEvents INT NOT NULL DEFAULT 0,"
|
||||
"EmailNtfEvents INT NOT NULL DEFAULT 0,"
|
||||
|
@ -3452,6 +3456,7 @@ mysql> DESCRIBE usr_data;
|
|||
"INDEX(CtrCod),"
|
||||
"INDEX(Menu),"
|
||||
"INDEX(SideCols),"
|
||||
"INDEX(UsrPhotos),"
|
||||
"INDEX(ThirdPartyCookies))");
|
||||
|
||||
/***** Table usr_duplicated *****/
|
||||
|
|
|
@ -344,14 +344,14 @@ void Dat_ShowClientLocalTime (void)
|
|||
if (Gbl.Usrs.Me.Logged)
|
||||
{
|
||||
Frm_BeginForm (ActSeeMyAgd);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Show_agenda,"BT_LINK CURRENT_DAY",NULL);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Show_agenda,"BT_LINK CURRENT_DAY",NULL);
|
||||
}
|
||||
HTM_SPAN_Begin ("id=\"current_day_txt\"");
|
||||
// JavaScript will write HTML here
|
||||
HTM_SPAN_End ();
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
{
|
||||
HTM_BUTTON_End ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
HTM_DIV_End ();
|
||||
|
|
|
@ -189,7 +189,7 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Deg_Degree *Deg,Act_Action_t Acti
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Deg_PutParamDegCod (Deg->DegCod);
|
||||
Deg_PutParamDegCod (Deg->DegCod);
|
||||
|
||||
/***** Link to action *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Deg->FullName),ClassLink,NULL);
|
||||
|
@ -362,7 +362,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenDegSho);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Deg->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -377,7 +377,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenDegFul);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Deg->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -392,7 +392,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgDegTyp);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"OthDegTypCod\" class=\"HIE_SEL_NARROW\"");
|
||||
for (NumDegTyp = 0;
|
||||
|
@ -421,7 +421,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgDegWWW);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
Hie_PutParamOtherHieCod (&Deg->DegCod);
|
||||
HTM_INPUT_URL ("WWW",Deg->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -238,7 +238,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
|
|||
if (!PrintView)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeCtrInf);
|
||||
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
|
||||
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Ctr.ShrtName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -325,7 +325,7 @@ static void DegCfg_NumCrss (void)
|
|||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LB\"");
|
||||
Frm_BeginFormGoTo (ActSeeCrs);
|
||||
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
|
||||
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Courses_of_DEGREE_X,
|
||||
Gbl.Hierarchy.Deg.ShrtName),
|
||||
"BT_LINK DAT",NULL);
|
||||
|
|
|
@ -415,7 +415,7 @@ static void DegTyp_ListDegreeTypesForEdition (void)
|
|||
/* Name of degree type */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginForm (ActRenDegTyp);
|
||||
DegTyp_PutParamOtherDegTypCod (&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
|
||||
DegTyp_PutParamOtherDegTypCod (&Gbl.DegTypes.Lst[NumDegTyp].DegTypCod);
|
||||
HTM_INPUT_TEXT ("DegTypName",DegTyp_MAX_CHARS_DEGREE_TYPE_NAME,
|
||||
Gbl.DegTypes.Lst[NumDegTyp].DegTypName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -524,13 +524,13 @@ static void DegTyp_PutHeadDegreeTypesForSeeing (Act_Action_t NextAction,
|
|||
|
||||
/* Begin form to change order */
|
||||
Frm_BeginForm (NextAction);
|
||||
if (NextAction == ActSeeUseGbl)
|
||||
{
|
||||
Figures.Scope = Scope;
|
||||
Figures.FigureType = Fig_DEGREE_TYPES;
|
||||
Fig_PutHiddenParamFigures (&Figures);
|
||||
}
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
if (NextAction == ActSeeUseGbl)
|
||||
{
|
||||
Figures.Scope = Scope;
|
||||
Figures.FigureType = Fig_DEGREE_TYPES;
|
||||
Fig_PutHiddenParamFigures (&Figures);
|
||||
}
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
/* Link with the head of this column */
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_DEGREE_TYPES_HELP_ORDER[Order],
|
||||
|
|
|
@ -144,7 +144,7 @@ void Dpt_SeeDepts (void)
|
|||
"LM");
|
||||
|
||||
Frm_BeginForm (ActSeeDpt);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_DEPARTMENTS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Departments.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -478,7 +478,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
/* Institution */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgDptIns);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"OthInsCod\" class=\"HIE_SEL_NARROW\"");
|
||||
HTM_OPTION (HTM_Type_STRING,"0",Dpt->InsCod == 0,false,
|
||||
|
@ -496,7 +496,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
/* Department short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenDptSho);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Dpt->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -506,7 +506,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
/* Department full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenDptFul);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Dpt->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -516,7 +516,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
/* Department WWW */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgDptWWW);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
Dpt_PutParamDptCod (&Dpt->DptCod);
|
||||
HTM_INPUT_URL ("WWW",Dpt->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -345,7 +345,7 @@ static void Dup_PutButtonToViewSimilarUsrs (const struct UsrData *UsrDat)
|
|||
extern const char *Txt_Similar_users;
|
||||
|
||||
Frm_BeginForm (ActLstSimUsr);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Btn_PutConfirmButtonInline (Txt_Similar_users);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -359,8 +359,8 @@ static void Dup_PutButtonToEliminateUsrAccount (const struct UsrData *UsrDat)
|
|||
extern const char *Txt_Eliminate_user_account;
|
||||
|
||||
Frm_BeginForm (ActUpdOth);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RegRemAction",(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RegRemAction",(unsigned) Enr_ELIMINATE_ONE_USR_FROM_PLATFORM);
|
||||
Btn_PutRemoveButtonInline (Txt_Eliminate_user_account);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat
|
|||
extern const char *Txt_Not_duplicated;
|
||||
|
||||
Frm_BeginForm (ActRemDupUsr);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Btn_PutConfirmButtonInline (Txt_Not_duplicated);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ void Enr_PutButtonInlineToRegisterStds (long CrsCod)
|
|||
1 << Rol_STD)) // No students in course
|
||||
{
|
||||
Frm_BeginForm (ActReqEnrSevStd);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
Btn_PutCreateButtonInline (Txt_Register_students);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -336,22 +336,22 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams)
|
|||
|
||||
/***** Form to request user's ID, @nickname or email address *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
|
||||
/***** Label *****/
|
||||
HTM_LABEL_Begin ("for=\"OtherUsrIDNickOrEMail\" class=\"%s RM\"",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_nick_email_or_ID);
|
||||
HTM_LABEL_End ();
|
||||
/***** Label *****/
|
||||
HTM_LABEL_Begin ("for=\"OtherUsrIDNickOrEMail\" class=\"%s RM\"",
|
||||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_nick_email_or_ID);
|
||||
HTM_LABEL_End ();
|
||||
|
||||
/***** Input box to enter user *****/
|
||||
HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"",
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"OtherUsrIDNickOrEMail\" size=\"18\" required=\"required\"");
|
||||
/***** Input box to enter user *****/
|
||||
HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"",
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"OtherUsrIDNickOrEMail\" size=\"18\" required=\"required\"");
|
||||
|
||||
/***** Send button*****/
|
||||
Btn_PutConfirmButton (Txt_Continue);
|
||||
/***** Send button*****/
|
||||
Btn_PutConfirmButton (Txt_Continue);
|
||||
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1704,7 +1704,7 @@ void Enr_AskRemAllStdsThisCrs (void)
|
|||
|
||||
/* Show form to request confirmation */
|
||||
Frm_BeginForm (ActRemAllStdCrs);
|
||||
Grp_PutParamAllGroups ();
|
||||
Grp_PutParamAllGroups ();
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
Btn_PutRemoveButton (Txt_Remove_all_students);
|
||||
Frm_EndForm ();
|
||||
|
@ -2074,6 +2074,12 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
extern const char *Txt_Register;
|
||||
extern const char *Txt_Reject;
|
||||
extern const char *Txt_No_enrolment_requests;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NumReqs;
|
||||
|
@ -2217,7 +2223,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
Deg_GetDataOfDegreeByCod (&Deg);
|
||||
|
||||
Frm_BeginFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs.FullName),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
@ -2235,7 +2241,9 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
|
||||
/***** User photo *****/
|
||||
HTM_TD_Begin ("class=\"DAT CT\" style=\"width:22px;\"");
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** User name *****/
|
||||
|
@ -2258,8 +2266,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
if (!NextAction[DesiredRole])
|
||||
Err_WrongRoleExit ();
|
||||
Frm_BeginForm (NextAction[DesiredRole]);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
Btn_PutCreateButtonInline (Txt_Register);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
@ -2267,8 +2275,8 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
/***** Button to reject the request *****/
|
||||
HTM_TD_Begin ("class=\"DAT LT\"");
|
||||
Frm_BeginForm (ActReqRejSignUp);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat.EnUsrCod);
|
||||
Btn_PutRemoveButtonInline (Txt_Reject);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
@ -3057,7 +3065,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
|
|||
if (!NextAction[UsrDat->Roles.InCurrentCrs])
|
||||
Err_WrongRoleExit ();
|
||||
Frm_BeginForm (NextAction[UsrDat->Roles.InCurrentCrs]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Pwd_AskForConfirmationOnDangerousAction ();
|
||||
Btn_PutRemoveButton (ItsMe ? Txt_Remove_me_from_this_course :
|
||||
Txt_Remove_user_from_this_course);
|
||||
|
|
12
swad_exam.c
12
swad_exam.c
|
@ -258,8 +258,8 @@ static void Exa_ListAllExams (struct Exa_Exams *Exams)
|
|||
|
||||
/* Form to change order */
|
||||
Frm_BeginForm (ActSeeAllExa);
|
||||
Pag_PutHiddenParamPagNum (Pag_EXAMS,Exams->CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Pag_PutHiddenParamPagNum (Pag_EXAMS,Exams->CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_EXAMS_ORDER_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Exams->SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -380,7 +380,7 @@ static void Exa_PutButtonToCreateNewExam (struct Exa_Exams *Exams)
|
|||
extern const char *Txt_New_exam;
|
||||
|
||||
Frm_BeginForm (ActFrmNewExa);
|
||||
Exa_PutParamsToCreateNewExam (Exams);
|
||||
Exa_PutParamsToCreateNewExam (Exams);
|
||||
Btn_PutConfirmButton (Txt_New_exam);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams,
|
|||
Exams->ExaCod = Exam->ExaCod;
|
||||
HTM_ARTICLE_Begin (Anchor);
|
||||
Frm_BeginForm (ActSeeExa);
|
||||
Exa_PutParams (Exams);
|
||||
Exa_PutParams (Exams);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_exam,
|
||||
Exam->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT":
|
||||
"BT_LINK LT ASG_TITLE",
|
||||
|
@ -576,7 +576,7 @@ static void Exa_ShowOneExam (struct Exa_Exams *Exams,
|
|||
|
||||
Exams->ExaCod = Exam->ExaCod;
|
||||
Frm_BeginForm (ActSeeExa);
|
||||
Exa_PutParams (Exams);
|
||||
Exa_PutParams (Exams);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Sessions,
|
||||
Exam->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT" :
|
||||
"BT_LINK LT ASG_TITLE",
|
||||
|
@ -1335,7 +1335,7 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
Exams->ExaCod = Exam->ExaCod;
|
||||
Frm_BeginForm (ItsANewExam ? ActNewExa :
|
||||
ActChgExa);
|
||||
Exa_PutParams (Exams);
|
||||
Exa_PutParams (Exams);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
if (ItsANewExam)
|
||||
|
|
|
@ -681,7 +681,7 @@ static void ExaPrn_ShowTableWithQstsToFill (struct Exa_Exams *Exams,
|
|||
|
||||
/***** Form to end/close this exam print *****/
|
||||
Frm_BeginFormId (ActEndExaPrn,"finished");
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
Btn_PutCreateButton (Txt_I_have_finished);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1037,7 +1037,7 @@ void ExaPrn_ReceivePrintAnswer (void)
|
|||
|
||||
/***** Form to end/close this exam print *****/
|
||||
Frm_BeginForm (ActEndExaPrn);
|
||||
ExaSes_PutParamsEdit (&Exams);
|
||||
ExaSes_PutParamsEdit (&Exams);
|
||||
Btn_PutCreateButton (Txt_Continue);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
|
|
@ -593,8 +593,8 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
|
|||
/***** Begin form to update the results
|
||||
depending on the exams selected *****/
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,ExaRes_RESULTS_TABLE_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
@ -1013,15 +1013,15 @@ static void ExaRes_ShowResults (struct Exa_Exams *Exams,
|
|||
{
|
||||
case Usr_ME:
|
||||
Frm_BeginForm (ActSeeOneExaResMe);
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
break;
|
||||
case Usr_OTHER:
|
||||
Frm_BeginForm (ActSeeOneExaResOth);
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
ExaSes_PutParamsEdit (Exams);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
}
|
||||
Ico_PutIconLink ("tasks.svg",Txt_Result);
|
||||
Ico_PutIconLink ("tasks.svg",Txt_Result);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
|
@ -1483,6 +1483,12 @@ static void ExaRes_ComputeValidPrintScore (struct ExaPrn_Print *Print)
|
|||
void ExaRes_ShowExamResultUser (struct UsrData *UsrDat)
|
||||
{
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
|
||||
/***** Row begin *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
@ -1501,7 +1507,9 @@ void ExaRes_ShowExamResultUser (struct UsrData *UsrDat)
|
|||
if (UsrDat->FrstName[0])
|
||||
HTM_TxtF (", %s",UsrDat->FrstName);
|
||||
HTM_BR ();
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO45x60",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Row end *****/
|
||||
|
|
|
@ -522,8 +522,8 @@ static void ExaSes_ListOneOrMoreSessionsTitleGrps (struct Exa_Exams *Exams,
|
|||
if (ExaSes_CheckIfICanAnswerThisSession (Exam,Session))
|
||||
{
|
||||
Frm_BeginForm (ActSeeExaPrn);
|
||||
Exa_PutParams (Exams);
|
||||
ExaSes_PutParamSesCod (Session->SesCod);
|
||||
Exa_PutParams (Exams);
|
||||
ExaSes_PutParamSesCod (Session->SesCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
|
||||
Txt_Resume,
|
||||
Session->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT":
|
||||
|
@ -1005,44 +1005,44 @@ static void ExaSes_PutFormSession (const struct ExaSes_Session *Session)
|
|||
/***** Begin form *****/
|
||||
Frm_BeginForm (ItsANewSession ? ActNewExaSes : // New session
|
||||
ActChgExaSes); // Existing session
|
||||
Exa_PutParamExamCod (Session->ExaCod);
|
||||
if (!ItsANewSession) // Existing session
|
||||
ExaSes_PutParamSesCod (Session->SesCod);
|
||||
Exa_PutParamExamCod (Session->ExaCod);
|
||||
if (!ItsANewSession) // Existing session
|
||||
ExaSes_PutParamSesCod (Session->SesCod);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,ItsANewSession ? Txt_New_session :
|
||||
Session->Title,
|
||||
NULL,NULL,
|
||||
Hlp_ASSESSMENT_Exams_sessions,Box_NOT_CLOSABLE,2);
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,ItsANewSession ? Txt_New_session :
|
||||
Session->Title,
|
||||
NULL,NULL,
|
||||
Hlp_ASSESSMENT_Exams_sessions,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Session title *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Session title *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Title",Txt_Title);
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Title",Txt_Title);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\" size=\"45\" required=\"required\"");
|
||||
HTM_TD_End ();
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Title",ExaSes_MAX_CHARS_TITLE,Session->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\" size=\"45\" required=\"required\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (Session->TimeUTC,
|
||||
Dat_FORM_SECONDS_OFF,
|
||||
SetHMS);
|
||||
/***** Start and end dates *****/
|
||||
Dat_PutFormStartEndClientLocalDateTimes (Session->TimeUTC,
|
||||
Dat_FORM_SECONDS_OFF,
|
||||
SetHMS);
|
||||
|
||||
/***** Groups *****/
|
||||
ExaSes_ShowLstGrpsToCreateSession (Session->SesCod);
|
||||
/***** Groups *****/
|
||||
ExaSes_ShowLstGrpsToCreateSession (Session->SesCod);
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
if (ItsANewSession)
|
||||
Box_BoxTableWithButtonEnd (Btn_CREATE_BUTTON,Txt_Create_session);
|
||||
else
|
||||
Box_BoxTableWithButtonEnd (Btn_CONFIRM_BUTTON,Txt_Save_changes);
|
||||
/***** End table, send button and end box *****/
|
||||
if (ItsANewSession)
|
||||
Box_BoxTableWithButtonEnd (Btn_CREATE_BUTTON,Txt_Create_session);
|
||||
else
|
||||
Box_BoxTableWithButtonEnd (Btn_CONFIRM_BUTTON,Txt_Save_changes);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -1123,7 +1123,7 @@ void ExaSes_PutButtonNewSession (struct Exa_Exams *Exams,long ExaCod)
|
|||
|
||||
Exams->ExaCod = ExaCod;
|
||||
Frm_BeginFormAnchor (ActReqNewExaSes,ExaSes_NEW_SESSION_SECTION_ID);
|
||||
Exa_PutParams (Exams);
|
||||
Exa_PutParams (Exams);
|
||||
Btn_PutConfirmButton (Txt_New_session);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams,
|
|||
/***** Begin form *****/
|
||||
Exams->ExaCod = Exam->ExaCod;
|
||||
Frm_BeginForm (ActNewExaSet);
|
||||
Exa_PutParams (Exams);
|
||||
Exa_PutParams (Exams);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_New_set_of_questions,
|
||||
|
@ -819,7 +819,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
|||
if (ICanEditSets)
|
||||
{
|
||||
Frm_BeginFormAnchor (ActChgTitExaSet,Anchor);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set.Title,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\" required=\"required\""
|
||||
|
@ -847,7 +847,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
|||
if (ICanEditSets)
|
||||
{
|
||||
Frm_BeginFormAnchor (ActChgNumQstExaSet,Anchor);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
HTM_INPUT_LONG ("NumQstsToPrint",0,UINT_MAX,(long) Set.NumQstsToPrint,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG\" required=\"required\"");
|
||||
|
@ -1837,8 +1837,8 @@ static void ExaSet_PutButtonToAddNewQuestions (struct Exa_Exams *Exams)
|
|||
extern const char *Txt_Add_questions;
|
||||
|
||||
Frm_BeginForm (ActReqAddQstExaSet);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
Btn_PutConfirmButtonInline (Txt_Add_questions);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
Btn_PutConfirmButtonInline (Txt_Add_questions);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -211,6 +211,7 @@ static void Fig_GetAndShowNumUsrsPerIconSet (void);
|
|||
static void Fig_GetAndShowNumUsrsPerMenu (void);
|
||||
static void Fig_GetAndShowNumUsrsPerTheme (void);
|
||||
static void Fig_GetAndShowNumUsrsPerSideColumns (void);
|
||||
static void Fig_GetAndShowNumUsrsPerUserPhotos (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Show use of the platform *************************/
|
||||
|
@ -371,6 +372,7 @@ void Fig_ShowFigures (void)
|
|||
[Fig_MENUS ] = Fig_GetAndShowNumUsrsPerMenu,
|
||||
[Fig_THEMES ] = Fig_GetAndShowNumUsrsPerTheme,
|
||||
[Fig_SIDE_COLUMNS ] = Fig_GetAndShowNumUsrsPerSideColumns,
|
||||
[Fig_USER_PHOTOS ] = Fig_GetAndShowNumUsrsPerUserPhotos,
|
||||
[Fig_PRIVACY ] = Fig_GetAndShowNumUsrsPerPrivacy,
|
||||
[Fig_COOKIES ] = Fig_GetAndShowNumUsrsPerCookies,
|
||||
};
|
||||
|
@ -1228,7 +1230,7 @@ static void Fig_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
|
|||
The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
/* Icon and name of this institution */
|
||||
Frm_BeginForm (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins.InsCod);
|
||||
Ins_PutParamInsCod (Ins.InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Ins.ShrtName,The_ClassFormLinkInBox[Gbl.Prefs.Theme],NULL);
|
||||
if (Gbl.Usrs.Listing.WithPhotos)
|
||||
{
|
||||
|
@ -3900,12 +3902,12 @@ static void Fig_GetAndShowNumUsrsPerSideColumns (void)
|
|||
extern const char *Txt_Columns;
|
||||
extern const char *Txt_Number_of_users;
|
||||
extern const char *Txt_PERCENT_of_users;
|
||||
extern const char *Txt_LAYOUT_SIDE_COLUMNS[4];
|
||||
unsigned SideCols;
|
||||
char *SubQuery;
|
||||
char *Icon;
|
||||
unsigned NumUsrs[4];
|
||||
unsigned NumUsrsTotal = 0;
|
||||
extern const char *Txt_LAYOUT_SIDE_COLUMNS[4];
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_SIDE_COLUMNS],
|
||||
|
@ -3919,8 +3921,8 @@ static void Fig_GetAndShowNumUsrsPerSideColumns (void)
|
|||
HTM_TH (1,1,"RM",Txt_PERCENT_of_users);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** For each language... *****/
|
||||
for (SideCols = 0;
|
||||
/***** For each layout of columns... *****/
|
||||
for (SideCols = 0;
|
||||
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
||||
SideCols++)
|
||||
{
|
||||
|
@ -3936,7 +3938,7 @@ static void Fig_GetAndShowNumUsrsPerSideColumns (void)
|
|||
}
|
||||
|
||||
/***** Write number of users who have chosen this layout of columns *****/
|
||||
for (SideCols = 0;
|
||||
for (SideCols = 0;
|
||||
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
||||
SideCols++)
|
||||
{
|
||||
|
@ -3967,3 +3969,83 @@ static void Fig_GetAndShowNumUsrsPerSideColumns (void)
|
|||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****** Get and show number of users who have chosen a user photo shape ******/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fig_GetAndShowNumUsrsPerUserPhotos (void)
|
||||
{
|
||||
extern const char *Hlp_ANALYTICS_Figures_columns;
|
||||
extern const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES];
|
||||
extern const char *Txt_User_photos;
|
||||
extern const char *Txt_Number_of_users;
|
||||
extern const char *Txt_PERCENT_of_users;
|
||||
extern const char *Txt_USER_PHOTOS[Set_NUM_USR_PHOTOS];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC15x20B",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE15x20B",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR15x20B",
|
||||
};
|
||||
Set_UsrPhotos_t UsrPhotos;
|
||||
char *SubQuery;
|
||||
unsigned NumUsrs[Set_NUM_USR_PHOTOS];
|
||||
unsigned NumUsrsTotal = 0;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_SIDE_COLUMNS],
|
||||
NULL,NULL,
|
||||
Hlp_ANALYTICS_Figures_columns,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Heading row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TH (1,1,"CM",Txt_User_photos);
|
||||
HTM_TH (1,1,"RM",Txt_Number_of_users);
|
||||
HTM_TH (1,1,"RM",Txt_PERCENT_of_users);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** For each user photo shape... *****/
|
||||
for (UsrPhotos = (Set_UsrPhotos_t) 0;
|
||||
UsrPhotos <= (Set_UsrPhotos_t) (Set_NUM_USR_PHOTOS - 1);
|
||||
UsrPhotos++)
|
||||
{
|
||||
/* Get the number of users who have chosen this layout of columns from database */
|
||||
if (asprintf (&SubQuery,"usr_data.UsrPhotos=%u",
|
||||
(unsigned) UsrPhotos) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
NumUsrs[UsrPhotos] = Usr_DB_GetNumUsrsWhoChoseAnOption (SubQuery);
|
||||
free (SubQuery);
|
||||
|
||||
/* Update total number of users */
|
||||
NumUsrsTotal += NumUsrs[UsrPhotos];
|
||||
}
|
||||
|
||||
/***** Write number of users who have chosen this user photo shape *****/
|
||||
for (UsrPhotos = (Set_UsrPhotos_t) 0;
|
||||
UsrPhotos <= (Set_UsrPhotos_t) (Set_NUM_USR_PHOTOS - 1);
|
||||
UsrPhotos++)
|
||||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
HTM_IMG (Cfg_URL_ICON_PUBLIC,"user.svg",Txt_USER_PHOTOS[UsrPhotos],
|
||||
"class=\"%s\"",ClassPhoto[UsrPhotos]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||
HTM_Unsigned (NumUsrs[UsrPhotos]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"DAT RM\"");
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[UsrPhotos] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
/************************** Public types and constants ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Fig_NUM_FIGURES 31
|
||||
#define Fig_NUM_FIGURES 32
|
||||
typedef enum
|
||||
{
|
||||
Fig_USERS, // Number of users
|
||||
|
@ -65,6 +65,7 @@ typedef enum
|
|||
Fig_MENUS, // Number of users per menu
|
||||
Fig_THEMES, // Number of users per theme
|
||||
Fig_SIDE_COLUMNS, // Number of users per layout of columns
|
||||
Fig_USER_PHOTOS, // Number of users per user photo shape
|
||||
Fig_PRIVACY, // Number of users per privacity
|
||||
Fig_COOKIES, // Number of users per acceptation of cookies
|
||||
} Fig_FigureType_t;
|
||||
|
|
|
@ -358,7 +358,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
|
|||
{
|
||||
Frm_BeginForm (IFollowUsr ? ActUnfUsr :
|
||||
ActFolUsr);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,
|
||||
IFollowUsr ? "user-check.svg" :
|
||||
"user-plus.svg",
|
||||
|
@ -399,7 +399,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
|||
{
|
||||
/* Form to list users */
|
||||
Frm_BeginFormAnchor (Action,Fol_FOLLOW_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,
|
||||
(Gbl.Action.Act == Action) ? "BT_LINK FOLLOW_NUM_B" :
|
||||
"BT_LINK FOLLOW_NUM",
|
||||
|
@ -425,7 +425,7 @@ static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
|||
{
|
||||
/* Form to list users */
|
||||
Frm_BeginFormAnchor (Action,Fol_FOLLOW_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,
|
||||
(Gbl.Action.Act == Action) ? The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme] :
|
||||
The_ClassFormLinkOutBox [Gbl.Prefs.Theme],
|
||||
|
@ -612,12 +612,20 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
|||
static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC60x80",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE60x80",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR60x80",
|
||||
};
|
||||
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
|
||||
|
||||
/***** Show user's photo *****/
|
||||
HTM_TD_Begin ("class=\"FOLLOW_PHOTO\"");
|
||||
if (Visible)
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO60x80",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Show user's name and icon to follow/unfollow *****/
|
||||
|
@ -627,7 +635,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
|
|||
{
|
||||
/* Put form to go to public profile */
|
||||
Frm_BeginForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_DIV_Begin ("class=\"FOLLOW_USR_NAME\""); // Limited width
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile,"BT_LINK LT DAT",NULL);
|
||||
Usr_WriteFirstNameBRSurnames (UsrDat);
|
||||
|
@ -662,6 +670,12 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
|
|||
static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
|
||||
|
||||
/***** Show user's photo *****/
|
||||
|
@ -669,7 +683,9 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
|
|||
|
||||
HTM_TD_Begin ("class=\"CON_PHOTO COLOR%u\"",Gbl.RowEvenOdd);
|
||||
if (Visible)
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** User's name *****/
|
||||
|
@ -678,7 +694,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
|
|||
{
|
||||
/* Put form to go to public profile */
|
||||
Frm_BeginForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_DIV_Begin ("class=\"CON_NAME_FOLLOW\""); // Limited width
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile,
|
||||
"BT_LINK CON_NAME_FOLLOW CON_CRS",NULL);
|
||||
|
@ -735,7 +751,7 @@ static void Fol_PutIconToFollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_
|
|||
|
||||
/***** Form to unfollow *****/
|
||||
Frm_BeginForm (ActFolUsr);
|
||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-plus.svg",
|
||||
Txt_Follow,"FOLLOW_USR_ICO ICO_HIGHLIGHT ICO16x16");
|
||||
Frm_EndForm ();
|
||||
|
@ -751,7 +767,7 @@ static void Fol_PutIconToUnfollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTE
|
|||
|
||||
/* Form to follow */
|
||||
Frm_BeginForm (ActUnfUsr);
|
||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user-check.svg",
|
||||
Txt_Unfollow,"FOLLOW_USR_ICO ICO_HIGHLIGHT ICO16x16");
|
||||
Frm_EndForm ();
|
||||
|
|
142
swad_forum.c
142
swad_forum.c
|
@ -925,7 +925,7 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
|
|||
Frm_BeginFormAnchor (Enabled ? For_ActionsDisPstFor[Forums->Forum.Type] :
|
||||
For_ActionsEnbPstFor[Forums->Forum.Type],
|
||||
For_FORUM_POSTS_SECTION_ID);
|
||||
For_PutParamsForum (Forums);
|
||||
For_PutParamsForum (Forums);
|
||||
Ico_PutIconLink (Enabled ? "eye-green.svg" :
|
||||
"eye-slash-red.svg",
|
||||
Str_BuildStringLong (Enabled ? Txt_FORUM_Post_X_allowed_Click_to_ban_it :
|
||||
|
@ -1386,7 +1386,7 @@ static void For_PutFormWhichForums (const struct For_Forums *Forums)
|
|||
- all my forums
|
||||
- only the forums of current institution/degree/course *****/
|
||||
Frm_BeginForm (ActSeeFor);
|
||||
Dat_PutHiddenParamOrder (Forums->ThreadsOrder);
|
||||
Dat_PutHiddenParamOrder (Forums->ThreadsOrder);
|
||||
HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE\"");
|
||||
HTM_UL_Begin (NULL);
|
||||
|
||||
|
@ -1696,14 +1696,14 @@ static void For_WriteLinkToForum (const struct For_Forums *Forums,
|
|||
{
|
||||
Frm_BeginFormAnchor (For_ActionsPasThrFor[Forum->Type],
|
||||
For_FORUM_THREADS_SECTION_ID);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forum->Location,
|
||||
Forums->Thread.ToMove,
|
||||
-1L);
|
||||
Ico_PutIconPaste ();
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forum->Location,
|
||||
Forums->Thread.ToMove,
|
||||
-1L);
|
||||
Ico_PutIconPaste ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
@ -1711,13 +1711,13 @@ static void For_WriteLinkToForum (const struct For_Forums *Forums,
|
|||
/***** Write link to forum *****/
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[Forum->Type],
|
||||
For_FORUM_THREADS_SECTION_ID);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forum->Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forum->Location,
|
||||
-1L,
|
||||
-1L);
|
||||
|
||||
HTM_BUTTON_SUBMIT_Begin (Act_GetActionText (For_ActionsSeeFor[Forum->Type]),
|
||||
Class,NULL);
|
||||
|
@ -2045,13 +2045,13 @@ static void For_ShowForumThreadsHighlightingOneThread (struct For_Forums *Forums
|
|||
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[Forums->Forum.Type],
|
||||
For_FORUM_THREADS_SECTION_ID);
|
||||
For_PutAllHiddenParamsForum (Forums->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Order,
|
||||
Forums->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (Forums->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Order,
|
||||
Forums->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_FORUM_THREAD_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Forums->ThreadsOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -2134,6 +2134,12 @@ static void For_ListForumThrs (struct For_Forums *Forums,
|
|||
extern const char *Txt_Thread_with_posts_from_you;
|
||||
extern const char *Txt_There_are_new_posts;
|
||||
extern const char *Txt_No_new_posts;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC15x20",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE15x20",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR15x20",
|
||||
};
|
||||
unsigned NumThr;
|
||||
unsigned NumThrInScreen; // From 0 to Pag_ITEMS_PER_PAGE-1
|
||||
struct For_Thread Thr;
|
||||
|
@ -2181,7 +2187,7 @@ static void For_ListForumThrs (struct For_Forums *Forums,
|
|||
Gbl.Usrs.Me.PhotoURL[0] ? NULL :
|
||||
"usr_bl.jpg",
|
||||
Txt_Thread_with_posts_from_you,
|
||||
"class=\"PHOTO15x20\"");
|
||||
"class=\"%s\"",ClassPhoto[Gbl.Prefs.UsrPhotos]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"CONTEXT_COL %s\"",BgColor);
|
||||
|
@ -2207,14 +2213,14 @@ static void For_ListForumThrs (struct For_Forums *Forums,
|
|||
HTM_BR ();
|
||||
Frm_BeginFormAnchor (For_ActionsCutThrFor[Forums->Forum.Type],
|
||||
For_FORUM_THREADS_SECTION_ID);
|
||||
For_PutAllHiddenParamsForum (Forums->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forums->Forum.Location,
|
||||
Thr.ThrCod,
|
||||
-1L);
|
||||
Ico_PutIconCut ();
|
||||
For_PutAllHiddenParamsForum (Forums->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forums->Forum.Location,
|
||||
Thr.ThrCod,
|
||||
-1L);
|
||||
Ico_PutIconCut ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -2672,60 +2678,60 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
|
|||
{
|
||||
Frm_BeginFormAnchor (For_ActionsRecRepFor[Forums->Forum.Type],
|
||||
For_FORUM_POSTS_SECTION_ID);
|
||||
For_PutAllHiddenParamsNewPost (Forums);
|
||||
For_PutAllHiddenParamsNewPost (Forums);
|
||||
}
|
||||
else // Form to write the first post of a new thread
|
||||
{
|
||||
Frm_BeginFormAnchor (For_ActionsRecThrFor[Forums->Forum.Type],
|
||||
For_FORUM_POSTS_SECTION_ID);
|
||||
For_PutAllHiddenParamsNewThread (Forums);
|
||||
For_PutAllHiddenParamsNewThread (Forums);
|
||||
}
|
||||
|
||||
/***** Subject and content *****/
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
/***** Subject and content *****/
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
|
||||
// If writing a reply to a message of an existing thread ==> write subject
|
||||
/* Subject */
|
||||
HTM_TR_Begin (NULL);
|
||||
// If writing a reply to a message of an existing thread ==> write subject
|
||||
/* Subject */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Subject",Txt_MSG_Subject);
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Subject",Txt_MSG_Subject);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Subject",Cns_MAX_CHARS_SUBJECT,
|
||||
IsReply ? Subject :
|
||||
"",
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Subject\" class=\"MSG_SUBJECT\" required=\"required\"");
|
||||
HTM_TD_End ();
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_INPUT_TEXT ("Subject",Cns_MAX_CHARS_SUBJECT,
|
||||
IsReply ? Subject :
|
||||
"",
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Subject\" class=\"MSG_SUBJECT\" required=\"required\"");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/* Content */
|
||||
HTM_TR_Begin (NULL);
|
||||
/* Content */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Content",Txt_MSG_Content);
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Content",Txt_MSG_Content);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"Content\" name=\"Content\" class=\"MSG_CONTENT\" rows=\"10\"");
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_TD_End ();
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"Content\" name=\"Content\" class=\"MSG_CONTENT\" rows=\"10\"");
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
HTM_TABLE_End ();
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Help for text editor *****/
|
||||
Lay_HelpPlainEditor ();
|
||||
/***** Help for text editor *****/
|
||||
Lay_HelpPlainEditor ();
|
||||
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,"FOR_MED_INPUT");
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,"FOR_MED_INPUT");
|
||||
|
||||
/***** Send button *****/
|
||||
Btn_PutCreateButton (Txt_Send);
|
||||
/***** Send button *****/
|
||||
Btn_PutCreateButton (Txt_Send);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
|
18
swad_game.c
18
swad_game.c
|
@ -280,8 +280,8 @@ static void Gam_ListAllGames (struct Gam_Games *Games)
|
|||
|
||||
/* Form to change order */
|
||||
Frm_BeginForm (ActSeeAllGam);
|
||||
Pag_PutHiddenParamPagNum (Pag_GAMES,Games->CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Pag_PutHiddenParamPagNum (Pag_GAMES,Games->CurrentPage);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_GAMES_ORDER_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Games->SelectedOrder)
|
||||
|
@ -419,7 +419,7 @@ static void Gam_PutButtonToCreateNewGame (struct Gam_Games *Games)
|
|||
extern const char *Txt_New_game;
|
||||
|
||||
Frm_BeginForm (ActFrmNewGam);
|
||||
Gam_PutParamsToCreateNewGame (Games);
|
||||
Gam_PutParamsToCreateNewGame (Games);
|
||||
|
||||
Btn_PutConfirmButton (Txt_New_game);
|
||||
|
||||
|
@ -596,7 +596,7 @@ static void Gam_ShowOneGame (struct Gam_Games *Games,
|
|||
Games->GamCod = Game->GamCod;
|
||||
HTM_ARTICLE_Begin (Anchor);
|
||||
Frm_BeginForm (ActSeeGam);
|
||||
Gam_PutParams (Games);
|
||||
Gam_PutParams (Games);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_game,
|
||||
Game->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT":
|
||||
"BT_LINK LT ASG_TITLE",
|
||||
|
@ -627,7 +627,7 @@ static void Gam_ShowOneGame (struct Gam_Games *Games,
|
|||
|
||||
Games->GamCod = Game->GamCod;
|
||||
Frm_BeginForm (ActSeeGam);
|
||||
Gam_PutParams (Games);
|
||||
Gam_PutParams (Games);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Matches,
|
||||
Game->Hidden ? "BT_LINK LT ASG_TITLE_LIGHT" :
|
||||
"BT_LINK LT ASG_TITLE",
|
||||
|
@ -1312,7 +1312,7 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games,
|
|||
Games->GamCod = Game->GamCod;
|
||||
Frm_BeginForm (ItsANewGame ? ActNewGam :
|
||||
ActChgGam);
|
||||
Gam_PutParams (Games);
|
||||
Gam_PutParams (Games);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
if (ItsANewGame)
|
||||
|
@ -1827,7 +1827,7 @@ static void Gam_PutButtonToAddNewQuestions (struct Gam_Games *Games)
|
|||
extern const char *Txt_Add_questions;
|
||||
|
||||
Frm_BeginForm (ActAddOneGamQst);
|
||||
Gam_PutParams (Games);
|
||||
Gam_PutParams (Games);
|
||||
|
||||
Btn_PutConfirmButton (Txt_Add_questions);
|
||||
|
||||
|
@ -2211,8 +2211,8 @@ void Gam_PutButtonNewMatch (struct Gam_Games *Games,long GamCod)
|
|||
extern const char *Txt_New_match;
|
||||
|
||||
Frm_BeginFormAnchor (ActReqNewMch,Mch_NEW_MATCH_SECTION_ID);
|
||||
Games->GamCod = GamCod;
|
||||
Gam_PutParams (Games);
|
||||
Games->GamCod = GamCod;
|
||||
Gam_PutParams (Games);
|
||||
|
||||
Btn_PutConfirmButton (Txt_New_match);
|
||||
|
||||
|
|
|
@ -145,10 +145,11 @@ struct Globals
|
|||
Lan_Language_t Language;
|
||||
unsigned FirstDayOfWeek;
|
||||
Dat_Format_t DateFormat;
|
||||
Mnu_Menu_t Menu;
|
||||
unsigned SideCols;
|
||||
The_Theme_t Theme;
|
||||
Ico_IconSet_t IconSet;
|
||||
Mnu_Menu_t Menu;
|
||||
The_Theme_t Theme;
|
||||
unsigned SideCols;
|
||||
Set_UsrPhotos_t UsrPhotos;
|
||||
char URLTheme[PATH_MAX + 1];
|
||||
char URLIconSet[PATH_MAX + 1];
|
||||
} Prefs;
|
||||
|
|
92
swad_group.c
92
swad_group.c
|
@ -384,38 +384,38 @@ void Grp_ShowFormToSelectSeveralGroups (void (*FuncParams) (void *Args),void *Ar
|
|||
depending on the groups selected *****/
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
|
||||
Usr_USER_LIST_SECTION_ID);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
|
||||
/***** Select all groups *****/
|
||||
Grp_PutCheckboxAllGrps (GroupsSelectableByStdsOrNETs);
|
||||
/***** Select all groups *****/
|
||||
Grp_PutCheckboxAllGrps (GroupsSelectableByStdsOrNETs);
|
||||
|
||||
/***** Get list of groups types and groups in this course *****/
|
||||
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
||||
/***** Get list of groups types and groups in this course *****/
|
||||
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
||||
|
||||
/***** List the groups for each group type *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
for (NumGrpTyp = 0;
|
||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||
NumGrpTyp++)
|
||||
if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps)
|
||||
Grp_ListGrpsForMultipleSelection (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],
|
||||
GroupsSelectableByStdsOrNETs);
|
||||
HTM_TABLE_End ();
|
||||
/***** List the groups for each group type *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
for (NumGrpTyp = 0;
|
||||
NumGrpTyp < Gbl.Crs.Grps.GrpTypes.NumGrpTypes;
|
||||
NumGrpTyp++)
|
||||
if (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps)
|
||||
Grp_ListGrpsForMultipleSelection (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp],
|
||||
GroupsSelectableByStdsOrNETs);
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Free list of groups types and groups in this course *****/
|
||||
Grp_FreeListGrpTypesAndGrps ();
|
||||
/***** Free list of groups types and groups in this course *****/
|
||||
Grp_FreeListGrpTypesAndGrps ();
|
||||
|
||||
/***** Submit button *****/
|
||||
HTM_DIV_Begin ("class=\"CM\" style=\"padding-top:12px;\"");
|
||||
HTM_BUTTON_Animated_Begin (Txt_Update_users,
|
||||
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
|
||||
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
|
||||
NULL);
|
||||
Ico_PutCalculateIconWithText (Txt_Update_users);
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
/***** Submit button *****/
|
||||
HTM_DIV_Begin ("class=\"CM\" style=\"padding-top:12px;\"");
|
||||
HTM_BUTTON_Animated_Begin (Txt_Update_users,
|
||||
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
|
||||
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
|
||||
NULL);
|
||||
Ico_PutCalculateIconWithText (Txt_Update_users);
|
||||
HTM_BUTTON_End ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -1258,7 +1258,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Name of group type */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginFormAnchor (ActRenGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
HTM_INPUT_TEXT ("GrpTypName",Grp_MAX_CHARS_GROUP_TYPE_NAME,
|
||||
Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -1269,7 +1269,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Is it mandatory to register in any group? */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginFormAnchor (ActChgMdtGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"MandatoryEnrolment\""
|
||||
" style=\"width:150px;\"");
|
||||
|
@ -1286,7 +1286,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Is it possible to register in multiple groups? */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginFormAnchor (ActChgMulGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"MultipleEnrolment\""
|
||||
" style=\"width:150px;\"");
|
||||
|
@ -1303,7 +1303,7 @@ static void Grp_ListGroupTypesForEdition (void)
|
|||
/* Open time */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginFormAnchor (ActChgTimGrpTyp,Grp_GROUP_TYPES_SECTION_ID);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
Grp_PutParamGrpTypCod (&Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod);
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
|
@ -1455,7 +1455,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
Frm_BeginFormAnchor (Grp->Open ? ActCloGrp :
|
||||
ActOpeGrp,
|
||||
Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Ico_PutIconLink (Grp->Open ? "unlock.svg" :
|
||||
"lock.svg",
|
||||
Str_BuildStringStr (Grp->Open ? Txt_Group_X_open_click_to_close_it :
|
||||
|
@ -1470,7 +1470,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
Frm_BeginFormAnchor (Grp->FileZones ? ActDisFilZonGrp :
|
||||
ActEnaFilZonGrp,
|
||||
Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Ico_PutIconLink (Grp->FileZones ? "folder-open-green.svg" :
|
||||
"folder-red.svg",
|
||||
Str_BuildStringStr (Grp->FileZones ? Txt_File_zones_of_the_group_X_enabled_click_to_disable_them :
|
||||
|
@ -1484,7 +1484,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
/* Begin selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginFormAnchor (ActChgGrpTyp,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"GrpTypCod\" style=\"width:100px;\"");
|
||||
|
||||
|
@ -1507,7 +1507,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
/***** Group name *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginFormAnchor (ActRenGrp,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
HTM_INPUT_TEXT ("GrpName",Grp_MAX_CHARS_GROUP_NAME,Grp->GrpName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\"");
|
||||
|
@ -1518,7 +1518,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
/* Begin selector */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginFormAnchor (ActChgGrpRoo,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"RooCod\" style=\"width:100px;\"");
|
||||
|
||||
|
@ -1558,7 +1558,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
/***** Maximum number of students of the group (row[3]) *****/
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginFormAnchor (ActChgMaxStdGrp,Grp_GROUPS_SECTION_ID);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_PutParamGrpCod (&Grp->GrpCod);
|
||||
Grp_WriteMaxStds (StrMaxStudents,Grp->MaxStudents);
|
||||
HTM_INPUT_TEXT ("MaxStudents",Cns_MAX_DECIMAL_DIGITS_UINT,StrMaxStudents,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -1758,9 +1758,9 @@ void Grp_ShowLstGrpsToChgMyGrps (void)
|
|||
/***** End form *****/
|
||||
if (PutFormToChangeGrps)
|
||||
{
|
||||
if (ICanChangeMyGrps)
|
||||
Btn_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups :
|
||||
Txt_Enrol_in_groups);
|
||||
if (ICanChangeMyGrps)
|
||||
Btn_PutConfirmButton (NumGrpsIBelong ? Txt_Change_my_groups :
|
||||
Txt_Enrol_in_groups);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
@ -4347,12 +4347,12 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,
|
|||
WhichGrps == Gbl.Crs.Grps.WhichGrps ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (Action);
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) WhichGrps);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams (Args);
|
||||
Ico_PutSettingIconLink (WhichGrps == Grp_MY_GROUPS ? "mysitemap.png" :
|
||||
"sitemap.svg",
|
||||
Txt_GROUP_WHICH_GROUPS[WhichGrps]);
|
||||
Par_PutHiddenParamUnsigned (NULL,"WhichGrps",(unsigned) WhichGrps);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams (Args);
|
||||
Ico_PutSettingIconLink (WhichGrps == Grp_MY_GROUPS ? "mysitemap.png" :
|
||||
"sitemap.svg",
|
||||
Txt_GROUP_WHICH_GROUPS[WhichGrps]);
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
|
|
@ -4172,6 +4172,27 @@ const char *Hlp_PROFILE_Settings_columns =
|
|||
"PROFILE.Settings.en#columns";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Settings_user_photos =
|
||||
#if L==1
|
||||
"PROFILE.Settings.es#fotos-de-usuarios";
|
||||
#elif L==2
|
||||
"PROFILE.Settings.en#user-photos";
|
||||
#elif L==3
|
||||
"PROFILE.Settings.en#user-photos";
|
||||
#elif L==4
|
||||
"PROFILE.Settings.es#fotos-de-usuarios";
|
||||
#elif L==5
|
||||
"PROFILE.Settings.en#user-photos";
|
||||
#elif L==6
|
||||
"PROFILE.Settings.es#fotos-de-usuarios";
|
||||
#elif L==7
|
||||
"PROFILE.Settings.en#user-photos";
|
||||
#elif L==8
|
||||
"PROFILE.Settings.en#user-photos";
|
||||
#elif L==9
|
||||
"PROFILE.Settings.en#user-photos";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Settings_privacy =
|
||||
#if L==1
|
||||
"PROFILE.Settings.es#privacidad";
|
||||
|
|
|
@ -198,7 +198,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
|
|||
HTM_NBSP ();
|
||||
|
||||
Frm_BeginFormGoTo (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_System,ClassLink,NULL);
|
||||
HTM_Txt (Txt_System);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -215,7 +215,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
|
|||
|
||||
/***** Form to go to see institutions of this country *****/
|
||||
Frm_BeginFormGoTo (ActSeeIns);
|
||||
Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod);
|
||||
Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language],ClassLink,NULL);
|
||||
HTM_Txt (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -249,7 +249,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
|
|||
|
||||
/***** Form to see centers of this institution *****/
|
||||
Frm_BeginFormGoTo (ActSeeCtr);
|
||||
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
|
||||
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Ins.FullName,ClassLink,NULL);
|
||||
HTM_Txt (Gbl.Hierarchy.Ins.ShrtName);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -295,7 +295,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
|
|||
|
||||
/***** Form to see degrees of this center *****/
|
||||
Frm_BeginFormGoTo (ActSeeDeg);
|
||||
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
|
||||
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Ctr.FullName,ClassLink,NULL);
|
||||
HTM_Txt (Gbl.Hierarchy.Ctr.ShrtName);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -341,7 +341,7 @@ void Hie_WriteHierarchyInBreadcrumb (void)
|
|||
|
||||
/***** Form to go to see courses of this degree *****/
|
||||
Frm_BeginFormGoTo (ActSeeCrs);
|
||||
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
|
||||
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Hierarchy.Deg.FullName,ClassLink,NULL);
|
||||
HTM_Txt (Gbl.Hierarchy.Deg.ShrtName);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -782,7 +782,7 @@ void Hie_WriteStatusCellEditable (bool ICanEdit,Hie_Status_t Status,
|
|||
{
|
||||
/* Begin form */
|
||||
Frm_BeginForm (NextAction);
|
||||
Hie_PutParamOtherHieCod (&HieCod);
|
||||
Hie_PutParamOtherHieCod (&HieCod);
|
||||
|
||||
/* Selector */
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
|
|
|
@ -235,7 +235,7 @@ void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm)
|
|||
if (PutForm)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeCtr);
|
||||
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
|
||||
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Str_BuildStringStr (Txt_Centers_of_INSTITUTION_X,
|
||||
Gbl.Hierarchy.Ins.ShrtName),
|
||||
"BT_LINK DAT",NULL);
|
||||
|
|
|
@ -135,7 +135,7 @@ void Hld_SeeHolidays (void)
|
|||
{
|
||||
HTM_TH_Begin (1,1,"LM");
|
||||
Frm_BeginForm (ActSeeHld);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_HOLIDAYS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Holidays.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -543,7 +543,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Holiday place */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgHldPlc);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"PlcCod\" class=\"PLC_SEL\"");
|
||||
HTM_OPTION (HTM_Type_STRING,"-1",Hld->PlcCod <= 0,false,
|
||||
|
@ -561,7 +561,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Holiday type */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgHldTyp);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"HldTyp\" style=\"width:62px;\"");
|
||||
for (HolidayType = (Hld_HolidayType_t) 0;
|
||||
|
@ -580,7 +580,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Holiday date / Non school period start date */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgHldStrDat);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
|
||||
Gbl.Now.Date.Year + 1,
|
||||
"Start",
|
||||
|
@ -592,7 +592,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Non school period end date */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgHldEndDat);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Dat_WriteFormDate (Gbl.Now.Date.Year - 1,
|
||||
Gbl.Now.Date.Year + 1,
|
||||
"End",
|
||||
|
@ -604,7 +604,7 @@ static void Hld_ListHolidaysForEdition (const struct Hld_Holidays *Holidays,
|
|||
/* Holiday name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenHld);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
Hld_PutParamHldCod (&Hld->HldCod);
|
||||
HTM_INPUT_TEXT ("Name",Hld_MAX_CHARS_HOLIDAY_NAME,Hld->Name,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\"");
|
||||
|
|
|
@ -129,7 +129,7 @@ void Ico_PutIconsToSelectIconSet (void)
|
|||
IconSet == Gbl.Prefs.IconSet ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActChgIco);
|
||||
Par_PutHiddenParamString (NULL,"IconSet",Ico_IconSetId[IconSet]);
|
||||
Par_PutHiddenParamString (NULL,"IconSet",Ico_IconSetId[IconSet]);
|
||||
snprintf (Icon,sizeof (Icon),"%s/%s/cog.svg",
|
||||
Cfg_ICON_FOLDER_SETS,
|
||||
Ico_IconSetId[IconSet]);
|
||||
|
|
|
@ -209,12 +209,12 @@ void Ind_ReqIndicatorsCourses (void)
|
|||
|
||||
/* Button to show more details */
|
||||
Frm_BeginForm (ActSeeAllStaCrs);
|
||||
Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current);
|
||||
Par_PutHiddenParamLong (NULL,"OthDegTypCod",Indicators.DegTypCod);
|
||||
Par_PutHiddenParamLong (NULL,Dpt_PARAM_DPT_COD_NAME,Indicators.DptCod);
|
||||
if (Indicators.StrIndicatorsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"Indicators",Indicators.StrIndicatorsSelected);
|
||||
Btn_PutConfirmButton (Txt_Show_more_details);
|
||||
Sco_PutParamScope ("ScopeInd",Gbl.Scope.Current);
|
||||
Par_PutHiddenParamLong (NULL,"OthDegTypCod",Indicators.DegTypCod);
|
||||
Par_PutHiddenParamLong (NULL,Dpt_PARAM_DPT_COD_NAME,Indicators.DptCod);
|
||||
if (Indicators.StrIndicatorsSelected[0])
|
||||
Par_PutHiddenParamString (NULL,"Indicators",Indicators.StrIndicatorsSelected);
|
||||
Btn_PutConfirmButton (Txt_Show_more_details);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ void Ins_DrawInstitutionLogoWithLink (struct Ins_Instit *Ins,unsigned Size)
|
|||
if (PutLink)
|
||||
{
|
||||
Frm_BeginForm (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Ins->FullName,"BT_LINK",NULL);
|
||||
}
|
||||
Lgo_DrawLogo (HieLvl_INS,Ins->InsCod,Ins->FullName,
|
||||
|
@ -221,7 +221,7 @@ void Ins_DrawInstitutionLogoAndNameWithLink (struct Ins_Instit *Ins,Act_Action_t
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormGoTo (Action);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
|
||||
/***** Link to action *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Ins->FullName),ClassLink,NULL);
|
||||
|
@ -465,7 +465,7 @@ static void Ins_PutHeadInstitutionsForSeeing (bool OrderSelectable)
|
|||
if (OrderSelectable)
|
||||
{
|
||||
Frm_BeginForm (ActSeeIns);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_INSTITUTIONS_HELP_ORDER[Order],ClassButton[Order],NULL);
|
||||
if (Order == Gbl.Hierarchy.Inss.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -974,7 +974,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenInsSho);
|
||||
Hie_PutParamOtherHieCod (&Ins->InsCod);
|
||||
Hie_PutParamOtherHieCod (&Ins->InsCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Cns_HIERARCHY_MAX_CHARS_SHRT_NAME,Ins->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -989,7 +989,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActRenInsFul);
|
||||
Hie_PutParamOtherHieCod (&Ins->InsCod);
|
||||
Hie_PutParamOtherHieCod (&Ins->InsCod);
|
||||
HTM_INPUT_TEXT ("FullName",Cns_HIERARCHY_MAX_CHARS_FULL_NAME,Ins->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -1004,7 +1004,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
if (ICanEdit)
|
||||
{
|
||||
Frm_BeginForm (ActChgInsWWW);
|
||||
Hie_PutParamOtherHieCod (&Ins->InsCod);
|
||||
Hie_PutParamOtherHieCod (&Ins->InsCod);
|
||||
HTM_INPUT_URL ("WWW",Ins->WWW,HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW\" required=\"required\"");
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -339,7 +339,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
|
|||
if (!PrintView)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeCtyInf);
|
||||
Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod);
|
||||
Cty_PutParamCtyCod (Gbl.Hierarchy.Cty.CtyCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]),
|
||||
"BT_LINK LT DAT",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
|
|
|
@ -1004,7 +1004,7 @@ static void Lay_WritePageTopHeading (void)
|
|||
|
||||
/* Begin form to go to home page */
|
||||
Frm_BeginFormGoTo (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) TabSys);
|
||||
|
||||
HTM_DIV_Begin ("id=\"head_row_1_logo_small\"");
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,Cfg_PLATFORM_LOGO_SMALL_FILENAME,
|
||||
|
@ -1225,11 +1225,11 @@ void Lay_PutContextualLinkOnlyIcon (Act_Action_t NextAction,const char *Anchor,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
|
||||
/***** Put icon with link *****/
|
||||
Ico_PutIconLink (Icon,Title);
|
||||
/***** Put icon with link *****/
|
||||
Ico_PutIconLink (Icon,Title);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -1252,13 +1252,13 @@ void Lay_PutContextualLinkIconText (Act_Action_t NextAction,const char *Anchor,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
|
||||
/***** Put icon and text with link *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Text,The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],NULL);
|
||||
Ico_PutIconTextLink (Icon,Text);
|
||||
HTM_BUTTON_End ();
|
||||
/***** Put icon and text with link *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Text,The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],NULL);
|
||||
Ico_PutIconTextLink (Icon,Text);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -1286,13 +1286,13 @@ void Lay_PutContextualLinkIconTextOnSubmit (Act_Action_t NextAction,const char *
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (NextAction,Anchor);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
|
||||
/***** Put icon with link *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Text,The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],OnSubmit);
|
||||
Ico_PutIconTextLink (Icon,Text);
|
||||
HTM_BUTTON_End ();
|
||||
/***** Put icon with link *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Text,The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],OnSubmit);
|
||||
Ico_PutIconTextLink (Icon,Text);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -1321,37 +1321,37 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"CONTEXT_OPT %s %s\" title=\"%s\"",
|
||||
Checked ? "CHECKBOX_CHECKED" :
|
||||
"CHECKBOX_UNCHECKED",
|
||||
The_ClassFormOutBoxBold[Gbl.Prefs.Theme],
|
||||
Title);
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"CONTEXT_OPT %s %s\" title=\"%s\"",
|
||||
Checked ? "CHECKBOX_CHECKED" :
|
||||
"CHECKBOX_UNCHECKED",
|
||||
The_ClassFormOutBoxBold[Gbl.Prefs.Theme],
|
||||
Title);
|
||||
|
||||
/***** Begin label *****/
|
||||
HTM_LABEL_Begin (NULL);
|
||||
/***** Begin label *****/
|
||||
HTM_LABEL_Begin (NULL);
|
||||
|
||||
/****** Checkbox *****/
|
||||
HTM_INPUT_CHECKBOX (CheckboxName,HTM_SUBMIT_ON_CHANGE,
|
||||
"value=\"Y\"%s%s",
|
||||
Checked ? " checked=\"checked\"" :
|
||||
"",
|
||||
Disabled ? " disabled=\"disabled\"" :
|
||||
"");
|
||||
/****** Checkbox *****/
|
||||
HTM_INPUT_CHECKBOX (CheckboxName,HTM_SUBMIT_ON_CHANGE,
|
||||
"value=\"Y\"%s%s",
|
||||
Checked ? " checked=\"checked\"" :
|
||||
"",
|
||||
Disabled ? " disabled=\"disabled\"" :
|
||||
"");
|
||||
|
||||
/***** Text *****/
|
||||
if (Text)
|
||||
if (Text[0])
|
||||
HTM_TxtF (" %s",Text);
|
||||
/***** Text *****/
|
||||
if (Text)
|
||||
if (Text[0])
|
||||
HTM_TxtF (" %s",Text);
|
||||
|
||||
/***** End label *****/
|
||||
HTM_LABEL_End ();
|
||||
/***** End label *****/
|
||||
HTM_LABEL_End ();
|
||||
|
||||
/***** End container *****/
|
||||
HTM_DIV_End ();
|
||||
/***** End container *****/
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -407,7 +407,7 @@ static void Lnk_ListLinksForEdition (void)
|
|||
/* Link short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenLnkSho);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\" required=\"required\"");
|
||||
|
@ -417,7 +417,7 @@ static void Lnk_ListLinksForEdition (void)
|
|||
/* Link full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenLnkFul);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
Lnk_PutParamLnkCod (&Lnk->LnkCod);
|
||||
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\" required=\"required\"");
|
||||
|
|
22
swad_mail.c
22
swad_mail.c
|
@ -132,7 +132,7 @@ void Mai_SeeMailDomains (void)
|
|||
HTM_TH_Begin (1,1,"LM");
|
||||
|
||||
Frm_BeginForm (ActSeeMai);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_EMAIL_DOMAIN_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Gbl.Mails.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -436,7 +436,7 @@ static void Mai_ListMailDomainsForEdition (void)
|
|||
/* Mail domain */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenMaiSho);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
HTM_INPUT_TEXT ("Domain",Cns_MAX_CHARS_EMAIL_ADDRESS,Mai->Domain,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\"");
|
||||
|
@ -446,7 +446,7 @@ static void Mai_ListMailDomainsForEdition (void)
|
|||
/* Mail domain info */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenMaiFul);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
Mai_PutParamMaiCod (&Mai->MaiCod);
|
||||
HTM_INPUT_TEXT ("Info",Mai_MAX_CHARS_MAIL_INFO,Mai->Info,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"40\"");
|
||||
|
@ -1158,9 +1158,9 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
|
|||
else
|
||||
{
|
||||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs].New,Mai_EMAIL_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
Par_PutHiddenParamString (NULL,"NewEmail",row[0]);
|
||||
Par_PutHiddenParamString (NULL,"NewEmail",row[0]);
|
||||
Btn_PutConfirmButtonInline ((ItsMe && NumEmail == 1) ? Txt_Confirm_email :
|
||||
Txt_Use_this_email);
|
||||
Frm_EndForm ();
|
||||
|
@ -1191,13 +1191,13 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
|
|||
else
|
||||
{
|
||||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs].New,Mai_EMAIL_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrDat.Email,
|
||||
"id=\"NewEmail\" size=\"18\"");
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address
|
||||
Txt_Save_changes); // User has no email address yet
|
||||
HTM_INPUT_EMAIL ("NewEmail",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrDat.Email,
|
||||
"id=\"NewEmail\" size=\"18\"");
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (NumEmails ? Txt_Change_email : // User already has an email address
|
||||
Txt_Save_changes); // User has no email address yet
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
Gbl.RowEvenOdd);
|
||||
Frm_BeginForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowHeaGrp : // Group zone
|
||||
ActChgNumRowHeaCrs); // Course zone
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
HTM_LABEL_Begin (NULL);
|
||||
HTM_TxtF (" %s: ",Txt_TABLE_Header);
|
||||
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),"%u",Marks.Header);
|
||||
|
@ -121,7 +121,7 @@ void Mrk_GetAndWriteNumRowsHeaderAndFooter (void)
|
|||
Gbl.RowEvenOdd);
|
||||
Frm_BeginForm (Gbl.Crs.Grps.GrpCod > 0 ? ActChgNumRowFooGrp : // Group zone
|
||||
ActChgNumRowFooCrs); // Course zone
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
Brw_PutImplicitParamsFileBrowser (&Gbl.FileBrowser.FilFolLnk);
|
||||
HTM_LABEL_Begin (NULL);
|
||||
HTM_TxtF (" %s: ",Txt_TABLE_Footer);
|
||||
snprintf (StrHeadOrFoot,sizeof (StrHeadOrFoot),"%u",Marks.Footer);
|
||||
|
|
28
swad_match.c
28
swad_match.c
|
@ -636,7 +636,7 @@ static void Mch_ListOneOrMoreMatchesTitleGrps (const struct Mch_Match *Match,
|
|||
/***** Match title *****/
|
||||
Frm_BeginForm (Gbl.Usrs.Me.Role.Logged == Rol_STD ? ActJoiMch :
|
||||
ActResMch);
|
||||
Mch_PutParamMchCod (Match->MchCod);
|
||||
Mch_PutParamMchCod (Match->MchCod);
|
||||
|
||||
HTM_BUTTON_SUBMIT_Begin (Gbl.Usrs.Me.Role.Logged == Rol_STD ? Txt_Play :
|
||||
Txt_Resume,
|
||||
|
@ -1214,7 +1214,7 @@ static void Mch_PutFormExistingMatch (struct Gam_Games *Games,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActChgMch,Anchor);
|
||||
Mch_PutParamsEdit (Games);
|
||||
Mch_PutParamsEdit (Games);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Match->Title,
|
||||
|
@ -1268,8 +1268,8 @@ static void Mch_PutFormNewMatch (const struct Gam_Game *Game)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActNewMch);
|
||||
Gam_PutParamGameCod (Game->GamCod);
|
||||
Gam_PutParamQstInd (0); // Start by first question in game
|
||||
Gam_PutParamGameCod (Game->GamCod);
|
||||
Gam_PutParamQstInd (0); // Start by first question in game
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_New_match,
|
||||
|
@ -2631,8 +2631,8 @@ static void Mch_ShowFormColumns (const struct Mch_Match *Match)
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActChgNumColMch);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Mch_PutParamNumCols (NumCols); // Number of columns
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Mch_PutParamNumCols (NumCols); // Number of columns
|
||||
|
||||
/* Number of columns */
|
||||
Ico_PutSettingIconLink (NumColsIcon[NumCols],
|
||||
|
@ -2674,7 +2674,7 @@ static void Mch_PutCheckboxResult (const struct Mch_Match *Match)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActChgVisResMchQst);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
|
||||
/***** Put icon with link *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_results,"BT_LINK DAT ICO_HIGHLIGHT",NULL);
|
||||
|
@ -2711,7 +2711,7 @@ static void Mch_PutIfAnswered (const struct Mch_Match *Match,bool Answered)
|
|||
{
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActSeeMchAnsQstStd);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
|
||||
HTM_BUTTON_OnMouseDown_Begin (Txt_View_my_answer,"BT_LINK DAT_SMALL_GREEN");
|
||||
HTM_TxtF ("<i class=\"%s\"></i>","fas fa-check-circle");
|
||||
|
@ -2752,8 +2752,8 @@ static void Mch_PutIconToRemoveMyAnswer (const struct Mch_Match *Match)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActRemMchAnsQstStd);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown
|
||||
|
||||
/***** Put icon with link *****/
|
||||
HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\"");
|
||||
|
@ -3008,9 +3008,9 @@ static void Mch_ShowQuestionAndAnswersStd (const struct Mch_Match *Match,
|
|||
is necessary in order to be fast
|
||||
and not lose clicks due to refresh */
|
||||
Frm_BeginForm (ActAnsMchQstStd);
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown
|
||||
Mch_PutParamNumOpt (NumOpt); // Number of button
|
||||
Mch_PutParamMchCod (Match->MchCod); // Current match being played
|
||||
Gam_PutParamQstInd (Match->Status.QstInd); // Current question index shown
|
||||
Mch_PutParamNumOpt (NumOpt); // Number of button
|
||||
|
||||
if (asprintf (&Class,"MCH_STD_BUTTON%s BT_%c",
|
||||
UsrAnswer->NumOpt == (int) NumOpt && // Student's answer
|
||||
|
@ -3272,7 +3272,7 @@ static void Mch_PutBigButton (Act_Action_t NextAction,const char *Id,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormId (NextAction,Id);
|
||||
Mch_PutParamMchCod (MchCod);
|
||||
Mch_PutParamMchCod (MchCod);
|
||||
|
||||
/***** Put icon with link *****/
|
||||
HTM_DIV_Begin ("class=\"MCH_BIGBUTTON_CONT\"");
|
||||
|
|
|
@ -550,8 +550,8 @@ static void MchRes_ListGamesToSelect (struct Gam_Games *Games)
|
|||
/***** Begin form to update the results
|
||||
depending on the games selected *****/
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,MchRes_RESULTS_TABLE_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
@ -889,12 +889,12 @@ static void MchRes_ShowMchResults (struct Gam_Games *Games,
|
|||
{
|
||||
case Usr_ME:
|
||||
Frm_BeginForm (ActSeeOneMchResMe);
|
||||
Mch_PutParamsEdit (Games);
|
||||
Mch_PutParamsEdit (Games);
|
||||
break;
|
||||
case Usr_OTHER:
|
||||
Frm_BeginForm (ActSeeOneMchResOth);
|
||||
Mch_PutParamsEdit (Games);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Mch_PutParamsEdit (Games);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
}
|
||||
Ico_PutIconLink ("tasks.svg",Txt_Result);
|
||||
|
@ -1041,6 +1041,12 @@ void MchRes_ShowOneMchResult (void)
|
|||
extern const char *Txt_Score;
|
||||
extern const char *Txt_Grade;
|
||||
extern const char *Txt_Tags;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
struct Gam_Games Games;
|
||||
struct Gam_Game Game;
|
||||
struct Mch_Match Match;
|
||||
|
@ -1125,7 +1131,9 @@ void MchRes_ShowOneMchResult (void)
|
|||
if (UsrDat->FrstName[0])
|
||||
HTM_TxtF (", %s",UsrDat->FrstName);
|
||||
HTM_BR ();
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO45x60",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
|
|
@ -299,7 +299,7 @@ void Mnu_PutIconsToSelectMenu (void)
|
|||
HTM_DIV_Begin ("class=\"%s\"",Menu == Gbl.Prefs.Menu ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActChgMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Menu",(unsigned) Menu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Menu",(unsigned) Menu);
|
||||
Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]);
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
|
|
211
swad_message.c
211
swad_message.c
|
@ -317,63 +317,63 @@ static void Msg_PutFormMsgUsrs (struct Msg_Messages *Messages,
|
|||
|
||||
/***** Begin form to select recipients and write the message *****/
|
||||
Frm_BeginForm (ActRcvMsgUsr);
|
||||
if (Messages->Reply.IsReply)
|
||||
{
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (Messages->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
if (Messages->ShowOnlyOneRecipient)
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
}
|
||||
if (Messages->Reply.IsReply)
|
||||
{
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (Messages->Reply.OriginalMsgCod);
|
||||
}
|
||||
if (Gbl.Usrs.Other.UsrDat.UsrCod > 0)
|
||||
{
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
if (Messages->ShowOnlyOneRecipient)
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
}
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
|
||||
/***** "To:" section (recipients) *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** "To:" section (recipients) *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColon (Txt_MSG_To);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColon (Txt_MSG_To);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
if (Messages->ShowOnlyOneRecipient)
|
||||
/***** Show only one user as recipient *****/
|
||||
Msg_ShowOneUniqueRecipient ();
|
||||
else
|
||||
{
|
||||
/***** Show potential recipients *****/
|
||||
HTM_TABLE_BeginWide ();
|
||||
if (ShowUsrsInCrs)
|
||||
{
|
||||
Usr_ListUsersToSelect (Rol_TCH,&Gbl.Usrs.Selected); // All teachers in course
|
||||
Usr_ListUsersToSelect (Rol_NET,&Gbl.Usrs.Selected); // All non-editing teachers in course
|
||||
Usr_ListUsersToSelect (Rol_STD,&Gbl.Usrs.Selected); // All students in selected groups
|
||||
}
|
||||
Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); // Other users (nicknames)
|
||||
HTM_TABLE_End ();
|
||||
}
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
if (Messages->ShowOnlyOneRecipient)
|
||||
/***** Show only one user as recipient *****/
|
||||
Msg_ShowOneUniqueRecipient ();
|
||||
else
|
||||
{
|
||||
/***** Show potential recipients *****/
|
||||
HTM_TABLE_BeginWide ();
|
||||
if (ShowUsrsInCrs)
|
||||
{
|
||||
Usr_ListUsersToSelect (Rol_TCH,&Gbl.Usrs.Selected); // All teachers in course
|
||||
Usr_ListUsersToSelect (Rol_NET,&Gbl.Usrs.Selected); // All non-editing teachers in course
|
||||
Usr_ListUsersToSelect (Rol_STD,&Gbl.Usrs.Selected); // All students in selected groups
|
||||
}
|
||||
Msg_WriteFormUsrsIDsOrNicksOtherRecipients (); // Other users (nicknames)
|
||||
HTM_TABLE_End ();
|
||||
}
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Subject and content sections *****/
|
||||
Msg_WriteFormSubjectAndContentMsgToUsrs (Messages,Content);
|
||||
/***** Subject and content sections *****/
|
||||
Msg_WriteFormSubjectAndContentMsgToUsrs (Messages,Content);
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Help for text editor and send button *****/
|
||||
Lay_HelpPlainEditor ();
|
||||
/***** Help for text editor and send button *****/
|
||||
Lay_HelpPlainEditor ();
|
||||
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,"MSG_MED_INPUT");
|
||||
/***** Attached image (optional) *****/
|
||||
Med_PutMediaUploader (-1,"MSG_MED_INPUT");
|
||||
|
||||
/***** Send button *****/
|
||||
Btn_PutCreateButton (Txt_Send_message);
|
||||
/***** Send button *****/
|
||||
Btn_PutCreateButton (Txt_Send_message);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -479,8 +479,17 @@ static void Msg_PutHiddenParamsSubjectAndContent (void)
|
|||
|
||||
static void Msg_ShowOneUniqueRecipient (void)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
|
||||
/***** Show user's photo *****/
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
|
||||
/****** Write user's IDs ******/
|
||||
HTM_DIV_Begin ("class=\"MSG_TO_ONE_RCP %s\"",
|
||||
|
@ -2249,8 +2258,8 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
|
|||
ActExpRcvMsg) :
|
||||
(Expanded ? ActConSntMsg :
|
||||
ActExpSntMsg));
|
||||
Messages->MsgCod = MsgCod; // Message to be contracted/expanded
|
||||
Msg_PutHiddenParamsOneMsg (Messages);
|
||||
Messages->MsgCod = MsgCod; // Message to be contracted/expanded
|
||||
Msg_PutHiddenParamsOneMsg (Messages);
|
||||
|
||||
HTM_BUTTON_SUBMIT_Begin (Expanded ? Txt_Hide_message :
|
||||
Txt_See_message,
|
||||
|
@ -2281,6 +2290,12 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
|
|||
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor)
|
||||
{
|
||||
extern const char *Txt_Unknown_or_without_photo;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC30x40",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE30x40",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR30x40",
|
||||
};
|
||||
bool WriteAuthor;
|
||||
|
||||
/***** Write author name or don't write it? *****/
|
||||
|
@ -2301,9 +2316,12 @@ void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled,const char *BgColor
|
|||
HTM_TD_Begin ("class=\"CT\" style=\"width:30px;\"");
|
||||
|
||||
if (WriteAuthor)
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO30x40",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
else
|
||||
Ico_PutIcon ("usr_bl.jpg",Txt_Unknown_or_without_photo,"PHOTO30x40");
|
||||
Ico_PutIcon ("usr_bl.jpg",Txt_Unknown_or_without_photo,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos]);
|
||||
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2367,7 +2385,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod)
|
|||
{
|
||||
/* Write course, including link */
|
||||
Frm_BeginFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
HTM_DIV_Begin ("class=\"AUTHOR_TXT\"");
|
||||
HTM_Txt ("(");
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs.FullName),
|
||||
|
@ -2410,13 +2428,13 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,
|
|||
else // Not the current course ==> go to another course
|
||||
{
|
||||
Frm_BeginFormGoTo (ActReqMsgUsr);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
Crs_PutParamCrsCod (CrsCod);
|
||||
}
|
||||
Grp_PutParamAllGroups ();
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (MsgCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
Grp_PutParamAllGroups ();
|
||||
Par_PutHiddenParamChar ("IsReply",'Y');
|
||||
Msg_PutHiddenParamMsgCod (MsgCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Par_PutHiddenParamChar ("ShowOnlyOneRecipient",'Y');
|
||||
|
||||
/****** Link *****/
|
||||
Ico_PutIconLink ("reply.svg",
|
||||
|
@ -2439,6 +2457,12 @@ static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
|
|||
extern const char *Txt_MSG_Sent;
|
||||
extern const char *Txt_MSG_Sent_and_deleted;
|
||||
extern const char *Txt_ROLES_SINGUL_abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
|
||||
HTM_TABLE_Begin (NULL);
|
||||
HTM_TR_Begin (NULL);
|
||||
|
@ -2454,7 +2478,9 @@ static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
|
|||
|
||||
/***** Put user's photo *****/
|
||||
HTM_TD_Begin ("class=\"CM\" style=\"width:30px;\"");
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Write user's name *****/
|
||||
|
@ -2500,6 +2526,18 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
extern const char *Txt_and_X_other_recipients;
|
||||
extern const char *Txt_unknown_recipient;
|
||||
extern const char *Txt_unknown_recipients;
|
||||
static const Act_Action_t ActionSee[Msg_NUM_TYPES_OF_MSGS] =
|
||||
{
|
||||
[Msg_WRITING ] = ActUnk,
|
||||
[Msg_RECEIVED] = ActSeeRcvMsg,
|
||||
[Msg_SENT ] = ActSeeSntMsg,
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NumRcp;
|
||||
|
@ -2517,12 +2555,6 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
bool ShowPhoto;
|
||||
const char *Title;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
static const Act_Action_t ActionSee[Msg_NUM_TYPES_OF_MSGS] =
|
||||
{
|
||||
[Msg_WRITING ] = ActUnk,
|
||||
[Msg_RECEIVED] = ActSeeRcvMsg,
|
||||
[Msg_SENT ] = ActSeeSntMsg,
|
||||
};
|
||||
|
||||
/***** Get number of recipients of a message from database *****/
|
||||
NumRecipients.Total = Msg_DB_GetNumRecipients (MsgCod);
|
||||
|
@ -2587,7 +2619,8 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
false);
|
||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
"PHOTO21x28",Pho_ZOOM,false);
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Write user's name */
|
||||
|
@ -2626,13 +2659,13 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
|
||||
HTM_TD_Begin ("colspan=\"3\" class=\"AUTHOR_TXT LM\"");
|
||||
Frm_BeginForm (ActionSee[Messages->TypeOfMessages]);
|
||||
Messages->MsgCod = MsgCod; // Message to be expanded with all recipients visible
|
||||
Msg_PutHiddenParamsOneMsg (Messages);
|
||||
Par_PutHiddenParamChar ("SeeAllRcpts",'Y');
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_all_recipients,"BT_LINK AUTHOR_TXT",NULL);
|
||||
HTM_TxtF (Txt_and_X_other_recipients,
|
||||
NumRecipients.Known - NumRecipients.ToShow);
|
||||
HTM_BUTTON_End ();
|
||||
Messages->MsgCod = MsgCod; // Message to be expanded with all recipients visible
|
||||
Msg_PutHiddenParamsOneMsg (Messages);
|
||||
Par_PutHiddenParamChar ("SeeAllRcpts",'Y');
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_all_recipients,"BT_LINK AUTHOR_TXT",NULL);
|
||||
HTM_TxtF (Txt_and_X_other_recipients,
|
||||
NumRecipients.Known - NumRecipients.ToShow);
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -2726,11 +2759,11 @@ static void Msg_PutFormToBanSender (struct Msg_Messages *Messages,
|
|||
extern const char *Txt_Sender_permitted_click_to_ban_him;
|
||||
|
||||
Frm_BeginForm (ActBanUsrMsg);
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages],
|
||||
Messages->CurrentPage);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Msg_PutHiddenParamsMsgsFilters (Messages);
|
||||
Ico_PutIconLink ("unlock.svg",Txt_Sender_permitted_click_to_ban_him);
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages],
|
||||
Messages->CurrentPage);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Msg_PutHiddenParamsMsgsFilters (Messages);
|
||||
Ico_PutIconLink ("unlock.svg",Txt_Sender_permitted_click_to_ban_him);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -2744,11 +2777,11 @@ static void Msg_PutFormToUnbanSender (struct Msg_Messages *Messages,
|
|||
extern const char *Txt_Sender_banned_click_to_unban_him;
|
||||
|
||||
Frm_BeginForm (ActUnbUsrMsg);
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages],
|
||||
Messages->CurrentPage);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Msg_PutHiddenParamsMsgsFilters (Messages);
|
||||
Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages],
|
||||
Messages->CurrentPage);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Msg_PutHiddenParamsMsgsFilters (Messages);
|
||||
Ico_PutIconLink ("lock.svg",Txt_Sender_banned_click_to_unban_him);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -2842,6 +2875,12 @@ void Msg_ListBannedUsrs (void)
|
|||
extern const char *Txt_You_have_not_banned_any_sender;
|
||||
extern const char *Txt_Banned_users;
|
||||
extern const char *Txt_Sender_banned_click_to_unban_him;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsr;
|
||||
unsigned NumUsrs;
|
||||
|
@ -2883,7 +2922,9 @@ void Msg_ListBannedUsrs (void)
|
|||
|
||||
/* Show photo */
|
||||
HTM_TD_Begin ("class=\"LM\" style=\"width:30px;\"");
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Write user's full name */
|
||||
|
|
|
@ -264,12 +264,12 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
|
|||
else
|
||||
{
|
||||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs].Change,Nck_NICKNAME_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",row[0]);
|
||||
Par_PutHiddenParamString (NULL,"NewNick",NickWithArr); // Nickname
|
||||
Btn_PutConfirmButtonInline (Txt_Use_this_nickname);
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",row[0]);
|
||||
Par_PutHiddenParamString (NULL,"NewNick",NickWithArr); // Nickname
|
||||
Btn_PutConfirmButtonInline (Txt_Use_this_nickname);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -298,16 +298,16 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
|
|||
else
|
||||
{
|
||||
Frm_BeginFormAnchor (NextAction[UsrDat->Roles.InCurrentCrs].Change,Nck_NICKNAME_SECTION_ID);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",
|
||||
Gbl.Usrs.Me.UsrDat.Nickname);
|
||||
HTM_INPUT_TEXT ("NewNick",1 + Nck_MAX_CHARS_NICK_WITHOUT_ARROBA,
|
||||
NickWithArr,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"NewNick\" size=\"18\"");
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname
|
||||
Txt_Save_changes); // I have no nickname yet);
|
||||
snprintf (NickWithArr,sizeof (NickWithArr),"@%s",
|
||||
Gbl.Usrs.Me.UsrDat.Nickname);
|
||||
HTM_INPUT_TEXT ("NewNick",1 + Nck_MAX_CHARS_NICK_WITHOUT_ARROBA,
|
||||
NickWithArr,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"NewNick\" size=\"18\"");
|
||||
HTM_BR ();
|
||||
Btn_PutCreateButtonInline (NumNicks ? Txt_Change_nickname : // I already have a nickname
|
||||
Txt_Save_changes); // I have no nickname yet);
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -620,7 +620,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
{
|
||||
/* Form to view full notice */
|
||||
Frm_BeginFormAnchor (ActSeeOneNot,Anchor);
|
||||
Not_PutHiddenParamNotCod (NotCod);
|
||||
Not_PutHiddenParamNotCod (NotCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_See_full_notice,"BT_LINK RT",NULL);
|
||||
}
|
||||
if (asprintf (&Id,"not_date_%u",UniqueId) < 0)
|
||||
|
|
|
@ -715,9 +715,9 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
break;
|
||||
}
|
||||
Frm_BeginForm (Action);
|
||||
if (GrpCod > 0)
|
||||
Grp_PutParamGrpCod (&GrpCod);
|
||||
Brw_PutHiddenParamFilCod (FileMetadata.FilCod);
|
||||
if (GrpCod > 0)
|
||||
Grp_PutParamGrpCod (&GrpCod);
|
||||
Brw_PutHiddenParamFilCod (FileMetadata.FilCod);
|
||||
}
|
||||
break;
|
||||
case Ntf_EVENT_TML_COMMENT:
|
||||
|
@ -726,17 +726,17 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
case Ntf_EVENT_TML_MENTION:
|
||||
// Cod is the code of the social publishing
|
||||
Frm_BeginForm (ActSeeGblTL);
|
||||
Tml_Pub_PutHiddenParamPubCod (Cod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Ntf_PutHiddenParamNotifyEvent (NotifyEvent);
|
||||
Tml_Pub_PutHiddenParamPubCod (Cod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Ntf_PutHiddenParamNotifyEvent (NotifyEvent);
|
||||
break;
|
||||
case Ntf_EVENT_FOLLOWER:
|
||||
if (UsrDat->EnUsrCod[0]) // User's code found ==>
|
||||
// go to user's public profile
|
||||
{
|
||||
Frm_BeginForm (ActSeeOthPubPrf);
|
||||
/* Put param to go to follower's profile */
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
/* Put param to go to follower's profile */
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
else // No user's code found ==> go to see my followers
|
||||
Frm_BeginForm (ActSeeFlr);
|
||||
|
@ -744,21 +744,21 @@ static bool Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
|||
case Ntf_EVENT_FORUM_POST_COURSE:
|
||||
case Ntf_EVENT_FORUM_REPLY:
|
||||
Frm_BeginForm (For_ActionsSeeFor[Forums->Forum.Type]);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forums->Forum.Location,
|
||||
Forums->Thread.Selected,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forums->Forum.Location,
|
||||
Forums->Thread.Selected,
|
||||
-1L);
|
||||
break;
|
||||
case Ntf_EVENT_NOTICE:
|
||||
Frm_BeginForm (ActSeeOneNot);
|
||||
Not_PutHiddenParamNotCod (Cod);
|
||||
Not_PutHiddenParamNotCod (Cod);
|
||||
break;
|
||||
case Ntf_EVENT_MESSAGE:
|
||||
Frm_BeginForm (ActExpRcvMsg);
|
||||
Msg_PutHiddenParamMsgCod (Cod);
|
||||
Msg_PutHiddenParamMsgCod (Cod);
|
||||
break;
|
||||
default:
|
||||
Frm_BeginForm (Ntf_DefaultActions[NotifyEvent]);
|
||||
|
|
|
@ -176,92 +176,92 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_PROJECTS:
|
||||
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_THREADS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_POSTS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_MESSAGES_RECEIVED:
|
||||
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MESSAGES_SENT:
|
||||
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MY_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_ANOTHER_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -303,102 +303,102 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_PROJECTS:
|
||||
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_THREADS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_POSTS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_MESSAGES_RECEIVED:
|
||||
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MESSAGES_SENT:
|
||||
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MY_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
1,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_ANOTHER_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,1,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (1);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,1,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (1);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
Frm_EndForm ();
|
||||
if (Pagination->LeftPage > 2)
|
||||
{
|
||||
|
@ -416,103 +416,103 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_PROJECTS:
|
||||
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
Pagination->LeftPage,
|
||||
Cod);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
Pagination->LeftPage,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_THREADS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (Pagination->LeftPage, // Page of threads = left
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (Pagination->LeftPage, // Page of threads = left
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_POSTS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
Pagination->LeftPage, // Page of posts = left
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
Pagination->LeftPage, // Page of posts = left
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_MESSAGES_RECEIVED:
|
||||
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MESSAGES_SENT:
|
||||
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MY_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
Pagination->LeftPage,
|
||||
Cod);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
Pagination->LeftPage,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_ANOTHER_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,
|
||||
Pagination->LeftPage,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (Pagination->LeftPage);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,
|
||||
Pagination->LeftPage,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (Pagination->LeftPage);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
Frm_EndForm ();
|
||||
if (Pagination->LeftPage < Pagination->StartPage - 1)
|
||||
{
|
||||
|
@ -541,99 +541,99 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_PROJECTS:
|
||||
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
NumPage,
|
||||
Cod);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
NumPage,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_THREADS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (NumPage, // Page of threads = number of page
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (NumPage, // Page of threads = number of page
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_POSTS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
NumPage, // Page of posts = number of page
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
NumPage, // Page of posts = number of page
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_MESSAGES_RECEIVED:
|
||||
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MESSAGES_SENT:
|
||||
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MY_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
NumPage,
|
||||
Cod);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
NumPage,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_ANOTHER_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (NumPage);
|
||||
HTM_BUTTON_End ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (NumPage);
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
free (Title);
|
||||
|
@ -653,103 +653,103 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_PROJECTS:
|
||||
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
Pagination->RightPage,
|
||||
Cod);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
Pagination->RightPage,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_THREADS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (Pagination->RightPage, // Page of threads = right
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (Pagination->RightPage, // Page of threads = right
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_POSTS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
Pagination->RightPage, // Page of posts = right
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
Pagination->RightPage, // Page of posts = right
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_MESSAGES_RECEIVED:
|
||||
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MESSAGES_SENT:
|
||||
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MY_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
Pagination->RightPage,
|
||||
Cod);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
Pagination->RightPage,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_ANOTHER_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,
|
||||
Pagination->RightPage,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (Pagination->RightPage);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,
|
||||
Pagination->RightPage,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (Pagination->RightPage);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -766,103 +766,103 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Asg_Assignments *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_PROJECTS:
|
||||
Frm_BeginFormAnchor (ActSeePrj,Pagination->Anchor);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
Pagination->NumPags,
|
||||
Cod);
|
||||
Prj_PutParams (&((struct Prj_Projects *) Context)->Filter,
|
||||
((struct Prj_Projects *) Context)->SelectedOrder,
|
||||
Pagination->NumPags,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_EXAMS:
|
||||
Frm_BeginFormAnchor (ActSeeAllExa,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Exa_Exams *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_GAMES:
|
||||
Frm_BeginFormAnchor (ActSeeAllGam,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Gam_Games *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_SURVEYS:
|
||||
Frm_BeginFormAnchor (ActSeeAllSvy,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Svy_Surveys *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_ATT_EVENTS:
|
||||
Frm_BeginFormAnchor (ActSeeAtt,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Dat_PutHiddenParamOrder (((struct Att_Events *) Context)->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
break;
|
||||
case Pag_THREADS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeeFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (Pagination->NumPags, // Page of threads = last
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (Pagination->NumPags, // Page of threads = last
|
||||
1, // Page of posts = first
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
-1L,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_POSTS_FORUM:
|
||||
Frm_BeginFormAnchor (For_ActionsSeePstFor[((struct For_Forums *) Context)->Forum.Type],
|
||||
Pagination->Anchor);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
Pagination->NumPags, // Page of posts = last
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
For_PutAllHiddenParamsForum (((struct For_Forums *) Context)->CurrentPageThrs, // Page of threads = current
|
||||
Pagination->NumPags, // Page of posts = last
|
||||
((struct For_Forums *) Context)->ForumSet,
|
||||
((struct For_Forums *) Context)->ThreadsOrder,
|
||||
((struct For_Forums *) Context)->Forum.Location,
|
||||
Cod,
|
||||
-1L);
|
||||
break;
|
||||
case Pag_MESSAGES_RECEIVED:
|
||||
Frm_BeginFormAnchor (ActSeeRcvMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MESSAGES_SENT:
|
||||
Frm_BeginFormAnchor (ActSeeSntMsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Msg_PutHiddenParamsMsgsFilters ((struct Msg_Messages *) Context);
|
||||
break;
|
||||
case Pag_MY_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeMyAgd,Pagination->Anchor);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
Pagination->NumPags,
|
||||
Cod);
|
||||
Agd_PutParamsMyAgenda (((struct Agd_Agenda *) Context)->Past__FutureEvents,
|
||||
((struct Agd_Agenda *) Context)->PrivatPublicEvents,
|
||||
((struct Agd_Agenda *) Context)->HiddenVisiblEvents,
|
||||
((struct Agd_Agenda *) Context)->SelectedOrder,
|
||||
Pagination->NumPags,
|
||||
Cod);
|
||||
break;
|
||||
case Pag_ANOTHER_AGENDA:
|
||||
Frm_BeginFormAnchor (ActSeeUsrAgd,Pagination->Anchor);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Agd_PutHiddenParamEventsOrder (((struct Agd_Agenda *) Context)->SelectedOrder);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,
|
||||
Pagination->NumPags,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (Pagination->NumPags);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
if (asprintf (&Title,Txt_Page_X_of_Y,
|
||||
Pagination->NumPags,Pagination->NumPags) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
HTM_BUTTON_SUBMIT_Begin (Title,ClassLink,NULL);
|
||||
HTM_Unsigned (Pagination->NumPags);
|
||||
HTM_BUTTON_End ();
|
||||
free (Title);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
|
|
@ -758,7 +758,7 @@ void Pwd_ShowFormChgOtherUsrPwd (void)
|
|||
/***** Form to change password *****/
|
||||
/* Begin form */
|
||||
Frm_BeginFormAnchor (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs],Pwd_PASSWORD_SECTION_ID);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
|
||||
/* New password */
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
|
80
swad_photo.c
80
swad_photo.c
|
@ -325,18 +325,18 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
|
|||
else
|
||||
{
|
||||
Frm_BeginForm (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
|
||||
/***** Show help message *****/
|
||||
Ale_ShowAlert (Ale_INFO,Txt_You_can_send_a_file_with_an_image_in_JPEG_format_);
|
||||
/***** Show help message *****/
|
||||
Ale_ShowAlert (Ale_INFO,Txt_You_can_send_a_file_with_an_image_in_JPEG_format_);
|
||||
|
||||
/***** Form to upload photo *****/
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_File_with_the_photo);
|
||||
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/*",
|
||||
HTM_SUBMIT_ON_CHANGE,NULL);
|
||||
HTM_LABEL_End ();
|
||||
/***** Form to upload photo *****/
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_File_with_the_photo);
|
||||
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/*",
|
||||
HTM_SUBMIT_ON_CHANGE,NULL);
|
||||
HTM_LABEL_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -421,6 +421,12 @@ void Pho_ReqRemoveMyPhoto (void)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_your_photo;
|
||||
extern const char *Txt_Remove_photo;
|
||||
extern const char *Txt_The_photo_no_longer_exists;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC186x248",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE186x248",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR186x248",
|
||||
};
|
||||
|
||||
/***** Show current photo and help message *****/
|
||||
if (Pho_BuildLinkToPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL))
|
||||
|
@ -431,7 +437,8 @@ void Pho_ReqRemoveMyPhoto (void)
|
|||
|
||||
/* Show current photo */
|
||||
Pho_ShowUsrPhoto (&Gbl.Usrs.Me.UsrDat,Gbl.Usrs.Me.PhotoURL,
|
||||
"PHOTO186x248",Pho_NO_ZOOM,false);
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_NO_ZOOM,
|
||||
false);
|
||||
|
||||
/* End alert */
|
||||
Ale_ShowAlertAndButton2 (ActRemMyPho,NULL,NULL,
|
||||
|
@ -477,7 +484,6 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
extern const char *Txt_Do_you_really_want_to_remove_the_photo_of_X;
|
||||
extern const char *Txt_Remove_photo;
|
||||
extern const char *Txt_The_photo_no_longer_exists;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
static const Act_Action_t NextAction[Rol_NUM_ROLES] =
|
||||
{
|
||||
[Rol_UNK ] = ActRemOthPho,
|
||||
|
@ -491,6 +497,13 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
[Rol_INS_ADM] = ActRemOthPho,
|
||||
[Rol_SYS_ADM] = ActRemOthPho,
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC186x248",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE186x248",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR186x248",
|
||||
};
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
|
||||
/***** Get user's code from form *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -512,7 +525,8 @@ void Pho_ReqRemoveUsrPhoto (void)
|
|||
|
||||
/* Show current photo */
|
||||
Pho_ShowUsrPhoto (&Gbl.Usrs.Other.UsrDat,PhotoURL,
|
||||
"PHOTO186x248",Pho_NO_ZOOM,false);
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_NO_ZOOM,
|
||||
false);
|
||||
|
||||
/* End alert */
|
||||
Ale_ShowAlertAndButton2 (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs],NULL,NULL,
|
||||
|
@ -692,10 +706,10 @@ static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *Usr
|
|||
else
|
||||
{
|
||||
Frm_BeginForm (NextAction[Gbl.Usrs.Other.UsrDat.Roles.InCurrentCrs]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
}
|
||||
Par_PutHiddenParamString (NULL,"FileName",StrFileName);
|
||||
Frm_EndForm ();
|
||||
Par_PutHiddenParamString (NULL,"FileName",StrFileName);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
NumFacesRed++;
|
||||
|
@ -1375,7 +1389,7 @@ void Pho_ChangePhotoVisibility (void)
|
|||
Pri_PHOTO_ALLOWED_VIS);
|
||||
|
||||
/***** Store public/private photo in database *****/
|
||||
Set_DB_UpdateMySettingsAboutPhoto ();
|
||||
Set_DB_UpdateMySettingsAboutPhotoVisibility ();
|
||||
|
||||
/***** Show form again *****/
|
||||
Set_EditSettings ();
|
||||
|
@ -1769,9 +1783,9 @@ static void Pho_PutSelectorForTypeOfAvg (const struct Pho_DegPhotos *DegPhotos)
|
|||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActSeePhoDeg);
|
||||
Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize);
|
||||
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize);
|
||||
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"AvgType\" name=\"AvgType\"");
|
||||
for (TypeOfAvg = (Pho_AvgPhotoTypeOfAverage_t) 0;
|
||||
|
@ -1833,9 +1847,9 @@ static void Pho_PutSelectorForHowComputePhotoSize (const struct Pho_DegPhotos *D
|
|||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActSeePhoDeg);
|
||||
Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage);
|
||||
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage);
|
||||
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"PhotoSize\" name=\"PhotoSize\"");
|
||||
for (PhoSi = (Pho_HowComputePhotoSize_t) 0;
|
||||
|
@ -1897,9 +1911,9 @@ static void Pho_PutSelectorForHowOrderDegrees (const struct Pho_DegPhotos *DegPh
|
|||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginForm (ActSeePhoDeg);
|
||||
Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage);
|
||||
Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage);
|
||||
Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"Order\" name=\"Order\"");
|
||||
for (Order = (Pho_HowOrderDegrees_t) 0;
|
||||
|
@ -1989,10 +2003,10 @@ static void Pho_PutLinkToCalculateDegreeStats (const struct Pho_DegPhotos *DegPh
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActCalPhoDeg);
|
||||
Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage);
|
||||
Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize);
|
||||
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Pho_PutHiddenParamTypeOfAvg (DegPhotos->TypeOfAverage);
|
||||
Pho_PutHiddenParamPhotoSize (DegPhotos->HowComputePhotoSize);
|
||||
Pho_PutHiddenParamOrderDegrees (DegPhotos->HowOrderDegrees);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
|
||||
HTM_BUTTON_Animated_Begin (Txt_Calculate_average_photo_of_THE_DEGREE_X,
|
||||
The_ClassFormLinkInBoxBold[Gbl.Prefs.Theme],
|
||||
|
@ -2344,9 +2358,9 @@ static void Pho_ShowDegreeAvgPhotoAndStat (const struct Deg_Degree *Deg,
|
|||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeDegInf);
|
||||
Deg_PutParamDegCod (Deg->DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Deg->FullName),"BT_LINK",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
Deg_PutParamDegCod (Deg->DegCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Deg->FullName),"BT_LINK",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
}
|
||||
|
||||
/***** Check if photo of degree can be shown *****/
|
||||
|
@ -2425,7 +2439,7 @@ static void Pho_ShowDegreeAvgPhotoAndStat (const struct Deg_Degree *Deg,
|
|||
|
||||
if (SeeOrPrint == Pho_DEGREES_SEE)
|
||||
{
|
||||
HTM_BUTTON_End ();
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ void Plc_SeePlaces (void)
|
|||
HTM_TH_Begin (1,1,"LM");
|
||||
|
||||
Frm_BeginForm (ActSeePlc);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_PLACES_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Places.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -207,7 +207,7 @@ void Plc_SeePlaces (void)
|
|||
if (Plc_CheckIfICanCreatePlaces ())
|
||||
{
|
||||
Frm_BeginForm (ActEdiPlc);
|
||||
Btn_PutConfirmButton (Txt_New_place);
|
||||
Btn_PutConfirmButton (Txt_New_place);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
|
@ -490,7 +490,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
/* Place short name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenPlcSho);
|
||||
Plc_PutParamPlcCod (&Plc->PlcCod);
|
||||
Plc_PutParamPlcCod (&Plc->PlcCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Plc_MAX_CHARS_PLACE_SHRT_NAME,Plc->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -500,7 +500,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
/* Place full name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenPlcFul);
|
||||
Plc_PutParamPlcCod (&Plc->PlcCod);
|
||||
Plc_PutParamPlcCod (&Plc->PlcCod);
|
||||
HTM_INPUT_TEXT ("FullName",Plc_MAX_CHARS_PLACE_FULL_NAME,Plc->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_FULL_NAME\"");
|
||||
|
|
|
@ -369,7 +369,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin name */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActRenPlg);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("Name",Plg_MAX_CHARS_PLUGIN_NAME,Plg->Name,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\"");
|
||||
|
@ -379,7 +379,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin description */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgPlgDes);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("Description",Plg_MAX_CHARS_PLUGIN_DESCRIPTION,Plg->Description,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"30\"");
|
||||
|
@ -389,7 +389,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin logo */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgPlgLog);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("Logo",Plg_MAX_CHARS_PLUGIN_LOGO,Plg->Logo,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"4\"");
|
||||
|
@ -399,7 +399,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin application key */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgPlgAppKey);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("AppKey",Plg_MAX_CHARS_PLUGIN_APP_KEY,Plg->AppKey,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"16\"");
|
||||
|
@ -409,7 +409,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin URL */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgPlgURL);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_URL ("URL",Plg->URL,HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"15\"");
|
||||
Frm_EndForm ();
|
||||
|
@ -418,7 +418,7 @@ static void Plg_ListPluginsForEdition (void)
|
|||
/* Plugin IP */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgPlgIP);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
Plg_PutParamPlgCod (&Plg->PlgCod);
|
||||
HTM_INPUT_TEXT ("IP",Cns_MAX_CHARS_IP,Plg->IP,HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\"");
|
||||
Frm_EndForm ();
|
||||
|
|
|
@ -774,7 +774,7 @@ static void Prf_PutLinkCalculateFigures (const char *EncryptedUsrCod)
|
|||
extern const char *Txt_Calculate;
|
||||
|
||||
Frm_BeginForm (ActCalFig);
|
||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (EncryptedUsrCod);
|
||||
HTM_BUTTON_Animated_Begin (Txt_Calculate,
|
||||
The_ClassFormLinkOutBoxBold[Gbl.Prefs.Theme],
|
||||
NULL);
|
||||
|
@ -850,8 +850,8 @@ static void Prf_ShowRanking (unsigned Rank,unsigned NumUsrs)
|
|||
|
||||
/***** Rank in form to go to ranking *****/
|
||||
Frm_BeginForm (ActSeeUseGbl);
|
||||
Sco_PutParamScope ("ScopeSta",HieLvl_SYS);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) Fig_USERS_RANKING);
|
||||
Sco_PutParamScope ("ScopeSta",HieLvl_SYS);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FigureType",(unsigned) Fig_USERS_RANKING);
|
||||
if (asprintf (&Title,"#%u %s %u",
|
||||
Rank,Txt_of_PART_OF_A_TOTAL,NumUsrs) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
|
@ -1299,6 +1299,12 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
|||
static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsMe)
|
||||
{
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC30x40",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE30x40",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR30x40",
|
||||
};
|
||||
bool Visible = Pri_ShowingIsAllowed (UsrDat->BaPrfVisibility,UsrDat);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM %s COLOR%u\"",
|
||||
|
@ -1312,7 +1318,9 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsM
|
|||
HTM_TD_Begin ("class=\"RANK_PHOTO COLOR%u\"",Gbl.RowEvenOdd);
|
||||
if (Visible)
|
||||
/***** User's photo *****/
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO30x40",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Put form to go to public profile *****/
|
||||
|
@ -1320,7 +1328,7 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsM
|
|||
if (Visible)
|
||||
{
|
||||
Frm_BeginForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Another_user_s_profile,
|
||||
ItsMe ? "BT_LINK RANK_USR DAT_SMALL_N" :
|
||||
"BT_LINK RANK_USR DAT_SMALL",
|
||||
|
|
|
@ -361,7 +361,7 @@ static void Prg_PutButtonToCreateNewItem (void)
|
|||
long ItmCod = -1L;
|
||||
|
||||
Frm_BeginFormAnchor (ActFrmNewPrgItm,"item_form");
|
||||
Prg_PutParams (&ItmCod);
|
||||
Prg_PutParams (&ItmCod);
|
||||
Btn_PutConfirmButton (Txt_New_item);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1677,7 +1677,7 @@ static void Prg_ShowFormToCreateItem (long ParentItmCod)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActNewPrgItm,"prg_highlighted");
|
||||
Prg_PutParamItmCod (ParentItem.Hierarchy.ItmCod);
|
||||
Prg_PutParamItmCod (ParentItem.Hierarchy.ItmCod);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",Txt_New_item,
|
||||
|
@ -1721,7 +1721,7 @@ static void Prg_ShowFormToChangeItem (long ItmCod)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActChgPrgItm,"prg_highlighted");
|
||||
Prg_PutParamItmCod (Item.Hierarchy.ItmCod);
|
||||
Prg_PutParamItmCod (Item.Hierarchy.ItmCod);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",
|
||||
|
|
134
swad_project.c
134
swad_project.c
|
@ -583,15 +583,15 @@ static void Prj_ShowFormToFilterByMy_All (const struct Prj_Projects *Projects)
|
|||
"PREF_OFF");
|
||||
Frm_BeginForm (Who == Usr_WHO_SELECTED ? ActReqUsrPrj :
|
||||
ActSeePrj);
|
||||
Filter.Who = Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Filter.Who = Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Usr_PutWhoIcon (Who);
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -618,15 +618,15 @@ static void Prj_ShowFormToFilterByAssign (const struct Prj_Projects *Projects)
|
|||
(Projects->Filter.Assign & (1 << Assign)) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActSeePrj);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign ^ (1 << Assign); // Toggle
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign ^ (1 << Assign); // Toggle
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (AssignedNonassigImage[Assign],
|
||||
Txt_PROJECT_ASSIGNED_NONASSIGNED_PLURAL[Assign]);
|
||||
Frm_EndForm ();
|
||||
|
@ -659,15 +659,15 @@ static void Prj_ShowFormToFilterByHidden (const struct Prj_Projects *Projects)
|
|||
(Projects->Filter.Hidden & (1 << HidVis)) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActSeePrj);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden ^ (1 << HidVis); // Toggle
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden ^ (1 << HidVis); // Toggle
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (HiddenVisiblIcon[HidVis],
|
||||
Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]);
|
||||
Frm_EndForm ();
|
||||
|
@ -700,15 +700,15 @@ static void Prj_ShowFormToFilterByWarning (const struct Prj_Projects *Projects)
|
|||
(Projects->Filter.Faulti & (1 << Faultiness)) ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActSeePrj);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti ^ (1 << Faultiness); // Toggle
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti ^ (1 << Faultiness); // Toggle
|
||||
Filter.DptCod = Projects->Filter.DptCod;
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Ico_PutSettingIconLink (FaultinessIcon[Faultiness],
|
||||
Txt_PROJECT_FAULTY_FAULTLESS_PROJECTS[Faultiness]);
|
||||
Frm_EndForm ();
|
||||
|
@ -729,15 +729,15 @@ static void Prj_ShowFormToFilterByDpt (const struct Prj_Projects *Projects)
|
|||
/***** Begin form *****/
|
||||
HTM_DIV_Begin (NULL);
|
||||
Frm_BeginForm (ActSeePrj);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Prj_FILTER_DPT_DEFAULT; // Do not put department parameter here
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Filter.Who = Projects->Filter.Who;
|
||||
Filter.Assign = Projects->Filter.Assign;
|
||||
Filter.Hidden = Projects->Filter.Hidden;
|
||||
Filter.Faulti = Projects->Filter.Faulti;
|
||||
Filter.DptCod = Prj_FILTER_DPT_DEFAULT; // Do not put department parameter here
|
||||
Prj_PutParams (&Filter,
|
||||
Projects->SelectedOrder,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
|
||||
/***** Write selector with departments *****/
|
||||
Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current insitution
|
||||
|
@ -977,10 +977,10 @@ static void Prj_ShowProjectsHead (struct Prj_Projects *Projects,
|
|||
case Prj_LIST_PROJECTS:
|
||||
case Prj_FILE_BROWSER_PROJECT:
|
||||
Frm_BeginForm (ActSeePrj);
|
||||
Prj_PutParams (&Projects->Filter,
|
||||
Order,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
Prj_PutParams (&Projects->Filter,
|
||||
Order,
|
||||
Projects->CurrentPage,
|
||||
-1L);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_PROJECT_ORDER_HELP[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Projects->SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -1121,7 +1121,7 @@ static void Prj_PutButtonToCreateNewPrj (struct Prj_Projects *Projects)
|
|||
|
||||
Projects->PrjCod = -1L;
|
||||
Frm_BeginForm (ActFrmNewPrj);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
Btn_PutConfirmButton (Txt_New_project);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1353,7 +1353,7 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects,
|
|||
if (ICanViewProjectFiles)
|
||||
{
|
||||
Frm_BeginForm (ActAdmDocPrj);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_Project_files,ClassLink,NULL);
|
||||
HTM_Txt (Prj->Title);
|
||||
HTM_BUTTON_End ();
|
||||
|
@ -2014,13 +2014,6 @@ static void Prj_ShowOneProjectMembersWithARole (struct Prj_Projects *Projects,
|
|||
extern const char *Txt_Remove;
|
||||
extern const char *Txt_Add_USERS;
|
||||
extern const char *Txt_PROJECT_ROLES_PLURAL_abc[Prj_NUM_ROLES_IN_PROJECT];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
bool WriteRow;
|
||||
unsigned NumUsr;
|
||||
unsigned NumUsrs;
|
||||
const char *ClassLabel;
|
||||
const char *ClassData;
|
||||
static const Act_Action_t ActionReqRemUsr[Prj_NUM_ROLES_IN_PROJECT] =
|
||||
{
|
||||
[Prj_ROLE_UNK] = ActUnk, // Unknown
|
||||
|
@ -2035,6 +2028,19 @@ static void Prj_ShowOneProjectMembersWithARole (struct Prj_Projects *Projects,
|
|||
[Prj_ROLE_TUT] = ActReqAddTutPrj, // Tutor
|
||||
[Prj_ROLE_EVL] = ActReqAddEvlPrj, // Evaluator
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
bool WriteRow;
|
||||
unsigned NumUsr;
|
||||
unsigned NumUsrs;
|
||||
const char *ClassLabel;
|
||||
const char *ClassData;
|
||||
|
||||
/***** Set CSS classes *****/
|
||||
ClassLabel = (Prj->Hidden == Prj_HIDDEN) ? "ASG_LABEL_LIGHT" :
|
||||
|
@ -2128,7 +2134,9 @@ static void Prj_ShowOneProjectMembersWithARole (struct Prj_Projects *Projects,
|
|||
|
||||
/* Put user's photo */
|
||||
HTM_TD_Begin ("class=\"PRJ_MEMBER_PHO\"");
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Write user's name */
|
||||
|
@ -2560,8 +2568,8 @@ static void Prj_ReqRemUsrFromPrj (struct Prj_Projects *Projects,
|
|||
|
||||
/* Show form to request confirmation */
|
||||
Frm_BeginForm (ActionRemUsr[RoleInPrj]);
|
||||
Projects->PrjCod = Prj.PrjCod;
|
||||
Prj_PutCurrentParams (Projects);
|
||||
Projects->PrjCod = Prj.PrjCod;
|
||||
Prj_PutCurrentParams (Projects);
|
||||
Btn_PutRemoveButton (Str_BuildStringStr (Txt_Remove_USER_from_this_project,
|
||||
Txt_PROJECT_ROLES_SINGUL_abc[RoleInPrj][Gbl.Usrs.Other.UsrDat.Sex]));
|
||||
Str_FreeString ();
|
||||
|
@ -3290,7 +3298,7 @@ static void Prj_PutFormProject (struct Prj_Projects *Projects,
|
|||
/* Begin data form */
|
||||
Frm_BeginForm (ItsANewProject ? ActNewPrj :
|
||||
ActChgPrj);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
Prj_PutCurrentParams (Projects);
|
||||
|
||||
/* Begin box and table */
|
||||
Box_BoxTableBegin (NULL,Txt_Data,
|
||||
|
@ -3997,7 +4005,7 @@ static void Prj_FormLockUnlock (const struct Prj_Project *Prj)
|
|||
Prj->PrjCod) < 0)
|
||||
Err_NotEnoughMemoryExit ();
|
||||
Frm_BeginFormOnSubmit (ActUnk,OnSubmit);
|
||||
Ico_PutIconLink (Prj_LockIcons[Prj->Locked],Txt_LOCKED_UNLOCKED[Prj->Locked]);
|
||||
Ico_PutIconLink (Prj_LockIcons[Prj->Locked],Txt_LOCKED_UNLOCKED[Prj->Locked]);
|
||||
Frm_EndForm ();
|
||||
|
||||
/* Free allocated memory for subquery */
|
||||
|
|
|
@ -152,7 +152,7 @@ void Qst_ShowFormRequestEditQsts (struct Qst_Questions *Questions)
|
|||
if ((Questions->Tags.Num = Tag_DB_GetAllTagsFromCurrentCrs (&mysql_res)))
|
||||
{
|
||||
Frm_BeginForm (ActLstTstQst);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Qst_DEFAULT_ORDER);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Qst_DEFAULT_ORDER);
|
||||
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
|
||||
|
@ -328,7 +328,7 @@ void Qst_ShowFormRequestSelectQstsForExamSet (struct Exa_Exams *Exams,
|
|||
if ((Questions->Tags.Num = Tag_DB_GetAllTagsFromCurrentCrs (&mysql_res)))
|
||||
{
|
||||
Frm_BeginForm (ActLstTstQstForSet);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
|
||||
|
@ -391,7 +391,7 @@ void Qst_ShowFormRequestSelectQstsForGame (struct Gam_Games *Games,
|
|||
if ((Questions->Tags.Num = Tag_DB_GetAllTagsFromCurrentCrs (&mysql_res)))
|
||||
{
|
||||
Frm_BeginForm (ActGamLstTstQst);
|
||||
Gam_PutParams (Games);
|
||||
Gam_PutParams (Games);
|
||||
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
|
||||
|
@ -922,8 +922,8 @@ void Qst_WriteHeadingRowQuestionsForEdition (struct Qst_Questions *Questions)
|
|||
if (Questions->NumQsts > 1)
|
||||
{
|
||||
Frm_BeginForm (ActLstTstQst);
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_TST_STR_ORDER_FULL[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Questions->SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -1005,8 +1005,8 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
|
|||
Questions->Question.Answer.Type == Qst_ANS_MULTIPLE_CHOICE)
|
||||
{
|
||||
Frm_BeginForm (ActChgShfTstQst);
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Questions->SelectedOrder);
|
||||
Qst_PutParamsEditQst (Questions);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Questions->SelectedOrder);
|
||||
HTM_INPUT_CHECKBOX ("Shuffle",HTM_SUBMIT_ON_CHANGE,
|
||||
"value=\"Y\"%s",
|
||||
Questions->Question.Answer.Shuffle ? " checked=\"checked\"" :
|
||||
|
@ -1092,7 +1092,7 @@ void Qst_ListOneOrMoreQstsForSelectionForExamSet (struct Exa_Exams *Exams,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActAddQstToExa);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
ExaSet_PutParamsOneSet (Exams);
|
||||
|
||||
/***** Select all questions *****/
|
||||
Qst_PutCheckboxToSelectAllQuestions ();
|
||||
|
@ -1179,7 +1179,7 @@ void Qst_ListOneOrMoreQstsForSelectionForGame (struct Gam_Games *Games,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActAddTstQstToGam);
|
||||
Gam_PutParams (Games);
|
||||
Gam_PutParams (Games);
|
||||
|
||||
/***** Select all questions *****/
|
||||
Qst_PutCheckboxToSelectAllQuestions ();
|
||||
|
@ -1870,7 +1870,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActRcvTstQst);
|
||||
Qst_PutParamQstCod (&Question->QstCod);
|
||||
Qst_PutParamQstCod (&Question->QstCod);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginPadding (2); // Table for this question
|
||||
|
|
|
@ -278,7 +278,7 @@ void Rec_ListFieldsRecordsForEdition (void)
|
|||
/* Name of the field */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginForm (ActRenFie);
|
||||
Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
HTM_INPUT_TEXT ("FieldName",Rec_MAX_CHARS_NAME_FIELD,
|
||||
Gbl.Crs.Records.LstFields.Lst[NumField].Name,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
@ -289,7 +289,7 @@ void Rec_ListFieldsRecordsForEdition (void)
|
|||
/* Number of lines in the form */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgRowFie);
|
||||
Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
snprintf (StrNumLines,sizeof (StrNumLines),"%u",
|
||||
Gbl.Crs.Records.LstFields.Lst[NumField].NumLines);
|
||||
HTM_INPUT_TEXT ("NumLines",Cns_MAX_DECIMAL_DIGITS_UINT,StrNumLines,
|
||||
|
@ -301,7 +301,7 @@ void Rec_ListFieldsRecordsForEdition (void)
|
|||
/* Visibility of a field */
|
||||
HTM_TD_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActChgVisFie);
|
||||
Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
Rec_PutParamFieldCod (&Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod);
|
||||
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,
|
||||
"name=\"Visibility\"");
|
||||
for (Vis = (Rec_VisibilityRecordFields_t) 0;
|
||||
|
@ -886,7 +886,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/* Print view */
|
||||
Frm_BeginForm (ActPrnRecSevGst);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -986,9 +986,9 @@ static void Rec_ShowRecordOneStdCrs (void)
|
|||
|
||||
/* Print view */
|
||||
Frm_BeginForm (ActPrnRecSevStd);
|
||||
Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
|
||||
/* Print view */
|
||||
Frm_BeginForm (ActPrnRecSevStd);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -1215,12 +1215,12 @@ static void Rec_ShowRecordOneTchCrs (void)
|
|||
|
||||
/* Print view */
|
||||
Frm_BeginForm (ActPrnRecSevTch);
|
||||
Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",ShowOfficeHours ? 'Y' :
|
||||
'N');
|
||||
Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (&Gbl.Usrs.Selected);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Usr_FreeListsSelectedEncryptedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",ShowOfficeHours ? 'Y' :
|
||||
'N');
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -1305,11 +1305,11 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
|
||||
/* Print view */
|
||||
Frm_BeginForm (ActPrnRecSevTch);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",
|
||||
ShowOfficeHours ? 'Y' :
|
||||
'N');
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamChar ("ParamOfficeHours",'Y');
|
||||
Par_PutHiddenParamChar ("ShowOfficeHours",
|
||||
ShowOfficeHours ? 'Y' :
|
||||
'N');
|
||||
Rec_ShowLinkToPrintPreviewOfRecords ();
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -1633,11 +1633,11 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
|||
{
|
||||
ICanEdit = true;
|
||||
Frm_BeginFormAnchor (ActRcvRecOthUsr,Anchor);
|
||||
Par_PutHiddenParamLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
if (TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Par_PutHiddenParamLong (NULL,"OriginalActCod",
|
||||
Act_GetActCod (ActSeeRecSevStd)); // Original action, used to know where we came from
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
if (TypeOfView == Rec_CRS_LIST_SEVERAL_RECORDS)
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -2178,7 +2178,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
|||
break;
|
||||
}
|
||||
Frm_BeginForm (NextAction);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); // Existing user
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod); // Existing user
|
||||
break;
|
||||
case Rec_SHA_OTHER_NEW_USR_FORM:
|
||||
switch (Gbl.Action.Act)
|
||||
|
@ -2197,7 +2197,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
|||
break;
|
||||
}
|
||||
Frm_BeginForm (NextAction);
|
||||
ID_PutParamOtherUsrIDPlain (); // New user
|
||||
ID_PutParamOtherUsrIDPlain (); // New user
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -2559,7 +2559,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks)
|
|||
if (PutFormLinks)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Ins->FullName,"BT_LINK",NULL);
|
||||
}
|
||||
Lgo_DrawLogo (HieLvl_INS,Ins->InsCod,Ins->ShrtName,
|
||||
|
@ -2580,7 +2580,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks)
|
|||
if (PutFormLinks)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeInsInf);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
Ins_PutParamInsCod (Ins->InsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Ins->FullName,"BT_LINK REC_HEAD LM",NULL);
|
||||
}
|
||||
HTM_Txt (Ins->FullName);
|
||||
|
@ -2599,9 +2599,18 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks)
|
|||
|
||||
static void Rec_ShowPhoto (struct UsrData *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC186x248",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE186x248",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR186x248",
|
||||
};
|
||||
|
||||
/***** User's photo *****/
|
||||
HTM_TD_Begin ("rowspan=\"3\" class=\"REC_C3_TOP CT\"");
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO186x248",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -2648,7 +2657,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
/* Put form to go to public profile */
|
||||
ItsMe = Usr_ItsMe (UsrDat->UsrCod);
|
||||
Frm_BeginForm (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (ItsMe ? Txt_My_public_profile :
|
||||
Txt_Another_user_s_profile,
|
||||
"BT_LINK REC_NICK",
|
||||
|
|
14
swad_room.c
14
swad_room.c
|
@ -184,7 +184,7 @@ void Roo_SeeRooms (void)
|
|||
{
|
||||
HTM_TH_Begin (1,1,"LM");
|
||||
Frm_BeginForm (ActSeeRoo);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Order",(unsigned) Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_ROOMS_HELP_ORDER[Order],"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Rooms.SelectedOrder)
|
||||
HTM_U_Begin ();
|
||||
|
@ -687,7 +687,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Building */
|
||||
HTM_TD_Begin ("class=\"CT\"");
|
||||
Frm_BeginFormAnchor (ActChgRooBld,Anchor);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutSelectorBuilding (Room->BldCod,Buildings,
|
||||
HTM_SUBMIT_ON_CHANGE);
|
||||
Frm_EndForm ();
|
||||
|
@ -696,7 +696,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Floor */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginFormAnchor (ActChgRooFlo,Anchor);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
HTM_INPUT_LONG ("Floor",(long) INT_MIN,(long) INT_MAX,(long) Room->Floor,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_LONG\"");
|
||||
|
@ -706,7 +706,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Room type */
|
||||
HTM_TD_Begin ("class=\"CT\"");
|
||||
Frm_BeginFormAnchor (ActChgRooTyp,Anchor);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutSelectorType (Room->Type,
|
||||
HTM_SUBMIT_ON_CHANGE);
|
||||
Frm_EndForm ();
|
||||
|
@ -715,7 +715,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Room short name */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginFormAnchor (ActRenRooSho,Anchor);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"10\" class=\"INPUT_SHORT_NAME\"");
|
||||
|
@ -725,7 +725,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Room full name */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginFormAnchor (ActRenRooFul,Anchor);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
HTM_INPUT_TEXT ("FullName",Roo_MAX_CHARS_FULL_NAME,Room->FullName,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"20\" class=\"INPUT_FULL_NAME\"");
|
||||
|
@ -735,7 +735,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
|
|||
/* Seating capacity */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
Frm_BeginFormAnchor (ActChgRooMaxUsr,Anchor);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_PutParamRooCod (&Room->RooCod);
|
||||
Roo_WriteCapacity (StrCapacity,Room->Capacity);
|
||||
HTM_INPUT_TEXT ("Capacity",Cns_MAX_DECIMAL_DIGITS_UINT,StrCapacity,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
|
|
|
@ -236,7 +236,7 @@ void Sch_PutFormToSearchInPageTopHeading (void)
|
|||
|
||||
/***** Put form *****/
|
||||
Frm_BeginForm (ActSch);
|
||||
Sco_PutParamScope ("ScopeSch",HieLvl_SYS);
|
||||
Sco_PutParamScope ("ScopeSch",HieLvl_SYS);
|
||||
Sch_PutInputStringToSearch ("head_search_text");
|
||||
Sch_PutMagnifyingGlassButton ("search-white.svg");
|
||||
Frm_EndForm ();
|
||||
|
|
100
swad_setting.c
100
swad_setting.c
|
@ -62,6 +62,9 @@ extern struct Globals Gbl;
|
|||
static void Set_PutIconsToSelectSideCols (void);
|
||||
static void Set_PutIconsSideColumns (__attribute__((unused)) void *Args);
|
||||
|
||||
static void Set_PutIconsToSelectUsrPhotos (void);
|
||||
static void Set_PutIconsUsrPhotos (__attribute__((unused)) void *Args);
|
||||
|
||||
static void Set_GetAndUpdateUsrListType (void);
|
||||
static void Set_GetUsrListTypeFromForm (void);
|
||||
static void Set_GetMyUsrListTypeFromDB (void);
|
||||
|
@ -115,13 +118,17 @@ void Set_EditSettings (void)
|
|||
HTM_DIV_End ();
|
||||
|
||||
HTM_DIV_Begin ("class=\"FRAME_INLINE\"");
|
||||
The_PutIconsToSelectTheme (); // 6. Theme
|
||||
The_PutIconsToSelectTheme (); // 6. Theme
|
||||
HTM_DIV_End ();
|
||||
|
||||
HTM_DIV_Begin ("class=\"FRAME_INLINE\"");
|
||||
Set_PutIconsToSelectSideCols (); // 7. Side columns
|
||||
HTM_DIV_End ();
|
||||
|
||||
HTM_DIV_Begin ("class=\"FRAME_INLINE\"");
|
||||
Set_PutIconsToSelectUsrPhotos (); // 8. User photos
|
||||
HTM_DIV_End ();
|
||||
|
||||
Box_BoxEnd ();
|
||||
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
|
@ -176,6 +183,15 @@ void Set_GetSettingsFromIP (void)
|
|||
}
|
||||
else
|
||||
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||
|
||||
/* Get user photo shape (row[6]) */
|
||||
if (sscanf (row[6],"%u",&Gbl.Prefs.UsrPhotos) == 1)
|
||||
{
|
||||
if (Gbl.Prefs.UsrPhotos >= Set_NUM_USR_PHOTOS)
|
||||
Gbl.Prefs.UsrPhotos = Set_USR_PHOTOS_DEFAULT;
|
||||
}
|
||||
else
|
||||
Gbl.Prefs.UsrPhotos = Set_USR_PHOTOS_DEFAULT;
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -214,14 +230,14 @@ static void Set_PutIconsToSelectSideCols (void)
|
|||
Hlp_PROFILE_Settings_columns,Box_NOT_CLOSABLE);
|
||||
Set_BeginSettingsHead ();
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (SideCols = 0;
|
||||
for (SideCols = 0;
|
||||
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
||||
SideCols++)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"%s\"",SideCols == Gbl.Prefs.SideCols ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActChgCol);
|
||||
Par_PutHiddenParamUnsigned (NULL,"SideCols",SideCols);
|
||||
Par_PutHiddenParamUnsigned (NULL,"SideCols",SideCols);
|
||||
snprintf (Icon,sizeof (Icon),"layout%u%u_32x20.gif",
|
||||
SideCols >> 1,SideCols & 1);
|
||||
Ico_PutSettingIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]);
|
||||
|
@ -272,6 +288,84 @@ unsigned Set_GetParamSideCols (void)
|
|||
Cfg_DEFAULT_COLUMNS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Put icons to select user photo shape ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Set_PutIconsToSelectUsrPhotos (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Settings_user_photos;
|
||||
extern const char *Txt_User_photos;
|
||||
extern const char *Txt_USER_PHOTOS[Set_NUM_USR_PHOTOS];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "ICO_HIGHLIGHT PHOTOC15x20B",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "ICO_HIGHLIGHT PHOTOE15x20B",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "ICO_HIGHLIGHT PHOTOR15x20B",
|
||||
};
|
||||
Set_UsrPhotos_t UsrPhotos;
|
||||
|
||||
Box_BoxBegin (NULL,Txt_User_photos,
|
||||
Set_PutIconsUsrPhotos,NULL,
|
||||
Hlp_PROFILE_Settings_user_photos,Box_NOT_CLOSABLE);
|
||||
Set_BeginSettingsHead ();
|
||||
Set_BeginOneSettingSelector ();
|
||||
for (UsrPhotos = (Set_UsrPhotos_t) 0;
|
||||
UsrPhotos <= (Set_UsrPhotos_t) (Set_NUM_USR_PHOTOS - 1);
|
||||
UsrPhotos++)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"%s\"",UsrPhotos == Gbl.Prefs.UsrPhotos ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActChgUsrPho);
|
||||
Par_PutHiddenParamUnsigned (NULL,"UsrPhotos",UsrPhotos);
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"user.svg",Txt_USER_PHOTOS[UsrPhotos],ClassPhoto[UsrPhotos]);
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Put contextual icons in side-columns setting *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Set_PutIconsUsrPhotos (__attribute__((unused)) void *Args)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Fig_PutIconToShowFigure (Fig_USER_PHOTOS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Change user photo shape **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_ChangeUsrPhotos (void)
|
||||
{
|
||||
/***** Get param with user photo shape *****/
|
||||
Gbl.Prefs.UsrPhotos = Set_GetParamUsrPhotos ();
|
||||
|
||||
/***** Store side colums in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Set_DB_UpdateMySettingsAboutUsrPhotos ();
|
||||
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Get parameter used to change user photo shape ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
Set_UsrPhotos_t Set_GetParamUsrPhotos (void)
|
||||
{
|
||||
return (Set_UsrPhotos_t) Par_GetParToUnsignedLong ("UsrPhotos",
|
||||
(Set_UsrPhotos_t) 0,
|
||||
(Set_UsrPhotos_t) (Set_NUM_USR_PHOTOS - 1),
|
||||
Set_USR_PHOTOS_DEFAULT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put hidden parameters with type of list, *******************/
|
||||
/**************** number of columns in class photo *******************/
|
||||
|
|
|
@ -33,6 +33,16 @@
|
|||
/***************************** Public constants ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
// Related with user photo shape
|
||||
#define Set_NUM_USR_PHOTOS 3
|
||||
typedef enum
|
||||
{
|
||||
Set_USR_PHOTO_CIRCLE = 0,
|
||||
Set_USR_PHOTO_ELLIPSE = 1,
|
||||
Set_USR_PHOTO_RECTANGLE = 2,
|
||||
} Set_UsrPhotos_t;
|
||||
#define Set_USR_PHOTOS_DEFAULT Set_USR_PHOTO_CIRCLE
|
||||
|
||||
// Related with type of list of users
|
||||
#define Set_NUM_USR_LIST_TYPES 3
|
||||
typedef enum
|
||||
|
@ -55,6 +65,9 @@ void Set_SetSettingsFromIP (void);
|
|||
void Set_ChangeSideCols (void);
|
||||
unsigned Set_GetParamSideCols (void);
|
||||
|
||||
void Set_ChangeUsrPhotos (void);
|
||||
Set_UsrPhotos_t Set_GetParamUsrPhotos (void);
|
||||
|
||||
//------------------------ My settings on users' list -------------------------
|
||||
void Set_PutParamsPrefsAboutUsrList (void);
|
||||
void Set_GetAndUpdatePrefsAboutUsrList (void);
|
||||
|
|
|
@ -145,11 +145,25 @@ void Set_DB_UpdateMySettingsAboutSideCols (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Update user photo shape on user data table *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_DB_UpdateMySettingsAboutUsrPhotos (void)
|
||||
{
|
||||
DB_QueryUPDATE ("can not update your setting about user photo shape",
|
||||
"UPDATE usr_data"
|
||||
" SET UsrPhotos=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
(unsigned) Gbl.Prefs.UsrPhotos,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Update my settings about photo visibility *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_DB_UpdateMySettingsAboutPhoto (void)
|
||||
void Set_DB_UpdateMySettingsAboutPhotoVisibility (void)
|
||||
{
|
||||
extern const char *Pri_VisibilityDB[Pri_NUM_OPTIONS_PRIVACY];
|
||||
|
||||
|
@ -417,10 +431,10 @@ void Set_DB_UpdateSettingsFromIP (void)
|
|||
DB_QueryREPLACE ("can not store settings from current IP address",
|
||||
"REPLACE INTO set_ip_settings"
|
||||
" (IP,UsrCod,LastChange,"
|
||||
"FirstDayOfWeek,DateFormat,Theme,IconSet,Menu,SideCols)"
|
||||
"FirstDayOfWeek,DateFormat,Theme,IconSet,Menu,SideCols,UsrPhotos)"
|
||||
" VALUES"
|
||||
" ('%s',%ld,NOW(),"
|
||||
"%u,%u,'%s','%s',%u,%u)",
|
||||
"%u,%u,'%s','%s',%u,%u,%u)",
|
||||
Gbl.IP,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
|
@ -428,7 +442,8 @@ void Set_DB_UpdateSettingsFromIP (void)
|
|||
The_ThemeId[Gbl.Prefs.Theme],
|
||||
Ico_IconSetId[Gbl.Prefs.IconSet],
|
||||
(unsigned) Gbl.Prefs.Menu,
|
||||
Gbl.Prefs.SideCols);
|
||||
Gbl.Prefs.SideCols,
|
||||
(unsigned) Gbl.Prefs.UsrPhotos);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -447,7 +462,8 @@ void Set_DB_UpdateMySettingsFromIP (void)
|
|||
"Theme='%s',"
|
||||
"IconSet='%s',"
|
||||
"Menu=%u,"
|
||||
"SideCols=%u"
|
||||
"SideCols=%u,"
|
||||
"UsrPhotos=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
(unsigned) Gbl.Prefs.DateFormat,
|
||||
|
@ -455,6 +471,7 @@ void Set_DB_UpdateMySettingsFromIP (void)
|
|||
Ico_IconSetId[Gbl.Prefs.IconSet],
|
||||
(unsigned) Gbl.Prefs.Menu,
|
||||
Gbl.Prefs.SideCols,
|
||||
(unsigned) Gbl.Prefs.UsrPhotos,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
|
@ -471,7 +488,8 @@ unsigned Set_DB_GetSettingsFromIP (MYSQL_RES **mysql_res)
|
|||
"Theme," // row[2]
|
||||
"IconSet," // row[3]
|
||||
"Menu," // row[4]
|
||||
"SideCols" // row[5]
|
||||
"SideCols," // row[5]
|
||||
"UsrPhotos" // row[6]
|
||||
" FROM set_ip_settings"
|
||||
" WHERE IP='%s'",
|
||||
Gbl.IP);
|
||||
|
|
|
@ -35,7 +35,8 @@ void Set_DB_UpdateMySettingsAboutIconSet (const char *IconSetId);
|
|||
void Set_DB_UpdateMySettingsAboutMenu (Mnu_Menu_t Menu);
|
||||
void Set_DB_UpdateMySettingsAboutTheme (const char *ThemeId);
|
||||
void Set_DB_UpdateMySettingsAboutSideCols (void);
|
||||
void Set_DB_UpdateMySettingsAboutPhoto (void);
|
||||
void Set_DB_UpdateMySettingsAboutUsrPhotos (void);
|
||||
void Set_DB_UpdateMySettingsAboutPhotoVisibility (void);
|
||||
void Set_DB_UpdateMySettingsAboutBasicProfile (void);
|
||||
void Set_DB_UpdateMySettingsAboutExtendedProfile (void);
|
||||
void Set_DB_UpdateMySettingsAboutNotifyEvents (void);
|
||||
|
|
|
@ -303,9 +303,9 @@ static void Sta_PutFormCrsHits (struct Sta_Stats *Stats)
|
|||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
|
||||
|
||||
Grp_PutParamsCodGrps ();
|
||||
Par_PutHiddenParamLong (NULL,"FirstRow",0);
|
||||
Par_PutHiddenParamLong (NULL,"LastRow",0);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Par_PutHiddenParamLong (NULL,"FirstRow",0);
|
||||
Par_PutHiddenParamLong (NULL,"LastRow",0);
|
||||
|
||||
/***** Put list of users to select some of them *****/
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
|
@ -1120,13 +1120,13 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
|||
if (FirstRow > 1)
|
||||
{
|
||||
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutHiddenParamLong (NULL,"FirstRow",FirstRow - Stats->RowsPerPage);
|
||||
Par_PutHiddenParamLong (NULL,"LastRow" ,FirstRow - 1);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RowsPage",Stats->RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutHiddenParamLong (NULL,"FirstRow",FirstRow - Stats->RowsPerPage);
|
||||
Par_PutHiddenParamLong (NULL,"LastRow" ,FirstRow - 1);
|
||||
Par_PutHiddenParamUnsigned (NULL,"RowsPage",Stats->RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
}
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
if (FirstRow > 1)
|
||||
|
@ -1158,13 +1158,13 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
|||
if (LastRow < NumHits)
|
||||
{
|
||||
Frm_BeginFormAnchor (ActSeeAccCrs,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FirstRow" ,(unsigned) (LastRow + 1));
|
||||
Par_PutHiddenParamUnsigned (NULL,"LastRow" ,(unsigned) (LastRow + Stats->RowsPerPage));
|
||||
Par_PutHiddenParamUnsigned (NULL,"RowsPage" ,(unsigned) Stats->RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Sta_CLICKS_CRS_DETAILED_LIST);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
Par_PutHiddenParamUnsigned (NULL,"FirstRow" ,(unsigned) (LastRow + 1));
|
||||
Par_PutHiddenParamUnsigned (NULL,"LastRow" ,(unsigned) (LastRow + Stats->RowsPerPage));
|
||||
Par_PutHiddenParamUnsigned (NULL,"RowsPage" ,(unsigned) Stats->RowsPerPage);
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
}
|
||||
HTM_TD_Begin ("class=\"RM\"");
|
||||
if (LastRow < NumHits)
|
||||
|
@ -1306,6 +1306,12 @@ static void Sta_ShowNumHitsPerUsr (Sta_CountType_t CountType,
|
|||
extern const char *Txt_Role;
|
||||
extern const char *Txt_STAT_TYPE_COUNT_CAPS[Sta_NUM_COUNT_TYPES];
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC15x20",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE15x20",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR15x20",
|
||||
};
|
||||
MYSQL_ROW row;
|
||||
unsigned NumHit;
|
||||
struct Sta_Hits Hits;
|
||||
|
@ -1347,7 +1353,9 @@ static void Sta_ShowNumHitsPerUsr (Sta_CountType_t CountType,
|
|||
|
||||
/* Show the photo */
|
||||
HTM_TD_Begin ("class=\"CT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO15x20",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Write the user's ID if user is a student in current course */
|
||||
|
@ -1573,17 +1581,17 @@ static void Sta_ShowDistrAccessesPerDayAndHour (const struct Sta_Stats *Stats,
|
|||
HTM_TD_Begin ("colspan=\"26\" class=\"CM\"");
|
||||
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act,Sta_STAT_RESULTS_SECTION_ID);
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Stats->ClicksGroupedBy);
|
||||
Par_PutHiddenParamUnsigned (NULL,"CountType",(unsigned) Stats->CountType);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
if (Gbl.Action.Act == ActSeeAccCrs)
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
else // Gbl.Action.Act == ActSeeAccGbl
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Role",(unsigned) Stats->Role);
|
||||
Sta_PutHiddenParamScopeSta ();
|
||||
}
|
||||
Dat_WriteParamsIniEndDates ();
|
||||
Par_PutHiddenParamUnsigned (NULL,"GroupedBy",(unsigned) Stats->ClicksGroupedBy);
|
||||
Par_PutHiddenParamUnsigned (NULL,"CountType",(unsigned) Stats->CountType);
|
||||
Par_PutHiddenParamUnsigned (NULL,"StatAct" ,(unsigned) Stats->NumAction);
|
||||
if (Gbl.Action.Act == ActSeeAccCrs)
|
||||
Usr_PutHiddenParSelectedUsrsCods (&Gbl.Usrs.Selected);
|
||||
else // Gbl.Action.Act == ActSeeAccGbl
|
||||
{
|
||||
Par_PutHiddenParamUnsigned (NULL,"Role",(unsigned) Stats->Role);
|
||||
Sta_PutHiddenParamScopeSta ();
|
||||
}
|
||||
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_Color_of_the_graphic);
|
||||
|
@ -3269,7 +3277,7 @@ static void Sta_ShowNumHitsPerCourse (Sta_CountType_t CountType,
|
|||
if (CrsOK)
|
||||
{
|
||||
Frm_BeginFormGoTo (ActSeeCrsInf);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
Crs_PutParamCrsCod (Crs.CrsCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (Hie_BuildGoToMsg (Crs.FullName),"BT_LINK LT LOG",NULL);
|
||||
Hie_FreeGoToMsg ();
|
||||
HTM_Txt (Crs.ShrtName);
|
||||
|
|
210
swad_survey.c
210
swad_survey.c
|
@ -253,10 +253,10 @@ static void Svy_ListAllSurveys (struct Svy_Surveys *Surveys)
|
|||
|
||||
/* Form to change order */
|
||||
Frm_BeginForm (ActSeeAllSvy);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Order);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Dat_PutHiddenParamOrder (Order);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_START_END_TIME_HELP[Order],
|
||||
"BT_LINK TIT_TBL",NULL);
|
||||
if (Order == Surveys->SelectedOrder)
|
||||
|
@ -356,7 +356,7 @@ static void Svy_PutButtonToCreateNewSvy (struct Svy_Surveys *Surveys)
|
|||
extern const char *Txt_New_survey;
|
||||
|
||||
Frm_BeginForm (ActFrmNewSvy);
|
||||
Svy_PutParamsToCreateNewSvy (Surveys);
|
||||
Svy_PutParamsToCreateNewSvy (Surveys);
|
||||
Btn_PutConfirmButton (Txt_New_survey);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -529,11 +529,11 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
|
|||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
HTM_ARTICLE_Begin (Anchor);
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_View_survey,
|
||||
Svy.Status.Visible ? "BT_LINK LT ASG_TITLE" :
|
||||
"BT_LINK LT ASG_TITLE_LIGHT",
|
||||
|
@ -571,12 +571,12 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
|
|||
HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\"");
|
||||
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Btn_PutCreateButtonInline (Txt_Answer_survey);
|
||||
Svy_PutParamSvyCod (Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Btn_PutCreateButtonInline (Txt_Answer_survey);
|
||||
Frm_EndForm ();
|
||||
|
||||
HTM_DIV_End ();
|
||||
|
@ -587,11 +587,11 @@ static void Svy_ShowOneSurvey (struct Svy_Surveys *Surveys,
|
|||
HTM_DIV_Begin ("class=\"BUTTONS_AFTER_ALERT\"");
|
||||
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Svy_PutParamSvyCod (Svy.SvyCod);
|
||||
Svy_PutHiddenParamSvyOrder (Surveys->SelectedOrder);
|
||||
WhichGroups = Grp_GetParamWhichGroups ();
|
||||
Grp_PutParamWhichGroups (&WhichGroups);
|
||||
Pag_PutHiddenParamPagNum (Pag_SURVEYS,Surveys->CurrentPage);
|
||||
Btn_PutConfirmButtonInline (Txt_View_results);
|
||||
Frm_EndForm ();
|
||||
|
||||
|
@ -1521,7 +1521,7 @@ static void Svy_PutButtonToResetSurvey (struct Svy_Surveys *Surveys)
|
|||
extern const char *Txt_Reset_survey;
|
||||
|
||||
Frm_BeginForm (ActRstSvy);
|
||||
Svy_PutParams (Surveys);
|
||||
Svy_PutParams (Surveys);
|
||||
Btn_PutRemoveButton (Txt_Reset_survey);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1711,7 +1711,7 @@ void Svy_RequestCreatOrEditSvy (void)
|
|||
Surveys.SvyCod = Svy.SvyCod;
|
||||
Frm_BeginForm (ItsANewSurvey ? ActNewSvy :
|
||||
ActChgSvy);
|
||||
Svy_PutParams (&Surveys);
|
||||
Svy_PutParams (&Surveys);
|
||||
|
||||
/***** Begin box and table *****/
|
||||
if (ItsANewSurvey)
|
||||
|
@ -2365,99 +2365,99 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActRcvSvyQst);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
if (SvyQst->QstCod > 0) // If the question already has assigned a code
|
||||
Svy_PutParamQstCod (SvyQst->QstCod);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
if (SvyQst->QstCod > 0) // If the question already has assigned a code
|
||||
Svy_PutParamQstCod (SvyQst->QstCod);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
||||
/***** Stem *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Stem *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Txt",Txt_Wording);
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Txt",Txt_Wording);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"4\"");
|
||||
HTM_Txt (Stem);
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_TD_End ();
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" cols=\"60\" rows=\"4\"");
|
||||
HTM_Txt (Stem);
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Type of answer *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
/***** Type of answer *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColon (Txt_Type);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColon (Txt_Type);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"%s LT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
for (AnsType = (Svy_AnswerType_t) 0;
|
||||
AnsType <= (Svy_AnswerType_t) (Svy_NUM_ANS_TYPES - 1);
|
||||
AnsType++)
|
||||
{
|
||||
HTM_LABEL_Begin (NULL);
|
||||
HTM_INPUT_RADIO ("AnswerType",false,
|
||||
"value=\"%u\"%s",
|
||||
(unsigned) AnsType,
|
||||
AnsType == SvyQst->AnswerType ? " checked=\"checked\"" : "");
|
||||
HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[AnsType]);
|
||||
HTM_LABEL_End ();
|
||||
HTM_BR ();
|
||||
}
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Answers *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
/* Unique or multiple choice answers */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
for (NumAns = 0;
|
||||
NumAns < Svy_MAX_ANSWERS_PER_QUESTION;
|
||||
NumAns++)
|
||||
HTM_TD_Begin ("class=\"%s LT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
for (AnsType = (Svy_AnswerType_t) 0;
|
||||
AnsType <= (Svy_AnswerType_t) (Svy_NUM_ANS_TYPES - 1);
|
||||
AnsType++)
|
||||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label with the number of the answer */
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_LABEL_Begin ("for=\"AnsStr%u\" class=\"%s\"",
|
||||
NumAns,The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtF ("%u)",NumAns + 1);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Answer text */
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"AnsStr%u\" name=\"AnsStr%u\" cols=\"50\" rows=\"1\"",
|
||||
NumAns,NumAns);
|
||||
if (SvyQst->AnsChoice[NumAns].Text)
|
||||
HTM_Txt (SvyQst->AnsChoice[NumAns].Text);
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_LABEL_Begin (NULL);
|
||||
HTM_INPUT_RADIO ("AnswerType",false,
|
||||
"value=\"%u\"%s",
|
||||
(unsigned) AnsType,
|
||||
AnsType == SvyQst->AnswerType ? " checked=\"checked\"" : "");
|
||||
HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[AnsType]);
|
||||
HTM_LABEL_End ();
|
||||
HTM_BR ();
|
||||
}
|
||||
HTM_TABLE_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
/***** Answers *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Send button *****/
|
||||
if (SvyQst->QstCod > 0) // If the question already has assigned a code
|
||||
Btn_PutConfirmButton (Txt_Save_changes);
|
||||
else
|
||||
Btn_PutCreateButton (Txt_Create_question);
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
/* Unique or multiple choice answers */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TABLE_BeginPadding (2);
|
||||
for (NumAns = 0;
|
||||
NumAns < Svy_MAX_ANSWERS_PER_QUESTION;
|
||||
NumAns++)
|
||||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label with the number of the answer */
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_LABEL_Begin ("for=\"AnsStr%u\" class=\"%s\"",
|
||||
NumAns,The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtF ("%u)",NumAns + 1);
|
||||
HTM_LABEL_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Answer text */
|
||||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"AnsStr%u\" name=\"AnsStr%u\" cols=\"50\" rows=\"1\"",
|
||||
NumAns,NumAns);
|
||||
if (SvyQst->AnsChoice[NumAns].Text)
|
||||
HTM_Txt (SvyQst->AnsChoice[NumAns].Text);
|
||||
HTM_TEXTAREA_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
HTM_TABLE_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Send button *****/
|
||||
if (SvyQst->QstCod > 0) // If the question already has assigned a code
|
||||
Btn_PutConfirmButton (Txt_Save_changes);
|
||||
else
|
||||
Btn_PutCreateButton (Txt_Create_question);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -2767,7 +2767,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys,
|
|||
{
|
||||
/***** Begin form to send answers to survey *****/
|
||||
Frm_BeginForm (ActAnsSvy);
|
||||
Svy_PutParamSvyCod (Svy->SvyCod);
|
||||
Svy_PutParamSvyCod (Svy->SvyCod);
|
||||
}
|
||||
|
||||
/***** Write the heading *****/
|
||||
|
@ -2921,7 +2921,7 @@ static void Svy_PutButtonToCreateNewQuestion (struct Svy_Surveys *Surveys)
|
|||
extern const char *Txt_New_question;
|
||||
|
||||
Frm_BeginForm (ActEdiOneSvyQst);
|
||||
Svy_PutParams (Surveys);
|
||||
Svy_PutParams (Surveys);
|
||||
Btn_PutConfirmButton (Txt_New_question);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
|
|
@ -860,8 +860,8 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
|||
ActInsIteSylPra) :
|
||||
(Gbl.Crs.Info.Type == Inf_LECTURES ? ActModIteSylLec :
|
||||
ActModIteSylPra));
|
||||
Syllabus->ParamNumItem = NumItem;
|
||||
Syl_PutParamNumItem (&Syllabus->ParamNumItem);
|
||||
Syllabus->ParamNumItem = NumItem;
|
||||
Syl_PutParamNumItem (&Syllabus->ParamNumItem);
|
||||
HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"60\" placeholder=\"%s\"%s",
|
||||
|
|
|
@ -103,7 +103,7 @@ void Tab_DrawTabs (void)
|
|||
HTM_DIV_Begin ("class=\"ICO_HIGHLIGHT\"");
|
||||
|
||||
Frm_BeginForm (ActMnu);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) NumTab);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NxtTab",(unsigned) NumTab);
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_TABS_TXT[NumTab],
|
||||
NumTab == Gbl.Action.Tab ? "BT_LINK" :
|
||||
"BT_LINK",
|
||||
|
|
|
@ -437,7 +437,7 @@ void Tag_ShowFormEditTags (void)
|
|||
/* Form to rename this tag */
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
Frm_BeginForm (ActRenTag);
|
||||
Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]);
|
||||
Par_PutHiddenParamString (NULL,"OldTagTxt",row[1]);
|
||||
HTM_INPUT_TEXT ("NewTagTxt",Tag_MAX_CHARS_TAG,row[1],
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"36\" required=\"required\"");
|
||||
|
@ -467,7 +467,7 @@ static void Tag_PutIconEnable (long TagCod,const char *TagTxt)
|
|||
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_BeginForm (ActEnaTag);
|
||||
Par_PutHiddenParamLong (NULL,"TagCod",TagCod);
|
||||
Par_PutHiddenParamLong (NULL,"TagCod",TagCod);
|
||||
Ico_PutIconLink ("eye-slash-red.svg",
|
||||
Str_BuildStringStr (Txt_Tag_X_not_allowed_Click_to_allow_it,
|
||||
TagTxt));
|
||||
|
@ -486,7 +486,7 @@ static void Tag_PutIconDisable (long TagCod,const char *TagTxt)
|
|||
|
||||
HTM_TD_Begin ("class=\"BM\"");
|
||||
Frm_BeginForm (ActDisTag);
|
||||
Par_PutHiddenParamLong (NULL,"TagCod",TagCod);
|
||||
Par_PutHiddenParamLong (NULL,"TagCod",TagCod);
|
||||
Ico_PutIconLink ("eye-green.svg",
|
||||
Str_BuildStringStr (Txt_Tag_X_allowed_Click_to_disable_it,
|
||||
TagTxt));
|
||||
|
|
|
@ -224,8 +224,8 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print,
|
|||
{
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Action[RequestOrConfirm]);
|
||||
TstPrn_PutParamPrnCod (Print->PrnCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NumTst",NumPrintsGeneratedByMe);
|
||||
TstPrn_PutParamPrnCod (Print->PrnCod);
|
||||
Par_PutHiddenParamUnsigned (NULL,"NumTst",NumPrintsGeneratedByMe);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (10);
|
||||
|
@ -1977,7 +1977,7 @@ static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat)
|
|||
{
|
||||
Frm_BeginForm (Gbl.Action.Act == ActSeeMyTstResCrs ? ActSeeOneTstResMe :
|
||||
ActSeeOneTstResOth);
|
||||
TstPrn_PutParamPrnCod (Print.PrnCod);
|
||||
TstPrn_PutParamPrnCod (Print.PrnCod);
|
||||
Ico_PutIconLink ("tasks.svg",Txt_View_test);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -2156,6 +2156,12 @@ void TstPrn_ShowOnePrint (void)
|
|||
extern const char *Txt_Score;
|
||||
extern const char *Txt_Grade;
|
||||
extern const char *Txt_Tags;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
struct TstPrn_Print Print;
|
||||
Dat_StartEndTime_t StartEndTime;
|
||||
char *Id;
|
||||
|
@ -2216,7 +2222,9 @@ void TstPrn_ShowOnePrint (void)
|
|||
if (Gbl.Usrs.Other.UsrDat.FrstName[0])
|
||||
HTM_TxtF (", %s",Gbl.Usrs.Other.UsrDat.FrstName);
|
||||
HTM_BR ();
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,"PHOTO45x60",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Other.UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
|
105
swad_text.c
105
swad_text.c
|
@ -44590,6 +44590,27 @@ const char *Txt_FIGURE_TYPES[Fig_NUM_FIGURES] =
|
|||
"Kolumny"
|
||||
#elif L==9 // pt
|
||||
"Colunas"
|
||||
#endif
|
||||
,
|
||||
[Fig_USER_PHOTOS] =
|
||||
#if L==1 // ca
|
||||
"Fotos d'usuaris"
|
||||
#elif L==2 // de
|
||||
"Benutzerfotos"
|
||||
#elif L==3 // en
|
||||
"User photos"
|
||||
#elif L==4 // es
|
||||
"Fotos de usuarios"
|
||||
#elif L==5 // fr
|
||||
"Photos des utilisateurs"
|
||||
#elif L==6 // gn
|
||||
"Fotos de usuarios" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Foto utente"
|
||||
#elif L==8 // pl
|
||||
"Zdjęcia użytkownika "
|
||||
#elif L==9 // pt
|
||||
"Fotos de utilizadores"
|
||||
#endif
|
||||
,
|
||||
[Fig_PRIVACY] =
|
||||
|
@ -55557,6 +55578,90 @@ const char *Txt_User_not_found_or_you_do_not_have_permission_ =
|
|||
" para realizar esta ação.";
|
||||
#endif
|
||||
|
||||
const char *Txt_User_photos =
|
||||
#if L==1 // ca
|
||||
"Fotos d'usuaris";
|
||||
#elif L==2 // de
|
||||
"Benutzerfotos";
|
||||
#elif L==3 // en
|
||||
"User photos";
|
||||
#elif L==4 // es
|
||||
"Fotos de usuarios";
|
||||
#elif L==5 // fr
|
||||
"Photos des utilisateurs";
|
||||
#elif L==6 // gn
|
||||
"Fotos de usuarios"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Foto utente";
|
||||
#elif L==8 // pl
|
||||
"Zdjęcia użytkownika ";
|
||||
#elif L==9 // pt
|
||||
"Fotos de utilizadores";
|
||||
#endif
|
||||
|
||||
const char *Txt_USER_PHOTOS[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
#if L==1 // ca
|
||||
"Cercle"
|
||||
#elif L==2 // de
|
||||
"Kreis"
|
||||
#elif L==3 // en
|
||||
"Circle"
|
||||
#elif L==4 // es
|
||||
"Círculo"
|
||||
#elif L==5 // fr
|
||||
"Cercle"
|
||||
#elif L==6 // gn
|
||||
"Círculo" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Cerchio"
|
||||
#elif L==8 // pl
|
||||
"Koło"
|
||||
#elif L==9 // pt
|
||||
"Círculo"
|
||||
#endif
|
||||
,
|
||||
#if L==1 // ca
|
||||
"El·lipse"
|
||||
#elif L==2 // de
|
||||
"Ellipse"
|
||||
#elif L==3 // en
|
||||
"Ellipse"
|
||||
#elif L==4 // es
|
||||
"Elipse"
|
||||
#elif L==5 // fr
|
||||
"Ellipse"
|
||||
#elif L==6 // gn
|
||||
"Elipse" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Ellisse"
|
||||
#elif L==8 // pl
|
||||
"Elipsa"
|
||||
#elif L==9 // pt
|
||||
"Elipse"
|
||||
#endif
|
||||
,
|
||||
#if L==1 // ca
|
||||
"Rectangle"
|
||||
#elif L==2 // de
|
||||
"Rechteck"
|
||||
#elif L==3 // en
|
||||
"Rectangle"
|
||||
#elif L==4 // es
|
||||
"Rectángulo"
|
||||
#elif L==5 // fr
|
||||
"Rectangle"
|
||||
#elif L==6 // gn
|
||||
"Rectángulo" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Rettangolo"
|
||||
#elif L==8 // pl
|
||||
"Prostokąt"
|
||||
#elif L==9 // pt
|
||||
"Retângulo"
|
||||
#endif
|
||||
};
|
||||
|
||||
const char *Txt_Users =
|
||||
#if L==1 // ca
|
||||
"Usuaris";
|
||||
|
|
|
@ -331,7 +331,7 @@ void The_PutIconsToSelectTheme (void)
|
|||
HTM_DIV_Begin ("class=\"%s\"",Theme == Gbl.Prefs.Theme ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_BeginForm (ActChgThe);
|
||||
Par_PutHiddenParamString (NULL,"Theme",The_ThemeId[Theme]);
|
||||
Par_PutHiddenParamString (NULL,"Theme",The_ThemeId[Theme]);
|
||||
snprintf (Icon,sizeof (Icon),"%s/%s/theme_32x20.gif",
|
||||
Cfg_ICON_FOLDER_THEMES,The_ThemeId[Theme]);
|
||||
Ico_PutSettingIconLink (Icon,The_ThemeNames[Theme]);
|
||||
|
|
|
@ -184,12 +184,21 @@ void Tml_Com_PutPhotoAndFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
|||
|
||||
static void Tml_Com_ShowAuthorPhoto (struct UsrData *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC30x40",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE30x40",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR30x40",
|
||||
};
|
||||
|
||||
/***** Show author's photo *****/
|
||||
/* Begin container */
|
||||
HTM_DIV_Begin ("class=\"Tml_COM_PHOTO\"");
|
||||
|
||||
/* Author's photo */
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO30x40",Pho_ZOOM,true); // Use unique id
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
true); // Use unique id
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
|
@ -209,7 +218,7 @@ static void Tml_Com_PutFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
|||
|
||||
/***** Begin form to write the post *****/
|
||||
Tml_Frm_BeginForm (Timeline,Tml_Frm_RECEIVE_COMM);
|
||||
Tml_Not_PutHiddenParamNotCod (NotCod);
|
||||
Tml_Not_PutHiddenParamNotCod (NotCod);
|
||||
|
||||
/***** Textarea and button *****/
|
||||
Tml_Pst_PutTextarea (Txt_New_TIMELINE_comment,
|
||||
|
@ -608,7 +617,7 @@ static void Tml_Com_WriteAuthorName (const struct UsrData *UsrDat) // Author
|
|||
/***** Show user's name inside form to go to user's public profile *****/
|
||||
/* Begin form */
|
||||
Frm_BeginFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
|
||||
/* Author's name */
|
||||
HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (UsrDat->UsrCod) ? Txt_My_public_profile :
|
||||
|
@ -685,7 +694,7 @@ static void Tml_Com_PutFormToRemoveComm (const struct Tml_Timeline *Timeline,
|
|||
/***** Form to remove publication *****/
|
||||
/* Begin form */
|
||||
Tml_Frm_BeginForm (Timeline,Tml_Frm_REQ_REM_COMM);
|
||||
Tml_Pub_PutHiddenParamPubCod (PubCod);
|
||||
Tml_Pub_PutHiddenParamPubCod (PubCod);
|
||||
|
||||
/* Icon to remove */
|
||||
Ico_PutIconLink ("trash.svg",Txt_Remove);
|
||||
|
|
|
@ -176,13 +176,13 @@ void Tml_Frm_BeginForm (const struct Tml_Timeline *Timeline,
|
|||
{
|
||||
/***** Begin form in user timeline *****/
|
||||
Frm_BeginFormAnchor (Tml_Frm_ActionUsr[Action],"timeline");
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
Usr_PutParamOtherUsrCodEncrypted (Gbl.Usrs.Other.UsrDat.EnUsrCod);
|
||||
}
|
||||
else
|
||||
{
|
||||
/***** Begin form in global timeline *****/
|
||||
Frm_BeginForm (Tml_Frm_ActionGbl[Action]);
|
||||
Usr_PutHiddenParamWho (Timeline->Who);
|
||||
Usr_PutHiddenParamWho (Timeline->Who);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -241,8 +241,7 @@ static void Tml_Not_WriteTopMessage (Tml_TopMessage_t TopMessage,long PublisherC
|
|||
HTM_DIV_Begin ("class=\"Tml_TOP_CONT Tml_TOP_PUBLISHER Tml_WIDTH\"");
|
||||
|
||||
/***** Show publisher's name inside form to go to user's public profile *****/
|
||||
Tml_Not_WriteAuthorName (&PublisherDat,
|
||||
"BT_LINK Tml_TOP_PUBLISHER");
|
||||
Tml_Not_WriteAuthorName (&PublisherDat,"BT_LINK Tml_TOP_PUBLISHER");
|
||||
|
||||
/***** Show action made *****/
|
||||
HTM_TxtF (" %s:",Txt_TIMELINE_NOTE_TOP_MESSAGES[TopMessage]);
|
||||
|
@ -290,11 +289,20 @@ static void Tml_Not_WriteNote (const struct Tml_Timeline *Timeline,
|
|||
|
||||
void Tml_Not_ShowAuthorPhoto (struct UsrData *UsrDat,bool FormUnique)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"Tml_LEFT_PHOTO\"");
|
||||
|
||||
/***** Photo *****/
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO45x60",Pho_ZOOM,FormUnique);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
FormUnique);
|
||||
|
||||
/***** End container *****/
|
||||
HTM_DIV_End ();
|
||||
|
@ -312,7 +320,8 @@ static void Tml_Not_WriteAuthorTimeAndContent (const struct Tml_Not_Note *Not,
|
|||
|
||||
/***** Write author's full name *****/
|
||||
Tml_Not_WriteAuthorName (UsrDat,
|
||||
"BT_LINK Tml_RIGHT_AUTHOR Tml_RIGHT_AUTHOR_WIDTH DAT_N_BOLD");
|
||||
"BT_LINK Tml_RIGHT_AUTHOR"
|
||||
" Tml_RIGHT_AUTHOR_WIDTH DAT_N_BOLD");
|
||||
|
||||
/***** Write date and time *****/
|
||||
Tml_WriteDateTime (Not->DateTimeUTC);
|
||||
|
@ -337,7 +346,7 @@ void Tml_Not_WriteAuthorName (const struct UsrData *UsrDat,
|
|||
/***** Show user's name inside form to go to user's public profile *****/
|
||||
/* Begin form */
|
||||
Frm_BeginFormUnique (ActSeeOthPubPrf);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
|
||||
/* Author's name */
|
||||
HTM_BUTTON_SUBMIT_Begin (Usr_ItsMe (UsrDat->UsrCod) ? Txt_My_public_profile :
|
||||
|
@ -609,62 +618,62 @@ static void Tml_Not_PutFormGoToAction (const struct Tml_Not_Note *Not,
|
|||
case Tml_NOTE_INS_DOC_PUB_FILE:
|
||||
case Tml_NOTE_INS_SHA_PUB_FILE:
|
||||
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
|
||||
Ins_PutParamInsCod (Not->HieCod); // Go to another institution
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Ins.InsCod) // Not the current institution
|
||||
Ins_PutParamInsCod (Not->HieCod); // Go to another institution
|
||||
break;
|
||||
case Tml_NOTE_CTR_DOC_PUB_FILE:
|
||||
case Tml_NOTE_CTR_SHA_PUB_FILE:
|
||||
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
|
||||
Ctr_PutParamCtrCod (Not->HieCod); // Go to another center
|
||||
break;
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Ctr.CtrCod) // Not the current center
|
||||
Ctr_PutParamCtrCod (Not->HieCod); // Go to another center
|
||||
break;
|
||||
case Tml_NOTE_DEG_DOC_PUB_FILE:
|
||||
case Tml_NOTE_DEG_SHA_PUB_FILE:
|
||||
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
|
||||
Deg_PutParamDegCod (Not->HieCod); // Go to another degree
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Deg.DegCod) // Not the current degree
|
||||
Deg_PutParamDegCod (Not->HieCod); // Go to another degree
|
||||
break;
|
||||
case Tml_NOTE_CRS_DOC_PUB_FILE:
|
||||
case Tml_NOTE_CRS_SHA_PUB_FILE:
|
||||
Frm_BeginFormUnique (Tml_DefaultActions[Not->Type]);
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
Brw_PutHiddenParamFilCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
case Tml_NOTE_CALL_FOR_EXAM:
|
||||
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
||||
Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
|
||||
Anchor); // Locate on this specific exam
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
Cfe_PutHiddenParamExaCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
Cfe_PutHiddenParamExaCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
case Tml_NOTE_POST: // Not applicable
|
||||
return;
|
||||
case Tml_NOTE_FORUM_POST:
|
||||
Frm_BeginFormUnique (For_ActionsSeeFor[Forums->Forum.Type]);
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forums->Forum.Location,
|
||||
Forums->Thread.Selected,
|
||||
-1L);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
For_PutAllHiddenParamsForum (1, // Page of threads = first
|
||||
1, // Page of posts = first
|
||||
Forums->ForumSet,
|
||||
Forums->ThreadsOrder,
|
||||
Forums->Forum.Location,
|
||||
Forums->Thread.Selected,
|
||||
-1L);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
case Tml_NOTE_NOTICE:
|
||||
Frm_SetAnchorStr (Not->Cod,&Anchor);
|
||||
Frm_BeginFormUniqueAnchor (Tml_DefaultActions[Not->Type],
|
||||
Anchor);
|
||||
Frm_FreeAnchorStr (Anchor);
|
||||
Not_PutHiddenParamNotCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
Not_PutHiddenParamNotCod (Not->Cod);
|
||||
if (Not->HieCod != Gbl.Hierarchy.Crs.CrsCod) // Not the current course
|
||||
Crs_PutParamCrsCod (Not->HieCod); // Go to another course
|
||||
break;
|
||||
default: // Not applicable
|
||||
return;
|
||||
|
@ -851,7 +860,7 @@ static void Tml_Not_PutFormToRemoveNote (const struct Tml_Timeline *Timeline,
|
|||
/***** Form to remove publication *****/
|
||||
/* Begin form */
|
||||
Tml_Frm_BeginForm (Timeline,Tml_Frm_REQ_REM_NOTE);
|
||||
Tml_Not_PutHiddenParamNotCod (NotCod);
|
||||
Tml_Not_PutHiddenParamNotCod (NotCod);
|
||||
|
||||
/* Icon to remove */
|
||||
Ico_PutIconLink ("trash.svg",Txt_Remove);
|
||||
|
|
|
@ -172,7 +172,8 @@ static void Tml_Pst_PutFormToWriteNewPost (struct Tml_Timeline *Timeline)
|
|||
|
||||
/***** Author name *****/
|
||||
Tml_Not_WriteAuthorName (&Gbl.Usrs.Me.UsrDat,
|
||||
"BT_LINK Tml_RIGHT_AUTHOR Tml_RIGHT_AUTHOR_WIDTH DAT_N_BOLD");
|
||||
"BT_LINK Tml_RIGHT_AUTHOR"
|
||||
" Tml_RIGHT_AUTHOR_WIDTH DAT_N_BOLD");
|
||||
|
||||
/***** Form to write the post *****/
|
||||
/* Begin container */
|
||||
|
|
|
@ -179,6 +179,12 @@ static void Tml_Usr_ShowNumSharersOrFavers (unsigned NumUsrs)
|
|||
static void Tml_Usr_ListSharersOrFavers (MYSQL_RES **mysql_res,
|
||||
unsigned NumUsrs,unsigned NumFirstUsrs)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC12x16",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE12x16",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR12x16",
|
||||
};
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
|
||||
|
@ -210,7 +216,9 @@ static void Tml_Usr_ListSharersOrFavers (MYSQL_RES **mysql_res,
|
|||
HTM_DIV_Begin ("class=\"Tml_SHARER\"");
|
||||
|
||||
/* User's photo */
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,"PHOTO12x16",Pho_ZOOM,true); // Use unique id
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
true); // Use unique id
|
||||
|
||||
/* End container */
|
||||
HTM_DIV_End ();
|
||||
|
|
|
@ -82,7 +82,7 @@ void Tml_Who_PutFormWho (struct Tml_Timeline *Timeline)
|
|||
|
||||
/* Begin form */
|
||||
Frm_BeginForm (ActSeeGblTL);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who);
|
||||
Par_PutHiddenParamUnsigned (NULL,"Who",(unsigned) Who);
|
||||
|
||||
/* Icon to select which users */
|
||||
Usr_PutWhoIcon (Who);
|
||||
|
|
290
swad_user.c
290
swad_user.c
|
@ -340,6 +340,7 @@ void Usr_ResetUsrDataExceptUsrCodAndIDs (struct UsrData *UsrDat)
|
|||
UsrDat->Prefs.IconSet = Ico_ICON_SET_DEFAULT;
|
||||
UsrDat->Prefs.Menu = Mnu_MENU_DEFAULT;
|
||||
UsrDat->Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||
UsrDat->Prefs.UsrPhotos = Set_USR_PHOTOS_DEFAULT;
|
||||
UsrDat->Prefs.AcceptThirdPartyCookies = false; // By default, don't accept third party cookies
|
||||
UsrDat->NtfEvents.SendEmail = 0; // By default, don't notify anything
|
||||
}
|
||||
|
@ -592,8 +593,17 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,
|
|||
else
|
||||
UsrDat->Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||
|
||||
/* Get if user accepts third party cookies (row[30]) */
|
||||
UsrDat->Prefs.AcceptThirdPartyCookies = (row[30][0] == 'Y');
|
||||
/* Get user settings on user photo shape (row[30]) */
|
||||
if (sscanf (row[30],"%u",&UsrDat->Prefs.UsrPhotos) == 1)
|
||||
{
|
||||
if (UsrDat->Prefs.UsrPhotos >= Set_NUM_USR_PHOTOS)
|
||||
UsrDat->Prefs.UsrPhotos = Set_USR_PHOTOS_DEFAULT;
|
||||
}
|
||||
else
|
||||
UsrDat->Prefs.UsrPhotos = Set_USR_PHOTOS_DEFAULT;
|
||||
|
||||
/* Get if user accepts third party cookies (row[31]) */
|
||||
UsrDat->Prefs.AcceptThirdPartyCookies = (row[31][0] == 'Y');
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1186,37 +1196,37 @@ void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void))
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NextAction);
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
if (FuncParams)
|
||||
FuncParams ();
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_Log_in,
|
||||
NULL,NULL,
|
||||
Hlp_PROFILE_LogIn,Box_NOT_CLOSABLE,2);
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_Log_in,
|
||||
NULL,NULL,
|
||||
Hlp_PROFILE_LogIn,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** User's ID/nickname *****/
|
||||
HTM_DIV_Begin ("class=\"LM\"");
|
||||
HTM_LABEL_Begin ("for=\"UsrId\"");
|
||||
Ico_PutIcon ("user.svg",Txt_User[Usr_SEX_UNKNOWN],"CONTEXT_ICO_16x16");
|
||||
HTM_LABEL_End ();
|
||||
HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"UsrId\" size=\"18\" placeholder=\"%s\""
|
||||
" autofocus=\"autofocus\" required=\"required\"",
|
||||
Txt_nick_email_or_ID);
|
||||
HTM_DIV_End ();
|
||||
/***** User's ID/nickname *****/
|
||||
HTM_DIV_Begin ("class=\"LM\"");
|
||||
HTM_LABEL_Begin ("for=\"UsrId\"");
|
||||
Ico_PutIcon ("user.svg",Txt_User[Usr_SEX_UNKNOWN],"CONTEXT_ICO_16x16");
|
||||
HTM_LABEL_End ();
|
||||
HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"UsrId\" size=\"18\" placeholder=\"%s\""
|
||||
" autofocus=\"autofocus\" required=\"required\"",
|
||||
Txt_nick_email_or_ID);
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** User's password *****/
|
||||
HTM_DIV_Begin ("class=\"LM\"");
|
||||
HTM_LABEL_Begin ("for=\"UsrPwd\"");
|
||||
Ico_PutIcon ("key.svg",Txt_Password,"CONTEXT_ICO_16x16");
|
||||
HTM_LABEL_End ();
|
||||
HTM_INPUT_PASSWORD ("UsrPwd",Txt_password,NULL,false,
|
||||
"id=\"UsrPwd\"");
|
||||
HTM_DIV_End ();
|
||||
/***** User's password *****/
|
||||
HTM_DIV_Begin ("class=\"LM\"");
|
||||
HTM_LABEL_Begin ("for=\"UsrPwd\"");
|
||||
Ico_PutIcon ("key.svg",Txt_Password,"CONTEXT_ICO_16x16");
|
||||
HTM_LABEL_End ();
|
||||
HTM_INPUT_PASSWORD ("UsrPwd",Txt_password,NULL,false,
|
||||
"id=\"UsrPwd\"");
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
Box_BoxTableWithButtonEnd (Btn_CONFIRM_BUTTON,Txt_Log_in);
|
||||
/***** End table, send button and end box *****/
|
||||
Box_BoxTableWithButtonEnd (Btn_CONFIRM_BUTTON,Txt_Log_in);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -1380,6 +1390,12 @@ void Usr_WriteLoggedUsrHead (void)
|
|||
extern const char *The_ClassUsr[The_NUM_THEMES];
|
||||
extern const char *Txt_Role;
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC18x24",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE18x24",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR18x24",
|
||||
};
|
||||
unsigned NumAvailableRoles = Rol_GetNumAvailableRoles ();
|
||||
|
||||
HTM_DIV_Begin ("class=\"HEAD_USR %s\"",The_ClassUsr[Gbl.Prefs.Theme]);
|
||||
|
@ -1404,7 +1420,9 @@ void Usr_WriteLoggedUsrHead (void)
|
|||
HTM_NBSP ();
|
||||
|
||||
/***** Show my photo *****/
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Me.UsrDat,"PHOTO18x24",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&Gbl.Usrs.Me.UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
|
||||
/***** User's name *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.FrstName[0])
|
||||
|
@ -2174,6 +2192,12 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
{
|
||||
extern const char *Txt_Enrolment_confirmed;
|
||||
extern const char *Txt_Enrolment_not_confirmed;
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
char BgColor[Usr_MAX_BYTES_BG_COLOR + 1];
|
||||
bool UsrIsTheMsgSender = PutCheckBoxToSelectUsr &&
|
||||
(UsrDat->UsrCod == Gbl.Usrs.Other.UsrDat.UsrCod);
|
||||
|
@ -2227,7 +2251,9 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
{
|
||||
/***** Show user's photo *****/
|
||||
HTM_TD_Begin ("class=\"CM %s\"",BgColor);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -2258,6 +2284,12 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
|
||||
static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
struct Ins_Instit Ins;
|
||||
struct Ctr_Center Ctr;
|
||||
struct Dpt_Department Dpt;
|
||||
|
@ -2269,7 +2301,9 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
{
|
||||
/***** Show guest's photo *****/
|
||||
HTM_TD_Begin ("class=\"LM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_NO_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_NO_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -2338,6 +2372,12 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
|
||||
static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
unsigned NumGrpTyp,NumField;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -2353,7 +2393,9 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
{
|
||||
/***** Show student's photo *****/
|
||||
HTM_TD_Begin ("class=\"LM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_NO_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_NO_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -2440,6 +2482,12 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
|
||||
static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
struct Ins_Instit Ins;
|
||||
struct Ctr_Center Ctr;
|
||||
struct Dpt_Department Dpt;
|
||||
|
@ -2453,7 +2501,9 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
{
|
||||
/***** Show teacher's photo *****/
|
||||
HTM_TD_Begin ("class=\"LM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_NO_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_NO_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -2512,6 +2562,12 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
|
||||
static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
};
|
||||
struct Ins_Instit Ins;
|
||||
|
||||
/***** Begin row *****/
|
||||
|
@ -2526,7 +2582,9 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
{
|
||||
/***** Show administrator's photo *****/
|
||||
HTM_TD_Begin ("class=\"LM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO21x28",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -3568,12 +3626,12 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void *Args),void *Arg
|
|||
/* Number of columns in the class photo */
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
|
||||
Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Set_PutParamUsrListType (Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
Set_PutParamListWithPhotos ();
|
||||
Usr_PutSelectorNumColsClassPhoto ();
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Set_PutParamUsrListType (Set_USR_LIST_AS_CLASS_PHOTO);
|
||||
Set_PutParamListWithPhotos ();
|
||||
Usr_PutSelectorNumColsClassPhoto ();
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
|
@ -3587,11 +3645,11 @@ void Usr_ShowFormsToSelectUsrListType (void (*FuncParams) (void *Args),void *Arg
|
|||
/* See the photos in list? */
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
|
||||
Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Set_PutParamUsrListType (Set_USR_LIST_AS_LISTING);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
Usr_PutCheckboxListWithPhotos ();
|
||||
Grp_PutParamsCodGrps ();
|
||||
Set_PutParamUsrListType (Set_USR_LIST_AS_LISTING);
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
Usr_PutCheckboxListWithPhotos ();
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
|
@ -3612,20 +3670,20 @@ static void Set_FormToSelectUsrListType (void (*FuncParams) (void *Args),void *A
|
|||
/***** Begin form *****/
|
||||
Frm_BeginFormAnchor (Gbl.Action.Act, // Repeat current action
|
||||
Usr_USER_LIST_SECTION_ID);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Set_PutParamUsrListType (ListType);
|
||||
Set_PutParamListWithPhotos ();
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Set_PutParamUsrListType (ListType);
|
||||
Set_PutParamListWithPhotos ();
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
|
||||
/***** Link and image *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_USR_LIST_TYPES[ListType],
|
||||
The_ClassFormLinkInBoxNoWrap[Gbl.Prefs.Theme],
|
||||
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
|
||||
NULL);
|
||||
Ico_PutIcon (Usr_IconsClassPhotoOrList[ListType],Txt_USR_LIST_TYPES[ListType],"ICO20x20");
|
||||
HTM_TxtF (" %s",Txt_USR_LIST_TYPES[ListType]);
|
||||
HTM_BUTTON_End ();
|
||||
/***** Link and image *****/
|
||||
HTM_BUTTON_SUBMIT_Begin (Txt_USR_LIST_TYPES[ListType],
|
||||
The_ClassFormLinkInBoxNoWrap[Gbl.Prefs.Theme],
|
||||
Gbl.Action.Act == ActReqMsgUsr ? "CopyMessageToHiddenFields();" :
|
||||
NULL);
|
||||
Ico_PutIcon (Usr_IconsClassPhotoOrList[ListType],Txt_USR_LIST_TYPES[ListType],"ICO20x20");
|
||||
HTM_TxtF (" %s",Txt_USR_LIST_TYPES[ListType]);
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -3702,43 +3760,43 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs,
|
|||
/* Begin form */
|
||||
Frm_BeginForm (NextAction);
|
||||
|
||||
/* Hidden parameters */
|
||||
Grp_PutParamsCodGrps ();
|
||||
if (NextAction == ActAdmAsgWrkCrs)
|
||||
{
|
||||
Gbl.FileBrowser.FullTree = true; // By default, show all files
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
}
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
/* Hidden parameters */
|
||||
Grp_PutParamsCodGrps ();
|
||||
if (NextAction == ActAdmAsgWrkCrs)
|
||||
{
|
||||
Gbl.FileBrowser.FullTree = true; // By default, show all files
|
||||
Brw_PutHiddenParamFullTreeIfSelected (&Gbl.FileBrowser.FullTree);
|
||||
}
|
||||
if (FuncParams)
|
||||
FuncParams (Args);
|
||||
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
|
||||
/* Put list of users to select some of them */
|
||||
HTM_TR_Begin (NULL);
|
||||
/* Put list of users to select some of them */
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColon (Txt_Users);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColon (Txt_Users);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"%s LT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
Usr_ListUsersToSelect (Rol_TCH,SelectedUsrs);
|
||||
Usr_ListUsersToSelect (Rol_NET,SelectedUsrs);
|
||||
Usr_ListUsersToSelect (Rol_STD,SelectedUsrs);
|
||||
HTM_TABLE_End ();
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"%s LT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TABLE_BeginCenterPadding (2);
|
||||
Usr_ListUsersToSelect (Rol_TCH,SelectedUsrs);
|
||||
Usr_ListUsersToSelect (Rol_NET,SelectedUsrs);
|
||||
Usr_ListUsersToSelect (Rol_STD,SelectedUsrs);
|
||||
HTM_TABLE_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
HTM_TR_End ();
|
||||
|
||||
/* Starting and ending dates in the search */
|
||||
if (PutFormDateRange)
|
||||
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (SetHMS);
|
||||
/* Starting and ending dates in the search */
|
||||
if (PutFormDateRange)
|
||||
Dat_PutFormStartEndClientLocalDateTimesWithYesterdayToday (SetHMS);
|
||||
|
||||
HTM_TABLE_End ();
|
||||
HTM_TABLE_End ();
|
||||
|
||||
/***** Send button *****/
|
||||
Btn_PutConfirmButton (TxtButton);
|
||||
/***** Send button *****/
|
||||
Btn_PutConfirmButton (TxtButton);
|
||||
|
||||
/***** End form *****/
|
||||
Frm_EndForm ();
|
||||
|
@ -4873,7 +4931,7 @@ void Usr_ListDataAdms (void)
|
|||
/***** Form to select scope *****/
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstOth);
|
||||
Set_PutParamListWithPhotos ();
|
||||
Set_PutParamListWithPhotos ();
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
|
@ -4887,7 +4945,7 @@ void Usr_ListDataAdms (void)
|
|||
HTM_DIV_Begin ("class=\"PREF_CONT\"");
|
||||
HTM_DIV_Begin ("class=\"PREF_OFF\"");
|
||||
Frm_BeginForm (ActLstOth);
|
||||
Sco_PutParamCurrentScope (&Gbl.Scope.Current);
|
||||
Sco_PutParamCurrentScope (&Gbl.Scope.Current);
|
||||
Usr_PutCheckboxListWithPhotos ();
|
||||
Frm_EndForm ();
|
||||
HTM_DIV_End ();
|
||||
|
@ -5015,7 +5073,7 @@ void Usr_SeeGuests (void)
|
|||
{
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstGst);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
|
@ -5162,7 +5220,7 @@ void Usr_SeeStudents (void)
|
|||
case Rol_SYS_ADM:
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstStd);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
|
@ -5212,7 +5270,7 @@ void Usr_SeeStudents (void)
|
|||
if (PutForm)
|
||||
{
|
||||
Frm_BeginForm (ActDoActOnSevStd);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Grp_PutParamsCodGrps ();
|
||||
}
|
||||
|
||||
/* Begin table */
|
||||
|
@ -5343,7 +5401,7 @@ void Usr_SeeTeachers (void)
|
|||
/***** Form to select scope *****/
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Frm_BeginForm (ActLstTch);
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
Set_PutParamsPrefsAboutUsrList ();
|
||||
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
|
||||
HTM_TxtColonNBSP (Txt_Scope);
|
||||
Sco_PutSelectorScope ("ScopeUsr",HTM_SUBMIT_ON_CHANGE);
|
||||
|
@ -5389,7 +5447,7 @@ void Usr_SeeTeachers (void)
|
|||
if (PutForm)
|
||||
{
|
||||
Frm_BeginForm (ActDoActOnSevTch);
|
||||
Grp_PutParamsCodGrps ();
|
||||
Grp_PutParamsCodGrps ();
|
||||
}
|
||||
|
||||
/* Begin table */
|
||||
|
@ -6077,16 +6135,22 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
struct SelectedUsrs *SelectedUsrs,
|
||||
bool PutCheckBoxToSelectUsr)
|
||||
{
|
||||
static const char *ClassPhoto[Usr_NUM_CLASS_PHOTO_TYPE][Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Usr_CLASS_PHOTO_SEL ][Set_USR_PHOTO_CIRCLE ] = "PHOTOC21x28",
|
||||
[Usr_CLASS_PHOTO_SEL ][Set_USR_PHOTO_ELLIPSE ] = "PHOTOE21x28",
|
||||
[Usr_CLASS_PHOTO_SEL ][Set_USR_PHOTO_RECTANGLE] = "PHOTOR21x28",
|
||||
[Usr_CLASS_PHOTO_SEL_SEE][Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Usr_CLASS_PHOTO_SEL_SEE][Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Usr_CLASS_PHOTO_SEL_SEE][Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
[Usr_CLASS_PHOTO_PRN ][Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Usr_CLASS_PHOTO_PRN ][Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Usr_CLASS_PHOTO_PRN ][Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
unsigned NumUsr;
|
||||
bool TRIsOpen = false;
|
||||
bool UsrIsTheMsgSender;
|
||||
struct UsrData UsrDat;
|
||||
static const char *ClassPhoto[Usr_NUM_CLASS_PHOTO_TYPE] =
|
||||
{
|
||||
[Usr_CLASS_PHOTO_SEL ] = "PHOTO21x28",
|
||||
[Usr_CLASS_PHOTO_SEL_SEE] = "PHOTO45x60",
|
||||
[Usr_CLASS_PHOTO_PRN ] = "PHOTO45x60",
|
||||
};
|
||||
|
||||
if (Gbl.Usrs.LstUsrs[Role].NumUsrs)
|
||||
{
|
||||
|
@ -6132,7 +6196,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
SelectedUsrs);
|
||||
|
||||
/***** Show photo *****/
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,ClassPhoto[ClassPhotoType],Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (&UsrDat,ClassPhoto[ClassPhotoType][Gbl.Prefs.UsrPhotos],Pho_ZOOM,false);
|
||||
|
||||
/***** Photo foot *****/
|
||||
HTM_DIV_Begin ("class=\"CLASSPHOTO_CAPTION\"");
|
||||
|
@ -6301,6 +6365,12 @@ unsigned Usr_GetTotalNumberOfUsers (void)
|
|||
|
||||
void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
|
||||
{
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC15x20",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE15x20",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR15x20",
|
||||
};
|
||||
bool ShowPhoto = false;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
struct UsrData UsrDat;
|
||||
|
@ -6318,7 +6388,7 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
|
|||
/***** Show photo *****/
|
||||
Pho_ShowUsrPhoto (&UsrDat,ShowPhoto ? PhotoURL :
|
||||
NULL,
|
||||
"PHOTO15x20",Pho_ZOOM,false);
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,false);
|
||||
|
||||
/***** Write name *****/
|
||||
HTM_DIV_Begin ("class=\"AUTHOR_1_LINE %s\"",Hidden ? "AUTHOR_TXT_LIGHT" :
|
||||
|
@ -6342,6 +6412,12 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
|||
[Rol_NET] = ActSeeRecOneTch,
|
||||
[Rol_TCH] = ActSeeRecOneTch,
|
||||
};
|
||||
static const char *ClassPhoto[Set_NUM_USR_PHOTOS] =
|
||||
{
|
||||
[Set_USR_PHOTO_CIRCLE ] = "PHOTOC45x60",
|
||||
[Set_USR_PHOTO_ELLIPSE ] = "PHOTOE45x60",
|
||||
[Set_USR_PHOTO_RECTANGLE] = "PHOTOR45x60",
|
||||
};
|
||||
|
||||
/***** Show user's photo *****/
|
||||
if (NumRows)
|
||||
|
@ -6349,7 +6425,9 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
|||
NumRows + 1,Gbl.RowEvenOdd);
|
||||
else
|
||||
HTM_TD_Begin ("class=\"LT LINE_BOTTOM COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,"PHOTO45x60",Pho_ZOOM,false);
|
||||
Pho_ShowUsrPhotoIfAllowed (UsrDat,
|
||||
ClassPhoto[Gbl.Prefs.UsrPhotos],Pho_ZOOM,
|
||||
false);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** User's IDs and name *****/
|
||||
|
@ -6368,7 +6446,7 @@ void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
|||
{
|
||||
/* Begin form to go to user's record card */
|
||||
Frm_BeginForm (NextAction[UsrDat->Roles.InCurrentCrs]);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
|
||||
HTM_BUTTON_SUBMIT_Begin (UsrDat->FullName,"BT_LINK LT AUTHOR_TXT",NULL);
|
||||
}
|
||||
|
||||
|
@ -6419,7 +6497,7 @@ void Usr_PutWhoIcon (Usr_Who_t Who)
|
|||
Gbl.Usrs.Me.PhotoURL[0] ? NULL :
|
||||
"usr_bl.jpg",
|
||||
Txt_WHO[Who],
|
||||
"ICO_HIGHLIGHT PHOTO15x20");
|
||||
"ICO_HIGHLIGHT PHOTOR15x20");
|
||||
break;
|
||||
case Usr_WHO_SELECTED:
|
||||
HTM_INPUT_IMAGE (Cfg_URL_ICON_PUBLIC,"search.svg",
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "swad_role_type.h"
|
||||
#include "swad_scope.h"
|
||||
#include "swad_search.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_theme.h"
|
||||
|
||||
|
@ -213,6 +214,7 @@ struct UsrData
|
|||
Ico_IconSet_t IconSet;
|
||||
Mnu_Menu_t Menu;
|
||||
unsigned SideCols;
|
||||
Set_UsrPhotos_t UsrPhotos;
|
||||
bool AcceptThirdPartyCookies; // User has accepted third party cookies
|
||||
} Prefs;
|
||||
};
|
||||
|
|
|
@ -275,7 +275,8 @@ unsigned Usr_DB_GetUsrDataFromUsrCod (MYSQL_RES **mysql_res,long UsrCod,
|
|||
"IconSet," // row[27]
|
||||
"Menu," // row[28]
|
||||
"SideCols," // row[29]
|
||||
"ThirdPartyCookies" // row[30]
|
||||
"UsrPhotos," // row[30]
|
||||
"ThirdPartyCookies" // row[31]
|
||||
" FROM usr_data"
|
||||
" WHERE UsrCod=%ld",
|
||||
UsrCod);
|
||||
|
|
Loading…
Reference in New Issue