mirror of https://github.com/acanas/swad-core.git
Version18.89
This commit is contained in:
parent
ea15787436
commit
243d7cee1e
5
Makefile
5
Makefile
|
@ -46,11 +46,10 @@ OBJS = swad_account.o swad_action.o swad_agenda.o swad_alert.o \
|
|||
swad_message.o swad_MFU.o \
|
||||
swad_network.o swad_nickname.o swad_notice.o swad_notification.o \
|
||||
swad_pagination.o swad_parameter.o swad_password.o swad_photo.o \
|
||||
swad_place.o swad_plugin.o swad_preference.o swad_privacy.o \
|
||||
swad_profile.o swad_project.o \
|
||||
swad_place.o swad_plugin.o swad_privacy.o swad_profile.o swad_project.o \
|
||||
swad_QR.o \
|
||||
swad_record.o swad_report.o swad_role.o swad_RSS.o \
|
||||
swad_scope.o swad_search.o swad_session.o swad_setup.o \
|
||||
swad_scope.o swad_search.o swad_session.o swad_setting.o swad_setup.o \
|
||||
swad_statistic.o swad_string.o swad_survey.o swad_syllabus.o \
|
||||
swad_tab.o swad_table.o swad_test.o swad_test_import.o swad_theme.o \
|
||||
swad_timeline.o swad_timetable.o \
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
#include "swad_parameter.h"
|
||||
#include "swad_password.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_project.h"
|
||||
|
@ -72,6 +71,7 @@
|
|||
#include "swad_report.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_search.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_setup.h"
|
||||
#include "swad_tab.h"
|
||||
#include "swad_test_import.h"
|
||||
|
@ -1497,7 +1497,7 @@ Profile:
|
|||
1271. ActSeeMyAgd Show my full agenda (personal organizer)
|
||||
1272. ActFrmMyAcc Show form to the creation or change of user's account
|
||||
1273. ActReqEdiRecSha Request the edition of the record with the personal data of the user
|
||||
1274. ActReqEdiPrf Show forms to edit preferences
|
||||
1274. ActReqEdiSet Show forms to edit settings
|
||||
|
||||
1275. ActChgMyRol Change type of logged user
|
||||
|
||||
|
@ -1559,7 +1559,7 @@ Profile:
|
|||
1325. ActChgPriPho Change privacy of my photo
|
||||
1326. ActChgBasPriPrf Change privacy of my basic public profile
|
||||
NEW. ActChgExtPriPrf Change privacy of my extended public profile
|
||||
NEW. ActChgCooPrf Change preference about third party cookies
|
||||
NEW. ActChgCooPrf Change setting about third party cookies
|
||||
1327. ActChgNtfPrf Change whether to notify by email new messages
|
||||
1328. ActPrnUsrQR Show my QR code ready to print
|
||||
|
||||
|
@ -1677,7 +1677,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActSeePen */{1060, 1,TabSys,ActSeePen , 0, 0, 0, 0, 0, 0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Hie_SeePending ,"sitemap" },
|
||||
/* ActSeeLnk */{ 748, 2,TabSys,ActSeeLnk , 0, 0, 0, 0, 0, 0,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lnk_SeeLinks ,"link" },
|
||||
/* ActLstPlg */{ 777, 3,TabSys,ActLstPlg , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plg_ListPlugins ,"puzzle-piece" },
|
||||
/* ActSetUp */{ 840, 4,TabSys,ActSetUp , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Set_Setup ,"bolt" },
|
||||
/* ActSetUp */{ 840, 4,TabSys,ActSetUp , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,SUp_SetUp ,"bolt" },
|
||||
|
||||
// Actions not in menu:
|
||||
/* ActEdiCty */{ 863,-1,TabUnk,ActSeeCty , 0, 0, 0, 0, 0, 0,0x200,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Cty_EditCountries ,NULL},
|
||||
|
@ -3078,7 +3078,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActSeeMyAgd */{1602, 3,TabPrf,ActSeeMyAgd ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Agd_ShowMyAgenda ,"calendar" },
|
||||
/* ActFrmMyAcc */{ 36, 4,TabPrf,ActFrmMyAcc ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Acc_ShowFormMyAccount ,"at" },
|
||||
/* ActReqEdiRecSha */{ 285, 5,TabPrf,ActReqEdiRecSha ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ShowMySharedRecordAndMore ,"card" },
|
||||
/* ActReqEdiPrf */{ 673, 6,TabPrf,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pre_EditPrefs ,"cog" },
|
||||
/* ActReqEdiSet */{ 673, 6,TabPrf,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Set_EditSettings ,"cog" },
|
||||
|
||||
// Actions not in menu:
|
||||
/* ActChgMyRol */{ 589,-1,TabUnk,ActFrmRolSes ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Rol_ChangeMyRole ,Usr_ShowFormsLogoutAndRole ,NULL},
|
||||
|
@ -3131,23 +3131,23 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActReqEdiMyNet */{1172,-1,TabUnk,ActReqEdiRecSha ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Rec_ShowMySharedRecordAndMore ,NULL},
|
||||
/* ActChgMyNet */{1173,-1,TabUnk,ActReqEdiRecSha ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Net_UpdateMyWebsAndSocialNets ,NULL},
|
||||
|
||||
/* ActChgThe */{ 841,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,The_ChangeTheme ,Pre_EditPrefs ,NULL},
|
||||
/* ActReqChgLan */{ 992,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lan_AskChangeLanguage ,NULL},
|
||||
/* ActChgLan */{ 654,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Lan_ChangeLanguage ,Pre_EditPrefs ,NULL},
|
||||
/* ActChg1stDay */{1484,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Cal_ChangeFirstDayOfWeek ,Pre_EditPrefs ,NULL},
|
||||
/* ActChgDatFmt */{1638,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_ChangeDateFormat ,Pre_EditPrefs ,NULL},
|
||||
/* ActChgCol */{ 674,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_ChangeSideCols ,Pre_EditPrefs ,NULL},
|
||||
/* ActHidLftCol */{ 668,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_HideLeftCol ,Pre_EditPrefs ,NULL},
|
||||
/* ActHidRgtCol */{ 669,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_HideRightCol ,Pre_EditPrefs ,NULL},
|
||||
/* ActShoLftCol */{ 670,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_ShowLeftCol ,Pre_EditPrefs ,NULL},
|
||||
/* ActShoRgtCol */{ 671,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Pre_ShowRightCol ,Pre_EditPrefs ,NULL},
|
||||
/* ActChgIco */{1092,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Ico_ChangeIconSet ,Pre_EditPrefs ,NULL},
|
||||
/* ActChgMnu */{1243,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Mnu_ChangeMenu ,Pre_EditPrefs ,NULL},
|
||||
/* ActChgPriPho */{ 774,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Pho_ChangePhotoVisibility ,NULL},
|
||||
/* ActChgBasPriPrf */{1404,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeBasicProfileVis ,NULL},
|
||||
/* ActChgExtPriPrf */{1765,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prf_ChangeExtendedProfileVis ,NULL},
|
||||
/* ActChgCooPrf */{1764,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Coo_ChangeMyPrefsCookies ,NULL},
|
||||
/* ActChgNtfPrf */{ 775,-1,TabUnk,ActReqEdiPrf ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Ntf_ChangeNotifyEvents ,Pre_EditPrefs ,NULL},
|
||||
/* ActChgThe */{ 841,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,The_ChangeTheme ,Set_EditSettings ,NULL},
|
||||
/* ActReqChgLan */{ 992,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Lan_AskChangeLanguage ,NULL},
|
||||
/* ActChgLan */{ 654,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Lan_ChangeLanguage ,Set_EditSettings ,NULL},
|
||||
/* ActChg1stDay */{1484,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Cal_ChangeFirstDayOfWeek ,Set_EditSettings ,NULL},
|
||||
/* ActChgDatFmt */{1638,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Dat_ChangeDateFormat ,Set_EditSettings ,NULL},
|
||||
/* ActChgCol */{ 674,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ChangeSideCols ,Set_EditSettings ,NULL},
|
||||
/* ActHidLftCol */{ 668,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_HideLeftCol ,Set_EditSettings ,NULL},
|
||||
/* ActHidRgtCol */{ 669,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_HideRightCol ,Set_EditSettings ,NULL},
|
||||
/* ActShoLftCol */{ 670,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ShowLeftCol ,Set_EditSettings ,NULL},
|
||||
/* ActShoRgtCol */{ 671,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,Set_ShowRightCol ,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},
|
||||
/* 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},
|
||||
/* ActChgCooPrf */{1764,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Coo_ChangeMyPrefsCookies ,NULL},
|
||||
/* ActChgNtfPrf */{ 775,-1,TabUnk,ActReqEdiSet ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,Ntf_ChangeNotifyEvents ,Set_EditSettings ,NULL},
|
||||
|
||||
/* ActPrnUsrQR */{1022,-1,TabUnk,ActFrmMyAcc ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Usr_PrintUsrQRCode ,NULL},
|
||||
|
||||
|
@ -3832,7 +3832,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
|
|||
ActShoLftCol, // #670
|
||||
ActShoRgtCol, // #671
|
||||
-1, // #672 (obsolete action)
|
||||
ActReqEdiPrf, // #673
|
||||
ActReqEdiSet, // #673
|
||||
ActChgCol, // #674
|
||||
ActSeeDpt, // #675
|
||||
ActSeeCtr, // #676
|
||||
|
@ -5249,14 +5249,14 @@ void Act_AdjustCurrentAction (void)
|
|||
|
||||
/***** Adjustment 5:
|
||||
-------------
|
||||
If any of my preferences about privacy is unknown
|
||||
If any of my settings about privacy is unknown
|
||||
the only action possible
|
||||
is to show a form to change my preferences *****/
|
||||
is to show a form to change my settings *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||
Gbl.Usrs.Me.UsrDat.BaPrfVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||
Gbl.Usrs.Me.UsrDat.ExPrfVisibility == Pri_VISIBILITY_UNKNOWN)
|
||||
{
|
||||
Gbl.Action.Act = ActReqEdiPrf;
|
||||
Gbl.Action.Act = ActReqEdiSet;
|
||||
Tab_SetCurrentTab ();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1530,7 +1530,7 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
|
|||
#define ActSeeMyAgd (ActSeeMyUsgRep + 4)
|
||||
#define ActFrmMyAcc (ActSeeMyUsgRep + 5)
|
||||
#define ActReqEdiRecSha (ActSeeMyUsgRep + 6)
|
||||
#define ActReqEdiPrf (ActSeeMyUsgRep + 7)
|
||||
#define ActReqEdiSet (ActSeeMyUsgRep + 7)
|
||||
// Secondary actions
|
||||
#define ActChgMyRol (ActSeeMyUsgRep + 8)
|
||||
#define ActFrmNewEvtMyAgd (ActSeeMyUsgRep + 9)
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
|
@ -158,11 +158,11 @@ void Agd_ShowMyAgenda (void)
|
|||
Hlp_PROFILE_Agenda,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Put forms to choice which events to show *****/
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Agd_ShowFormToSelPast__FutureEvents ();
|
||||
Agd_ShowFormToSelPrivatPublicEvents ();
|
||||
Agd_ShowFormToSelHiddenVisiblEvents ();
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
|
||||
/***** Show the current events in the user's agenda *****/
|
||||
Agd_ShowEventsToday (Agd_MY_AGENDA_TODAY);
|
||||
|
@ -188,7 +188,7 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
|
|||
"calendar-plus.svg", // Agd_FUTURE_EVENTS
|
||||
};
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (PstFut = Agd_PAST___EVENTS;
|
||||
PstFut <= Agd_FUTURE_EVENTS;
|
||||
PstFut++)
|
||||
|
@ -202,12 +202,12 @@ static void Agd_ShowFormToSelPast__FutureEvents (void)
|
|||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutPrefIconLink (Icon[PstFut],
|
||||
Ico_PutSettingIconLink (Icon[PstFut],
|
||||
Txt_AGENDA_PAST___FUTURE_EVENTS[PstFut]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -224,7 +224,7 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
|
|||
"unlock.svg", // Agd_PUBLIC_EVENTS
|
||||
};
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (PrvPub = Agd_PRIVAT_EVENTS;
|
||||
PrvPub <= Agd_PUBLIC_EVENTS;
|
||||
PrvPub++)
|
||||
|
@ -238,12 +238,12 @@ static void Agd_ShowFormToSelPrivatPublicEvents (void)
|
|||
Gbl.Agenda.HiddenVisiblEvents,
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutPrefIconLink (Icon[PrvPub],
|
||||
Ico_PutSettingIconLink (Icon[PrvPub],
|
||||
Txt_AGENDA_PRIVAT_PUBLIC_EVENTS[PrvPub]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -260,7 +260,7 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
|
|||
"eye.svg", // Agd_VISIBL_EVENTS
|
||||
};
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (HidVis = Agd_HIDDEN_EVENTS;
|
||||
HidVis <= Agd_VISIBL_EVENTS;
|
||||
HidVis++)
|
||||
|
@ -274,12 +274,12 @@ static void Agd_ShowFormToSelHiddenVisiblEvents (void)
|
|||
Gbl.Agenda.HiddenVisiblEvents ^ (1 << HidVis), // Toggle
|
||||
Gbl.Agenda.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutPrefIconLink (Icon[HidVis],
|
||||
Ico_PutSettingIconLink (Icon[HidVis],
|
||||
Txt_AGENDA_HIDDEN_VISIBL_EVENTS[HidVis]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
|
@ -147,9 +147,9 @@ static void Asg_ShowAllAssignments (void)
|
|||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAsg,Asg_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.Asgs.Num)
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -228,9 +228,9 @@ static void Att_ShowAllAttEvents (void)
|
|||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAtt,Att_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.AttEvents.Num)
|
||||
|
@ -1865,7 +1865,7 @@ static void Att_ListAttOnlyMeAsStudent (struct AttendanceEvent *Att)
|
|||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Save_changes;
|
||||
|
||||
/***** Get my preference about photos in users' list for current course *****/
|
||||
/***** Get my setting about photos in users' list for current course *****/
|
||||
Usr_GetMyPrefAboutListWithPhotosFromDB ();
|
||||
|
||||
/***** Start form *****/
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "swad_form.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -77,19 +77,19 @@ static void Cal_PutIconsCalendar (void);
|
|||
|
||||
void Cal_PutIconsToSelectFirstDayOfWeek (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_calendar;
|
||||
extern const char *Hlp_PROFILE_Settings_calendar;
|
||||
extern const char *Txt_Calendar;
|
||||
|
||||
Box_StartBox (NULL,Txt_Calendar,Cal_PutIconsFirstDayOfWeek,
|
||||
Hlp_PROFILE_Preferences_calendar,Box_NOT_CLOSABLE);
|
||||
Pre_StartPrefsHead ();
|
||||
Hlp_PROFILE_Settings_calendar,Box_NOT_CLOSABLE);
|
||||
Set_StartSettingsHead ();
|
||||
Cal_ShowFormToSelFirstDayOfWeek (ActChg1stDay,NULL);
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********** Put contextual icons in first-day-of-week preference ************/
|
||||
/************ Put contextual icons in first-day-of-week setting **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Cal_PutIconsFirstDayOfWeek (void)
|
||||
|
@ -110,7 +110,7 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ())
|
|||
unsigned FirstDayOfWeek;
|
||||
char Icon[32 + 1];
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (FirstDayOfWeek = 0; // Monday
|
||||
FirstDayOfWeek <= 6; // Sunday
|
||||
FirstDayOfWeek++)
|
||||
|
@ -129,11 +129,11 @@ void Cal_ShowFormToSelFirstDayOfWeek (Act_Action_t Action,void (*FuncParams) ())
|
|||
snprintf (Icon,sizeof (Icon),
|
||||
"first-day-of-week-%u.png",
|
||||
FirstDayOfWeek);
|
||||
Ico_PutPrefIconLink (Icon,Gbl.Title);
|
||||
Ico_PutSettingIconLink (Icon,Gbl.Title);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -147,14 +147,14 @@ void Cal_ChangeFirstDayOfWeek (void)
|
|||
|
||||
/***** Store icon first day of week database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your preference about first day of week",
|
||||
DB_QueryUPDATE ("can not update your setting about first day of week",
|
||||
"UPDATE usr_data SET FirstDayOfWeek=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -270,9 +270,9 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
|||
/***** Preference selector to change first day of week *****/
|
||||
if (!PrintView)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,NULL);
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
/***** Draw several months *****/
|
||||
|
|
|
@ -466,10 +466,12 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.88 (2019-03-25)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.89 (2019-03-26)"
|
||||
#define CSS_FILE "swad18.88.css"
|
||||
#define JS_FILE "swad18.88.js"
|
||||
/*
|
||||
Version 18.89: Mar 26, 2019 Corrections in help links after recent changes.
|
||||
Module swad_preference is renamed swad_setting. (241090 lines)
|
||||
Version 18.88: Mar 25, 2019 Change in usability of exam announcements, suggested by Mancia Anguita López and Javier Fernández Baldomero. (241089 lines)
|
||||
Version 18.87.1: Mar 24, 2019 Code refactoring in notices. (241011 lines)
|
||||
Version 18.87: Mar 24, 2019 Change in usability of notices. (240997 lines)
|
||||
|
|
|
@ -528,7 +528,7 @@
|
|||
#define Cfg_TIME_TO_DELETE_OLD_PENDING_PASSWORDS ((time_t)( 24UL * 60UL * 60UL)) // Past these seconds, remove expired pending passwords
|
||||
#define Cfg_TIME_TO_DELETE_OLD_PENDING_EMAILS ((time_t)( 24UL * 60UL * 60UL)) // Past these seconds, remove expired pending emails
|
||||
|
||||
#define Cfg_TIME_TO_DELETE_IP_PREFS ((time_t)( 7UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired IP preferences
|
||||
#define Cfg_TIME_TO_DELETE_IP_PREFS ((time_t)( 7UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired IP settings
|
||||
|
||||
#define Cfg_TIME_TO_DELETE_OLD_NOTIF ((time_t)(30UL * 24UL * 60UL * 60UL)) // Past these seconds, remove expired notifications
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
#include "swad_help.h"
|
||||
#include "swad_institution.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
14
swad_date.c
14
swad_date.c
|
@ -36,7 +36,7 @@
|
|||
#include "swad_form.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -99,13 +99,13 @@ static unsigned Dat_GetParamDateFormat (void);
|
|||
|
||||
void Dat_PutBoxToSelectDateFormat (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_dates;
|
||||
extern const char *Hlp_PROFILE_Settings_dates;
|
||||
extern const char *Txt_Dates;
|
||||
Dat_Format_t Format;
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Dates,Dat_PutIconsDateFormat,
|
||||
Hlp_PROFILE_Preferences_dates,Box_NOT_CLOSABLE);
|
||||
Hlp_PROFILE_Settings_dates,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Form with list of options *****/
|
||||
Frm_StartForm (ActChgDatFmt);
|
||||
|
@ -142,7 +142,7 @@ void Dat_PutBoxToSelectDateFormat (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Put contextual icons in date-format preference ***************/
|
||||
/*************** Put contextual icons in date-format setting *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Dat_PutIconsDateFormat (void)
|
||||
|
@ -183,14 +183,14 @@ void Dat_ChangeDateFormat (void)
|
|||
|
||||
/***** Store date format in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your preference about date format",
|
||||
DB_QueryUPDATE ("can not update your setting about date format",
|
||||
"UPDATE usr_data SET DateFormat=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
(unsigned) Gbl.Prefs.DateFormat,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
#include "swad_group.h"
|
||||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_test.h"
|
||||
|
||||
|
@ -225,9 +225,9 @@ static void Gam_ListAllGames (void)
|
|||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAllGam,Gam_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.Games.Num)
|
||||
|
|
|
@ -43,9 +43,9 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_icon.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_theme.h"
|
||||
#include "swad_web_service.h"
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
#include "swad_group.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -5023,7 +5023,7 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ())
|
|||
extern const char *Txt_GROUP_WHICH_GROUPS[2];
|
||||
Grp_WhichGroups_t WhichGrps;
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (WhichGrps = Grp_ONLY_MY_GROUPS;
|
||||
WhichGrps <= Grp_ALL_GROUPS;
|
||||
WhichGrps++)
|
||||
|
@ -5035,13 +5035,13 @@ void Grp_ShowFormToSelWhichGrps (Act_Action_t Action,void (*FuncParams) ())
|
|||
Par_PutHiddenParamUnsigned ("WhichGrps",(unsigned) WhichGrps);
|
||||
if (FuncParams) // Extra parameters depending on the action
|
||||
FuncParams ();
|
||||
Ico_PutPrefIconLink (WhichGrps == Grp_ONLY_MY_GROUPS ? "mysitemap.png" :
|
||||
Ico_PutSettingIconLink (WhichGrps == Grp_ONLY_MY_GROUPS ? "mysitemap.png" :
|
||||
"sitemap.svg",
|
||||
Txt_GROUP_WHICH_GROUPS[WhichGrps]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
240
swad_help_URL.c
240
swad_help_URL.c
|
@ -3500,254 +3500,254 @@ const char *Hlp_PROFILE_Photo =
|
|||
"PROFILE.Photo.en";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_internationalization =
|
||||
const char *Hlp_PROFILE_Settings_internationalization =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#internacionalizaci%C3%B3n";
|
||||
"PROFILE.Settings.es#internacionalizaci%C3%B3n";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#internationalization";
|
||||
"PROFILE.Settings.en#internationalization";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#internationalization";
|
||||
"PROFILE.Settings.en#internationalization";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#internacionalizaci%C3%B3n";
|
||||
"PROFILE.Settings.es#internacionalizaci%C3%B3n";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#internationalization";
|
||||
"PROFILE.Settings.en#internationalization";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#internacionalizaci%C3%B3n";
|
||||
"PROFILE.Settings.es#internacionalizaci%C3%B3n";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#internationalization";
|
||||
"PROFILE.Settings.en#internationalization";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#internationalization";
|
||||
"PROFILE.Settings.en#internationalization";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#internationalization";
|
||||
"PROFILE.Settings.en#internationalization";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_language =
|
||||
const char *Hlp_PROFILE_Settings_language =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#idioma";
|
||||
"PROFILE.Settings.es#idioma";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#language";
|
||||
"PROFILE.Settings.en#language";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#language";
|
||||
"PROFILE.Settings.en#language";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#idioma";
|
||||
"PROFILE.Settings.es#idioma";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#language";
|
||||
"PROFILE.Settings.en#language";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#idioma";
|
||||
"PROFILE.Settings.es#idioma";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#language";
|
||||
"PROFILE.Settings.en#language";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#language";
|
||||
"PROFILE.Settings.en#language";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#language";
|
||||
"PROFILE.Settings.en#language";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_calendar =
|
||||
const char *Hlp_PROFILE_Settings_calendar =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#calendario";
|
||||
"PROFILE.Settings.es#calendario";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#calendar";
|
||||
"PROFILE.Settings.en#calendar";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#calendar";
|
||||
"PROFILE.Settings.en#calendar";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#calendario";
|
||||
"PROFILE.Settings.es#calendario";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#calendar";
|
||||
"PROFILE.Settings.en#calendar";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#calendario";
|
||||
"PROFILE.Settings.es#calendario";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#calendar";
|
||||
"PROFILE.Settings.en#calendar";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#calendar";
|
||||
"PROFILE.Settings.en#calendar";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#calendar";
|
||||
"PROFILE.Settings.en#calendar";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_dates =
|
||||
const char *Hlp_PROFILE_Settings_dates =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#fechas";
|
||||
"PROFILE.Settings.es#fechas";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#dates";
|
||||
"PROFILE.Settings.en#dates";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#dates";
|
||||
"PROFILE.Settings.en#dates";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#fechas";
|
||||
"PROFILE.Settings.es#fechas";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#dates";
|
||||
"PROFILE.Settings.en#dates";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#fechas";
|
||||
"PROFILE.Settings.es#fechas";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#dates";
|
||||
"PROFILE.Settings.en#dates";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#dates";
|
||||
"PROFILE.Settings.en#dates";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#dates";
|
||||
"PROFILE.Settings.en#dates";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_design =
|
||||
const char *Hlp_PROFILE_Settings_design =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#dise%C3%B1o";
|
||||
"PROFILE.Settings.es#dise%C3%B1o";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#design";
|
||||
"PROFILE.Settings.en#design";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#design";
|
||||
"PROFILE.Settings.en#design";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#dise%C3%B1o";
|
||||
"PROFILE.Settings.es#dise%C3%B1o";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#design";
|
||||
"PROFILE.Settings.en#design";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#dise%C3%B1o";
|
||||
"PROFILE.Settings.es#dise%C3%B1o";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#design";
|
||||
"PROFILE.Settings.en#design";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#design";
|
||||
"PROFILE.Settings.en#design";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#design";
|
||||
"PROFILE.Settings.en#design";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_icons =
|
||||
const char *Hlp_PROFILE_Settings_icons =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#iconos";
|
||||
"PROFILE.Settings.es#iconos";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#icons";
|
||||
"PROFILE.Settings.en#icons";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#icons";
|
||||
"PROFILE.Settings.en#icons";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#iconos";
|
||||
"PROFILE.Settings.es#iconos";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#icons";
|
||||
"PROFILE.Settings.en#icons";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#iconos";
|
||||
"PROFILE.Settings.es#iconos";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#icons";
|
||||
"PROFILE.Settings.en#icons";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#icons";
|
||||
"PROFILE.Settings.en#icons";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#icons";
|
||||
"PROFILE.Settings.en#icons";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_theme =
|
||||
const char *Hlp_PROFILE_Settings_theme =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#tema";
|
||||
"PROFILE.Settings.es#tema";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#theme";
|
||||
"PROFILE.Settings.en#theme";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#theme";
|
||||
"PROFILE.Settings.en#theme";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#tema";
|
||||
"PROFILE.Settings.es#tema";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#theme";
|
||||
"PROFILE.Settings.en#theme";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#tema";
|
||||
"PROFILE.Settings.es#tema";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#theme";
|
||||
"PROFILE.Settings.en#theme";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#theme";
|
||||
"PROFILE.Settings.en#theme";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#theme";
|
||||
"PROFILE.Settings.en#theme";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_menu =
|
||||
const char *Hlp_PROFILE_Settings_menu =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#men%C3%BA";
|
||||
"PROFILE.Settings.es#men%C3%BA";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#menu";
|
||||
"PROFILE.Settings.en#menu";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#menu";
|
||||
"PROFILE.Settings.en#menu";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#men%C3%BA";
|
||||
"PROFILE.Settings.es#men%C3%BA";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#menu";
|
||||
"PROFILE.Settings.en#menu";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#men%C3%BA";
|
||||
"PROFILE.Settings.es#men%C3%BA";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#menu";
|
||||
"PROFILE.Settings.en#menu";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#menu";
|
||||
"PROFILE.Settings.en#menu";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#menu";
|
||||
"PROFILE.Settings.en#menu";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_columns =
|
||||
const char *Hlp_PROFILE_Settings_columns =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#columnas";
|
||||
"PROFILE.Settings.es#columnas";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#columns";
|
||||
"PROFILE.Settings.en#columns";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#columns";
|
||||
"PROFILE.Settings.en#columns";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#columnas";
|
||||
"PROFILE.Settings.es#columnas";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#columns";
|
||||
"PROFILE.Settings.en#columns";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#columnas";
|
||||
"PROFILE.Settings.es#columnas";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#columns";
|
||||
"PROFILE.Settings.en#columns";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#columns";
|
||||
"PROFILE.Settings.en#columns";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#columns";
|
||||
"PROFILE.Settings.en#columns";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_privacy =
|
||||
const char *Hlp_PROFILE_Settings_privacy =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#privacidad";
|
||||
"PROFILE.Settings.es#privacidad";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#privacy";
|
||||
"PROFILE.Settings.en#privacy";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#privacy";
|
||||
"PROFILE.Settings.en#privacy";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#privacidad";
|
||||
"PROFILE.Settings.es#privacidad";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#privacy";
|
||||
"PROFILE.Settings.en#privacy";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#privacidad";
|
||||
"PROFILE.Settings.es#privacidad";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#privacy";
|
||||
"PROFILE.Settings.en#privacy";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#privacy";
|
||||
"PROFILE.Settings.en#privacy";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#privacy";
|
||||
"PROFILE.Settings.en#privacy";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_cookies =
|
||||
const char *Hlp_PROFILE_Settings_cookies =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#cookies";
|
||||
"PROFILE.Settings.es#cookies";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#cookies";
|
||||
"PROFILE.Settings.en#cookies";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#cookies";
|
||||
"PROFILE.Settings.en#cookies";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#cookies";
|
||||
"PROFILE.Settings.es#cookies";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#cookies";
|
||||
"PROFILE.Settings.en#cookies";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#cookies";
|
||||
"PROFILE.Settings.es#cookies";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#cookies";
|
||||
"PROFILE.Settings.en#cookies";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#cookies";
|
||||
"PROFILE.Settings.en#cookies";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#cookies";
|
||||
"PROFILE.Settings.en#cookies";
|
||||
#endif
|
||||
|
||||
const char *Hlp_PROFILE_Preferences_notifications =
|
||||
const char *Hlp_PROFILE_Settings_notifications =
|
||||
#if L==1
|
||||
"PROFILE.Preferences.es#notificaciones";
|
||||
"PROFILE.Settings.es#notificaciones";
|
||||
#elif L==2
|
||||
"PROFILE.Preferences.en#notifications";
|
||||
"PROFILE.Settings.en#notifications";
|
||||
#elif L==3
|
||||
"PROFILE.Preferences.en#notifications";
|
||||
"PROFILE.Settings.en#notifications";
|
||||
#elif L==4
|
||||
"PROFILE.Preferences.es#notificaciones";
|
||||
"PROFILE.Settings.es#notificaciones";
|
||||
#elif L==5
|
||||
"PROFILE.Preferences.en#notifications";
|
||||
"PROFILE.Settings.en#notifications";
|
||||
#elif L==6
|
||||
"PROFILE.Preferences.es#notificaciones";
|
||||
"PROFILE.Settings.es#notificaciones";
|
||||
#elif L==7
|
||||
"PROFILE.Preferences.en#notifications";
|
||||
"PROFILE.Settings.en#notifications";
|
||||
#elif L==8
|
||||
"PROFILE.Preferences.en#notifications";
|
||||
"PROFILE.Settings.en#notifications";
|
||||
#elif L==9
|
||||
"PROFILE.Preferences.en#notifications";
|
||||
"PROFILE.Settings.en#notifications";
|
||||
#endif
|
||||
|
|
28
swad_icon.c
28
swad_icon.c
|
@ -35,7 +35,7 @@
|
|||
#include "swad_icon.h"
|
||||
#include "swad_layout.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
|
@ -110,15 +110,15 @@ const char *Ico_GetIcon (const char *IconWithoutExtension)
|
|||
|
||||
void Ico_PutIconsToSelectIconSet (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_icons;
|
||||
extern const char *Hlp_PROFILE_Settings_icons;
|
||||
extern const char *Txt_Icons;
|
||||
Ico_IconSet_t IconSet;
|
||||
char Icon[PATH_MAX + 1];
|
||||
|
||||
Box_StartBox (NULL,Txt_Icons,Ico_PutIconsIconSet,
|
||||
Hlp_PROFILE_Preferences_icons,Box_NOT_CLOSABLE);
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
Hlp_PROFILE_Settings_icons,Box_NOT_CLOSABLE);
|
||||
Set_StartSettingsHead ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (IconSet = (Ico_IconSet_t) 0;
|
||||
IconSet < Ico_NUM_ICON_SETS;
|
||||
IconSet++)
|
||||
|
@ -132,17 +132,17 @@ void Ico_PutIconsToSelectIconSet (void)
|
|||
"%s/%s/cog.svg",
|
||||
Cfg_ICON_FOLDER_SETS,
|
||||
Ico_IconSetId[IconSet]);
|
||||
Ico_PutPrefIconLink (Icon,Ico_IconSetNames[IconSet]);
|
||||
Ico_PutSettingIconLink (Icon,Ico_IconSetNames[IconSet]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Put contextual icons in icon-set preference *****************/
|
||||
/***************** Put contextual icons in icon-set setting *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ico_PutIconsIconSet (void)
|
||||
|
@ -167,13 +167,13 @@ void Ico_ChangeIconSet (void)
|
|||
|
||||
/***** Store icon set in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your preference about icon set",
|
||||
DB_QueryUPDATE ("can not update your setting about icon set",
|
||||
"UPDATE usr_data SET IconSet='%s' WHERE UsrCod=%ld",
|
||||
Ico_IconSetId[Gbl.Prefs.IconSet],
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -345,10 +345,10 @@ void Ico_PutIconTextLink (const char *Icon,const char *Text)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Show a preference selector ***********************/
|
||||
/**************************** Show a setting selector *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ico_PutPrefIconLink (const char *Icon,const char *Title)
|
||||
void Ico_PutSettingIconLink (const char *Icon,const char *Title)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<input type=\"image\" src=\"%s/%s\""
|
||||
" alt=\"%s\" title=\"%s\""
|
||||
|
|
|
@ -70,7 +70,7 @@ void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title);
|
|||
void Ico_PutDivIconLink (const char *DivClass,const char *Icon,const char *Title);
|
||||
void Ico_PutIconLink (const char *Icon,const char *Title);
|
||||
void Ico_PutIconTextLink (const char *Icon,const char *Text);
|
||||
void Ico_PutPrefIconLink (const char *Icon,const char *Title);
|
||||
void Ico_PutSettingIconLink (const char *Icon,const char *Title);
|
||||
void Ico_PutIconOff (const char *Icon,const char *Title);
|
||||
|
||||
void Ico_PutCalculateIcon (const char *Title);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// swad_language.c: user's preferences on language
|
||||
// swad_language.c: user's settings on language
|
||||
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance),
|
||||
|
@ -30,7 +30,7 @@
|
|||
#include "swad_form.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** External global variables from others modules ***************/
|
||||
|
@ -69,33 +69,33 @@ static void Lan_PutIconsLanguage (void);
|
|||
static void Lan_PutParamLanguage (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Put link to change language (edit preferences) ***************/
|
||||
/*************** Put link to change language (edit settings) *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lan_PutLinkToChangeLanguage (void)
|
||||
{
|
||||
Lay_PutContextualLinkIconText (ActReqEdiPrf,NULL,NULL,
|
||||
Lay_PutContextualLinkIconText (ActReqEdiSet,NULL,NULL,
|
||||
"globe.svg",
|
||||
"Change language");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Put a selector to select language in preferences **************/
|
||||
/************** Put a selector to select language in settings ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Lan_PutBoxToSelectLanguage (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_language;
|
||||
extern const char *Hlp_PROFILE_Settings_language;
|
||||
extern const char *Txt_Language;
|
||||
|
||||
Box_StartBox (NULL,Txt_Language,Lan_PutIconsLanguage,
|
||||
Hlp_PROFILE_Preferences_language,Box_NOT_CLOSABLE);
|
||||
Hlp_PROFILE_Settings_language,Box_NOT_CLOSABLE);
|
||||
Lan_PutSelectorToSelectLanguage ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Put contextual icons in language preference *****************/
|
||||
/**************** Put contextual icons in language setting *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Lan_PutIconsLanguage (void)
|
||||
|
@ -155,8 +155,8 @@ void Lan_AskChangeLanguage (void)
|
|||
|
||||
Gbl.Prefs.Language = CurrentLanguage; // Restore current language
|
||||
|
||||
/***** Display preferences *****/
|
||||
Pre_EditPrefs ();
|
||||
/***** Display settings *****/
|
||||
Set_EditSettings ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -182,8 +182,8 @@ void Lan_ChangeLanguage (void)
|
|||
Gbl.Prefs.Language != Gbl.Usrs.Me.UsrDat.Prefs.Language)
|
||||
Lan_UpdateMyLanguageToCurrentLanguage ();
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// swad_language.h: user's preferences on language
|
||||
// swad_language.h: user's settings on language
|
||||
|
||||
#ifndef _SWAD_LAN
|
||||
#define _SWAD_LAN
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
#include "swad_notice.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_tab.h"
|
||||
#include "swad_theme.h"
|
||||
#include "swad_timeline.h"
|
||||
|
@ -1442,7 +1442,7 @@ void Lay_RefreshNotifsAndConnected (void)
|
|||
else if (!(Gbl.PID % 101))
|
||||
Brw_RemoveExpiredExpandedFolders (); // Remove old expanded folders (from all users)
|
||||
else if (!(Gbl.PID % 103))
|
||||
Pre_RemoveOldPrefsFromIP (); // Remove old preferences from IP
|
||||
Set_RemoveOldSettingsFromIP (); // Remove old settings from IP
|
||||
else if (!(Gbl.PID % 107))
|
||||
Sta_RemoveOldEntriesRecentLog (); // Remove old entries in recent log table, it's a slow query
|
||||
else if (!(Gbl.PID % 109))
|
||||
|
|
|
@ -38,9 +38,9 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_hierarchy.h"
|
||||
#include "swad_MFU.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_setting.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Constants **********************************/
|
||||
|
|
|
@ -1750,7 +1750,7 @@ static void Med_AlertThirdPartyCookies (void)
|
|||
|
||||
/* Put form to change cookies preferences */
|
||||
if (!Gbl.Form.Inside)
|
||||
Lay_PutContextualLinkIconText (ActReqEdiPrf,Coo_COOKIES_ID,NULL,
|
||||
Lay_PutContextualLinkIconText (ActReqEdiSet,Coo_COOKIES_ID,NULL,
|
||||
"cog.svg",
|
||||
Txt_Settings);
|
||||
|
||||
|
|
26
swad_menu.c
26
swad_menu.c
|
@ -34,7 +34,7 @@
|
|||
#include "swad_layout.h"
|
||||
#include "swad_menu.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_tab.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -286,7 +286,7 @@ const Act_Action_t Mnu_MenuActions[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB
|
|||
ActSeeMyAgd, // 3
|
||||
ActFrmMyAcc, // 4
|
||||
ActReqEdiRecSha, // 5
|
||||
ActReqEdiPrf, // 6
|
||||
ActReqEdiSet, // 6
|
||||
0, // 7
|
||||
0, // 8
|
||||
0, // 9
|
||||
|
@ -404,15 +404,15 @@ void Mnu_WriteMenuThisTab (void)
|
|||
|
||||
void Mnu_PutIconsToSelectMenu (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_menu;
|
||||
extern const char *Hlp_PROFILE_Settings_menu;
|
||||
extern const char *Txt_Menu;
|
||||
extern const char *Txt_MENU_NAMES[Mnu_NUM_MENUS];
|
||||
Mnu_Menu_t Menu;
|
||||
|
||||
Box_StartBox (NULL,Txt_Menu,Mnu_PutIconsMenu,
|
||||
Hlp_PROFILE_Preferences_menu,Box_NOT_CLOSABLE);
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
Hlp_PROFILE_Settings_menu,Box_NOT_CLOSABLE);
|
||||
Set_StartSettingsHead ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (Menu = (Mnu_Menu_t) 0;
|
||||
Menu < Mnu_NUM_MENUS;
|
||||
Menu++)
|
||||
|
@ -422,17 +422,17 @@ void Mnu_PutIconsToSelectMenu (void)
|
|||
"PREF_OFF");
|
||||
Frm_StartForm (ActChgMnu);
|
||||
Par_PutHiddenParamUnsigned ("Menu",(unsigned) Menu);
|
||||
Ico_PutPrefIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]);
|
||||
Ico_PutSettingIconLink (Mnu_MenuIcons[Menu],Txt_MENU_NAMES[Menu]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Put contextual icons in menu preference ******************/
|
||||
/******************* Put contextual icons in menu setting ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Mnu_PutIconsMenu (void)
|
||||
|
@ -453,12 +453,12 @@ void Mnu_ChangeMenu (void)
|
|||
|
||||
/***** Store menu in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your preference about menu",
|
||||
DB_QueryUPDATE ("can not update your setting about menu",
|
||||
"UPDATE usr_data SET Menu=%u WHERE UsrCod=%ld",
|
||||
(unsigned) Gbl.Prefs.Menu,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -365,13 +365,13 @@ void Ntf_ShowMyNotifications (void)
|
|||
Ntf_WriteFormAllNotifications (AllNotifications);
|
||||
|
||||
if (NumNotifications) // TODO: Show message only when I don't have notificacions at all
|
||||
/* Put form to change notification preferences */
|
||||
/* Put form to change notification settings */
|
||||
Lay_PutContextualLinkIconText (ActMrkNtfSee,NULL,NULL,
|
||||
"eye.svg",
|
||||
Txt_Mark_all_NOTIFICATIONS_as_read);
|
||||
|
||||
/* Put form to change notification preferences */
|
||||
Lay_PutContextualLinkIconText (ActReqEdiPrf,Ntf_NOTIFICATIONS_ID,NULL,
|
||||
/* Put form to change notification settings */
|
||||
Lay_PutContextualLinkIconText (ActReqEdiSet,Ntf_NOTIFICATIONS_ID,NULL,
|
||||
"cog.svg",
|
||||
Txt_Settings);
|
||||
|
||||
|
@ -1915,7 +1915,7 @@ void Ntf_MarkAllNotifAsSeen (void)
|
|||
|
||||
void Ntf_PutFormChangeNotifSentByEMail (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_notifications;
|
||||
extern const char *Hlp_PROFILE_Settings_notifications;
|
||||
extern const char *The_ClassFormInBox[The_NUM_THEMES];
|
||||
extern const char *Txt_Save_changes;
|
||||
extern const char *Txt_Notifications;
|
||||
|
@ -1924,12 +1924,12 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
|
|||
extern const char *Txt_NOTIFY_EVENTS_PLURAL[Ntf_NUM_NOTIFY_EVENTS];
|
||||
Ntf_NotifyEvent_t NotifyEvent;
|
||||
|
||||
/***** Start section with preferences on privacy *****/
|
||||
/***** Start section with settings on privacy *****/
|
||||
Lay_StartSection (Ntf_NOTIFICATIONS_ID);
|
||||
|
||||
/***** Start box *****/
|
||||
Box_StartBox (NULL,Txt_Notifications,Ntf_PutIconsNotif,
|
||||
Hlp_PROFILE_Preferences_notifications,Box_NOT_CLOSABLE);
|
||||
Hlp_PROFILE_Settings_notifications,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Start form *****/
|
||||
Frm_StartForm (ActChgNtfPrf);
|
||||
|
@ -1992,7 +1992,7 @@ void Ntf_PutFormChangeNotifSentByEMail (void)
|
|||
/***** End box *****/
|
||||
Box_EndBox ();
|
||||
|
||||
/***** End section with preferences about notifications *****/
|
||||
/***** End section with settings about notifications *****/
|
||||
Lay_EndSection ();
|
||||
}
|
||||
|
||||
|
@ -2024,18 +2024,18 @@ static void Ntf_GetParamsNotifyEvents (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***** Change my preference about sending me notify emails about events ******/
|
||||
/******* Change my setting about sending me notify emails about events *******/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ntf_ChangeNotifyEvents (void)
|
||||
{
|
||||
extern const char *Txt_Your_preferences_about_notifications_have_changed;
|
||||
extern const char *Txt_Your_settings_about_notifications_have_changed;
|
||||
|
||||
/***** Get param with whether notify me about events *****/
|
||||
Ntf_GetParamsNotifyEvents ();
|
||||
|
||||
/***** Store preferences about notify events *****/
|
||||
DB_QueryUPDATE ("can not update user's preferences",
|
||||
/***** Store settings about notify events *****/
|
||||
DB_QueryUPDATE ("can not update user's settings",
|
||||
"UPDATE usr_data"
|
||||
" SET NotifNtfEvents=%u,EmailNtfEvents=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
|
@ -2044,7 +2044,7 @@ void Ntf_ChangeNotifyEvents (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Show message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_preferences_about_notifications_have_changed);
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Your_settings_about_notifications_have_changed);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -32,11 +32,10 @@
|
|||
|
||||
#include "swad_action.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_database.h" // TODO: REMOVE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
#include "swad_global.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_password.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_tab.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -794,12 +793,12 @@ void Par_GetMainParameters (void)
|
|||
break;
|
||||
}
|
||||
|
||||
/***** Try to get preferences changed from current IP *****/
|
||||
Pre_GetPrefsFromIP ();
|
||||
/***** Try to get settings changed from current IP *****/
|
||||
Set_GetSettingsFromIP ();
|
||||
|
||||
if (!Gbl.Session.IsOpen) // When no session open (no logged user)...
|
||||
{
|
||||
/***** Try to get preferences changed from current IP *****/
|
||||
/***** Try to get settings changed from current IP *****/
|
||||
if (Gbl.Prefs.Theme == The_THEME_UNKNOWN)
|
||||
Gbl.Prefs.Theme = The_THEME_DEFAULT;
|
||||
|
||||
|
|
|
@ -46,8 +46,8 @@
|
|||
#include "swad_logo.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_theme.h"
|
||||
#include "swad_user.h"
|
||||
|
@ -1314,13 +1314,13 @@ void Pho_ChangePhotoVisibility (void)
|
|||
Pri_PHOTO_ALLOWED_VIS);
|
||||
|
||||
/***** Store public/private photo in database *****/
|
||||
DB_QueryUPDATE ("can not update your preference about photo visibility",
|
||||
DB_QueryUPDATE ("can not update your setting about photo visibility",
|
||||
"UPDATE usr_data SET PhotoVisibility='%s' WHERE UsrCod=%ld",
|
||||
Pri_VisibilityDB[Gbl.Usrs.Me.UsrDat.PhotoVisibility],
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Show form again *****/
|
||||
Pre_EditPrefs ();
|
||||
Set_EditSettings ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1,404 +0,0 @@
|
|||
// swad_preference.c: user's preferences
|
||||
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance),
|
||||
is a web platform developed at the University of Granada (Spain),
|
||||
and used to support university teaching.
|
||||
|
||||
This file is part of SWAD core.
|
||||
Copyright (C) 1999-2019 Antonio Cañas Vargas
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/********************************** Headers **********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <linux/stddef.h> // For NULL
|
||||
#include <stdbool.h> // For boolean type
|
||||
#include <stdio.h> // For fprintf, etc.
|
||||
#include <string.h>
|
||||
|
||||
#include "swad_box.h"
|
||||
#include "swad_calendar.h"
|
||||
#include "swad_config.h"
|
||||
#include "swad_cookie.h"
|
||||
#include "swad_database.h"
|
||||
#include "swad_date.h"
|
||||
#include "swad_form.h"
|
||||
#include "swad_global.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_layout.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_menu.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** External global variables from others modules ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
extern struct Globals Gbl;
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Private constants ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Private prototypes ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pre_PutIconsToSelectSideCols (void);
|
||||
static void Pre_PutIconsSideColumns (void);
|
||||
static void Pre_UpdateSideColsOnUsrDataTable (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Edit preferences ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_EditPrefs (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_internationalization;
|
||||
extern const char *Hlp_PROFILE_Preferences_design;
|
||||
extern const char *Txt_Internationalization;
|
||||
extern const char *Txt_Design;
|
||||
|
||||
/***** Internationalization: language, first day of week, date format *****/
|
||||
Box_StartBox (NULL,Txt_Internationalization,NULL,
|
||||
Hlp_PROFILE_Preferences_internationalization,Box_NOT_CLOSABLE);
|
||||
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
|
||||
Lan_PutBoxToSelectLanguage (); // 1. Language
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
"<div class=\"FRAME_INLINE\">");
|
||||
Cal_PutIconsToSelectFirstDayOfWeek (); // 2. First day of week
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
"<div class=\"FRAME_INLINE\">");
|
||||
Dat_PutBoxToSelectDateFormat (); // 3. Date format
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Box_EndBox ();
|
||||
|
||||
/***** Design: icon set, menu, theme, side columns *****/
|
||||
Box_StartBox (NULL,Txt_Design,NULL,
|
||||
Hlp_PROFILE_Preferences_design,Box_NOT_CLOSABLE);
|
||||
fprintf (Gbl.F.Out,"<div class=\"FRAME_INLINE\">");
|
||||
Ico_PutIconsToSelectIconSet (); // 4. Icon set
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
"<div class=\"FRAME_INLINE\">");
|
||||
Mnu_PutIconsToSelectMenu (); // 5. Menu
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
"<div class=\"FRAME_INLINE\">");
|
||||
The_PutIconsToSelectTheme (); // 6. Theme
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
"<div class=\"FRAME_INLINE\">");
|
||||
Pre_PutIconsToSelectSideCols (); // 7. Side columns
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
Box_EndBox ();
|
||||
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
{
|
||||
/***** Form to set my preferences on privacy *****/
|
||||
Pri_EditMyPrivacy ();
|
||||
|
||||
/***** Form to set my preferences on cookies *****/
|
||||
Coo_EditMyPrefsOnCookies ();
|
||||
|
||||
/***** Automatic email to notify of new events *****/
|
||||
Ntf_PutFormChangeNotifSentByEMail ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Get preferences changed from current IP *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_GetPrefsFromIP (void)
|
||||
{
|
||||
unsigned long NumRows;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (Gbl.IP[0])
|
||||
{
|
||||
/***** Get preferences from database *****/
|
||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get preferences",
|
||||
"SELECT FirstDayOfWeek,DateFormat,Theme,IconSet,Menu,SideCols"
|
||||
" FROM IP_prefs WHERE IP='%s'",
|
||||
Gbl.IP);
|
||||
if (NumRows)
|
||||
{
|
||||
if (NumRows != 1)
|
||||
Lay_ShowErrorAndExit ("Internal error while getting preferences.");
|
||||
|
||||
/***** Get preferences from database *****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get first day of week (row[0]) */
|
||||
Gbl.Prefs.FirstDayOfWeek = Cal_GetFirstDayOfWeekFromStr (row[0]);
|
||||
|
||||
/* Get date format (row[1]) */
|
||||
Gbl.Prefs.DateFormat = Dat_GetDateFormatFromStr (row[1]);
|
||||
|
||||
/* Get theme (row[2]) */
|
||||
Gbl.Prefs.Theme = The_GetThemeFromStr (row[2]);
|
||||
|
||||
/* Get icon set (row[3]) */
|
||||
Gbl.Prefs.IconSet = Ico_GetIconSetFromStr (row[3]);
|
||||
|
||||
/* Get menu (row[4]) */
|
||||
Gbl.Prefs.Menu = Mnu_GetMenuFromStr (row[4]);
|
||||
|
||||
/* Get if user wants to show side columns (row[5]) */
|
||||
if (sscanf (row[5],"%u",&Gbl.Prefs.SideCols) == 1)
|
||||
{
|
||||
if (Gbl.Prefs.SideCols > Lay_SHOW_BOTH_COLUMNS)
|
||||
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||
}
|
||||
else
|
||||
Gbl.Prefs.SideCols = Cfg_DEFAULT_COLUMNS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Set preferences from current IP ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_SetPrefsFromIP (void)
|
||||
{
|
||||
extern const char *The_ThemeId[The_NUM_THEMES];
|
||||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
||||
|
||||
/***** Update preferences from current IP in database *****/
|
||||
DB_QueryREPLACE ("can not store preferences from current IP address",
|
||||
"REPLACE INTO IP_prefs"
|
||||
" (IP,UsrCod,LastChange,"
|
||||
"FirstDayOfWeek,DateFormat,Theme,IconSet,Menu,SideCols)"
|
||||
" VALUES"
|
||||
" ('%s',%ld,NOW(),"
|
||||
"%u,%u,'%s','%s',%u,%u)",
|
||||
Gbl.IP,Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
(unsigned) Gbl.Prefs.DateFormat,
|
||||
The_ThemeId[Gbl.Prefs.Theme],
|
||||
Ico_IconSetId[Gbl.Prefs.IconSet],
|
||||
(unsigned) Gbl.Prefs.Menu,
|
||||
Gbl.Prefs.SideCols);
|
||||
|
||||
/***** If a user is logged, update its preferences in database for all its IP's *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your preferences",
|
||||
"UPDATE IP_prefs"
|
||||
" SET FirstDayOfWeek=%u,DateFormat=%u,"
|
||||
"Theme='%s',IconSet='%s',Menu=%u,SideCols=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
Gbl.Prefs.FirstDayOfWeek,
|
||||
(unsigned) Gbl.Prefs.DateFormat,
|
||||
The_ThemeId[Gbl.Prefs.Theme],
|
||||
Ico_IconSetId[Gbl.Prefs.IconSet],
|
||||
(unsigned) Gbl.Prefs.Menu,
|
||||
Gbl.Prefs.SideCols,
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Remove old preferences from IP **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_RemoveOldPrefsFromIP (void)
|
||||
{
|
||||
/***** Remove old preferences *****/
|
||||
DB_QueryDELETE ("can not remove old preferences",
|
||||
"DELETE LOW_PRIORITY FROM IP_prefs"
|
||||
" WHERE LastChange<FROM_UNIXTIME(UNIX_TIMESTAMP()-%lu)",
|
||||
Cfg_TIME_TO_DELETE_IP_PREFS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************ Put icons to select the layout of the side columns *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pre_PutIconsToSelectSideCols (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_columns;
|
||||
extern const char *Txt_Columns;
|
||||
extern const char *Txt_LAYOUT_SIDE_COLUMNS[4];
|
||||
unsigned SideCols;
|
||||
char Icon[32 + 1];
|
||||
|
||||
Box_StartBox (NULL,Txt_Columns,Pre_PutIconsSideColumns,
|
||||
Hlp_PROFILE_Preferences_columns,Box_NOT_CLOSABLE);
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
for (SideCols = 0;
|
||||
SideCols <= Lay_SHOW_BOTH_COLUMNS;
|
||||
SideCols++)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">",
|
||||
SideCols == Gbl.Prefs.SideCols ? "PREF_ON" :
|
||||
"PREF_OFF");
|
||||
Frm_StartForm (ActChgCol);
|
||||
Par_PutHiddenParamUnsigned ("SideCols",SideCols);
|
||||
snprintf (Icon,sizeof (Icon),
|
||||
"layout%u%u_32x20.gif",
|
||||
SideCols >> 1,SideCols & 1);
|
||||
Ico_PutPrefIconLink (Icon,Txt_LAYOUT_SIDE_COLUMNS[SideCols]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Put contextual icons in side-columns preference ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pre_PutIconsSideColumns (void)
|
||||
{
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_SIDE_COLUMNS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Change layout of side columns ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_ChangeSideCols (void)
|
||||
{
|
||||
/***** Get param side-columns *****/
|
||||
Gbl.Prefs.SideCols = Pre_GetParamSideCols ();
|
||||
|
||||
/***** Store side colums in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Pre_UpdateSideColsOnUsrDataTable ();
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** Hide left side column ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_HideLeftCol (void)
|
||||
{
|
||||
Gbl.Prefs.SideCols &= ~Lay_SHOW_LEFT_COLUMN; // And with 1...101 to hide left column
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Pre_UpdateSideColsOnUsrDataTable ();
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** Hide right side column **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_HideRightCol (void)
|
||||
{
|
||||
Gbl.Prefs.SideCols &= ~Lay_SHOW_RIGHT_COLUMN; // And with 1...110 to hide right column
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Pre_UpdateSideColsOnUsrDataTable ();
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Show left side column **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_ShowLeftCol (void)
|
||||
{
|
||||
Gbl.Prefs.SideCols |= Lay_SHOW_LEFT_COLUMN; // Or with 10 to show left column
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Pre_UpdateSideColsOnUsrDataTable ();
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Show right side column *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_ShowRightCol (void)
|
||||
{
|
||||
Gbl.Prefs.SideCols |= Lay_SHOW_RIGHT_COLUMN; // Or with 01 to show right column
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
Pre_UpdateSideColsOnUsrDataTable ();
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Update layout of side colums on user data table **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pre_UpdateSideColsOnUsrDataTable (void)
|
||||
{
|
||||
DB_QueryUPDATE ("can not update your preference about side columns",
|
||||
"UPDATE usr_data SET SideCols=%u"
|
||||
" WHERE UsrCod=%ld",
|
||||
Gbl.Prefs.SideCols,Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Get parameter used to show/hide side columns *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Pre_GetParamSideCols (void)
|
||||
{
|
||||
return (unsigned) Par_GetParToUnsignedLong ("SideCols",
|
||||
0,
|
||||
Lay_SHOW_BOTH_COLUMNS,
|
||||
Cfg_DEFAULT_COLUMNS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********** Head to select one or several preferences using icons ************/
|
||||
/*****************************************************************************/
|
||||
/*
|
||||
+-- Container for several pref. selectors ---+
|
||||
| +One pref.selector+ +One pref.selector+ |
|
||||
| | +-----+ +-----+ | | +-----+ +-----+ | |
|
||||
| | |Icon | |Icon | | | |Icon | |Icon | | |
|
||||
| | |opt.A| |opt.B| | | |opt.A| |opt.B| | |
|
||||
| | +-----+ +-----+ | | +-----+ +-----+ | |
|
||||
| +-----------------+ +-----------------+ |
|
||||
+--------------------------------------------+
|
||||
*/
|
||||
void Pre_StartPrefsHead (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINERS\">");
|
||||
}
|
||||
|
||||
void Pre_EndPrefsHead (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
|
||||
void Pre_StartOnePrefSelector (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<div class=\"PREF_CONTAINER\">");
|
||||
}
|
||||
|
||||
void Pre_EndOnePrefSelector (void)
|
||||
{
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
// swad_preference.h: user's preferences
|
||||
|
||||
#ifndef _SWAD_PRE
|
||||
#define _SWAD_PRE
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance in Spanish),
|
||||
is a web platform developed at the University of Granada (Spain),
|
||||
and used to support university teaching.
|
||||
|
||||
This file is part of SWAD core.
|
||||
Copyright (C) 1999-2019 Antonio Cañas Vargas
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*****************************************************************************/
|
||||
/********************************* Headers ***********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public constants ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Public types ********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pre_EditPrefs (void);
|
||||
|
||||
void Pre_GetPrefsFromIP (void);
|
||||
void Pre_SetPrefsFromIP (void);
|
||||
void Pre_RemoveOldPrefsFromIP (void);
|
||||
|
||||
void Pre_ChangeSideCols (void);
|
||||
void Pre_HideLeftCol (void);
|
||||
void Pre_HideRightCol (void);
|
||||
void Pre_ShowLeftCol (void);
|
||||
void Pre_ShowRightCol (void);
|
||||
unsigned Pre_GetParamSideCols (void);
|
||||
|
||||
void Pre_StartPrefsHead (void);
|
||||
void Pre_EndPrefsHead (void);
|
||||
void Pre_StartOnePrefSelector (void);
|
||||
void Pre_EndOnePrefSelector (void);
|
||||
|
||||
#endif
|
|
@ -78,26 +78,26 @@ static void Pri_PutFormVisibility (const char *TxtLabel,
|
|||
|
||||
void Pri_EditMyPrivacy (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_privacy;
|
||||
extern const char *Txt_Please_review_your_privacy_preferences;
|
||||
extern const char *Hlp_PROFILE_Settings_privacy;
|
||||
extern const char *Txt_Please_check_your_privacy_settings;
|
||||
extern const char *Txt_Privacy;
|
||||
extern const char *Txt_Photo;
|
||||
extern const char *Txt_Basic_public_profile;
|
||||
extern const char *Txt_Extended_public_profile;
|
||||
extern const char *Txt_Timeline;
|
||||
|
||||
/***** Start section with preferences on privacy *****/
|
||||
/***** Start section with settings on privacy *****/
|
||||
Lay_StartSection (Pri_PRIVACY_ID);
|
||||
|
||||
/***** If any of my preferences about privacy is unknown *****/
|
||||
/***** If any of my settings about privacy is unknown *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.PhotoVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||
Gbl.Usrs.Me.UsrDat.BaPrfVisibility == Pri_VISIBILITY_UNKNOWN ||
|
||||
Gbl.Usrs.Me.UsrDat.ExPrfVisibility == Pri_VISIBILITY_UNKNOWN)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_review_your_privacy_preferences);
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_check_your_privacy_settings);
|
||||
|
||||
/***** Start box and table *****/
|
||||
Box_StartBoxTable (NULL,Txt_Privacy,Pri_PutIconsPrivacy,
|
||||
Hlp_PROFILE_Preferences_privacy,Box_NOT_CLOSABLE,2);
|
||||
Hlp_PROFILE_Settings_privacy,Box_NOT_CLOSABLE,2);
|
||||
|
||||
/***** Edit photo visibility *****/
|
||||
Pri_PutFormVisibility (Txt_Photo,
|
||||
|
@ -126,12 +126,12 @@ void Pri_EditMyPrivacy (void)
|
|||
/***** End table and box *****/
|
||||
Box_EndBoxTable ();
|
||||
|
||||
/***** End section with preferences on privacy *****/
|
||||
/***** End section with settings on privacy *****/
|
||||
Lay_EndSection ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put contextual icons in privacy preference ****************/
|
||||
/****************** Put contextual icons in privacy setting ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pri_PutIconsPrivacy (void)
|
||||
|
|
|
@ -39,11 +39,11 @@
|
|||
#include "swad_nickname.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_role_type.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_theme.h"
|
||||
#include "swad_timeline.h"
|
||||
#include "swad_user.h"
|
||||
|
@ -357,7 +357,7 @@ void Prf_ChangeBasicProfileVis (void)
|
|||
Pri_BASIC_PROFILE_ALLOWED_VIS);
|
||||
|
||||
/***** Store public/private photo in database *****/
|
||||
DB_QueryUPDATE ("can not update your preference"
|
||||
DB_QueryUPDATE ("can not update your setting"
|
||||
" about public profile visibility",
|
||||
"UPDATE usr_data SET BaPrfVisibility='%s'"
|
||||
" WHERE UsrCod=%ld",
|
||||
|
@ -365,7 +365,7 @@ void Prf_ChangeBasicProfileVis (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Show form again *****/
|
||||
Pre_EditPrefs ();
|
||||
Set_EditSettings ();
|
||||
}
|
||||
|
||||
void Prf_ChangeExtendedProfileVis (void)
|
||||
|
@ -377,7 +377,7 @@ void Prf_ChangeExtendedProfileVis (void)
|
|||
Pri_EXTENDED_PROFILE_ALLOWED_VIS);
|
||||
|
||||
/***** Store public/private photo in database *****/
|
||||
DB_QueryUPDATE ("can not update your preference"
|
||||
DB_QueryUPDATE ("can not update your setting"
|
||||
" about public profile visibility",
|
||||
"UPDATE usr_data SET ExPrfVisibility='%s'"
|
||||
" WHERE UsrCod=%ld",
|
||||
|
@ -385,7 +385,7 @@ void Prf_ChangeExtendedProfileVis (void)
|
|||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Show form again *****/
|
||||
Pre_EditPrefs ();
|
||||
Set_EditSettings ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_string.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
|
@ -268,7 +268,7 @@ static void Prj_ShowProjectsInCurrentPage (void)
|
|||
|
||||
/***** Put forms to choice which projects to show *****/
|
||||
/* 1st. row */
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Prj_ShowFormToFilterByMy_All ();
|
||||
Prj_ShowFormToFilterByPreassignedNonPreassig ();
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
|
@ -281,7 +281,7 @@ static void Prj_ShowProjectsInCurrentPage (void)
|
|||
default: // Students will see only visible projects
|
||||
break;
|
||||
}
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
/* 2nd. row */
|
||||
Prj_ShowFormToFilterByDpt ();
|
||||
|
||||
|
@ -368,7 +368,7 @@ static void Prj_ShowFormToFilterByMy_All (void)
|
|||
"sitemap.svg", // Prj_ALL_PROJECTS
|
||||
};
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (My_All = (Prj_WhoseProjects_t) 0;
|
||||
My_All <= (Prj_WhoseProjects_t) (Prj_NUM_WHOSE_PROJECTS - 1);
|
||||
My_All++)
|
||||
|
@ -385,12 +385,12 @@ static void Prj_ShowFormToFilterByMy_All (void)
|
|||
Gbl.Prjs.SelectedOrder,
|
||||
Gbl.Prjs.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutPrefIconLink (WhoseProjectsIcon[My_All],
|
||||
Ico_PutSettingIconLink (WhoseProjectsIcon[My_All],
|
||||
Txt_PROJECT_MY_ALL_PROJECTS[My_All]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -403,7 +403,7 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void)
|
|||
struct Prj_Filter Filter;
|
||||
Prj_PreassignedNonpreassig_t PreNon;
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (PreNon = (Prj_PreassignedNonpreassig_t) 0;
|
||||
PreNon <= (Prj_PreassignedNonpreassig_t) (Prj_NUM_PREASSIGNED_NONPREASSIG - 1);
|
||||
PreNon++)
|
||||
|
@ -420,12 +420,12 @@ static void Prj_ShowFormToFilterByPreassignedNonPreassig (void)
|
|||
Gbl.Prjs.SelectedOrder,
|
||||
Gbl.Prjs.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutPrefIconLink (PreassignedNonpreassigImage[PreNon],
|
||||
Ico_PutSettingIconLink (PreassignedNonpreassigImage[PreNon],
|
||||
Txt_PROJECT_PREASSIGNED_NONPREASSIGNED_PLURAL[PreNon]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -443,7 +443,7 @@ static void Prj_ShowFormToFilterByHidden (void)
|
|||
"eye.svg", // Prj_VISIBL
|
||||
};
|
||||
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (HidVis = (Prj_HiddenVisibl_t) 0;
|
||||
HidVis <= (Prj_HiddenVisibl_t) (Prj_NUM_HIDDEN_VISIBL - 1);
|
||||
HidVis++)
|
||||
|
@ -460,12 +460,12 @@ static void Prj_ShowFormToFilterByHidden (void)
|
|||
Gbl.Prjs.SelectedOrder,
|
||||
Gbl.Prjs.CurrentPage,
|
||||
-1L);
|
||||
Ico_PutPrefIconLink (HiddenVisiblIcon[HidVis],
|
||||
Ico_PutSettingIconLink (HiddenVisiblIcon[HidVis],
|
||||
Txt_PROJECT_HIDDEN_VISIBL_PROJECTS[HidVis]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Set_EndOneSettingSelector ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -44,11 +44,11 @@
|
|||
#include "swad_network.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_photo.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_record.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_user.h"
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
/****************************** Initial set up *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_Setup (void)
|
||||
void SUp_SetUp (void)
|
||||
{
|
||||
/***** Create tables in database *****/
|
||||
DB_CreateTablesIfNotExist ();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// swad_setup.h: initial setup after installation
|
||||
|
||||
#ifndef _SWAD_SET
|
||||
#define _SWAD_SET
|
||||
#ifndef _SWAD_SUP
|
||||
#define _SWAD_SUP
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance in Spanish),
|
||||
is a web platform developed at the University of Granada (Spain),
|
||||
|
@ -35,6 +35,6 @@
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Set_Setup (void);
|
||||
void SUp_SetUp (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
#include "swad_notification.h"
|
||||
#include "swad_pagination.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_table.h"
|
||||
|
||||
|
@ -230,9 +230,9 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst)
|
|||
/***** Select whether show only my groups or all groups *****/
|
||||
if (Gbl.CurrentCrs.Grps.NumGrps)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Set_StartSettingsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeeAllSvy,Svy_ParamsWhichGroupsToShow);
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
if (Gbl.Svys.Num)
|
||||
|
|
|
@ -7317,7 +7317,7 @@ void Tst_SelUsrsToSeeUsrsTestResults (void)
|
|||
|
||||
/***** Get and update type of list,
|
||||
number of columns in class photo
|
||||
and preference about view photos *****/
|
||||
and preference about viewing photos *****/
|
||||
Usr_GetAndUpdatePrefsAboutUsrList ();
|
||||
|
||||
/***** Get groups to show ******/
|
||||
|
|
60
swad_text.c
60
swad_text.c
|
@ -19778,7 +19778,7 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
"Cartão"
|
||||
#endif
|
||||
,
|
||||
// 6: ActReqEdiPrf
|
||||
// 6: ActReqEdiSet
|
||||
#if L==1 // ca
|
||||
"Configuració"
|
||||
#elif L==2 // de
|
||||
|
@ -21645,25 +21645,25 @@ const char *Txt_MENU_SUBTITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
"Cartão"
|
||||
#endif
|
||||
,
|
||||
// 6: ActReqEdiPrf
|
||||
// 6: ActReqEdiSet
|
||||
#if L==1 // ca
|
||||
"Les meves preferències (idioma, colors, notificacions …)"
|
||||
"Els meus ajustos (idioma, colors, notificacions…)"
|
||||
#elif L==2 // de
|
||||
"Einstellungen"
|
||||
"Meine Einstellungen (Sprache, Farben, Benachrichtigungen…)"
|
||||
#elif L==3 // en
|
||||
"Preferences"
|
||||
"My settings (language, colors, notifications…)"
|
||||
#elif L==4 // es
|
||||
"Mis preferencias (idioma, colores, notificaciones…)"
|
||||
"Mis ajustes (idioma, colores, notificaciones…)"
|
||||
#elif L==5 // fr
|
||||
"Préférences"
|
||||
"Mes paramètres (langue, couleurs, notifications…)"
|
||||
#elif L==6 // gn
|
||||
"Mis preferencias (idioma, colores, notificaciones…)" // Okoteve traducción
|
||||
"Mis ajustes (idioma, colores, notificaciones…)" // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Preferenze"
|
||||
"Le mie impostazioni (lingua, colori, notifiche…)"
|
||||
#elif L==8 // pl
|
||||
"Preferencje"
|
||||
"Moje ustawienia (język, kolory, powiadomienia…)"
|
||||
#elif L==9 // pt
|
||||
"Preferências"
|
||||
"Minhas configurações (idioma, cores, notificações…)"
|
||||
#endif
|
||||
,
|
||||
NULL, // 7
|
||||
|
@ -29161,25 +29161,25 @@ const char *Txt_Please_fill_in_your_record_card_including_your_sex =
|
|||
" incluindo o seu sexo.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Please_review_your_privacy_preferences =
|
||||
const char *Txt_Please_check_your_privacy_settings =
|
||||
#if L==1 // ca
|
||||
"Si us plau, revisi les seves preferències de privacitat.";
|
||||
"Si us plau, comproveu la seva configuració de privacitat.";
|
||||
#elif L==2 // de
|
||||
"Bitte überprüfen Sie Ihre Datenschutzeinstellungen.";
|
||||
#elif L==3 // en
|
||||
"Please review your privacy preferences.";
|
||||
"Please review your privacy settings.";
|
||||
#elif L==4 // es
|
||||
"Por favor, revise sus preferencias de privacidad.";
|
||||
"Por favor, revise sus ajustes de privacidad.";
|
||||
#elif L==5 // fr
|
||||
"S'il vous plaît revoir vos préférences de privacité.";
|
||||
"S'il vous plaît, vérifiez vos paramètres de privacité.";
|
||||
#elif L==6 // gn
|
||||
"Por favor, revise sus preferencias de privacidad."; // Okoteve traducción
|
||||
"Por favor, revise sus ajustes de privacidad."; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Si prega di rivedere le vostre preferenze di privatezza.";
|
||||
"Per favore, controlla le tue impostazioni sulla privacy.";
|
||||
#elif L==8 // pl
|
||||
"Proszę sprawdzić ustawienia prywatności.";
|
||||
"Sprawdź ustawienia prywatności.";
|
||||
#elif L==9 // pt
|
||||
"Por favor, revise suas preferências de privacidade.";
|
||||
"Por favor, verifique suas configurações de privacidade.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Please_select_the_country_of_your_institution =
|
||||
|
@ -56537,25 +56537,25 @@ const char *Txt_Your_personal_data_have_been_updated =
|
|||
"Seus dados pessoais foram atualizados.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Your_preferences_about_notifications_have_changed =
|
||||
const char *Txt_Your_settings_about_notifications_have_changed =
|
||||
#if L==1 // ca
|
||||
"Les seves preferències sobre les notificacions han canviat.";
|
||||
"La seva configuració de les notificacions ha canviat.";
|
||||
#elif L==2 // de
|
||||
"Your preferences about notifications have changed."; // Need Übersetzung
|
||||
"Ihre Einstellungen zu Benachrichtigungen haben sich geändert.";
|
||||
#elif L==3 // en
|
||||
"Your preferences about notifications have changed.";
|
||||
"Your settings about notifications have changed.";
|
||||
#elif L==4 // es
|
||||
"Sus preferencias sobre las notificaciones han cambiado.";
|
||||
"Sus ajustes sobre las notificaciones han cambiado.";
|
||||
#elif L==5 // fr
|
||||
"Your preferences about notifications have changed."; // Besoin de traduction
|
||||
"Vos paramètres concernant les notifications ont changé.";
|
||||
#elif L==6 // gn
|
||||
"Sus preferencias sobre las notificaciones han cambiado."; // Okoteve traducción
|
||||
"Sus ajustes sobre las notificaciones han cambiado."; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Le tue preferenze sulle notifiche sono cambiate.";
|
||||
"Le tue impostazioni sulle notifiche sono cambiate.";
|
||||
#elif L==8 // pl
|
||||
"Your preferences about notifications have changed."; // Potrzebujesz tlumaczenie
|
||||
"Twoje ustawienia dotyczące powiadomień uległy zmianie.";
|
||||
#elif L==9 // pt
|
||||
"Suas preferências sobre notificações foram alteradas.";
|
||||
"Suas configurações sobre notificações foram alteradas.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Your_record_card_in_this_course_has_been_updated =
|
||||
|
|
|
@ -320,23 +320,23 @@ const char *Txt_If_you_no_longer_wish_to_receive_email_notifications_NO_HTML[1 +
|
|||
{
|
||||
"",
|
||||
"Si no desitgeu rebre més avisos per correu,"
|
||||
" desactiveu la opció corresponent en les preferències del seu perfil.",
|
||||
" desactiveu la opció corresponent en els ajustos del seu perfil.",
|
||||
"Wenn Sie nicht mehr erhalten möchten, E-Mail-Benachrichtigungen,"
|
||||
" Deaktivieren Sie die Option in den Einstellungen Ihres Profils.",
|
||||
" Deaktivieren Sie die Option in Ihren Profileinstellungen.",
|
||||
"If you no longer wish to receive email notifications,"
|
||||
" uncheck the option in the preferences of your profile.",
|
||||
" uncheck the option in your profile settings.",
|
||||
"Si no desea recibir más avisos por correo,"
|
||||
" desactive la opción correspondiente en las preferencias de su perfil.",
|
||||
" desactive la opción correspondiente en los ajustes de su perfil.",
|
||||
"Si vous ne souhaitez plus recevoir de notifications par email,"
|
||||
" décochez l'option dans les préférences de votre profil.",
|
||||
" décochez l'option dans les paramètres de votre profil.",
|
||||
"Si no desea recibir más avisos por correo,"
|
||||
" desactive la opción correspondiente en las preferencias de su perfil.", // Okoteve traducción
|
||||
" desactive la opción correspondiente en los ajustes de su perfil.", // Okoteve traducción
|
||||
"Se non desideri più ricevere notifiche via email,"
|
||||
" deselezionare l'opzione nelle preferenze del tuo profilo.",
|
||||
" deselezionare l'opzione nelle impostazioni del tuo profilo.",
|
||||
"Jesli nie chcesz otrzymywac powiadomien email,"
|
||||
" usuń zaznaczenie opcje w ustawieniach swojego profilu.",
|
||||
" odznacz opcję w ustawieniach swojego profilu.",
|
||||
"Se já não desejar receber notificações por email,"
|
||||
" desmarque a opção nas preferências do seu perfil.",
|
||||
" desmarque a opção nas configurações do seu perfil.",
|
||||
};
|
||||
|
||||
const char *Txt_Institutions_NO_HTML =
|
||||
|
|
24
swad_theme.c
24
swad_theme.c
|
@ -35,7 +35,7 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_layout.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_theme.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -261,15 +261,15 @@ static void The_PutIconsTheme (void);
|
|||
|
||||
void The_PutIconsToSelectTheme (void)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Preferences_theme;
|
||||
extern const char *Hlp_PROFILE_Settings_theme;
|
||||
extern const char *Txt_Theme_SKIN;
|
||||
The_Theme_t Theme;
|
||||
char Icon[PATH_MAX + 1];
|
||||
|
||||
Box_StartBox (NULL,Txt_Theme_SKIN,The_PutIconsTheme,
|
||||
Hlp_PROFILE_Preferences_theme,Box_NOT_CLOSABLE);
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
Hlp_PROFILE_Settings_theme,Box_NOT_CLOSABLE);
|
||||
Set_StartSettingsHead ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (Theme = (The_Theme_t) 0;
|
||||
Theme < The_NUM_THEMES;
|
||||
Theme++)
|
||||
|
@ -283,17 +283,17 @@ void The_PutIconsToSelectTheme (void)
|
|||
"%s/%s/theme_32x20.gif",
|
||||
Cfg_ICON_FOLDER_THEMES,
|
||||
The_ThemeId[Theme]);
|
||||
Ico_PutPrefIconLink (Icon,The_ThemeNames[Theme]);
|
||||
Ico_PutSettingIconLink (Icon,The_ThemeNames[Theme]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
Box_EndBox ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************** Put contextual icons in theme preference ******************/
|
||||
/****************** Put contextual icons in theme setting ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void The_PutIconsTheme (void)
|
||||
|
@ -324,14 +324,14 @@ void The_ChangeTheme (void)
|
|||
|
||||
/***** Store theme in database *****/
|
||||
if (Gbl.Usrs.Me.Logged)
|
||||
DB_QueryUPDATE ("can not update your preference about theme",
|
||||
DB_QueryUPDATE ("can not update your setting about theme",
|
||||
"UPDATE usr_data SET Theme='%s'"
|
||||
" WHERE UsrCod=%ld",
|
||||
The_ThemeId[Gbl.Prefs.Theme],
|
||||
Gbl.Usrs.Me.UsrDat.UsrCod);
|
||||
|
||||
/***** Set preferences from current IP *****/
|
||||
Pre_SetPrefsFromIP ();
|
||||
/***** Set settings from current IP *****/
|
||||
Set_SetSettingsFromIP ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
#include "swad_notice.h"
|
||||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_profile.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_timeline.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1135,9 +1135,9 @@ static void TL_PutFormWhichUsrs (void)
|
|||
"users.svg", // TL_USRS_ALL
|
||||
};
|
||||
|
||||
/***** Preference selector for which users *****/
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
/***** Setting selector for which users *****/
|
||||
Set_StartSettingsHead ();
|
||||
Set_StartOneSettingSelector ();
|
||||
for (WhichUsrs = (TL_WhichUsrs_t) 1;
|
||||
WhichUsrs < TL_NUM_WHICH_USRS;
|
||||
WhichUsrs++)
|
||||
|
@ -1147,12 +1147,12 @@ static void TL_PutFormWhichUsrs (void)
|
|||
"PREF_OFF");
|
||||
Frm_StartForm (ActSeeSocTmlGbl);
|
||||
Par_PutHiddenParamUnsigned ("WhichUsrs",WhichUsrs);
|
||||
Ico_PutPrefIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]);
|
||||
Ico_PutSettingIconLink (Icon[WhichUsrs],Txt_TIMELINE_WHICH_USERS[WhichUsrs]);
|
||||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
}
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
|
||||
/***** Show warning if I do not follow anyone *****/
|
||||
if (Gbl.Timeline.WhichUsrs == TL_USRS_FOLLOWED)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_language.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_timetable.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -371,8 +371,8 @@ void TT_ShowClassTimeTable (void)
|
|||
TT_ShowTimeTableGrpsSelected ();
|
||||
else
|
||||
{
|
||||
/***** Preference selector *****/
|
||||
Pre_StartPrefsHead ();
|
||||
/***** Setting selector *****/
|
||||
Set_StartSettingsHead ();
|
||||
|
||||
/* Select whether show only my groups or all groups */
|
||||
if ( Gbl.TimeTable.Type == TT_MY_TIMETABLE ||
|
||||
|
@ -384,7 +384,7 @@ void TT_ShowClassTimeTable (void)
|
|||
Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Gbl.TimeTable.Type],
|
||||
Grp_PutParamWhichGrps);
|
||||
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
/***** Show the time table *****/
|
||||
|
|
48
swad_user.c
48
swad_user.c
|
@ -57,11 +57,11 @@
|
|||
#include "swad_notification.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_password.h"
|
||||
#include "swad_preference.h"
|
||||
#include "swad_privacy.h"
|
||||
#include "swad_QR.h"
|
||||
#include "swad_record.h"
|
||||
#include "swad_role.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_tab.h"
|
||||
#include "swad_table.h"
|
||||
#include "swad_user.h"
|
||||
|
@ -549,7 +549,7 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
|||
"NotifNtfEvents," // row[24]
|
||||
"EmailNtfEvents," // row[25]
|
||||
|
||||
// Preferences (usually not necessary
|
||||
// Settings (usually not necessary
|
||||
// when getting another user's data)
|
||||
"Language," // row[26]
|
||||
"FirstDayOfWeek," // row[27]
|
||||
|
@ -666,7 +666,7 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,Usr_GetPrefs_t GetPrefs)
|
|||
if (UsrDat->NtfEvents.SendEmail >= (1 << Ntf_NUM_NOTIFY_EVENTS)) // Maximum binary value for NotifyEvents is 000...0011...11
|
||||
UsrDat->NtfEvents.SendEmail = 0;
|
||||
|
||||
/***** Get user's preferences *****/
|
||||
/***** Get user's settings *****/
|
||||
if (GetPrefs == Usr_GET_PREFS)
|
||||
{
|
||||
/* Get language (row[26]) */
|
||||
|
@ -2999,8 +2999,8 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
Act_AdjustCurrentAction ();
|
||||
Ses_CreateSession ();
|
||||
|
||||
/* Set preferences from current IP */
|
||||
Pre_SetPrefsFromIP ();
|
||||
/* Set settings from current IP */
|
||||
Set_SetSettingsFromIP ();
|
||||
|
||||
/* Send message via email to confirm the new email address */
|
||||
Mai_SendMailMsgToConfirmEmail ();
|
||||
|
@ -3040,7 +3040,7 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
Act_AdjustCurrentAction ();
|
||||
Ses_CreateSession ();
|
||||
|
||||
Pre_SetPrefsFromIP (); // Set preferences from current IP
|
||||
Set_SetSettingsFromIP (); // Set settings from current IP
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3065,7 +3065,7 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
Act_AdjustCurrentAction ();
|
||||
Ses_CreateSession ();
|
||||
|
||||
Pre_SetPrefsFromIP (); // Set preferences from current IP
|
||||
Set_SetSettingsFromIP (); // Set settings from current IP
|
||||
}
|
||||
else
|
||||
FormLogin.PutForm = true;
|
||||
|
@ -3314,7 +3314,7 @@ static void Usr_ShowAlertThereAreMoreThanOneUsr (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Set my preferences and my roles ***********************/
|
||||
/********************** Set my settings and my roles *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_SetMyPrefsAndRoles (void)
|
||||
|
@ -3329,7 +3329,7 @@ static void Usr_SetMyPrefsAndRoles (void)
|
|||
if (Gbl.Usrs.Me.UsrDat.Prefs.Language == Lan_LANGUAGE_UNKNOWN) // I have not chosen language
|
||||
Lan_UpdateMyLanguageToCurrentLanguage (); // Update my language in database
|
||||
|
||||
/***** Set preferences from my preferences *****/
|
||||
/***** Set settings from my settings *****/
|
||||
Gbl.Prefs.FirstDayOfWeek = Gbl.Usrs.Me.UsrDat.Prefs.FirstDayOfWeek;
|
||||
Gbl.Prefs.DateFormat = Gbl.Usrs.Me.UsrDat.Prefs.DateFormat;
|
||||
Gbl.Prefs.Menu = Gbl.Usrs.Me.UsrDat.Prefs.Menu;
|
||||
|
@ -5948,8 +5948,8 @@ void Usr_FreeListOtherRecipients (void)
|
|||
|
||||
void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction)
|
||||
{
|
||||
Pre_StartPrefsHead ();
|
||||
Pre_StartOnePrefSelector ();
|
||||
Set_StartSettingsHead ();
|
||||
Set_StartOneSettingSelector ();
|
||||
|
||||
/***** Select Usr_LIST_AS_CLASS_PHOTO *****/
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">",
|
||||
|
@ -5982,8 +5982,8 @@ void Usr_ShowFormsToSelectUsrListType (Act_Action_t NextAction)
|
|||
Frm_EndForm ();
|
||||
fprintf (Gbl.F.Out,"</div>");
|
||||
|
||||
Pre_EndOnePrefSelector ();
|
||||
Pre_EndPrefsHead ();
|
||||
Set_EndOneSettingSelector ();
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -6509,7 +6509,7 @@ void Usr_ListAllDataGsts (void)
|
|||
|
||||
/***** Get and update type of list,
|
||||
number of columns in class photo
|
||||
and preference about view photos *****/
|
||||
and preference about viewing photos *****/
|
||||
Usr_GetAndUpdatePrefsAboutUsrList ();
|
||||
|
||||
/***** Get scope *****/
|
||||
|
@ -6627,7 +6627,7 @@ void Usr_ListAllDataStds (void)
|
|||
|
||||
/***** Get and update type of list,
|
||||
number of columns in class photo
|
||||
and preference about view photos *****/
|
||||
and preference about viewing photos *****/
|
||||
Usr_GetAndUpdatePrefsAboutUsrList ();
|
||||
|
||||
/***** Get scope *****/
|
||||
|
@ -6865,7 +6865,7 @@ void Usr_ListAllDataTchs (void)
|
|||
|
||||
/***** Get and update type of list,
|
||||
number of columns in class photo
|
||||
and preference about view photos *****/
|
||||
and preference about viewing photos *****/
|
||||
Usr_GetAndUpdatePrefsAboutUsrList ();
|
||||
|
||||
/***** Get scope *****/
|
||||
|
@ -7133,7 +7133,7 @@ void Usr_ListDataAdms (void)
|
|||
|
||||
/***** Get and update type of list,
|
||||
number of columns in class photo
|
||||
and preference about view photos *****/
|
||||
and preference about viewing photos *****/
|
||||
Usr_GetAndUpdatePrefsAboutUsrList ();
|
||||
|
||||
/***** Get scope *****/
|
||||
|
@ -7222,9 +7222,9 @@ void Usr_ListDataAdms (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Put hidden parameters with type of list, *****************/
|
||||
/****************** number of columns in class photo *************************/
|
||||
/****************** and preference about view photos *************************/
|
||||
/**************** Put hidden parameters with type of list, *******************/
|
||||
/**************** number of columns in class photo *******************/
|
||||
/**************** and preference about viewing photos *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_PutParamsPrefsAboutUsrList (void)
|
||||
|
@ -7235,9 +7235,9 @@ void Usr_PutParamsPrefsAboutUsrList (void)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Get and update type of list, **********************/
|
||||
/********************* number of columns in class photo **********************/
|
||||
/********************* and preference about view photos **********************/
|
||||
/****************** Get and update type of list, **********************/
|
||||
/****************** number of columns in class photo **********************/
|
||||
/****************** and preference about viewing photos **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_GetAndUpdatePrefsAboutUsrList (void)
|
||||
|
@ -7248,7 +7248,7 @@ void Usr_GetAndUpdatePrefsAboutUsrList (void)
|
|||
/***** Get and update number of columns in class photo *****/
|
||||
Usr_GetAndUpdateColsClassPhoto ();
|
||||
|
||||
/***** Get and update preference about view photos *****/
|
||||
/***** Get and update preference about viewing photos *****/
|
||||
Usr_GetAndUpdatePrefAboutListWithPhotos ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue