mirror of https://github.com/acanas/swad-core.git
Version 22.27: Sep 24, 2022 New module swad_browser_resource.
This commit is contained in:
parent
aa9dd28b03
commit
85e8cda5c7
7
Makefile
7
Makefile
|
@ -33,8 +33,8 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_admin.o \
|
|||
swad_assignment_resource.o swad_attendance.o swad_attendance_database.o \
|
||||
swad_autolink.o \
|
||||
swad_banner.o swad_banner_database.o swad_box.o swad_browser.o \
|
||||
swad_browser_database.o swad_building.o swad_building_database.o \
|
||||
swad_button.o \
|
||||
swad_browser_database.o swad_browser_resource.o swad_building.o \
|
||||
swad_building_database.o swad_button.o \
|
||||
swad_calendar.o swad_call_for_exam.o swad_call_for_exam_resource.o \
|
||||
swad_call_for_exam_database.o swad_center.o swad_center_config.o \
|
||||
swad_center_database.o swad_chat.o swad_chat_database.o swad_config.o \
|
||||
|
@ -86,7 +86,8 @@ OBJS = swad_account.o swad_account_database.o swad_action.o swad_admin.o \
|
|||
swad_scope.o swad_search.o swad_session.o swad_session_database.o \
|
||||
swad_setting.o swad_setting_database.o swad_statistic.o \
|
||||
swad_statistic_database.o swad_string.o swad_survey.o \
|
||||
swad_survey_database.o swad_syllabus.o swad_system_config.o \
|
||||
swad_survey_database.o swad_survey_resource.o swad_syllabus.o \
|
||||
swad_system_config.o \
|
||||
swad_tab.o swad_tag.o swad_tag_database.o swad_test.o \
|
||||
swad_test_database.o swad_test_config.o swad_test_print.o \
|
||||
swad_test_visibility.o swad_theme.o swad_timeline.o \
|
||||
|
|
16
swad_API.c
16
swad_API.c
|
@ -242,7 +242,7 @@ static int API_CheckCourseAndGroupCodes (struct soap *soap,
|
|||
static int API_GenerateNewAPIKey (struct soap *soap,
|
||||
long UsrCod,
|
||||
char APIKey[API_BYTES_KEY + 1]);
|
||||
static bool API_GetSomeUsrDataFromUsrCod (struct UsrData *UsrDat,long CrsCod);
|
||||
static bool API_GetSomeUsrDataFromUsrCod (struct Usr_Data *UsrDat,long CrsCod);
|
||||
|
||||
static int API_CheckParamsNewAccount (char *NewNickWithArr, // Input
|
||||
char NewNickWithoutArr[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1], // Output
|
||||
|
@ -262,7 +262,7 @@ static void API_CopyListUsers (struct soap *soap,
|
|||
Rol_Role_t Role,
|
||||
struct swad__getUsersOutput *getUsersOut);
|
||||
static void API_CopyUsrData (struct soap *soap,
|
||||
struct swad__user *Usr,struct UsrData *UsrDat,
|
||||
struct swad__user *Usr,struct Usr_Data *UsrDat,
|
||||
bool UsrIDIsVisible);
|
||||
|
||||
static void API_GetListGrpsInAttendanceEventFromDB (struct soap *soap,
|
||||
|
@ -534,7 +534,7 @@ static int API_GenerateNewAPIKey (struct soap *soap,
|
|||
/*****************************************************************************/
|
||||
// Return false if UsrDat->UsrCod does not exist ini database
|
||||
|
||||
static bool API_GetSomeUsrDataFromUsrCod (struct UsrData *UsrDat,long CrsCod)
|
||||
static bool API_GetSomeUsrDataFromUsrCod (struct Usr_Data *UsrDat,long CrsCod)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -1736,7 +1736,7 @@ static void API_CopyListUsers (struct soap *soap,
|
|||
{
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ICanSeeUsrID;
|
||||
|
||||
/***** Initialize result *****/
|
||||
|
@ -2184,7 +2184,7 @@ int swad__sendMyGroups (struct soap *soap,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void API_CopyUsrData (struct soap *soap,
|
||||
struct swad__user *Usr,struct UsrData *UsrDat,
|
||||
struct swad__user *Usr,struct Usr_Data *UsrDat,
|
||||
bool UsrIDIsVisible)
|
||||
{
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
|
@ -4815,7 +4815,7 @@ static bool API_WriteRowFileBrowser (unsigned Level,Brw_FileType_t FileType,cons
|
|||
{
|
||||
extern const char *Txt_NEW_LINE;
|
||||
extern const char *Txt_LICENSES[Brw_NUM_LICENSES];
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
|
||||
/***** Is this row hidden or visible? *****/
|
||||
|
@ -4893,7 +4893,7 @@ int swad__getFile (struct soap *soap,
|
|||
{
|
||||
extern const char *Txt_LICENSES[Brw_NUM_LICENSES];
|
||||
int ReturnCode;
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||
|
||||
|
@ -5056,7 +5056,7 @@ int swad__getMarks (struct soap *soap,
|
|||
struct swad__getMarksOutput *getMarksOut) // output
|
||||
{
|
||||
int ReturnCode;
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1]; // Not used
|
||||
char *ContentStr;
|
||||
size_t Length;
|
||||
|
|
28
swad_ID.c
28
swad_ID.c
|
@ -70,7 +70,7 @@ const char *ID_ID_SECTION_ID = "id_section";
|
|||
|
||||
static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned MinDigits);
|
||||
|
||||
static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
|
||||
static void ID_PutLinkToConfirmID (struct Usr_Data *UsrDat,unsigned NumID,
|
||||
const char *Anchor);
|
||||
|
||||
static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID);
|
||||
|
@ -78,14 +78,14 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID);
|
|||
static void ID_PutParamsRemoveMyID (void *ID);
|
||||
static void ID_PutParamsRemoveOtherID (void *ID);
|
||||
|
||||
static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe);
|
||||
static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe);
|
||||
static void ID_RemoveUsrID (const struct Usr_Data *UsrDat,bool ItsMe);
|
||||
static void ID_NewUsrID (const struct Usr_Data *UsrDat,bool ItsMe);
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Get list of IDs of a user ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ID_GetListIDsFromUsrCod (struct UsrData *UsrDat)
|
||||
void ID_GetListIDsFromUsrCod (struct Usr_Data *UsrDat)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -130,7 +130,7 @@ void ID_GetListIDsFromUsrCod (struct UsrData *UsrDat)
|
|||
/***************** Free memory allocated for list of IDs *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ID_ReallocateListIDs (struct UsrData *UsrDat,unsigned NumIDs)
|
||||
void ID_ReallocateListIDs (struct Usr_Data *UsrDat,unsigned NumIDs)
|
||||
{
|
||||
/***** Free list of IDs if used *****/
|
||||
ID_FreeListIDs (UsrDat);
|
||||
|
@ -147,7 +147,7 @@ void ID_ReallocateListIDs (struct UsrData *UsrDat,unsigned NumIDs)
|
|||
/***************** Free memory allocated for list of IDs *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ID_FreeListIDs (struct UsrData *UsrDat)
|
||||
void ID_FreeListIDs (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Free list *****/
|
||||
if (UsrDat->IDs.Num && UsrDat->IDs.List)
|
||||
|
@ -164,9 +164,9 @@ void ID_FreeListIDs (struct UsrData *UsrDat)
|
|||
// Returns the number of users with any of these IDs
|
||||
// The list of users' codes is allocated inside this function and should be freed by caller
|
||||
|
||||
unsigned ID_GetListUsrCodsFromUsrID (struct UsrData *UsrDat,
|
||||
unsigned ID_GetListUsrCodsFromUsrID (struct Usr_Data *UsrDat,
|
||||
const char *EncryptedPassword, // If NULL or empty ==> do not check password
|
||||
struct ListUsrCods *ListUsrCods,
|
||||
struct Usr_ListUsrCods *ListUsrCods,
|
||||
bool OnlyConfirmedIDs)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
|
@ -303,7 +303,7 @@ static bool ID_CheckIfUsrIDIsValidUsingMinDigits (const char *UsrID,unsigned Min
|
|||
/*************************** Write list of user's ID *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ID_WriteUsrIDs (struct UsrData *UsrDat,const char *Anchor)
|
||||
void ID_WriteUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
||||
{
|
||||
unsigned NumID;
|
||||
bool ICanSeeUsrID;
|
||||
|
@ -342,7 +342,7 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat,const char *Anchor)
|
|||
/***************** Check if I can see another user's IDs *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat)
|
||||
bool ID_ICanSeeOtherUsrIDs (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
if (Usr_ItsMe (UsrDat->UsrCod))
|
||||
return true;
|
||||
|
@ -387,7 +387,7 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat)
|
|||
/****************** Put a link to confirm another user's ID ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
|
||||
static void ID_PutLinkToConfirmID (struct Usr_Data *UsrDat,unsigned NumID,
|
||||
const char *Anchor)
|
||||
{
|
||||
extern const char *Txt_Confirm_ID;
|
||||
|
@ -529,7 +529,7 @@ static void ID_ShowFormChangeUsrID (bool ItsMe,bool IShouldFillInID)
|
|||
[Rol_INS_ADM] = {ActRemID_Oth,ActNewID_Oth},
|
||||
[Rol_SYS_ADM] = {ActRemID_Oth,ActNewID_Oth},
|
||||
};
|
||||
const struct UsrData *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat :
|
||||
const struct Usr_Data *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat :
|
||||
&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/***** Show possible alerts *****/
|
||||
|
@ -711,7 +711,7 @@ void ID_RemoveOtherUsrID (void)
|
|||
/***************************** Remove user's ID ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
||||
static void ID_RemoveUsrID (const struct Usr_Data *UsrDat,bool ItsMe)
|
||||
{
|
||||
extern const char *Txt_ID_X_removed;
|
||||
extern const char *Txt_You_can_not_delete_this_ID;
|
||||
|
@ -801,7 +801,7 @@ void ID_NewOtherUsrID (void)
|
|||
/***************************** New user's ID *********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
||||
static void ID_NewUsrID (const struct Usr_Data *UsrDat,bool ItsMe)
|
||||
{
|
||||
extern const char *Txt_The_ID_X_matches_one_of_the_existing;
|
||||
extern const char *Txt_The_ID_X_has_been_confirmed;
|
||||
|
|
14
swad_ID.h
14
swad_ID.h
|
@ -55,12 +55,12 @@ struct ListIDs
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ID_GetListIDsFromUsrCod (struct UsrData *UsrDat);
|
||||
void ID_ReallocateListIDs (struct UsrData *UsrDat,unsigned NumIDs);
|
||||
void ID_FreeListIDs (struct UsrData *UsrDat);
|
||||
unsigned ID_GetListUsrCodsFromUsrID (struct UsrData *UsrDat,
|
||||
void ID_GetListIDsFromUsrCod (struct Usr_Data *UsrDat);
|
||||
void ID_ReallocateListIDs (struct Usr_Data *UsrDat,unsigned NumIDs);
|
||||
void ID_FreeListIDs (struct Usr_Data *UsrDat);
|
||||
unsigned ID_GetListUsrCodsFromUsrID (struct Usr_Data *UsrDat,
|
||||
const char *EncryptedPassword, // If NULL or empty ==> do not check password
|
||||
struct ListUsrCods *ListUsrCods,
|
||||
struct Usr_ListUsrCods *ListUsrCods,
|
||||
bool OnlyConfirmedIDs);
|
||||
|
||||
void ID_PutParamOtherUsrIDPlain (void);
|
||||
|
@ -69,8 +69,8 @@ void ID_GetParamOtherUsrIDPlain (void);
|
|||
bool ID_CheckIfUsrIDIsValid (const char *UsrID);
|
||||
bool ID_CheckIfUsrIDSeemsAValidID (const char *UsrID);
|
||||
|
||||
void ID_WriteUsrIDs (struct UsrData *UsrDat,const char *Anchor);
|
||||
bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat);
|
||||
void ID_WriteUsrIDs (struct Usr_Data *UsrDat,const char *Anchor);
|
||||
bool ID_ICanSeeOtherUsrIDs (const struct Usr_Data *UsrDat);
|
||||
|
||||
void ID_ShowFormChangeMyID (bool IShouldFillInID);
|
||||
void ID_ShowFormChangeOtherUsrID (void);
|
||||
|
|
|
@ -123,7 +123,7 @@ bool ID_DB_FindStrInUsrsIDs (const char *Str)
|
|||
// Returns the number of users with any of these IDs
|
||||
|
||||
unsigned ID_DB_GetUsrCodsFromUsrID (MYSQL_RES **mysql_res,
|
||||
const struct UsrData *UsrDat,
|
||||
const struct Usr_Data *UsrDat,
|
||||
const char *EncryptedPassword, // If NULL or empty ==> do not check password
|
||||
bool OnlyConfirmedIDs)
|
||||
{
|
||||
|
|
|
@ -36,7 +36,7 @@ unsigned ID_DB_GetIDsFromUsrCod (MYSQL_RES **mysql_res,long UsrCod);
|
|||
bool ID_DB_CheckIfConfirmed (long UsrCod,const char ID[ID_MAX_BYTES_USR_ID + 1]);
|
||||
bool ID_DB_FindStrInUsrsIDs (const char *Str);
|
||||
unsigned ID_DB_GetUsrCodsFromUsrID (MYSQL_RES **mysql_res,
|
||||
const struct UsrData *UsrDat,
|
||||
const struct Usr_Data *UsrDat,
|
||||
const char *EncryptedPassword,
|
||||
bool OnlyConfirmedIDs);
|
||||
|
||||
|
|
|
@ -149,7 +149,7 @@ static void RSS_WriteNotices (FILE *FileRSS,struct Crs_Course *Crs)
|
|||
extern const char *Txt_Notice;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
struct tm *tm;
|
||||
time_t CreatTimeUTC;
|
||||
long NotCod;
|
||||
|
@ -238,7 +238,7 @@ static void RSS_WriteCallsForExams (FILE *FileRSS,struct Crs_Course *Crs)
|
|||
extern const char *Txt_Exam;
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
struct tm *tm;
|
||||
time_t CallTimeUTC;
|
||||
long ExaCod;
|
||||
|
|
|
@ -87,20 +87,20 @@ extern struct Globals Gbl;
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Acc_ShowFormCheckIfIHaveAccount (const char *Title);
|
||||
static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrData *UsrDat);
|
||||
static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct Usr_Data *UsrDat);
|
||||
static void Acc_ShowFormRequestNewAccountWithParams (const char NewNickWithoutArr[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1],
|
||||
const char *NewEmail);
|
||||
static bool Acc_GetParamsNewAccount (char NewNickWithoutArr[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1],
|
||||
char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1],
|
||||
char *NewEncryptedPassword);
|
||||
static void Acc_CreateNewEncryptedUsrCod (struct UsrData *UsrDat);
|
||||
static void Acc_CreateNewEncryptedUsrCod (struct Usr_Data *UsrDat);
|
||||
|
||||
static void Acc_PutParamsToRemoveMyAccount (void *EncryptedUsrCod);
|
||||
|
||||
static void Acc_AskIfRemoveUsrAccount (bool ItsMe);
|
||||
static void Acc_AskIfRemoveOtherUsrAccount (void);
|
||||
|
||||
static void Acc_RemoveUsrBriefcase (struct UsrData *UsrDat);
|
||||
static void Acc_RemoveUsrBriefcase (struct Usr_Data *UsrDat);
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Put link to create a new account ***********************/
|
||||
|
@ -196,7 +196,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
char ID[ID_MAX_BYTES_USR_ID + 1];
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
MYSQL_RES *mysql_res;
|
||||
|
||||
/***** Contextual menu *****/
|
||||
|
@ -274,7 +274,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
|||
/************************ Write data of empty account ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrData *UsrDat)
|
||||
static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_ID;
|
||||
extern const char *Txt_Name;
|
||||
|
@ -720,7 +720,7 @@ static bool Acc_GetParamsNewAccount (char NewNickWithoutArr[Nck_MAX_BYTES_NICK_W
|
|||
// UsrDat->UsrCod must be <= 0
|
||||
// UsrDat->UsrDat.IDs must contain a list of IDs for the new user
|
||||
|
||||
void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount)
|
||||
void Acc_CreateNewUsr (struct Usr_Data *UsrDat,bool CreatingMyOwnAccount)
|
||||
{
|
||||
char PathRelUsr[PATH_MAX + 1];
|
||||
unsigned NumID;
|
||||
|
@ -765,7 +765,7 @@ void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount)
|
|||
#define LENGTH_RANDOM_STR 32
|
||||
#define MAX_TRY 10
|
||||
|
||||
static void Acc_CreateNewEncryptedUsrCod (struct UsrData *UsrDat)
|
||||
static void Acc_CreateNewEncryptedUsrCod (struct Usr_Data *UsrDat)
|
||||
{
|
||||
char RandomStr[LENGTH_RANDOM_STR + 1];
|
||||
unsigned NumTry;
|
||||
|
@ -955,7 +955,7 @@ void Acc_RemoveMyAccount (void)
|
|||
Acc_AskIfRemoveUsrAccount (true);
|
||||
}
|
||||
|
||||
void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
||||
void Acc_CompletelyEliminateAccount (struct Usr_Data *UsrDat,
|
||||
Cns_QuietOrVerbose_t QuietOrVerbose)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_has_been_removed_from_all_his_her_courses;
|
||||
|
@ -1097,7 +1097,7 @@ void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
|||
/********************** Remove the briefcase of a user ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Acc_RemoveUsrBriefcase (struct UsrData *UsrDat)
|
||||
static void Acc_RemoveUsrBriefcase (struct Usr_Data *UsrDat)
|
||||
{
|
||||
char PathRelUsr[PATH_MAX + 1];
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ void Acc_ShowFormChgMyAccount (void);
|
|||
void Acc_ShowFormChgOtherUsrAccount (void);
|
||||
void Acc_PutLinkToRemoveMyAccount (__attribute__((unused)) void *Args);
|
||||
bool Acc_CreateMyNewAccountAndLogIn (void);
|
||||
void Acc_CreateNewUsr (struct UsrData *UsrDat,bool CreatingMyOwnAccount);
|
||||
void Acc_CreateNewUsr (struct Usr_Data *UsrDat,bool CreatingMyOwnAccount);
|
||||
void Acc_AfterCreationNewAccount (void);
|
||||
|
||||
void Acc_GetUsrCodAndRemUsrGbl (void);
|
||||
|
@ -65,7 +65,7 @@ void Acc_ReqRemAccountOrRemAccount (Acc_ReqOrRemUsr_t RequestOrRemove);
|
|||
bool Acc_CheckIfICanEliminateAccount (long UsrCod);
|
||||
void Acc_AskIfRemoveMyAccount (void);
|
||||
void Acc_RemoveMyAccount (void);
|
||||
void Acc_CompletelyEliminateAccount (struct UsrData *UsrDat,
|
||||
void Acc_CompletelyEliminateAccount (struct Usr_Data *UsrDat,
|
||||
Cns_QuietOrVerbose_t QuietOrVerbose);
|
||||
|
||||
void Acc_PutIconToChangeUsrAccount (void);
|
||||
|
|
|
@ -95,7 +95,7 @@ bool Acc_DB_CheckIfEmailAlreadyExists (const char NewEmail[Cns_MAX_BYTES_EMAIL_A
|
|||
/*****************************************************************************/
|
||||
// Return new user's code
|
||||
|
||||
long Acc_DB_CreateNewUsr (const struct UsrData *UsrDat)
|
||||
long Acc_DB_CreateNewUsr (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *The_ThemeId[The_NUM_THEMES];
|
||||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
||||
|
@ -158,7 +158,7 @@ long Acc_DB_CreateNewUsr (const struct UsrData *UsrDat)
|
|||
/*****************************************************************************/
|
||||
// UsrDat->UsrCod must be > 0
|
||||
|
||||
void Acc_DB_UpdateUsrData (const struct UsrData *UsrDat)
|
||||
void Acc_DB_UpdateUsrData (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Usr_StringsSexDB[Usr_NUM_SEXS];
|
||||
char BirthdayStrDB[Usr_BIRTHDAY_STR_DB_LENGTH + 1];
|
||||
|
|
|
@ -42,8 +42,8 @@ unsigned Acc_DB_GetUsrsWithID (MYSQL_RES **mysql_res,
|
|||
bool Acc_DB_CheckIfNicknameAlreadyExists (const char NewNickWithoutArr[Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1]);
|
||||
bool Acc_DB_CheckIfEmailAlreadyExists (const char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]);
|
||||
|
||||
long Acc_DB_CreateNewUsr (const struct UsrData *UsrDat);
|
||||
void Acc_DB_UpdateUsrData (const struct UsrData *UsrDat);
|
||||
long Acc_DB_CreateNewUsr (const struct Usr_Data *UsrDat);
|
||||
void Acc_DB_UpdateUsrData (const struct Usr_Data *UsrDat);
|
||||
void Acc_DB_UpdateMyInstitutionCenterDepartment (void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "swad_assignment_resource.h"
|
||||
#include "swad_attendance.h"
|
||||
#include "swad_banner.h"
|
||||
#include "swad_browser_resource.h"
|
||||
#include "swad_building.h"
|
||||
#include "swad_calendar.h"
|
||||
#include "swad_call_for_exam.h"
|
||||
|
@ -99,6 +100,7 @@
|
|||
#include "swad_search.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_survey_resource.h"
|
||||
#include "swad_system_config.h"
|
||||
#include "swad_tab.h"
|
||||
#include "swad_tag.h"
|
||||
|
@ -833,7 +835,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActRemGamQst ] = {1665,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_RemoveQstFromGame ,NULL},
|
||||
[ActUp_GamQst ] = {1668,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_MoveUpQst ,NULL},
|
||||
[ActDwnGamQst ] = {1669,-1,TabUnk,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_MoveDownQst ,NULL},
|
||||
[ActReqLnkGam ] = {1935,-1,TabUnk,ActSeeAllGam ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_GetLinkToGame ,NULL},
|
||||
[ActReqLnkGam ] = {1935,-1,TabUnk,ActSeeAllGam ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,GamRsc_GetLinkToGame ,NULL},
|
||||
|
||||
[ActSeeSvy ] = { 982,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_SeeOneSurvey ,NULL},
|
||||
[ActAnsSvy ] = { 983,-1,TabUnk,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_ReceiveSurveyAnswers ,NULL},
|
||||
|
@ -847,7 +849,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActRstSvy ] = { 985,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_ResetSurvey ,NULL},
|
||||
[ActHidSvy ] = { 977,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_HideSurvey ,NULL},
|
||||
[ActUnhSvy ] = { 978,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_UnhideSurvey ,NULL},
|
||||
[ActReqLnkSvy ] = {1937,-1,TabUnk,ActSeeAllSvy ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_GetLinkToSurvey ,NULL},
|
||||
[ActReqLnkSvy ] = {1937,-1,TabUnk,ActSeeAllSvy ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,SvyRsc_GetLinkToSurvey ,NULL},
|
||||
[ActEdiOneSvyQst ] = { 979,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_RequestEditQuestion ,NULL},
|
||||
[ActRcvSvyQst ] = { 980,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_ReceiveQst ,NULL},
|
||||
[ActReqRemSvyQst ] = {1524,-1,TabUnk,ActSeeAllSvy ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_RequestRemoveQst ,NULL},
|
||||
|
@ -1033,7 +1035,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActConSeeDocCrs ] = { 476,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_204_NO_CONT,Brw_ContractFileTree ,NULL ,NULL},
|
||||
[ActZIPSeeDocCrs ] = {1124,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,ZIP_CompressFileTree ,NULL},
|
||||
[ActReqDatSeeDocCrs ] = {1033,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileMetadata ,NULL},
|
||||
[ActReqLnkSeeDocCrs ] = {1930,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_GetLinkToFile ,NULL},
|
||||
[ActReqLnkSeeDocCrs ] = {1930,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,BrwRsc_GetLinkToFile ,NULL},
|
||||
[ActDowSeeDocCrs ] = {1111,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL},
|
||||
|
||||
[ActSeeDocGrp ] = {1200,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileBrowserOrWorks ,NULL},
|
||||
|
@ -1065,7 +1067,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActHidDocCrs ] = { 465,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_SetDocumentAsHidden ,NULL},
|
||||
[ActReqDatAdmDocCrs ] = {1029,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileMetadata ,NULL},
|
||||
[ActChgDatAdmDocCrs ] = { 996,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ChgFileMetadata ,NULL},
|
||||
[ActReqLnkAdmDocCrs ] = {1931,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_GetLinkToFile ,NULL},
|
||||
[ActReqLnkAdmDocCrs ] = {1931,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,BrwRsc_GetLinkToFile ,NULL},
|
||||
[ActDowAdmDocCrs ] = {1113,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL},
|
||||
|
||||
[ActAdmDocGrp ] = {1201,-1,TabUnk,ActSeeAdmDocCrsGrp ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileBrowserOrWorks ,NULL},
|
||||
|
@ -1258,7 +1260,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActExpSeeMrkCrs ] = { 528,-1,TabUnk,ActSeeAdmMrk ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_204_NO_CONT,Brw_ExpandFileTree ,NULL ,NULL},
|
||||
[ActConSeeMrkCrs ] = { 527,-1,TabUnk,ActSeeAdmMrk ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_204_NO_CONT,Brw_ContractFileTree ,NULL ,NULL},
|
||||
[ActReqDatSeeMrkCrs ] = {1086,-1,TabUnk,ActSeeAdmMrk ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileMetadata ,NULL},
|
||||
[ActReqLnkSeeMrkCrs ] = {1939,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_GetLinkToFile ,NULL},
|
||||
[ActReqLnkSeeMrkCrs ] = {1939,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,BrwRsc_GetLinkToFile ,NULL},
|
||||
[ActSeeMyMrkCrs ] = { 523,-1,TabUnk,ActSeeAdmMrk ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,Mrk_ShowMyMarks ,NULL ,NULL},
|
||||
|
||||
[ActSeeMrkGrp ] = {1204,-1,TabUnk,ActSeeAdmMrk ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileBrowserOrWorks ,NULL},
|
||||
|
@ -1288,7 +1290,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
[ActHidMrkCrs ] = {1192,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_SetDocumentAsHidden ,NULL},
|
||||
[ActReqDatAdmMrkCrs ] = {1035,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ShowFileMetadata ,NULL},
|
||||
[ActChgDatAdmMrkCrs ] = {1036,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_ChgFileMetadata ,NULL},
|
||||
[ActReqLnkAdmMrkCrs ] = {1940,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Brw_GetLinkToFile ,NULL},
|
||||
[ActReqLnkAdmMrkCrs ] = {1940,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,BrwRsc_GetLinkToFile ,NULL},
|
||||
[ActDowAdmMrkCrs ] = {1121,-1,TabUnk,ActSeeAdmMrk ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_DOWNLD_FILE,Brw_DownloadFile ,NULL ,NULL},
|
||||
[ActChgNumRowHeaCrs ] = { 503,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mrk_ChangeNumRowsHeader ,NULL},
|
||||
[ActChgNumRowFooCrs ] = { 504,-1,TabUnk,ActSeeAdmMrk ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Mrk_ChangeNumRowsFooter ,NULL},
|
||||
|
|
|
@ -66,7 +66,7 @@ static void Adm_ReqAddAdm (HieLvl_Level_t Scope,long Cod,
|
|||
const char *InsCtrDegName);
|
||||
static void Enr_AddAdm (HieLvl_Level_t Scope,long Cod,
|
||||
const char *InsCtrDegName);
|
||||
static void Adm_RegisterAdmin (struct UsrData *UsrDat,
|
||||
static void Adm_RegisterAdmin (struct Usr_Data *UsrDat,
|
||||
HieLvl_Level_t Scope,long Cod,
|
||||
const char *InsCtrDegName);
|
||||
|
||||
|
@ -75,7 +75,7 @@ static void Adm_ReqRemOrRemAdm (Enr_ReqDelOrDelUsr_t ReqDelOrDelUsr,
|
|||
const char *InsCtrDegName);
|
||||
static void Adm_AskIfRemAdm (bool ItsMe,HieLvl_Level_t Scope,
|
||||
const char *InsCtrDegName);
|
||||
static void Adm_EffectivelyRemAdm (struct UsrData *UsrDat,
|
||||
static void Adm_EffectivelyRemAdm (struct Usr_Data *UsrDat,
|
||||
HieLvl_Level_t Scope,long Cod,
|
||||
const char *InsCtrDegName);
|
||||
|
||||
|
@ -253,7 +253,7 @@ static void Enr_AddAdm (HieLvl_Level_t Scope,long Cod,
|
|||
/**************** Register administrator in current institution **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Adm_RegisterAdmin (struct UsrData *UsrDat,
|
||||
static void Adm_RegisterAdmin (struct Usr_Data *UsrDat,
|
||||
HieLvl_Level_t Scope,long Cod,
|
||||
const char *InsCtrDegName)
|
||||
{
|
||||
|
@ -433,7 +433,7 @@ static void Adm_AskIfRemAdm (bool ItsMe,HieLvl_Level_t Scope,
|
|||
/**** Remove an administrator from current institution, center or degree *****/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Adm_EffectivelyRemAdm (struct UsrData *UsrDat,
|
||||
static void Adm_EffectivelyRemAdm (struct Usr_Data *UsrDat,
|
||||
HieLvl_Level_t Scope,long Cod,
|
||||
const char *InsCtrDegName)
|
||||
{
|
||||
|
|
|
@ -123,7 +123,7 @@ static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event);
|
|||
static void Att_ListAttStudents (struct Att_Events *Events,
|
||||
struct Att_Event *Event);
|
||||
static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||
struct UsrData *UsrDat,
|
||||
struct Usr_Data *UsrDat,
|
||||
struct Att_Event *Event);
|
||||
static void Att_PutLinkAttEvent (struct Att_Event *Event,
|
||||
const char *Title,const char *Txt);
|
||||
|
@ -159,13 +159,13 @@ static void Att_ListUsrsAttendanceTable (const struct Att_Events *Events,
|
|||
long *LstSelectedUsrCods);
|
||||
static void Att_WriteTableHeadSeveralAttEvents (const struct Att_Events *Events);
|
||||
static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
|
||||
unsigned NumUsr,struct UsrData *UsrDat);
|
||||
unsigned NumUsr,struct Usr_Data *UsrDat);
|
||||
static void Att_PutCheckOrCross (bool Present);
|
||||
static void Att_ListStdsWithAttEventsDetails (const struct Att_Events *Events,
|
||||
unsigned NumUsrsInList,
|
||||
long *LstSelectedUsrCods);
|
||||
static void Att_ListAttEventsForAStd (const struct Att_Events *Events,
|
||||
unsigned NumUsr,struct UsrData *UsrDat);
|
||||
unsigned NumUsr,struct Usr_Data *UsrDat);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Reset attendance events **************************/
|
||||
|
@ -1601,7 +1601,7 @@ static void Att_ListAttStudents (struct Att_Events *Events,
|
|||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_Save_changes;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Get groups to show ******/
|
||||
Grp_GetParCodsSeveralGrpsToShowUsrs ();
|
||||
|
@ -1697,7 +1697,7 @@ static void Att_ListAttStudents (struct Att_Events *Events,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||
struct UsrData *UsrDat,
|
||||
struct Usr_Data *UsrDat,
|
||||
struct Att_Event *Event)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
|
@ -2012,7 +2012,7 @@ void Att_RegisterStudentsInAttEvent (void)
|
|||
char *ParamName;
|
||||
unsigned NumStdsPresent;
|
||||
unsigned NumStdsAbsent;
|
||||
struct UsrData UsrData;
|
||||
struct Usr_Data UsrData;
|
||||
char CommentStd[Cns_MAX_BYTES_TEXT + 1];
|
||||
char CommentTch[Cns_MAX_BYTES_TEXT + 1];
|
||||
|
||||
|
@ -2835,7 +2835,7 @@ static void Att_ListUsrsAttendanceTable (const struct Att_Events *Events,
|
|||
long *LstSelectedUsrCods)
|
||||
{
|
||||
extern const char *Txt_Number_of_users;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumUsr;
|
||||
unsigned NumAttEvent;
|
||||
unsigned Total;
|
||||
|
@ -2962,7 +2962,7 @@ static void Att_WriteTableHeadSeveralAttEvents (const struct Att_Events *Events)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Att_WriteRowUsrSeveralAttEvents (const struct Att_Events *Events,
|
||||
unsigned NumUsr,struct UsrData *UsrDat)
|
||||
unsigned NumUsr,struct Usr_Data *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -3082,7 +3082,7 @@ static void Att_ListStdsWithAttEventsDetails (const struct Att_Events *Events,
|
|||
long *LstSelectedUsrCods)
|
||||
{
|
||||
extern const char *Txt_Details;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumUsr;
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
|
@ -3127,7 +3127,7 @@ static void Att_ListStdsWithAttEventsDetails (const struct Att_Events *Events,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Att_ListAttEventsForAStd (const struct Att_Events *Events,
|
||||
unsigned NumUsr,struct UsrData *UsrDat)
|
||||
unsigned NumUsr,struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Student_comment;
|
||||
extern const char *Txt_Teachers_comment;
|
||||
|
|
|
@ -616,7 +616,7 @@ void Att_DB_SetUsrsAsPresent (long AttCod,const char *ListUsrs,bool SetOthersAsA
|
|||
{
|
||||
const char *Ptr;
|
||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumCodsInList;
|
||||
char *SubQueryAllUsrs = NULL;
|
||||
char SubQueryOneUsr[1 + Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||
|
|
|
@ -477,7 +477,7 @@ static ALn_LinkType_t ALn_CheckNickname (char **PtrSrc,char PrevCh,
|
|||
char Ch;
|
||||
size_t Length;
|
||||
char ParamsStr[Frm_MAX_BYTES_PARAMS_STR];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ShowPhoto = false;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
char *CaptionStr;
|
||||
|
|
255
swad_browser.c
255
swad_browser.c
|
@ -1175,8 +1175,6 @@ bool Brw_ICanEditFileOrFolder; // Can I modify (remove, rename, create inside, e
|
|||
static long Brw_GetGrpSettings (void);
|
||||
static void Brw_GetDataCurrentGrp (void);
|
||||
|
||||
static void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FileFolderName,
|
||||
Brw_FileType_t FileType,long FilCod);
|
||||
static void Brw_GetParamsPathInTreeAndFileName (void);
|
||||
static void Brw_SetPathFileBrowser (void);
|
||||
static void Brw_CreateFoldersAssignmentsIfNotExist (long ZoneUsrCod);
|
||||
|
@ -1191,7 +1189,7 @@ static void Brw_ShowFileBrowsersAsgWrkUsr (void);
|
|||
|
||||
static void Brw_FormToChangeCrsGrpZone (void);
|
||||
static void Brw_GetSelectedGroupData (struct GroupData *GrpDat,bool AbortOnError);
|
||||
static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat);
|
||||
static void Brw_ShowDataOwnerAsgWrk (struct Usr_Data *UsrDat);
|
||||
static void Brw_ShowFileBrowserOrWorksInternal (__attribute__((unused)) void *Args);
|
||||
static void Brw_ShowFileBrowser (void);
|
||||
static void Brw_PutIconsFileBrowser (__attribute__((unused)) void *Args);
|
||||
|
@ -1251,9 +1249,7 @@ static void Brw_PutIconFolderWithPlus (const char *FileBrowserId,const char *Row
|
|||
bool Open,bool Hidden);
|
||||
|
||||
static void Brw_PutIconNewFileOrFolder (void);
|
||||
static void Brw_PutIconFileWithLinkToViewMetadata (const struct FileMetadata *FileMetadata);
|
||||
static void Brw_PutIconFile (const char *FileName,
|
||||
const char *Class,bool PutLinkToViewMetadata);
|
||||
static void Brw_PutIconFileWithLinkToViewMetadata (const struct Brw_FileMetadata *FileMetadata);
|
||||
|
||||
static void Brw_PutButtonToDownloadZIPOfAFolder (void);
|
||||
|
||||
|
@ -1267,7 +1263,7 @@ static void Brw_GetFileNameToShow (Brw_FileType_t FileType,
|
|||
const char FileName[NAME_MAX + 1],
|
||||
char FileNameToShow[NAME_MAX + 1]);
|
||||
static void Brw_WriteDatesAssignment (void);
|
||||
static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata);
|
||||
static void Brw_WriteFileSizeAndDate (struct Brw_FileMetadata *FileMetadata);
|
||||
static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod);
|
||||
static void Brw_AskConfirmRemoveFolderNotEmpty (void);
|
||||
|
||||
|
@ -1300,14 +1296,14 @@ static void Brw_PutParamsToGetLinkToFile (void *FileMetadata);
|
|||
static bool Brw_CheckIfICanEditFileMetadata (long IAmTheOwner);
|
||||
static bool Brw_CheckIfIAmOwnerOfFile (long PublisherUsrCod);
|
||||
static void Brw_WriteBigLinkToDownloadFile (const char *URL,
|
||||
struct FileMetadata *FileMetadata,
|
||||
struct Brw_FileMetadata *FileMetadata,
|
||||
const char *FileNameToShow);
|
||||
static void Brw_WriteSmallLinkToDownloadFile (const char *URL,
|
||||
struct FileMetadata *FileMetadata,
|
||||
struct Brw_FileMetadata *FileMetadata,
|
||||
const char *FileNameToShow);
|
||||
static bool Brw_GetParamPublicFile (void);
|
||||
static Brw_License_t Brw_GetParLicense (void);
|
||||
static void Brw_GetFileViewsFromLoggedUsrs (struct FileMetadata *FileMetadata);
|
||||
static void Brw_GetFileViewsFromLoggedUsrs (struct Brw_FileMetadata *FileMetadata);
|
||||
static unsigned Brw_GetFileViewsFromMe (long FilCod);
|
||||
|
||||
static void Brw_RemoveOneFileOrFolderFromDB (const char Path[PATH_MAX + 1]);
|
||||
|
@ -2228,14 +2224,14 @@ long Brw_GetParamFilCod (void)
|
|||
void Brw_PutImplicitParamsFileBrowser (void *FilFolLnk)
|
||||
{
|
||||
if (FilFolLnk)
|
||||
Brw_PutParamsFileBrowser (((struct FilFolLnk *) FilFolLnk)->Path,
|
||||
((struct FilFolLnk *) FilFolLnk)->Name,
|
||||
((struct FilFolLnk *) FilFolLnk)->Type,
|
||||
Brw_PutParamsFileBrowser (((struct Brw_FilFolLnk *) FilFolLnk)->Path,
|
||||
((struct Brw_FilFolLnk *) FilFolLnk)->Name,
|
||||
((struct Brw_FilFolLnk *) FilFolLnk)->Type,
|
||||
-1L); // Not used
|
||||
}
|
||||
|
||||
static void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FilFolLnkName,
|
||||
Brw_FileType_t FileType,long FilCod)
|
||||
void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FilFolLnkName,
|
||||
Brw_FileType_t FileType,long FilCod)
|
||||
{
|
||||
if (Brw_GetIfGroupFileBrowser ()) // This file browser needs specify a group
|
||||
/***** Group code *****/
|
||||
|
@ -3247,7 +3243,7 @@ static void Brw_GetSelectedGroupData (struct GroupData *GrpDat,bool AbortOnError
|
|||
/******** Show a row with the data of the owner of assignments/works *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
|
||||
static void Brw_ShowDataOwnerAsgWrk (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_View_record_for_this_course;
|
||||
static const Act_Action_t NextAction[Rol_NUM_ROLES] =
|
||||
|
@ -4442,7 +4438,7 @@ static bool Brw_WriteRowFileBrowser (unsigned Level,const char *RowId,
|
|||
bool RowSetAsPublic = false;
|
||||
bool LightStyle = false;
|
||||
bool IsRecent = false;
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char FileBrowserId[32];
|
||||
bool SeeDocsZone = Gbl.FileBrowser.Type == Brw_SHOW_DOC_INS ||
|
||||
Gbl.FileBrowser.Type == Brw_SHOW_DOC_CTR ||
|
||||
|
@ -5130,7 +5126,7 @@ static void Brw_PutIconNewFileOrFolder (void)
|
|||
/***************************** Put icon of a file ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_PutIconFileWithLinkToViewMetadata (const struct FileMetadata *FileMetadata)
|
||||
static void Brw_PutIconFileWithLinkToViewMetadata (const struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
/***** Begin cell *****/
|
||||
HTM_TD_Begin ("class=\"BM %s\"",The_GetColorRows ());
|
||||
|
@ -5167,8 +5163,8 @@ static void Brw_PutIconFileWithLinkToViewMetadata (const struct FileMetadata *Fi
|
|||
/***************************** Put icon of a file ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_PutIconFile (const char *FileName,
|
||||
const char *Class,bool PutLinkToViewMetadata)
|
||||
void Brw_PutIconFile (const char *FileName,
|
||||
const char *Class,bool PutLinkToViewMetadata)
|
||||
{
|
||||
extern const unsigned Ext_NUM_FILE_EXT_ALLOWED;
|
||||
extern const char *Ext_FileExtensionsAllowed[];
|
||||
|
@ -5325,175 +5321,6 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Get link to file *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_GetLinkToFile (void)
|
||||
{
|
||||
extern const char *Txt_Link_to_resource_X_copied_into_clipboard;
|
||||
struct FileMetadata FileMetadata;
|
||||
bool Found;
|
||||
PrgRsc_Type_t Type;
|
||||
|
||||
/***** Get parameters related to file browser *****/
|
||||
Brw_GetParAndInitFileBrowser ();
|
||||
|
||||
/***** Get file name *****/
|
||||
FileMetadata.FilCod = Brw_GetParamFilCod ();
|
||||
Brw_GetFileNameByCod (&FileMetadata);
|
||||
Found = Brw_GetFileTypeSizeAndDate (&FileMetadata);
|
||||
|
||||
if (Found)
|
||||
{
|
||||
/***** Copy link to file into resource clipboard *****/
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActReqLnkSeeDocCrs:
|
||||
case ActReqLnkAdmDocCrs:
|
||||
Type = PrgRsc_DOCUMENT;
|
||||
break;
|
||||
case ActReqLnkSeeMrkCrs:
|
||||
case ActReqLnkAdmMrkCrs:
|
||||
Type = PrgRsc_MARKS;
|
||||
break;
|
||||
default:
|
||||
Type = PrgRsc_NONE; // Initialized to avoid warning
|
||||
Err_WrongTypeExit ();
|
||||
break;
|
||||
}
|
||||
Prg_DB_CopyToClipboard (Type,FileMetadata.FilCod);
|
||||
|
||||
/***** Write sucess message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Link_to_resource_X_copied_into_clipboard,
|
||||
FileMetadata.FilFolLnk.Name);
|
||||
}
|
||||
|
||||
/***** Show again the file browser *****/
|
||||
Brw_ShowAgainFileBrowserOrWorks ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Write file name in course program **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void BrwRsc_WriteDocFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle)
|
||||
{
|
||||
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||
struct FileMetadata FileMetadata;
|
||||
|
||||
/***** Get file metadata *****/
|
||||
FileMetadata.FilCod = FilCod;
|
||||
Brw_GetFileMetadataByCod (&FileMetadata);
|
||||
|
||||
/***** Begin form to go to file data *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
Frm_BeginForm (ActReqDatSeeDocCrs);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
FileMetadata.FilCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[ActReqDatSeeDocCrs],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
The_GetSuffix ());
|
||||
}
|
||||
|
||||
/***** Icon depending on type ******/
|
||||
switch (FileMetadata.FilFolLnk.Type)
|
||||
{
|
||||
case Brw_IS_FILE:
|
||||
Brw_PutIconFile (FileMetadata.FilFolLnk.Name,
|
||||
"CONTEXT_OPT ICO_HIGHLIGHT CONTEXT_ICO16x16",
|
||||
PutFormToGo); // Put link to view metadata
|
||||
break;
|
||||
case Brw_IS_LINK:
|
||||
if (PutFormToGo)
|
||||
Ico_PutIconLink (Icon,Ico_BLACK,ActReqDatSeeDocCrs);
|
||||
else
|
||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Write filename *****/
|
||||
HTM_Txt (FileMetadata.FilFolLnk.Name);
|
||||
|
||||
/***** End form to download file *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Write file name in course program **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void BrwRsc_WriteMrkFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle)
|
||||
{
|
||||
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||
struct FileMetadata FileMetadata;
|
||||
|
||||
/***** Get file metadata *****/
|
||||
FileMetadata.FilCod = FilCod;
|
||||
Brw_GetFileMetadataByCod (&FileMetadata);
|
||||
|
||||
/***** Begin form to go to file data *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
Frm_BeginForm (ActReqDatSeeMrkCrs);
|
||||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
FileMetadata.FilCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[ActReqDatSeeMrkCrs],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
The_GetSuffix ());
|
||||
}
|
||||
|
||||
/***** Icon depending on type ******/
|
||||
if (PutFormToGo)
|
||||
Ico_PutIconLink (Icon,Ico_BLACK,ActReqDatSeeMrkCrs);
|
||||
else
|
||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||
|
||||
/***** Write filename *****/
|
||||
HTM_Txt (FileMetadata.FilFolLnk.Name);
|
||||
|
||||
/***** End form to download file *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Get file name from file code *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void BrwRsc_GetFileNameFromFilCod (long FilCod,char *FileName,size_t FileNameSize)
|
||||
{
|
||||
struct FileMetadata FileMetadata;
|
||||
|
||||
/***** Return nothing on error *****/
|
||||
FileName[0] = '\0'; // Return nothing on error
|
||||
|
||||
/***** Get file metadata *****/
|
||||
FileMetadata.FilCod = FilCod;
|
||||
Brw_GetFileMetadataByCod (&FileMetadata);
|
||||
|
||||
/***** Copy file name into summary string *****/
|
||||
Str_Copy (FileName,FileMetadata.FilFolLnk.Name,FileNameSize);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Which filename must be shown? ***********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -5598,7 +5425,7 @@ static void Brw_WriteDatesAssignment (void)
|
|||
/****************** Write size and date of a file or folder ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata)
|
||||
static void Brw_WriteFileSizeAndDate (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
static unsigned UniqueId = 0;
|
||||
char *Id;
|
||||
|
@ -5649,7 +5476,7 @@ static void Brw_WriteFileOrFolderPublisher (unsigned Level,long UsrCod)
|
|||
[PhoSha_SHAPE_RECTANGLE] = "PHOTOR15x20B",
|
||||
};
|
||||
bool ShowUsr = false;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
if (Level && UsrCod > 0)
|
||||
{
|
||||
|
@ -5969,7 +5796,7 @@ static void Brw_WriteCurrentClipboard (void)
|
|||
struct Hie_Hierarchy Hie;
|
||||
struct GroupData GrpDat;
|
||||
struct Prj_Project Prj;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
char TxtClipboardZone[1024 +
|
||||
Cns_HIERARCHY_MAX_BYTES_SHRT_NAME +
|
||||
Grp_MAX_BYTES_GROUP_TYPE_NAME +
|
||||
|
@ -6525,12 +6352,12 @@ static void Brw_PasteClipboard (void)
|
|||
extern const char *Txt_You_can_not_paste_file_or_folder_here;
|
||||
struct Hie_Hierarchy Hie;
|
||||
struct GroupData GrpDat;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
long PrjCod;
|
||||
char PathOrg[PATH_MAX + NAME_MAX + PATH_MAX + 128];
|
||||
struct Brw_NumObjects Pasted;
|
||||
long FirstFilCod = -1L; // First file code of the first file or link pasted. Important: initialize here to -1L
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
|
||||
Pasted.NumFiles =
|
||||
Pasted.NumLinks =
|
||||
|
@ -7545,7 +7372,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType)
|
|||
bool AdminMarks;
|
||||
bool FileIsValid = true;
|
||||
long FilCod = -1L; // Code of new file in database
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
struct Mrk_Properties Marks;
|
||||
char FileNameToShow[NAME_MAX + 1];
|
||||
bool UploadSucessful = false;
|
||||
|
@ -7729,7 +7556,7 @@ void Brw_RecLinkFileBrowser (void)
|
|||
char PathCompleteInTreeIncludingFile[PATH_MAX + 1 + NAME_MAX + 4 + 1];
|
||||
long FilCod = -1L; // Code of new file in database
|
||||
char FileNameToShow[NAME_MAX + 1];
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
|
||||
/***** Get parameters related to file browser *****/
|
||||
Brw_GetParAndInitFileBrowser ();
|
||||
|
@ -8046,8 +7873,8 @@ void Brw_ShowFileMetadata (void)
|
|||
[PhoSha_SHAPE_OVAL ] = "PHOTOO15x20",
|
||||
[PhoSha_SHAPE_RECTANGLE] = "PHOTOR15x20",
|
||||
};
|
||||
struct FileMetadata FileMetadata;
|
||||
struct UsrData PublisherUsrDat;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
struct Usr_Data PublisherUsrDat;
|
||||
char FileNameToShow[NAME_MAX + 1];
|
||||
char URL[PATH_MAX + 1];
|
||||
char FileSizeStr[Fil_MAX_BYTES_FILE_SIZE_STRING + 1];
|
||||
|
@ -8480,7 +8307,7 @@ static void Brw_PutParamsToGetLinkToFile (void *FileMetadata)
|
|||
Brw_PutParamsFileBrowser (NULL, // Not used
|
||||
NULL, // Not used
|
||||
Brw_IS_UNKNOWN, // Not used
|
||||
((struct FileMetadata *) FileMetadata)->FilCod);
|
||||
((struct Brw_FileMetadata *) FileMetadata)->FilCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -8534,7 +8361,7 @@ void Brw_GetLinkToDownloadFile (const char *PathInTree,const char *FileName,char
|
|||
void Brw_DownloadFile (void)
|
||||
{
|
||||
extern const char *Txt_The_file_of_folder_no_longer_exists_or_is_now_hidden;
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
char URL[PATH_MAX + 1];
|
||||
bool Found;
|
||||
bool ICanView = false;
|
||||
|
@ -8749,7 +8576,7 @@ static bool Brw_CheckIfIAmOwnerOfFile (long PublisherUsrCod)
|
|||
// FileType can be Brw_IS_FILE or Brw_IS_LINK
|
||||
|
||||
static void Brw_WriteBigLinkToDownloadFile (const char *URL,
|
||||
struct FileMetadata *FileMetadata,
|
||||
struct Brw_FileMetadata *FileMetadata,
|
||||
const char *FileNameToShow)
|
||||
{
|
||||
extern const char *Txt_Check_marks_in_the_file;
|
||||
|
@ -8818,7 +8645,7 @@ static void Brw_WriteBigLinkToDownloadFile (const char *URL,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Brw_WriteSmallLinkToDownloadFile (const char *URL,
|
||||
struct FileMetadata *FileMetadata,
|
||||
struct Brw_FileMetadata *FileMetadata,
|
||||
const char *FileNameToShow)
|
||||
{
|
||||
extern const char *Txt_Check_marks_in_the_file;
|
||||
|
@ -8868,7 +8695,7 @@ static void Brw_WriteSmallLinkToDownloadFile (const char *URL,
|
|||
void Brw_ChgFileMetadata (void)
|
||||
{
|
||||
extern const char *Txt_The_properties_of_file_X_have_been_saved;
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
bool Found;
|
||||
bool IAmTheOwner;
|
||||
bool PublicFileBeforeEdition;
|
||||
|
@ -9008,7 +8835,7 @@ static Brw_License_t Brw_GetParLicense (void)
|
|||
// This function only gets metadata stored in table files,
|
||||
// does not get size, time, numviews...
|
||||
|
||||
void Brw_GetFileMetadataByPath (struct FileMetadata *FileMetadata)
|
||||
void Brw_GetFileMetadataByPath (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -9132,7 +8959,7 @@ void Brw_GetFileMetadataByPath (struct FileMetadata *FileMetadata)
|
|||
// This function only gets metadata stored in table files,
|
||||
// does not get size, time, numviews...
|
||||
|
||||
void Brw_GetFileMetadataByCod (struct FileMetadata *FileMetadata)
|
||||
void Brw_GetFileMetadataByCod (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -9256,7 +9083,7 @@ void Brw_GetFileMetadataByCod (struct FileMetadata *FileMetadata)
|
|||
// This function only gets file name stored in table files,
|
||||
// The rest of the fields are not filled
|
||||
|
||||
void Brw_GetFileNameByCod (struct FileMetadata *FileMetadata)
|
||||
void Brw_GetFileNameByCod (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -9284,7 +9111,7 @@ void Brw_GetFileNameByCod (struct FileMetadata *FileMetadata)
|
|||
/*****************************************************************************/
|
||||
// Return true if file exists
|
||||
|
||||
bool Brw_GetFileTypeSizeAndDate (struct FileMetadata *FileMetadata)
|
||||
bool Brw_GetFileTypeSizeAndDate (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
char Path[PATH_MAX + 1 + PATH_MAX + 1];
|
||||
struct stat FileStatus;
|
||||
|
@ -9325,7 +9152,7 @@ bool Brw_GetFileTypeSizeAndDate (struct FileMetadata *FileMetadata)
|
|||
FileMetadata->NumViewsFromLoggedUsrs
|
||||
FileMetadata->NumLoggedUsrs
|
||||
*/
|
||||
void Brw_GetAndUpdateFileViews (struct FileMetadata *FileMetadata)
|
||||
void Brw_GetAndUpdateFileViews (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
if (FileMetadata->FilCod > 0)
|
||||
{
|
||||
|
@ -9378,7 +9205,7 @@ void Brw_UpdateMyFileViews (long FilCod)
|
|||
Output: FileMetadata->NumViewsFromLoggedUsrs
|
||||
FileMetadata->NumLoggedUsrs
|
||||
*/
|
||||
static void Brw_GetFileViewsFromLoggedUsrs (struct FileMetadata *FileMetadata)
|
||||
static void Brw_GetFileViewsFromLoggedUsrs (struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -9939,7 +9766,7 @@ void Brw_RemoveGrpZones (long CrsCod,long GrpCod)
|
|||
/***************** Remove the works of a user in a course ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RemoveUsrWorksInCrs (struct UsrData *UsrDat,struct Crs_Course *Crs)
|
||||
void Brw_RemoveUsrWorksInCrs (struct Usr_Data *UsrDat,struct Crs_Course *Crs)
|
||||
{
|
||||
char PathUsrInCrs[PATH_MAX + 1];
|
||||
|
||||
|
@ -9958,7 +9785,7 @@ void Brw_RemoveUsrWorksInCrs (struct UsrData *UsrDat,struct Crs_Course *Crs)
|
|||
/************* Remove the works of a user in all of his courses **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_RemoveUsrWorksInAllCrss (struct UsrData *UsrDat)
|
||||
void Brw_RemoveUsrWorksInAllCrss (struct Usr_Data *UsrDat)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -10001,9 +9828,9 @@ void Brw_GetSummaryAndContentOfFile (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
extern const char *Txt_Folder;
|
||||
extern const char *Txt_Uploaded_by;
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
bool FileHasPublisher;
|
||||
struct UsrData PublisherUsrDat;
|
||||
struct Usr_Data PublisherUsrDat;
|
||||
|
||||
/***** Return nothing on error *****/
|
||||
SummaryStr[0] = '\0'; // Return nothing on error
|
||||
|
@ -10145,7 +9972,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
|||
extern const char *Txt_Temporary_private_storage_area;
|
||||
extern const char *Txt_Folder;
|
||||
extern const char *Txt_Link;
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
long InsCod;
|
||||
long CtrCod;
|
||||
long DegCod;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// swad_browser.h: file browsers
|
||||
|
||||
#ifndef _SWAD_BROWSER
|
||||
#define _SWAD_BROWSER
|
||||
#ifndef _SWAD_BRW
|
||||
#define _SWAD_BRW
|
||||
/*
|
||||
SWAD (Shared Workspace At a Distance in Spanish),
|
||||
is a web platform developed at the University of Granada (Spain),
|
||||
|
@ -120,7 +120,7 @@ typedef enum
|
|||
Brw_FOOTER = 1,
|
||||
} Brw_HeadOrFoot_t;
|
||||
|
||||
struct FilFolLnk
|
||||
struct Brw_FilFolLnk
|
||||
{
|
||||
char Full[PATH_MAX + 1]; // Full path = Path/Name
|
||||
char Path[PATH_MAX + 1]; // Path in tree, without ending '/', until file, folder or link name
|
||||
|
@ -128,14 +128,14 @@ struct FilFolLnk
|
|||
Brw_FileType_t Type;
|
||||
};
|
||||
|
||||
struct FileMetadata
|
||||
struct Brw_FileMetadata
|
||||
{
|
||||
long FilCod;
|
||||
Brw_FileBrowser_t FileBrowser;
|
||||
long Cod; // Code of institution, center, degree, course or group
|
||||
long ZoneUsrCod;
|
||||
long PublisherUsrCod;
|
||||
struct FilFolLnk FilFolLnk;
|
||||
struct Brw_FilFolLnk FilFolLnk;
|
||||
bool IsHidden;
|
||||
bool IsPublic;
|
||||
Brw_License_t License;
|
||||
|
@ -229,11 +229,11 @@ void Brw_ShowFileMetadata (void);
|
|||
void Brw_GetLinkToDownloadFile (const char *PathInTree,const char *FileName,char *URL);
|
||||
void Brw_DownloadFile (void);
|
||||
void Brw_ChgFileMetadata (void);
|
||||
void Brw_GetFileMetadataByPath (struct FileMetadata *FileMetadata);
|
||||
void Brw_GetFileMetadataByCod (struct FileMetadata *FileMetadata);
|
||||
void Brw_GetFileNameByCod (struct FileMetadata *FileMetadata);
|
||||
bool Brw_GetFileTypeSizeAndDate (struct FileMetadata *FileMetadata);
|
||||
void Brw_GetAndUpdateFileViews (struct FileMetadata *FileMetadata);
|
||||
void Brw_GetFileMetadataByPath (struct Brw_FileMetadata *FileMetadata);
|
||||
void Brw_GetFileMetadataByCod (struct Brw_FileMetadata *FileMetadata);
|
||||
void Brw_GetFileNameByCod (struct Brw_FileMetadata *FileMetadata);
|
||||
bool Brw_GetFileTypeSizeAndDate (struct Brw_FileMetadata *FileMetadata);
|
||||
void Brw_GetAndUpdateFileViews (struct Brw_FileMetadata *FileMetadata);
|
||||
void Brw_UpdateMyFileViews (long FilCod);
|
||||
|
||||
long Brw_GetZoneUsrCodForFileBrowser (void);
|
||||
|
@ -255,25 +255,22 @@ void Brw_CalcSizeOfDir (char *Path);
|
|||
|
||||
void Brw_SetFullPathInTree (void);
|
||||
|
||||
//--------------------------- Program resources -------------------------------
|
||||
void Brw_GetLinkToFile (void);
|
||||
void BrwRsc_WriteDocFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle);
|
||||
void BrwRsc_WriteMrkFileNameInCrsProgram (long FilCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle);
|
||||
void BrwRsc_GetFileNameFromFilCod (long FilCod,char *FileName,size_t FileNameSize);
|
||||
void Brw_PutIconFile (const char *FileName,
|
||||
const char *Class,bool PutLinkToViewMetadata);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void Brw_CreateTmpPublicLinkToPrivateFile (const char *FullPathIncludingFile,
|
||||
const char *FileName);
|
||||
|
||||
void Brw_PutImplicitParamsFileBrowser (void *FilFolLnk);
|
||||
void Brw_PutParamsFileBrowser (const char *PathInTree,const char *FilFolLnkName,
|
||||
Brw_FileType_t FileType,long FilCod);
|
||||
|
||||
void Brw_RemoveZonesOfGroupsOfType (long GrpTypCod);
|
||||
void Brw_RemoveGrpZones (long CrsCod,long GrpCod);
|
||||
|
||||
void Brw_RemoveUsrWorksInCrs (struct UsrData *UsrDat,struct Crs_Course *Crs);
|
||||
void Brw_RemoveUsrWorksInAllCrss (struct UsrData *UsrDat);
|
||||
void Brw_RemoveUsrWorksInCrs (struct Usr_Data *UsrDat,struct Crs_Course *Crs);
|
||||
void Brw_RemoveUsrWorksInAllCrss (struct Usr_Data *UsrDat);
|
||||
|
||||
void Brw_GetSummaryAndContentOfFile (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
char **ContentStr,
|
||||
|
|
|
@ -1394,7 +1394,7 @@ void Brw_DB_RemoveUsrFiles (long UsrCod)
|
|||
/************ Change public and license of file in the database **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||
void Brw_DB_ChangeFilePublic (const struct Brw_FileMetadata *FileMetadata,
|
||||
bool IsPublic,Brw_License_t License)
|
||||
{
|
||||
long Cod = Brw_GetCodForFileBrowser ();
|
||||
|
@ -2320,7 +2320,7 @@ unsigned Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingPath (MYSQL_RES **mysql_res
|
|||
/******** Check if a file / folder from the documents zone is hidden *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingMetadata (const struct FileMetadata *FileMetadata)
|
||||
bool Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingMetadata (const struct Brw_FileMetadata *FileMetadata)
|
||||
{
|
||||
/***** Get if a file or folder is under a hidden folder from database *****/
|
||||
/*
|
||||
|
|
|
@ -66,7 +66,7 @@ void Brw_DB_RemoveWrkFiles (long CrsCod,long UsrCod);
|
|||
void Brw_DB_RemoveUsrFiles (long UsrCod);
|
||||
|
||||
//------------------------------ Public files ---------------------------------
|
||||
void Brw_DB_ChangeFilePublic (const struct FileMetadata *FileMetadata,
|
||||
void Brw_DB_ChangeFilePublic (const struct Brw_FileMetadata *FileMetadata,
|
||||
bool IsPublic,Brw_License_t License);
|
||||
bool Brw_DB_GetIfFolderHasPublicFiles (const char Path[PATH_MAX + 1]);
|
||||
unsigned Brw_DB_GetNumPublicFilesUsr (long UsrCod);
|
||||
|
@ -100,7 +100,7 @@ unsigned Brw_DB_GetNumFileViewsUsr (long UsrCod);
|
|||
void Brw_DB_HideOrUnhideFileOrFolder (const char Path[PATH_MAX + 1],bool Hide);
|
||||
unsigned Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingPath (MYSQL_RES **mysql_res,
|
||||
const char *Path);
|
||||
bool Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingMetadata (const struct FileMetadata *FileMetadata);
|
||||
bool Brw_DB_CheckIfFileOrFolderIsSetAsHiddenUsingMetadata (const struct Brw_FileMetadata *FileMetadata);
|
||||
|
||||
//---------------------------- Expanded folders -------------------------------
|
||||
void Brw_DB_InsertFolderInExpandedFolders (const char Path[PATH_MAX + 1]);
|
||||
|
|
|
@ -755,7 +755,7 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
struct Ctr_Center *Ctr;
|
||||
unsigned NumPlc;
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ICanEdit;
|
||||
unsigned NumDegs;
|
||||
unsigned NumUsrsCtr;
|
||||
|
|
|
@ -606,10 +606,12 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
|||
|
||||
TODO: Attach pdf files in multimedia.
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.25 (2022-09-23)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.27 (2022-09-24)"
|
||||
#define CSS_FILE "swad22.22.1.css"
|
||||
#define JS_FILE "swad21.100.js"
|
||||
/*
|
||||
Version 22.27: Sep 24, 2022 New module swad_browser_resource. (332157 lines)
|
||||
Version 22.26: Sep 23, 2022 New module swad_survey_resource. (332095 lines)
|
||||
Version 22.25: Sep 23, 2022 New module swad_game_resource. (332037 lines)
|
||||
Version 22.24: Sep 23, 2022 New module swad_exam_resource. (331980 lines)
|
||||
Version 22.23: Sep 23, 2022 New module swad_call_for_exam_resource. (331924 lines)
|
||||
|
|
|
@ -568,8 +568,8 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
|
|||
const char *ClassTxt;
|
||||
long UsrCod;
|
||||
bool ItsMe;
|
||||
struct UsrData *UsrDat;
|
||||
struct UsrData OtherUsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
struct Usr_Data OtherUsrDat;
|
||||
|
||||
/***** Get user's code from list *****/
|
||||
UsrCod = Gbl.Usrs.Connected.Lst[Gbl.Usrs.Connected.NumUsr].UsrCod;
|
||||
|
@ -666,7 +666,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
|
|||
bool ThisCrs;
|
||||
time_t TimeDiff;
|
||||
const char *ClassTxt;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool PutLinkToRecord = (Gbl.Hierarchy.Level == HieLvl_CRS && // Course selected
|
||||
Gbl.Scope.Current == HieLvl_CRS && // Scope is current course
|
||||
(Role == Rol_STD || // Role is student,...
|
||||
|
|
|
@ -1138,7 +1138,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
struct Crs_Course *Crs;
|
||||
unsigned YearAux;
|
||||
unsigned NumCrs;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ICanEdit;
|
||||
unsigned NumUsrs[Rol_NUM_ROLES];
|
||||
|
||||
|
@ -2241,7 +2241,7 @@ void Crs_PutParamCrsCod (long CrsCod)
|
|||
/************************** Write courses of a user **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role)
|
||||
void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role)
|
||||
{
|
||||
extern const char *Txt_USER_in_COURSE;
|
||||
extern const char *Txt_User[Usr_NUM_SEXS];
|
||||
|
|
|
@ -129,7 +129,7 @@ void Crs_PutParamCrsCod (long CrsCod);
|
|||
|
||||
void Crs_ReqSelectOneOfMyCourses (void);
|
||||
|
||||
void Crs_GetAndWriteCrssOfAUsr (const struct UsrData *UsrDat,Rol_Role_t Role);
|
||||
void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role);
|
||||
|
||||
void Crs_ListCrssFound (MYSQL_RES **mysql_res,unsigned NumCrss);
|
||||
|
||||
|
|
|
@ -310,7 +310,7 @@ static void Deg_ListDegreesForEdition (void)
|
|||
struct Deg_Degree *Deg;
|
||||
unsigned NumDegTyp;
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ICanEdit;
|
||||
unsigned NumCrss;
|
||||
unsigned NumUsrsInCrssOfDeg;
|
||||
|
|
|
@ -53,9 +53,9 @@ extern struct Globals Gbl;
|
|||
|
||||
static void Dup_ListSimilarUsrs (void);
|
||||
|
||||
static void Dup_PutButtonToViewSimilarUsrs (const struct UsrData *UsrDat);
|
||||
static void Dup_PutButtonToEliminateUsrAccount (const struct UsrData *UsrDat);
|
||||
static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat);
|
||||
static void Dup_PutButtonToViewSimilarUsrs (const struct Usr_Data *UsrDat);
|
||||
static void Dup_PutButtonToEliminateUsrAccount (const struct Usr_Data *UsrDat);
|
||||
static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct Usr_Data *UsrDat);
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************** Report a user as possible duplicate ********************/
|
||||
|
@ -113,7 +113,7 @@ void Dup_ListDuplicateUsrs (void)
|
|||
MYSQL_ROW row;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumInformants;
|
||||
|
||||
/***** Begin box with list of possible duplicate users *****/
|
||||
|
@ -232,7 +232,7 @@ static void Dup_ListSimilarUsrs (void)
|
|||
{
|
||||
extern const char *Hlp_USERS_Duplicates_similar_users;
|
||||
extern const char *Txt_Similar_users;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
|
@ -344,7 +344,7 @@ static void Dup_ListSimilarUsrs (void)
|
|||
/********************* Put button to view similar users **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Dup_PutButtonToViewSimilarUsrs (const struct UsrData *UsrDat)
|
||||
static void Dup_PutButtonToViewSimilarUsrs (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Similar_users;
|
||||
|
||||
|
@ -358,7 +358,7 @@ static void Dup_PutButtonToViewSimilarUsrs (const struct UsrData *UsrDat)
|
|||
/********* Put button to request the elimination of a user's account *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Dup_PutButtonToEliminateUsrAccount (const struct UsrData *UsrDat)
|
||||
static void Dup_PutButtonToEliminateUsrAccount (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Eliminate_user_account;
|
||||
|
||||
|
@ -373,7 +373,7 @@ static void Dup_PutButtonToEliminateUsrAccount (const struct UsrData *UsrDat)
|
|||
/****** Put button to remove user from list of possible duplicate users ******/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct UsrData *UsrDat)
|
||||
static void Dup_PutButtonToRemoveFromListOfDupUsrs (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Not_duplicated;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ unsigned Dup_DB_GetListDuplicateUsrs (MYSQL_RES **mysql_res)
|
|||
/***************** Get list of users similar to a given one ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Dup_DB_GetUsrsSimilarTo (MYSQL_RES **mysql_res,const struct UsrData *UsrDat)
|
||||
unsigned Dup_DB_GetUsrsSimilarTo (MYSQL_RES **mysql_res,const struct Usr_Data *UsrDat)
|
||||
{
|
||||
if (UsrDat->Surname1[0] &&
|
||||
UsrDat->FrstName[0]) // Name and surname 1 not empty
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
unsigned Dup_DB_GetListDuplicateUsrs (MYSQL_RES **mysql_res);
|
||||
unsigned Dup_DB_GetUsrsSimilarTo (MYSQL_RES **mysql_res,const struct UsrData *UsrDat);
|
||||
unsigned Dup_DB_GetUsrsSimilarTo (MYSQL_RES **mysql_res,const struct Usr_Data *UsrDat);
|
||||
bool Dup_DB_CheckIfUsrIsDup (long UsrCod);
|
||||
|
||||
void Dup_DB_AddUsrToDuplicated (long UsrCod);
|
||||
|
|
|
@ -100,7 +100,7 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_NotifyAfterEnrolment (const struct UsrData *UsrDat,
|
||||
static void Enr_NotifyAfterEnrolment (const struct Usr_Data *UsrDat,
|
||||
Rol_Role_t NewRole);
|
||||
|
||||
static void Enr_ReqAdminUsrs (Rol_Role_t Role);
|
||||
|
@ -125,7 +125,7 @@ static void Enr_RegRemOneUsrActionBegin (Enr_RegRemOneUsrAction_t RegRemOneUsrAc
|
|||
bool *OptionChecked);
|
||||
static void Enr_RegRemOneUsrActionEnd (void);
|
||||
|
||||
static void Enr_RegisterUsr (struct UsrData *UsrDat,Rol_Role_t RegRemRole,
|
||||
static void Enr_RegisterUsr (struct Usr_Data *UsrDat,Rol_Role_t RegRemRole,
|
||||
struct ListCodGrps *LstGrps,unsigned *NumUsrsRegistered);
|
||||
|
||||
static void Enr_PutLinkToRemAllStdsThisCrs (void);
|
||||
|
@ -138,14 +138,14 @@ static void Enr_ReqRegRemUsr (Rol_Role_t Role);
|
|||
static void Enr_ReqAnotherUsrIDToRegisterRemove (Rol_Role_t Role);
|
||||
static void Enr_AskIfRegRemMe (Rol_Role_t Role);
|
||||
static void Enr_AskIfRegRemAnotherUsr (Rol_Role_t Role);
|
||||
static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role);
|
||||
static void Enr_AskIfRegRemUsr (struct Usr_ListUsrCods *ListUsrCods,Rol_Role_t Role);
|
||||
|
||||
static void Enr_ShowFormToEditOtherUsr (void);
|
||||
|
||||
static bool Enr_CheckIfICanRemUsrFromCrs (void);
|
||||
|
||||
static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat);
|
||||
static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,
|
||||
static void Enr_AskIfRemoveUsrFromCrs (struct Usr_Data *UsrDat);
|
||||
static void Enr_EffectivelyRemUsrFromCrs (struct Usr_Data *UsrDat,
|
||||
struct Crs_Course *Crs,
|
||||
Enr_RemoveUsrProduction_t RemoveUsrWorks,
|
||||
Cns_QuietOrVerbose_t QuietOrVerbose);
|
||||
|
@ -203,7 +203,7 @@ void Enr_PutLinkToRequestSignUp (void)
|
|||
/***************** Modify the role of a user in a course *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole)
|
||||
void Enr_ModifyRoleInCurrentCrs (struct Usr_Data *UsrDat,Rol_Role_t NewRole)
|
||||
{
|
||||
/***** Trivial check 1: current course code should be > 0 *****/
|
||||
if (Gbl.Hierarchy.Crs.CrsCod <= 0)
|
||||
|
@ -243,7 +243,7 @@ void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole)
|
|||
// Before calling this function, you must be sure that
|
||||
// the user does not belong to the current course
|
||||
|
||||
void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||
void Enr_RegisterUsrInCurrentCrs (struct Usr_Data *UsrDat,Rol_Role_t NewRole,
|
||||
Enr_KeepOrSetAccepted_t KeepOrSetAccepted)
|
||||
{
|
||||
/***** Trivial check 1: current course code should be > 0 *****/
|
||||
|
@ -286,7 +286,7 @@ void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
|||
/********* Create notification after register user in current course *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_NotifyAfterEnrolment (const struct UsrData *UsrDat,
|
||||
static void Enr_NotifyAfterEnrolment (const struct Usr_Data *UsrDat,
|
||||
Rol_Role_t NewRole)
|
||||
{
|
||||
static const Ntf_NotifyEvent_t NotifyEvent[Rol_NUM_ROLES] =
|
||||
|
@ -426,7 +426,7 @@ void Enr_GetNotifEnrolment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
long CrsCod,long UsrCod)
|
||||
{
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
Rol_Role_t Role;
|
||||
|
||||
/***** Get user's role in course from database *****/
|
||||
|
@ -455,7 +455,7 @@ void Enr_GetNotifEnrolment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
/*****************************************************************************/
|
||||
// UsrDat->UsrCod must be > 0
|
||||
|
||||
void Enr_UpdateUsrData (struct UsrData *UsrDat)
|
||||
void Enr_UpdateUsrData (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Check if user's code is initialized *****/
|
||||
if (UsrDat->UsrCod <= 0)
|
||||
|
@ -706,7 +706,7 @@ void Enr_RemoveOldUsrs (void)
|
|||
unsigned NumUsr;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsrsEliminated = 0;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Get parameter with number of months without access *****/
|
||||
MonthsWithoutAccess = (unsigned)
|
||||
|
@ -899,7 +899,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
bool RegisterUsrs;
|
||||
} WhatToDo;
|
||||
char *ListUsrsIDs;
|
||||
struct ListUsrCods ListUsrCods; // List with users' codes for a given user's ID
|
||||
struct Usr_ListUsrCods ListUsrCods; // List with users' codes for a given user's ID
|
||||
unsigned NumUsrFound;
|
||||
const char *Ptr;
|
||||
unsigned NumCurrentUsr;
|
||||
|
@ -907,7 +907,7 @@ static void Enr_ReceiveFormUsrsCrs (Rol_Role_t Role)
|
|||
unsigned NumUsrsRemoved = 0;
|
||||
unsigned NumUsrsEliminated = 0;
|
||||
struct ListCodGrps LstGrps;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ItLooksLikeAUsrID;
|
||||
Enr_RegRemUsrsAction_t RegRemUsrsAction;
|
||||
|
||||
|
@ -1615,7 +1615,7 @@ static void Enr_RegRemOneUsrActionEnd (void)
|
|||
/*****************************************************************************/
|
||||
// If user does not exists, UsrDat->IDs must hold the user's ID
|
||||
|
||||
static void Enr_RegisterUsr (struct UsrData *UsrDat,Rol_Role_t RegRemRole,
|
||||
static void Enr_RegisterUsr (struct Usr_Data *UsrDat,Rol_Role_t RegRemRole,
|
||||
struct ListCodGrps *LstGrps,unsigned *NumUsrsRegistered)
|
||||
{
|
||||
/***** Check if I can register this user *****/
|
||||
|
@ -1869,7 +1869,7 @@ void Enr_GetNotifEnrolmentRequest (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
Rol_Role_t DesiredRole;
|
||||
|
||||
SummaryStr[0] = '\0'; // Return nothing on error
|
||||
|
@ -2087,7 +2087,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
|
|||
long ReqCod;
|
||||
struct Deg_Degree Deg;
|
||||
struct Crs_Course Crs;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool UsrExists;
|
||||
bool UsrBelongsToCrs;
|
||||
Rol_Role_t DesiredRole;
|
||||
|
@ -2460,7 +2460,7 @@ static void Enr_ReqAnotherUsrIDToRegisterRemove (Rol_Role_t Role)
|
|||
|
||||
static void Enr_AskIfRegRemMe (Rol_Role_t Role)
|
||||
{
|
||||
struct ListUsrCods ListUsrCods;
|
||||
struct Usr_ListUsrCods ListUsrCods;
|
||||
|
||||
/***** I only can admin me *****/
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
|
@ -2492,7 +2492,7 @@ void Enr_AskIfRegRemAnotherTch (void)
|
|||
|
||||
static void Enr_AskIfRegRemAnotherUsr (Rol_Role_t Role)
|
||||
{
|
||||
struct ListUsrCods ListUsrCods;
|
||||
struct Usr_ListUsrCods ListUsrCods;
|
||||
|
||||
/***** Check if UsrCod is present in parameters *****/
|
||||
Usr_GetParamOtherUsrCodEncryptedAndGetListIDs ();
|
||||
|
@ -2516,7 +2516,7 @@ static void Enr_AskIfRegRemAnotherUsr (Rol_Role_t Role)
|
|||
/********************** Ask me for register/remove user **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_AskIfRegRemUsr (struct ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
||||
static void Enr_AskIfRegRemUsr (struct Usr_ListUsrCods *ListUsrCods,Rol_Role_t Role)
|
||||
{
|
||||
extern const char *Txt_There_are_X_users_with_the_ID_Y;
|
||||
extern const char *Txt_The_user_is_new_not_yet_in_X;
|
||||
|
@ -3042,7 +3042,7 @@ void Enr_ModifyUsr2 (void)
|
|||
/******************* Ask if really wanted to remove a user *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
|
||||
static void Enr_AskIfRemoveUsrFromCrs (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Do_you_really_want_to_be_removed_from_the_course_X;
|
||||
extern const char *Txt_Do_you_really_want_to_remove_the_following_user_from_the_course_X;
|
||||
|
@ -3092,7 +3092,7 @@ static void Enr_AskIfRemoveUsrFromCrs (struct UsrData *UsrDat)
|
|||
/************************ Remove a user from a course ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,
|
||||
static void Enr_EffectivelyRemUsrFromCrs (struct Usr_Data *UsrDat,
|
||||
struct Crs_Course *Crs,
|
||||
Enr_RemoveUsrProduction_t RemoveUsrWorks,
|
||||
Cns_QuietOrVerbose_t QuietOrVerbose)
|
||||
|
@ -3322,7 +3322,7 @@ void Enr_FlushCacheUsrBelongsToCurrentCrs (void)
|
|||
Gbl.Cache.UsrBelongsToCurrentCrs.Belongs = false;
|
||||
}
|
||||
|
||||
bool Enr_CheckIfUsrBelongsToCurrentCrs (const struct UsrData *UsrDat)
|
||||
bool Enr_CheckIfUsrBelongsToCurrentCrs (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Trivial cases *****/
|
||||
if (UsrDat->UsrCod <= 0 ||
|
||||
|
@ -3362,7 +3362,7 @@ void Enr_FlushCacheUsrHasAcceptedInCurrentCrs (void)
|
|||
Gbl.Cache.UsrHasAcceptedInCurrentCrs.Accepted = false;
|
||||
}
|
||||
|
||||
bool Enr_CheckIfUsrHasAcceptedInCurrentCrs (const struct UsrData *UsrDat)
|
||||
bool Enr_CheckIfUsrHasAcceptedInCurrentCrs (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Trivial cases *****/
|
||||
if (UsrDat->UsrCod <= 0 ||
|
||||
|
@ -3392,7 +3392,7 @@ void Enr_FlushCacheUsrSharesAnyOfMyCrs (void)
|
|||
Gbl.Cache.UsrSharesAnyOfMyCrs.SharesAnyOfMyCrs = false;
|
||||
}
|
||||
|
||||
bool Enr_CheckIfUsrSharesAnyOfMyCrs (struct UsrData *UsrDat)
|
||||
bool Enr_CheckIfUsrSharesAnyOfMyCrs (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
|
|
@ -78,8 +78,8 @@ void Enr_PutButtonInlineToRegisterStds (long CrsCod);
|
|||
|
||||
void Enr_PutLinkToRequestSignUp (void);
|
||||
|
||||
void Enr_ModifyRoleInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole);
|
||||
void Enr_RegisterUsrInCurrentCrs (struct UsrData *UsrDat,Rol_Role_t NewRole,
|
||||
void Enr_ModifyRoleInCurrentCrs (struct Usr_Data *UsrDat,Rol_Role_t NewRole);
|
||||
void Enr_RegisterUsrInCurrentCrs (struct Usr_Data *UsrDat,Rol_Role_t NewRole,
|
||||
Enr_KeepOrSetAccepted_t KeepOrSetAccepted);
|
||||
|
||||
void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams) (void));
|
||||
|
@ -87,7 +87,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams)
|
|||
void Enr_ReqAcceptRegisterInCrs (void);
|
||||
void Enr_GetNotifEnrolment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
long CrsCod,long UsrCod);
|
||||
void Enr_UpdateUsrData (struct UsrData *UsrDat);
|
||||
void Enr_UpdateUsrData (struct Usr_Data *UsrDat);
|
||||
|
||||
void Enr_ReqAdminStds (void);
|
||||
void Enr_ReqAdminNonEditingTchs (void);
|
||||
|
@ -144,11 +144,11 @@ void Enr_FlushCacheUsrBelongsToCrs (void);
|
|||
bool Enr_CheckIfUsrBelongsToCrs (long UsrCod,long CrsCod,
|
||||
bool CountOnlyAcceptedCourses);;
|
||||
void Enr_FlushCacheUsrBelongsToCurrentCrs (void);
|
||||
bool Enr_CheckIfUsrBelongsToCurrentCrs (const struct UsrData *UsrDat);
|
||||
bool Enr_CheckIfUsrBelongsToCurrentCrs (const struct Usr_Data *UsrDat);
|
||||
void Enr_FlushCacheUsrHasAcceptedInCurrentCrs (void);
|
||||
bool Enr_CheckIfUsrHasAcceptedInCurrentCrs (const struct UsrData *UsrDat);
|
||||
bool Enr_CheckIfUsrHasAcceptedInCurrentCrs (const struct Usr_Data *UsrDat);
|
||||
void Enr_FlushCacheUsrSharesAnyOfMyCrs (void);
|
||||
bool Enr_CheckIfUsrSharesAnyOfMyCrs (struct UsrData *UsrDat);
|
||||
bool Enr_CheckIfUsrSharesAnyOfMyCrs (struct Usr_Data *UsrDat);
|
||||
|
||||
unsigned Enr_GetNumUsrsInCrss (HieLvl_Level_t Scope,long Cod,unsigned Roles);
|
||||
unsigned Enr_GetCachedNumUsrsInCrss (HieLvl_Level_t Scope,long Cod,unsigned Roles);
|
||||
|
|
|
@ -105,7 +105,7 @@ static void ExaRes_ShowResultsSummaryRow (unsigned NumResults,
|
|||
static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam,
|
||||
const struct ExaSes_Session *Session,
|
||||
struct ExaPrn_Print *Print,
|
||||
struct UsrData *UsrDat,
|
||||
struct Usr_Data *UsrDat,
|
||||
struct ExaRes_ICanView *ICanView,
|
||||
unsigned Visibility);
|
||||
|
||||
|
@ -125,10 +125,10 @@ static void ExaRes_ShowExamResultScore (struct ExaPrn_Print *Print,
|
|||
static void ExaRes_ShowExamResultGrade (const struct Exa_Exam *Exam,
|
||||
struct ExaPrn_Print *Print,
|
||||
const struct ExaRes_ICanView *ICanView);
|
||||
static void ExaRes_ShowExamAnswers (struct UsrData *UsrDat,
|
||||
static void ExaRes_ShowExamAnswers (struct Usr_Data *UsrDat,
|
||||
struct ExaPrn_Print *Print,
|
||||
unsigned Visibility);
|
||||
static void ExaRes_WriteQstAndAnsExam (struct UsrData *UsrDat,
|
||||
static void ExaRes_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
|
||||
struct ExaPrn_Print *Print,
|
||||
unsigned QstInd,
|
||||
struct Qst_Question *Question,
|
||||
|
@ -772,7 +772,7 @@ static void ExaRes_ShowResults (struct Exa_Exams *Exams,
|
|||
const char *ExamsSelectedCommas)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
struct UsrData *UsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
unsigned NumResults;
|
||||
unsigned NumResult;
|
||||
struct ExaRes_ICanView ICanView;
|
||||
|
@ -1295,7 +1295,7 @@ void ExaRes_ShowOneExaResult (void)
|
|||
struct Exa_Exam Exam;
|
||||
struct ExaSes_Session Session;
|
||||
Usr_MeOrOther_t MeOrOther;
|
||||
struct UsrData *UsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
struct ExaPrn_Print Print;
|
||||
struct ExaRes_ICanView ICanView;
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ void ExaRes_ShowOneExaResult (void)
|
|||
static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam,
|
||||
const struct ExaSes_Session *Session,
|
||||
struct ExaPrn_Print *Print,
|
||||
struct UsrData *UsrDat,
|
||||
struct Usr_Data *UsrDat,
|
||||
struct ExaRes_ICanView *ICanView,
|
||||
unsigned Visibility)
|
||||
{
|
||||
|
@ -1541,7 +1541,7 @@ static void ExaRes_ComputeValidPrintScore (struct ExaPrn_Print *Print)
|
|||
/************************ Show user row in exam result ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ExaRes_ShowExamResultUser (struct UsrData *UsrDat)
|
||||
void ExaRes_ShowExamResultUser (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
|
@ -1814,7 +1814,7 @@ static void ExaRes_ShowExamResultGrade (const struct Exa_Exam *Exam,
|
|||
/**************** Show user's and correct answers of a test ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ExaRes_ShowExamAnswers (struct UsrData *UsrDat,
|
||||
static void ExaRes_ShowExamAnswers (struct Usr_Data *UsrDat,
|
||||
struct ExaPrn_Print *Print,
|
||||
unsigned Visibility)
|
||||
{
|
||||
|
@ -1844,7 +1844,7 @@ static void ExaRes_ShowExamAnswers (struct UsrData *UsrDat,
|
|||
/********** Write a row of a test, with one question and its answer **********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ExaRes_WriteQstAndAnsExam (struct UsrData *UsrDat,
|
||||
static void ExaRes_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
|
||||
struct ExaPrn_Print *Print,
|
||||
unsigned QstInd,
|
||||
struct Qst_Question *Question,
|
||||
|
|
|
@ -51,6 +51,6 @@ void ExaRes_ShowAllResultsInSes (void);
|
|||
|
||||
void ExaRes_ShowExaResultAfterFinish (void);
|
||||
void ExaRes_ShowOneExaResult (void);
|
||||
void ExaRes_ShowExamResultUser (struct UsrData *UsrDat);
|
||||
void ExaRes_ShowExamResultUser (struct Usr_Data *UsrDat);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -67,16 +67,16 @@ extern struct Globals Gbl;
|
|||
static void Fol_PutIconsWhoToFollow (__attribute__((unused)) void *Args);
|
||||
static void Fol_PutIconToUpdateWhoToFollow (void);
|
||||
|
||||
static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
||||
static void Fol_ShowNumberOfFollowingOrFollowers (const struct Usr_Data *UsrDat,
|
||||
unsigned NumUsrs,
|
||||
Act_Action_t Action,
|
||||
const char *Title);
|
||||
|
||||
static void Fol_ListFollowingUsr (struct UsrData *UsrDat);
|
||||
static void Fol_ListFollowersUsr (struct UsrData *UsrDat);
|
||||
static void Fol_ListFollowingUsr (struct Usr_Data *UsrDat);
|
||||
static void Fol_ListFollowersUsr (struct Usr_Data *UsrDat);
|
||||
|
||||
static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat);
|
||||
static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat);
|
||||
static void Fol_ShowFollowedOrFollower (struct Usr_Data *UsrDat);
|
||||
static void Fol_WriteRowUsrToFollowOnRightColumn (struct Usr_Data *UsrDat);
|
||||
static void Fol_PutInactiveIconToFollowUnfollow (void);
|
||||
static void Fol_PutIconToFollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]);
|
||||
static void Fol_PutIconToUnfollow (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]);
|
||||
|
@ -87,8 +87,8 @@ static void Fol_PutHiddenParSelectedUsrsCods (void *SelectedUsrs);
|
|||
static void Fol_GetFollowedFromSelectedUsrs (unsigned *NumFollowed,
|
||||
unsigned *NumNotFollowed);
|
||||
|
||||
static void Fol_FollowUsr (const struct UsrData *UsrDat);
|
||||
static void Fol_UnfollowUsr (const struct UsrData *UsrDat);
|
||||
static void Fol_FollowUsr (const struct Usr_Data *UsrDat);
|
||||
static void Fol_UnfollowUsr (const struct Usr_Data *UsrDat);
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Put link to show users to follow **********************/
|
||||
|
@ -119,7 +119,7 @@ void Fol_SuggestUsrsToFollowMainZone (void)
|
|||
MYSQL_ROW row;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Contextual menu *****/
|
||||
Mnu_ContextMenuBegin ();
|
||||
|
@ -190,7 +190,7 @@ void Fol_SuggestUsrsToFollowMainZoneOnRightColumn (void)
|
|||
MYSQL_ROW row;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Get users *****/
|
||||
if ((NumUsrs = Fol_DB_GetUsrsToFollow (Fol_MAX_USRS_TO_FOLLOW_RIGHT_COLUMN,
|
||||
|
@ -309,7 +309,7 @@ void Fol_GetNumFollow (long UsrCod,
|
|||
/**************** Show following and followers of a user *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
|
||||
void Fol_ShowFollowingAndFollowers (const struct Usr_Data *UsrDat,
|
||||
unsigned NumFollowing,unsigned NumFollowers,
|
||||
bool UsrFollowsMe,bool IFollowUsr)
|
||||
{
|
||||
|
@ -379,7 +379,7 @@ void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
|
|||
/**************** Show following and followers of a user *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fol_ShowNumberOfFollowingOrFollowers (const struct UsrData *UsrDat,
|
||||
static void Fol_ShowNumberOfFollowingOrFollowers (const struct Usr_Data *UsrDat,
|
||||
unsigned NumUsrs,
|
||||
Act_Action_t Action,
|
||||
const char *Title)
|
||||
|
@ -450,13 +450,13 @@ void Fol_ListFollowing (void)
|
|||
Fol_ListFollowingUsr (&Gbl.Usrs.Me.UsrDat);
|
||||
}
|
||||
|
||||
static void Fol_ListFollowingUsr (struct UsrData *UsrDat)
|
||||
static void Fol_ListFollowingUsr (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Following;
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData FollowingUsrDat;
|
||||
struct Usr_Data FollowingUsrDat;
|
||||
|
||||
/***** Show user's profile *****/
|
||||
if (Prf_ShowUserProfile (UsrDat))
|
||||
|
@ -529,13 +529,13 @@ void Fol_ListFollowers (void)
|
|||
Fol_ListFollowersUsr (&Gbl.Usrs.Me.UsrDat);
|
||||
}
|
||||
|
||||
static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
||||
static void Fol_ListFollowersUsr (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Followers;
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData FollowerUsrDat;
|
||||
struct Usr_Data FollowerUsrDat;
|
||||
|
||||
/***** Show user's profile *****/
|
||||
if (Prf_ShowUserProfile (UsrDat))
|
||||
|
@ -594,7 +594,7 @@ static void Fol_ListFollowersUsr (struct UsrData *UsrDat)
|
|||
/************************* Show followed or follower *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
|
||||
static void Fol_ShowFollowedOrFollower (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
|
@ -655,7 +655,7 @@ static void Fol_ShowFollowedOrFollower (struct UsrData *UsrDat)
|
|||
/********************* Write the name of a connected user ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
|
||||
static void Fol_WriteRowUsrToFollowOnRightColumn (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
|
@ -927,7 +927,7 @@ static void Fol_RequestUnfollowUsrs (Act_Action_t NextAction)
|
|||
static void Fol_PutHiddenParSelectedUsrsCods (void *SelectedUsrs)
|
||||
{
|
||||
if (SelectedUsrs)
|
||||
Usr_PutHiddenParSelectedUsrsCods ((struct SelectedUsrs *) SelectedUsrs);
|
||||
Usr_PutHiddenParSelectedUsrsCods ((struct Usr_SelectedUsrs *) SelectedUsrs);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -938,7 +938,7 @@ static void Fol_GetFollowedFromSelectedUsrs (unsigned *NumFollowed,
|
|||
unsigned *NumNotFollowed)
|
||||
{
|
||||
extern const char *Txt_Selected_users_X_Followed_Y_Not_followed_Z;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *Ptr;
|
||||
unsigned NumUsrs = 0;
|
||||
|
||||
|
@ -985,7 +985,7 @@ void Fol_FollowUsrs ()
|
|||
extern const char *Txt_You_have_followed_one_user;
|
||||
extern const char *Txt_You_have_followed_X_users;
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumFollowed = 0;
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
|
@ -1034,7 +1034,7 @@ void Fol_UnfollowUsrs (void)
|
|||
extern const char *Txt_You_have_stopped_following_one_user;
|
||||
extern const char *Txt_You_have_stopped_following_X_users;
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumUnfollowed = 0;
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
|
@ -1082,7 +1082,7 @@ void Fol_UnfollowUsrs (void)
|
|||
/******************************** Follow user ********************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fol_FollowUsr (const struct UsrData *UsrDat)
|
||||
static void Fol_FollowUsr (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
bool CreateNotif;
|
||||
bool NotifyByEmail;
|
||||
|
@ -1121,7 +1121,7 @@ static void Fol_FollowUsr (const struct UsrData *UsrDat)
|
|||
/******************************* Unfollow user *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Fol_UnfollowUsr (const struct UsrData *UsrDat)
|
||||
static void Fol_UnfollowUsr (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Avoid wrong cases *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.UsrCod <= 0 ||
|
||||
|
|
|
@ -51,7 +51,7 @@ void Fol_FlushCacheFollow (void);
|
|||
void Fol_GetNumFollow (long UsrCod,
|
||||
unsigned *NumFollowing,unsigned *NumFollowers);
|
||||
unsigned Fol_GetNumFollowers (long UsrCod);
|
||||
void Fol_ShowFollowingAndFollowers (const struct UsrData *UsrDat,
|
||||
void Fol_ShowFollowingAndFollowers (const struct Usr_Data *UsrDat,
|
||||
unsigned NumFollowing,unsigned NumFollowers,
|
||||
bool UsrFollowsMe,bool IFollowUsr);
|
||||
void Fol_ListFollowing (void);
|
||||
|
|
|
@ -878,7 +878,7 @@ static void For_ShowAForumPost (struct For_Forums *Forums,
|
|||
extern const char *Txt_FORUM_Post_banned;
|
||||
extern const char *Txt_FORUM_Post_X_banned;
|
||||
extern const char *Txt_This_post_has_been_banned_probably_for_not_satisfy_the_rules_of_the_forums;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
time_t CreatTimeUTC; // Creation time of a post
|
||||
char OriginalContent[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||
char Subject[Cns_MAX_BYTES_SUBJECT + 1];
|
||||
|
@ -2178,7 +2178,7 @@ static void For_ListForumThrs (struct For_Forums *Forums,
|
|||
struct For_Thread Thr;
|
||||
unsigned UniqueId;
|
||||
char *Id;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
Dat_StartEndTime_t Order;
|
||||
time_t TimeUTC;
|
||||
struct Pagination PaginationPsts;
|
||||
|
@ -2912,7 +2912,7 @@ void For_RemovePost (void)
|
|||
extern const char *Txt_FORUM_Post_and_thread_removed;
|
||||
extern const char *Txt_FORUM_Post_removed;
|
||||
struct For_Forums Forums;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
time_t CreatTimeUTC; // Creation time of a message
|
||||
char Subject[Cns_MAX_BYTES_SUBJECT + 1];
|
||||
char OriginalContent[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
/***************************** Get link to game ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Gam_GetLinkToGame (void)
|
||||
void GamRsc_GetLinkToGame (void)
|
||||
{
|
||||
extern const char *Txt_Link_to_resource_X_copied_into_clipboard;
|
||||
struct Gam_Games Games;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Gam_GetLinkToGame (void);
|
||||
void GamRsc_GetLinkToGame (void);
|
||||
void GamRsc_WriteGameInCrsProgram (long GamCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle);
|
||||
void GamRsc_GetTitleFromGamCod (long GamCod,char *Title,size_t TitleSize);
|
||||
|
|
|
@ -230,8 +230,8 @@ struct Globals
|
|||
{
|
||||
struct
|
||||
{
|
||||
struct UsrData UsrDat;
|
||||
struct UsrLast UsrLast;
|
||||
struct Usr_Data UsrDat;
|
||||
struct Usr_Last UsrLast;
|
||||
struct
|
||||
{
|
||||
unsigned Available;
|
||||
|
@ -313,11 +313,11 @@ struct Globals
|
|||
} Me; // The user logged
|
||||
struct
|
||||
{
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumIDToConfirm; // Used as hidden parameter to confirm a user's ID
|
||||
} Other; // Another user, used for example to register in / remove from a course
|
||||
struct ListUsrs LstUsrs[Rol_NUM_ROLES];
|
||||
struct SelectedUsrs Selected;
|
||||
struct Usr_ListUsrs LstUsrs[Rol_NUM_ROLES];
|
||||
struct Usr_SelectedUsrs Selected;
|
||||
char *ListOtherRecipients; // List of ID or nicks of users written explicitely on a form
|
||||
struct
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ struct Globals
|
|||
} Usrs;
|
||||
struct
|
||||
{
|
||||
struct UsrData *UsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
Rec_SharedRecordViewType_t TypeOfView;
|
||||
} Record;
|
||||
struct
|
||||
|
@ -398,7 +398,7 @@ struct Globals
|
|||
char PathRootFolder[PATH_MAX + 1];
|
||||
} Priv;
|
||||
char NewFilFolLnkName[NAME_MAX + 1];
|
||||
struct FilFolLnk FilFolLnk;
|
||||
struct Brw_FilFolLnk FilFolLnk;
|
||||
unsigned Level;
|
||||
Brw_IconViewEdit_t IconViewEdit;
|
||||
struct
|
||||
|
@ -407,7 +407,7 @@ struct Globals
|
|||
long Cod; // Code of the institution/center/degree/course/group related to the file browser with the clipboard
|
||||
long WorksUsrCod; // User code of the user related to the works file browser with the clipboard
|
||||
unsigned Level;
|
||||
struct FilFolLnk FilFolLnk;
|
||||
struct Brw_FilFolLnk FilFolLnk;
|
||||
bool IsThisTree; // When showing a file browser, is it that corresponding to the clipboard?
|
||||
bool IsThisFile; // When showing a row of a file browser, are we in the path of the clipboard?
|
||||
} Clipboard;
|
||||
|
|
|
@ -1047,7 +1047,7 @@ static void Grp_DestructorListGrpAlreadySelec (struct ListGrpsAlreadySelec **Alr
|
|||
/******************* Register user in the groups of a list *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGrps)
|
||||
void Grp_RegisterUsrIntoGroups (struct Usr_Data *UsrDat,struct ListCodGrps *LstGrps)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged;
|
||||
extern const char *Txt_THE_USER_X_has_been_enroled_in_the_group_of_type_Y_Z;
|
||||
|
@ -1123,7 +1123,7 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
|
|||
/*****************************************************************************/
|
||||
// Returns NumGrpsHeIsRemoved
|
||||
|
||||
unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGrps)
|
||||
unsigned Grp_RemoveUsrFromGroups (struct Usr_Data *UsrDat,struct ListCodGrps *LstGrps)
|
||||
{
|
||||
extern const char *Txt_THE_USER_X_has_not_been_removed_from_any_group;
|
||||
extern const char *Txt_THE_USER_X_has_been_removed_from_one_group;
|
||||
|
@ -3037,7 +3037,7 @@ void Grp_FlushCacheUsrSharesAnyOfMyGrpsInCurrentCrs (void)
|
|||
Gbl.Cache.UsrSharesAnyOfMyGrpsInCurrentCrs.Shares = false;
|
||||
}
|
||||
|
||||
bool Grp_CheckIfUsrSharesAnyOfMyGrpsInCurrentCrs (const struct UsrData *UsrDat)
|
||||
bool Grp_CheckIfUsrSharesAnyOfMyGrpsInCurrentCrs (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
|
|
@ -177,8 +177,8 @@ void Grp_ChangeOtherUsrGrps (void);
|
|||
bool Grp_ChangeMyGrpsAtomically (struct ListCodGrps *LstGrpsIWant);
|
||||
void Grp_ChangeGrpsOtherUsrAtomically (struct ListCodGrps *LstGrpsUsrWants);
|
||||
bool Grp_CheckIfSelectionGrpsSingleEnrolmentIsValid (Rol_Role_t Role,struct ListCodGrps *LstGrps);
|
||||
void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGrps);
|
||||
unsigned Grp_RemoveUsrFromGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGrps);
|
||||
void Grp_RegisterUsrIntoGroups (struct Usr_Data *UsrDat,struct ListCodGrps *LstGrps);
|
||||
unsigned Grp_RemoveUsrFromGroups (struct Usr_Data *UsrDat,struct ListCodGrps *LstGrps);
|
||||
void Grp_RemUsrFromAllGrpsInCrs (long UsrCod,long CrsCod);
|
||||
void Grp_RemUsrFromAllGrps (long UsrCod);
|
||||
void Grp_ListGrpsToEditAsgAttSvyEvtMch (struct GroupType *GrpTyp,
|
||||
|
@ -198,7 +198,7 @@ void Grp_GetDataOfGroupByCod (struct GroupData *GrpDat);
|
|||
void Grp_FlushCacheIBelongToGrp (void);
|
||||
bool Grp_GetIfIBelongToGrp (long GrpCod);
|
||||
void Grp_FlushCacheUsrSharesAnyOfMyGrpsInCurrentCrs (void);
|
||||
bool Grp_CheckIfUsrSharesAnyOfMyGrpsInCurrentCrs (const struct UsrData *UsrDat);
|
||||
bool Grp_CheckIfUsrSharesAnyOfMyGrpsInCurrentCrs (const struct Usr_Data *UsrDat);
|
||||
|
||||
void Grp_GetLstCodGrpsWithFileZonesIBelong (struct ListCodGrps *LstGrps);
|
||||
void Grp_GetNamesGrpsUsrBelongsTo (long UsrCod,long GrpTypCod,char *GroupNames);
|
||||
|
|
|
@ -929,7 +929,7 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
unsigned NumIns;
|
||||
struct Ins_Instit *Ins;
|
||||
char WWW[Cns_MAX_BYTES_WWW + 1];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ICanEdit;
|
||||
unsigned NumCtrs;
|
||||
unsigned NumUsrsIns;
|
||||
|
|
22
swad_mail.c
22
swad_mail.c
|
@ -88,8 +88,8 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
|
|||
static void Mai_PutParamsRemoveMyEmail (void *Email);
|
||||
static void Mai_PutParamsRemoveOtherEmail (void *Email);
|
||||
|
||||
static void Mai_RemoveEmail (struct UsrData *UsrDat);
|
||||
static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe);
|
||||
static void Mai_RemoveEmail (struct Usr_Data *UsrDat);
|
||||
static void Mai_NewUsrEmail (struct Usr_Data *UsrDat,bool ItsMe);
|
||||
static void Mai_InsertMailKey (const char Email[Cns_MAX_BYTES_EMAIL_ADDRESS + 1],
|
||||
const char MailKey[Mai_LENGTH_EMAIL_CONFIRM_KEY + 1]);
|
||||
|
||||
|
@ -297,7 +297,7 @@ static void Mai_GetListMailDomainsAllowedForNotif (void)
|
|||
/************ Check if user can receive notifications via email **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Mai_CheckIfUsrCanReceiveEmailNotif (const struct UsrData *UsrDat)
|
||||
bool Mai_CheckIfUsrCanReceiveEmailNotif (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
char MailDomain[Cns_MAX_BYTES_EMAIL_ADDRESS + 1];
|
||||
|
||||
|
@ -806,7 +806,7 @@ static void Mai_ListEmails (__attribute__((unused)) void *Args)
|
|||
unsigned NumAcceptedUsrsWithEmail = 0;
|
||||
char StrAddresses[Mai_MAX_BYTES_STR_ADDR + 1]; // TODO: Use malloc depending on the number of students
|
||||
unsigned int LengthStrAddr = 0;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *Ptr;
|
||||
|
||||
/***** Begin the box used to list the emails *****/
|
||||
|
@ -955,7 +955,7 @@ bool Mai_CheckIfEmailIsValid (const char *Email)
|
|||
/********** Get email address of a user from his/her user's code *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Mai_GetEmailFromUsrCod (struct UsrData *UsrDat)
|
||||
bool Mai_GetEmailFromUsrCod (struct Usr_Data *UsrDat)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -1087,7 +1087,7 @@ static void Mai_ShowFormChangeUsrEmail (bool ItsMe,
|
|||
[Rol_INS_ADM] = {ActRemMaiOth,ActNewMaiOth},
|
||||
[Rol_SYS_ADM] = {ActRemMaiOth,ActNewMaiOth},
|
||||
};
|
||||
const struct UsrData *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat :
|
||||
const struct Usr_Data *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat :
|
||||
&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/***** Show possible alerts *****/
|
||||
|
@ -1273,7 +1273,7 @@ void Mai_RemoveOtherUsrEmail (void)
|
|||
/************************** Remove email address *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Mai_RemoveEmail (struct UsrData *UsrDat)
|
||||
static void Mai_RemoveEmail (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Email_X_removed;
|
||||
char Email[Cns_MAX_BYTES_EMAIL_ADDRESS + 1];
|
||||
|
@ -1341,7 +1341,7 @@ void Mai_NewOtherUsrEmail (void)
|
|||
/************************* Update my email address ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
||||
static void Mai_NewUsrEmail (struct Usr_Data *UsrDat,bool ItsMe)
|
||||
{
|
||||
extern const char *Txt_The_email_address_X_matches_one_previously_registered;
|
||||
extern const char *Txt_The_email_address_X_has_been_registered_successfully;
|
||||
|
@ -1400,7 +1400,7 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe)
|
|||
// Return true if email is successfully updated
|
||||
// Return false if email can not be updated beacuse it is registered by another user
|
||||
|
||||
bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1])
|
||||
bool Mai_UpdateEmailInDB (const struct Usr_Data *UsrDat,const char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1])
|
||||
{
|
||||
/***** Check if the new email matches any of the confirmed emails of other users *****/
|
||||
if (Mai_DB_CheckIfEmailBelongToAnotherUsr (UsrDat->UsrCod,NewEmail)) // An email of another user is the same that my email
|
||||
|
@ -1600,7 +1600,7 @@ void Mai_CreateFileNameMail (char FileNameMail[PATH_MAX + 1],FILE **FileMail)
|
|||
/************ Write a welcome note heading the automatic email ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Mai_WriteWelcomeNoteEMail (FILE *FileMail,struct UsrData *UsrDat)
|
||||
void Mai_WriteWelcomeNoteEMail (FILE *FileMail,struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Dear_NO_HTML[Usr_NUM_SEXS][1 + Lan_NUM_LANGUAGES];
|
||||
extern const char *Txt_user_NO_HTML[Usr_NUM_SEXS][1 + Lan_NUM_LANGUAGES];
|
||||
|
@ -1631,7 +1631,7 @@ void Mai_WriteFootNoteEMail (FILE *FileMail,Lan_Language_t Language)
|
|||
/**************** Check if I can see another user's email ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Mai_ICanSeeOtherUsrEmail (const struct UsrData *UsrDat)
|
||||
bool Mai_ICanSeeOtherUsrEmail (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** I can see my email *****/
|
||||
if (Usr_ItsMe (UsrDat->UsrCod))
|
||||
|
|
10
swad_mail.h
10
swad_mail.h
|
@ -63,7 +63,7 @@ void Mai_SeeMailDomains (void);
|
|||
void Mai_EditMailDomains (void);
|
||||
void Mai_FreeListMailDomains (void);
|
||||
|
||||
bool Mai_CheckIfUsrCanReceiveEmailNotif (const struct UsrData *UsrDat);
|
||||
bool Mai_CheckIfUsrCanReceiveEmailNotif (const struct Usr_Data *UsrDat);
|
||||
void Mai_WriteWarningEmailNotifications (void);
|
||||
|
||||
void Mai_GetDataOfMailDomainByCod (struct Mail *Plc);
|
||||
|
@ -78,7 +78,7 @@ void Mai_ReqUsrsToListEmails (void);
|
|||
void Mai_GetSelUsrsAndListEmails (void);
|
||||
|
||||
bool Mai_CheckIfEmailIsValid (const char *Email);
|
||||
bool Mai_GetEmailFromUsrCod (struct UsrData *UsrDat);
|
||||
bool Mai_GetEmailFromUsrCod (struct Usr_Data *UsrDat);
|
||||
|
||||
void Mai_ShowFormChangeMyEmail (bool IMustFillInEmail,bool IShouldConfirmEmail);
|
||||
void Mai_ShowFormChangeOtherUsrEmail (void);
|
||||
|
@ -88,16 +88,16 @@ void Mai_RemoveOtherUsrEmail (void);
|
|||
|
||||
void May_NewMyUsrEmail (void);
|
||||
void Mai_NewOtherUsrEmail (void);
|
||||
bool Mai_UpdateEmailInDB (const struct UsrData *UsrDat,const char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]);
|
||||
bool Mai_UpdateEmailInDB (const struct Usr_Data *UsrDat,const char NewEmail[Cns_MAX_BYTES_EMAIL_ADDRESS + 1]);
|
||||
|
||||
|
||||
bool Mai_SendMailMsgToConfirmEmail (void);
|
||||
void Mai_ConfirmEmail (void);
|
||||
|
||||
void Mai_CreateFileNameMail (char FileNameMail[PATH_MAX + 1],FILE **FileMail);
|
||||
void Mai_WriteWelcomeNoteEMail (FILE *FileMail,struct UsrData *UsrDat);
|
||||
void Mai_WriteWelcomeNoteEMail (FILE *FileMail,struct Usr_Data *UsrDat);
|
||||
void Mai_WriteFootNoteEMail (FILE *FileMail,Lan_Language_t Language);
|
||||
|
||||
bool Mai_ICanSeeOtherUsrEmail (const struct UsrData *UsrDat);
|
||||
bool Mai_ICanSeeOtherUsrEmail (const struct Usr_Data *UsrDat);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -74,7 +74,7 @@ static const char *Mrk_HeadOrFootStr[2] = // Names of fields in forms
|
|||
static void Mrk_GetNumRowsHeaderAndFooter (struct Mrk_Properties *Marks);
|
||||
static void Mrk_ChangeNumRowsHeaderOrFooter (Brw_HeadOrFoot_t HeaderOrFooter);
|
||||
static bool Mrk_CheckIfCellContainsOnlyIDs (const char *CellContent);
|
||||
static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
|
||||
static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct Usr_Data *UsrDat,
|
||||
const char *PathFileAllMarks,
|
||||
struct Mrk_Properties *Marks);
|
||||
|
||||
|
@ -362,7 +362,7 @@ static bool Mrk_CheckIfCellContainsOnlyIDs (const char *CellContent)
|
|||
/*************************** Show the marks of a user ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct UsrData *UsrDat,
|
||||
static bool Mrk_GetUsrMarks (FILE *FileUsrMarks,struct Usr_Data *UsrDat,
|
||||
const char *PathFileAllMarks,
|
||||
struct Mrk_Properties *Marks)
|
||||
{
|
||||
|
@ -532,7 +532,7 @@ void Mrk_ShowMyMarks (void)
|
|||
FILE *FileUsrMarks;
|
||||
char PathPrivate[PATH_MAX + 1 +
|
||||
PATH_MAX + 1];
|
||||
struct UsrData *UsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
bool UsrIsOK = true;
|
||||
|
||||
/***** Get parameters related to file browser *****/
|
||||
|
@ -637,7 +637,7 @@ void Mrk_GetNotifMyMarks (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned UnsignedNum;
|
||||
Brw_FileBrowser_t FileBrowser;
|
||||
long Cod;
|
||||
|
|
|
@ -717,7 +717,7 @@ static void MchRes_ShowMchResults (struct Gam_Games *Games,
|
|||
const char *GamesSelectedCommas)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
struct UsrData *UsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
struct MchRes_ICanView ICanView;
|
||||
unsigned NumResults;
|
||||
unsigned NumResult;
|
||||
|
@ -1076,7 +1076,7 @@ void MchRes_ShowOneMchResult (void)
|
|||
struct Gam_Game Game;
|
||||
struct Mch_Match Match;
|
||||
Usr_MeOrOther_t MeOrOther;
|
||||
struct UsrData *UsrDat;
|
||||
struct Usr_Data *UsrDat;
|
||||
Dat_StartEndTime_t StartEndTime;
|
||||
char *Id;
|
||||
struct MchPrn_Print Print;
|
||||
|
|
|
@ -123,7 +123,7 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void);
|
|||
static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messages,
|
||||
char Content[Cns_MAX_BYTES_LONG_TEXT + 1]);
|
||||
|
||||
static void Msg_PutHiddenParamAnotherRecipient (const struct UsrData *UsrDat);
|
||||
static void Msg_PutHiddenParamAnotherRecipient (const struct Usr_Data *UsrDat);
|
||||
static void Msg_PutHiddenParamOtherRecipients (void);
|
||||
|
||||
static void Msg_ShowNumMsgsDeleted (unsigned NumMsgs);
|
||||
|
@ -156,15 +156,15 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
|
|||
static bool Msg_WriteCrsOrgMsg (long CrsCod);
|
||||
|
||||
static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs,
|
||||
const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
|
||||
struct UsrData *UsrDat,bool Deleted);
|
||||
struct Usr_Data *UsrDat,bool Deleted);
|
||||
static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod);
|
||||
|
||||
static void Msg_PutFormToBanSender (struct Msg_Messages *Messages,
|
||||
struct UsrData *UsrDat);
|
||||
struct Usr_Data *UsrDat);
|
||||
static void Msg_PutFormToUnbanSender (struct Msg_Messages *Messages,
|
||||
struct UsrData *UsrDat);
|
||||
struct Usr_Data *UsrDat);
|
||||
static void Msg_UnbanSender (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -690,7 +690,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
|
|||
/********* Put hidden parameter for another recipient (one nickname) *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Msg_PutHiddenParamAnotherRecipient (const struct UsrData *UsrDat)
|
||||
static void Msg_PutHiddenParamAnotherRecipient (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
char NickWithArr[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1];
|
||||
|
||||
|
@ -733,7 +733,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
const char *Ptr;
|
||||
unsigned NumRecipients;
|
||||
unsigned NumRecipientsToBeNotifiedByEMail = 0;
|
||||
struct UsrData UsrDstData;
|
||||
struct Usr_Data UsrDstData;
|
||||
int NumErrors = 0;
|
||||
long NewMsgCod = -1L; // Initiliazed to avoid warning
|
||||
bool MsgAlreadyInserted = false;
|
||||
|
@ -2017,7 +2017,7 @@ static void Msg_ShowASentOrReceivedMessage (struct Msg_Messages *Messages,
|
|||
[Msg_RECEIVED] = ActDelRcvMsg,
|
||||
[Msg_SENT ] = ActDelSntMsg,
|
||||
};
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *Title = NULL; // Initialized to avoid warning
|
||||
bool FromThisCrs = false; // Initialized to avoid warning
|
||||
time_t CreatTimeUTC; // Creation time of a message
|
||||
|
@ -2301,7 +2301,7 @@ static void Msg_WriteSentOrReceivedMsgSubject (struct Msg_Messages *Messages,
|
|||
/*****************************************************************************/
|
||||
// Input: UsrDat must hold user's data
|
||||
|
||||
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled)
|
||||
void Msg_WriteMsgAuthor (struct Usr_Data *UsrDat,bool Enabled)
|
||||
{
|
||||
extern const char *Txt_Unknown_or_without_photo;
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
|
@ -2415,7 +2415,7 @@ static bool Msg_WriteCrsOrgMsg (long CrsCod)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs,
|
||||
const struct UsrData *UsrDat)
|
||||
const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Begin form and parameters *****/
|
||||
if (FromThisCrs)
|
||||
|
@ -2443,7 +2443,7 @@ static void Msg_WriteFormToReply (long MsgCod,long CrsCod,bool FromThisCrs,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Msg_WriteMsgFrom (struct Msg_Messages *Messages,
|
||||
struct UsrData *UsrDat,bool Deleted)
|
||||
struct Usr_Data *UsrDat,bool Deleted)
|
||||
{
|
||||
extern const char *Txt_MSG_Sent;
|
||||
extern const char *Txt_MSG_Sent_and_deleted;
|
||||
|
@ -2540,7 +2540,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
|
|||
unsigned Unknown;
|
||||
unsigned ToShow;
|
||||
} NumRecipients;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool Deleted;
|
||||
bool OpenByDst;
|
||||
bool UsrValid;
|
||||
|
@ -2756,7 +2756,7 @@ static long Msg_GetParamMsgCod (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Msg_PutFormToBanSender (struct Msg_Messages *Messages,
|
||||
struct UsrData *UsrDat)
|
||||
struct Usr_Data *UsrDat)
|
||||
{
|
||||
Frm_BeginForm (ActBanUsrMsg);
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages],
|
||||
|
@ -2772,7 +2772,7 @@ static void Msg_PutFormToBanSender (struct Msg_Messages *Messages,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Msg_PutFormToUnbanSender (struct Msg_Messages *Messages,
|
||||
struct UsrData *UsrDat)
|
||||
struct Usr_Data *UsrDat)
|
||||
{
|
||||
Frm_BeginForm (ActUnbUsrMsg);
|
||||
Pag_PutHiddenParamPagNum (Msg_WhatPaginate[Messages->TypeOfMessages],
|
||||
|
@ -2882,7 +2882,7 @@ void Msg_ListBannedUsrs (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsr;
|
||||
unsigned NumUsrs;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Get users banned by me *****/
|
||||
if ((NumUsrs = Msg_DB_GetUsrsBannedBy (&mysql_res,Gbl.Usrs.Me.UsrDat.UsrCod)))
|
||||
|
|
|
@ -113,7 +113,7 @@ void Msg_GetNotifMessage (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
char **ContentStr,long MsgCod,bool GetContent);
|
||||
|
||||
void Msg_WriteMsgNumber (unsigned long MsgNum,bool NewMsg);
|
||||
void Msg_WriteMsgAuthor (struct UsrData *UsrDat,bool Enabled);
|
||||
void Msg_WriteMsgAuthor (struct Usr_Data *UsrDat,bool Enabled);
|
||||
void Msg_WriteMsgDate (time_t TimeUTC,const char *ClassTxt,const char *ClassBg);
|
||||
void Msg_WriteMsgContent (char Content[Cns_MAX_BYTES_LONG_TEXT + 1],
|
||||
bool InsertLinks,bool ChangeBRToRet);
|
||||
|
|
|
@ -140,7 +140,7 @@ static void Net_GetMyWebsAndSocialNetsFromForm (void);
|
|||
/************************** Show webs / social networks **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat)
|
||||
void Net_ShowWebsAndSocialNets (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
Net_WebsAndSocialNetworks_t NumURL;
|
||||
char URL[Cns_MAX_BYTES_WWW + 1];
|
||||
|
|
|
@ -71,7 +71,7 @@ typedef enum
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Net_ShowWebsAndSocialNets (const struct UsrData *UsrDat);
|
||||
void Net_ShowWebsAndSocialNets (const struct Usr_Data *UsrDat);
|
||||
|
||||
void Net_ShowFormMyWebsAndSocialNets (void);
|
||||
void Net_UpdateMyWebsAndSocialNets (void);
|
||||
|
|
|
@ -59,7 +59,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
|
|||
static void Nck_PutParamsRemoveMyNick (void *Nick);
|
||||
static void Nck_PutParamsRemoveOtherNick (void *Nick);
|
||||
|
||||
static void Nck_UpdateUsrNick (struct UsrData *UsrDat);
|
||||
static void Nck_UpdateUsrNick (struct Usr_Data *UsrDat);
|
||||
|
||||
/*****************************************************************************/
|
||||
/********* Check whether a nickname (with initial arroba) if valid ***********/
|
||||
|
@ -181,7 +181,7 @@ static void Nck_ShowFormChangeUsrNickname (bool ItsMe,
|
|||
unsigned NumNicks;
|
||||
unsigned NumNick;
|
||||
char NickWithArr[Nck_MAX_BYTES_NICK_WITH_ARROBA + 1];
|
||||
const struct UsrData *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat :
|
||||
const struct Usr_Data *UsrDat = (ItsMe ? &Gbl.Usrs.Me.UsrDat :
|
||||
&Gbl.Usrs.Other.UsrDat);
|
||||
|
||||
/***** Begin section *****/
|
||||
|
@ -448,7 +448,7 @@ void Nck_UpdateOtherUsrNick (void)
|
|||
/*************************** Update user's nickname **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Nck_UpdateUsrNick (struct UsrData *UsrDat)
|
||||
static void Nck_UpdateUsrNick (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_The_nickname_matches_the_one_you_had_previously_registered;
|
||||
extern const char *Txt_The_nickname_had_been_registered_by_another_user;
|
||||
|
|
|
@ -558,7 +558,7 @@ static void Not_DrawANotice (Not_Listing_t TypeNoticesListing,
|
|||
};
|
||||
static unsigned UniqueId = 0;
|
||||
char *Id;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
char *Anchor = NULL;
|
||||
|
||||
/***** Build anchor string *****/
|
||||
|
|
|
@ -291,11 +291,11 @@ static void Ntf_WriteFormAllNotifications (bool AllNotifications);
|
|||
static bool Ntf_GetAllNotificationsFromForm (void);
|
||||
|
||||
static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
||||
long CrsCod,struct UsrData *UsrDat,long Cod,
|
||||
long CrsCod,struct Usr_Data *UsrDat,long Cod,
|
||||
const struct For_Forums *Forums);
|
||||
static void Ntf_PutHiddenParamNotifyEvent (Ntf_NotifyEvent_t NotifyEvent);
|
||||
|
||||
static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsigned *NumNotif,unsigned *NumMails);
|
||||
static void Ntf_SendPendingNotifByEMailToOneUsr (struct Usr_Data *ToUsrDat,unsigned *NumNotif,unsigned *NumMails);
|
||||
static void Ntf_GetNumNotifSent (long DegCod,long CrsCod,
|
||||
Ntf_NotifyEvent_t NotifyEvent,
|
||||
unsigned *NumEvents,unsigned *NumMails);
|
||||
|
@ -336,7 +336,7 @@ void Ntf_ShowMyNotifications (void)
|
|||
unsigned NumNotifications;
|
||||
bool AllNotifications;
|
||||
Ntf_NotifyEvent_t NotifyEvent = (Ntf_NotifyEvent_t) 0; // Initialized to avoid warning
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
struct Hie_Hierarchy Hie;
|
||||
long Cod;
|
||||
struct For_Forums Forums;
|
||||
|
@ -689,11 +689,11 @@ static bool Ntf_GetAllNotificationsFromForm (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
static Act_Action_t Ntf_StartFormGoToAction (Ntf_NotifyEvent_t NotifyEvent,
|
||||
long CrsCod,struct UsrData *UsrDat,long Cod,
|
||||
long CrsCod,struct Usr_Data *UsrDat,long Cod,
|
||||
const struct For_Forums *Forums)
|
||||
{
|
||||
extern const Act_Action_t For_ActionsSeeFor[For_NUM_TYPES_FORUM];
|
||||
struct FileMetadata FileMetadata;
|
||||
struct Brw_FileMetadata FileMetadata;
|
||||
long InsCod = -1L;
|
||||
long CtrCod = -1L;
|
||||
long DegCod = -1L;
|
||||
|
@ -1042,7 +1042,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsrs = 0; // Initialized to avoid warning
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
struct For_Forum ForumSelected;
|
||||
long InsCod;
|
||||
long CtrCod;
|
||||
|
@ -1203,7 +1203,7 @@ void Ntf_SendPendingNotifByEMailToAllUsrs (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumNotif;
|
||||
unsigned NumTotalNotif = 0;
|
||||
unsigned NumMails;
|
||||
|
@ -1250,7 +1250,7 @@ void Ntf_SendPendingNotifByEMailToAllUsrs (void)
|
|||
/************ Send pending notifications of one user by email ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsigned *NumNotif,unsigned *NumMails)
|
||||
static void Ntf_SendPendingNotifByEMailToOneUsr (struct Usr_Data *ToUsrDat,unsigned *NumNotif,unsigned *NumMails)
|
||||
{
|
||||
extern const char *Txt_NOTIFY_EVENTS_There_is_a_new_event_NO_HTML[1 + Lan_NUM_LANGUAGES];
|
||||
extern const char *Txt_NOTIFY_EVENTS_There_are_X_new_events_NO_HTML[1 + Lan_NUM_LANGUAGES];
|
||||
|
@ -1267,7 +1267,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (struct UsrData *ToUsrDat,unsign
|
|||
unsigned NumNtfs;
|
||||
unsigned NumNtf;
|
||||
Lan_Language_t ToUsrLanguage;
|
||||
struct UsrData FromUsrDat;
|
||||
struct Usr_Data FromUsrDat;
|
||||
Ntf_NotifyEvent_t NotifyEvent = (Ntf_NotifyEvent_t) 0; // Initialized to avoid warning
|
||||
struct Hie_Hierarchy Hie;
|
||||
long Cod;
|
||||
|
|
|
@ -74,7 +74,7 @@ const char *Pwd_PASSWORD_SECTION_ID = "password_section";
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pwd_CheckAndUpdateNewPwd (struct UsrData *UsrDat);
|
||||
static void Pwd_CheckAndUpdateNewPwd (struct Usr_Data *UsrDat);
|
||||
|
||||
static void Pwd_PutLinkToSendNewPasswdParams (void *UsrIdLogin);
|
||||
|
||||
|
@ -189,7 +189,7 @@ void Pwd_UpdateOtherUsrPwd (void)
|
|||
/********************* Check and update new password *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pwd_CheckAndUpdateNewPwd (struct UsrData *UsrDat)
|
||||
static void Pwd_CheckAndUpdateNewPwd (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_You_have_not_written_twice_the_same_new_password;
|
||||
extern const char *Txt_The_password_has_been_changed_successfully;
|
||||
|
@ -292,7 +292,7 @@ void Pwd_ChkIdLoginAndSendNewPwd (void)
|
|||
extern const char *Txt_You_must_enter_your_nick_email_or_ID;
|
||||
extern const char *Txt_There_was_a_problem_sending_an_email_automatically;
|
||||
extern const char *Txt_If_you_have_written_your_ID_nickname_or_email_correctly_;
|
||||
struct ListUsrCods ListUsrCods;
|
||||
struct Usr_ListUsrCods ListUsrCods;
|
||||
unsigned NumUsr;
|
||||
char NewRandomPlainPassword[Pwd_MAX_BYTES_PLAIN_PASSWORD + 1];
|
||||
int ReturnCode;
|
||||
|
|
28
swad_photo.c
28
swad_photo.c
|
@ -89,11 +89,11 @@ static void Pho_PutIconToRequestRemoveMyPhoto (__attribute__((unused)) void *Arg
|
|||
static void Pho_PutIconToRequestRemoveOtherUsrPhoto (__attribute__((unused)) void *Args);
|
||||
static void Pho_ReqOtherUsrPhoto (void);
|
||||
|
||||
static void Pho_ReqPhoto (const struct UsrData *UsrDat);
|
||||
static void Pho_ReqPhoto (const struct Usr_Data *UsrDat);
|
||||
|
||||
static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *UsrDat);
|
||||
static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct Usr_Data *UsrDat);
|
||||
|
||||
static void Pho_UpdatePhoto1 (struct UsrData *UsrDat);
|
||||
static void Pho_UpdatePhoto1 (struct Usr_Data *UsrDat);
|
||||
static void Pho_UpdatePhoto2 (void);
|
||||
|
||||
static long Pho_GetDegWithAvgPhotoLeastRecentlyUpdated (void);
|
||||
|
@ -137,7 +137,7 @@ static void Pho_ComputePhotoSize (const struct Pho_DegPhotos *DegPhotos,
|
|||
/************** Check if I can change the photo of another user **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Pho_ICanChangeOtherUsrPhoto (struct UsrData *UsrDat)
|
||||
bool Pho_ICanChangeOtherUsrPhoto (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** I can change my photo *****/
|
||||
if (Usr_ItsMe (UsrDat->UsrCod))
|
||||
|
@ -270,7 +270,7 @@ static void Pho_ReqOtherUsrPhoto (void)
|
|||
/****************** Show a form for sending an user's photo ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pho_ReqPhoto (const struct UsrData *UsrDat)
|
||||
static void Pho_ReqPhoto (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Hlp_PROFILE_Photo;
|
||||
extern const char *Txt_Photo;
|
||||
|
@ -556,7 +556,7 @@ void Pho_RemoveUsrPhoto (void)
|
|||
/*****************************************************************************/
|
||||
// Return false if no "green" faces detected
|
||||
|
||||
static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct UsrData *UsrDat)
|
||||
static bool Pho_ReceivePhotoAndDetectFaces (bool ItsMe,const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_The_file_is_not_X;
|
||||
extern const char *Txt_Could_not_detect_any_face_in_front_position_;
|
||||
|
@ -828,7 +828,7 @@ void Pho_UpdateUsrPhoto2 (void)
|
|||
/*************** Update a user's photo with a selected face ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Pho_UpdatePhoto1 (struct UsrData *UsrDat)
|
||||
static void Pho_UpdatePhoto1 (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Photo_has_been_updated;
|
||||
char PathPhotoTmp[PATH_MAX + 1]; // Full name (including path and .jpg) of the temporary file with the selected face
|
||||
|
@ -941,7 +941,7 @@ unsigned Pho_UpdateMyClicksWithoutPhoto (void)
|
|||
/********************* Show a user's photo if allowed ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pho_ShowUsrPhotoIfAllowed (struct UsrData *UsrDat,
|
||||
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
bool FormUnique)
|
||||
{
|
||||
|
@ -959,7 +959,7 @@ void Pho_ShowUsrPhotoIfAllowed (struct UsrData *UsrDat,
|
|||
// Returns true if the photo can be shown and false if not.
|
||||
// Public photo means two different things depending on the user's type
|
||||
|
||||
bool Pho_ShowingUsrPhotoIsAllowed (struct UsrData *UsrDat,
|
||||
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
||||
char PhotoURL[PATH_MAX + 1])
|
||||
{
|
||||
bool ICanSeePhoto;
|
||||
|
@ -978,7 +978,7 @@ bool Pho_ShowingUsrPhotoIsAllowed (struct UsrData *UsrDat,
|
|||
// Returns false if photo does not exist
|
||||
// Returns true if link is created successfully
|
||||
|
||||
bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char PhotoURL[PATH_MAX + 1])
|
||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[PATH_MAX + 1])
|
||||
{
|
||||
char PathPublPhoto[PATH_MAX + 1];
|
||||
char PathPrivPhoto[PATH_MAX + 1];
|
||||
|
@ -1032,7 +1032,7 @@ bool Pho_CheckIfPrivPhotoExists (long UsrCod,char PathPrivRelPhoto[PATH_MAX + 1]
|
|||
/********************* Build HTML code for user's photo **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pho_BuildHTMLUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
||||
void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
char **ImgStr,
|
||||
char **CaptionStr)
|
||||
|
@ -1246,7 +1246,7 @@ void Pho_BuildHTMLUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
|||
/*************************** Show a user's photo *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
||||
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
bool FormUnique)
|
||||
{
|
||||
|
@ -1293,7 +1293,7 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
|||
/*****************************************************************************/
|
||||
// Returns true on success, false on error
|
||||
|
||||
bool Pho_RemovePhoto (struct UsrData *UsrDat)
|
||||
bool Pho_RemovePhoto (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Photo_removed;
|
||||
char PathPrivRelPhoto[PATH_MAX + 1];
|
||||
|
@ -1353,7 +1353,7 @@ bool Pho_RemovePhoto (struct UsrData *UsrDat)
|
|||
/***************** Update photo name of an user in database ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Pho_UpdatePhotoName (struct UsrData *UsrDat)
|
||||
void Pho_UpdatePhotoName (struct Usr_Data *UsrDat)
|
||||
{
|
||||
char PathPublPhoto[PATH_MAX + 1];
|
||||
|
||||
|
|
16
swad_photo.h
16
swad_photo.h
|
@ -95,7 +95,7 @@ struct Pho_DegPhotos
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Pho_ICanChangeOtherUsrPhoto (struct UsrData *UsrDat);
|
||||
bool Pho_ICanChangeOtherUsrPhoto (struct Usr_Data *UsrDat);
|
||||
void Pho_PutIconToChangeUsrPhoto (void);
|
||||
void Pho_ReqMyPhoto (void);
|
||||
void Pho_SendPhotoUsr (void);
|
||||
|
@ -115,23 +115,23 @@ void Pho_UpdateUsrPhoto2 (void);
|
|||
|
||||
unsigned Pho_UpdateMyClicksWithoutPhoto (void);
|
||||
|
||||
void Pho_ShowUsrPhotoIfAllowed (struct UsrData *UsrDat,
|
||||
void Pho_ShowUsrPhotoIfAllowed (struct Usr_Data *UsrDat,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
bool FormUnique);
|
||||
bool Pho_ShowingUsrPhotoIsAllowed (struct UsrData *UsrDat,
|
||||
bool Pho_ShowingUsrPhotoIsAllowed (struct Usr_Data *UsrDat,
|
||||
char PhotoURL[PATH_MAX + 1]);
|
||||
bool Pho_BuildLinkToPhoto (const struct UsrData *UsrDat,char PhotoURL[PATH_MAX + 1]);
|
||||
bool Pho_BuildLinkToPhoto (const struct Usr_Data *UsrDat,char PhotoURL[PATH_MAX + 1]);
|
||||
bool Pho_CheckIfPrivPhotoExists (long UsrCod,char PathPrivRelPhoto[PATH_MAX + 1]);
|
||||
void Pho_BuildHTMLUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
||||
void Pho_BuildHTMLUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
char **ImgStr,
|
||||
char **CaptionStr);
|
||||
void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
|
||||
void Pho_ShowUsrPhoto (const struct Usr_Data *UsrDat,const char *PhotoURL,
|
||||
const char *ClassPhoto,Pho_Zoom_t Zoom,
|
||||
bool FormUnique);
|
||||
|
||||
bool Pho_RemovePhoto (struct UsrData *UsrDat);
|
||||
void Pho_UpdatePhotoName (struct UsrData *UsrDat);
|
||||
bool Pho_RemovePhoto (struct Usr_Data *UsrDat);
|
||||
void Pho_UpdatePhotoName (struct Usr_Data *UsrDat);
|
||||
|
||||
void Pho_ChangePhotoVisibility (void);
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ Pri_Visibility_t Pri_GetParamVisibility (const char *ParamName,
|
|||
/*****************************************************************************/
|
||||
// Returns true if it can be shown and false if not.
|
||||
|
||||
bool Pri_ShowingIsAllowed (Pri_Visibility_t Visibility,struct UsrData *UsrDat)
|
||||
bool Pri_ShowingIsAllowed (Pri_Visibility_t Visibility,struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** I always can see my things *****/
|
||||
if (Usr_ItsMe (UsrDat->UsrCod))
|
||||
|
|
|
@ -65,7 +65,7 @@ Pri_Visibility_t Pri_GetVisibilityFromStr (const char *Str);
|
|||
Pri_Visibility_t Pri_GetParamVisibility (const char *ParamName,
|
||||
unsigned MaskAllowedVisibility);
|
||||
|
||||
bool Pri_ShowingIsAllowed (Pri_Visibility_t Visibility,struct UsrData *UsrDat);
|
||||
bool Pri_ShowingIsAllowed (Pri_Visibility_t Visibility,struct Usr_Data *UsrDat);
|
||||
|
||||
//-------------------------------- Figures ------------------------------------
|
||||
void Pri_GetAndShowNumUsrsPerPrivacy (void);
|
||||
|
|
|
@ -77,20 +77,20 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowTimeSinceFirstClick (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowTimeSinceFirstClick (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures);
|
||||
static void Prf_ShowNumCrssWithRole (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumCrssWithRole (const struct Usr_Data *UsrDat,
|
||||
Rol_Role_t Role);
|
||||
static void Prf_ShowNumFilesCurrentlyPublished (const struct UsrData *UsrDat);
|
||||
static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumFilesCurrentlyPublished (const struct Usr_Data *UsrDat);
|
||||
static void Prf_ShowNumClicks (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures);
|
||||
static void Prf_ShowNumFileViews (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumFileViews (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures);
|
||||
static void Prf_ShowNumTimelinePubs (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumTimelinePubs (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures);
|
||||
static void Prf_ShowNumForumPosts (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumForumPosts (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures);
|
||||
static void Prf_ShowNumMessagesSent (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumMessagesSent (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures);
|
||||
static void Prf_BeginListItem (const char *Title,const char *Icon);
|
||||
static void Prf_EndListItem (void);
|
||||
|
@ -108,7 +108,7 @@ static void Prf_GetNumMessagesSentAndStoreAsUsrFigure (long UsrCod);
|
|||
static void Prf_ResetUsrFigures (struct Prf_UsrFigures *UsrFigures);
|
||||
|
||||
static void Prf_GetAndShowRankingFigure (const char *FieldName);
|
||||
static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsMe);
|
||||
static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank,bool ItsMe);
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Suggest who to follow or request user's profile ***************/
|
||||
|
@ -274,7 +274,7 @@ void Prf_GetUsrDatAndShowUserProfile (void)
|
|||
/*****************************************************************************/
|
||||
// Return false on error
|
||||
|
||||
bool Prf_ShowUserProfile (struct UsrData *UsrDat)
|
||||
bool Prf_ShowUserProfile (struct Usr_Data *UsrDat)
|
||||
{
|
||||
unsigned NumFollowing;
|
||||
unsigned NumFollowers;
|
||||
|
@ -372,7 +372,7 @@ void Prf_ChangeExtendedProfileVis (void)
|
|||
/********************** Show details of user's profile ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
||||
void Prf_ShowDetailsUserProfile (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
bool UsrIsBannedFromRanking;
|
||||
struct Prf_UsrFigures UsrFigures;
|
||||
|
@ -439,7 +439,7 @@ void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat)
|
|||
/************** Show time since first click in user's profile ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowTimeSinceFirstClick (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowTimeSinceFirstClick (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures)
|
||||
{
|
||||
extern const char *Txt_TIME_Since;
|
||||
|
@ -503,7 +503,7 @@ static void Prf_ShowTimeSinceFirstClick (const struct UsrData *UsrDat,
|
|||
/*** Show number of courses in which the user has a role in user's profile ***/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumCrssWithRole (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumCrssWithRole (const struct Usr_Data *UsrDat,
|
||||
Rol_Role_t Role)
|
||||
{
|
||||
extern const char *Rol_Icons[Rol_NUM_ROLES];
|
||||
|
@ -537,7 +537,7 @@ static void Prf_ShowNumCrssWithRole (const struct UsrData *UsrDat,
|
|||
/******** Show number of files currently published in user's profile *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumFilesCurrentlyPublished (const struct UsrData *UsrDat)
|
||||
static void Prf_ShowNumFilesCurrentlyPublished (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Files_uploaded;
|
||||
extern const char *Txt_file;
|
||||
|
@ -568,7 +568,7 @@ static void Prf_ShowNumFilesCurrentlyPublished (const struct UsrData *UsrDat)
|
|||
/****************** Show number of clicks in user's profile ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumClicks (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures)
|
||||
{
|
||||
extern const char *Txt_Clicks;
|
||||
|
@ -606,7 +606,7 @@ static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
|
|||
/*************** Show number of file views in user's profile *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumFileViews (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumFileViews (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures)
|
||||
{
|
||||
extern const char *Txt_Downloads;
|
||||
|
@ -643,7 +643,7 @@ static void Prf_ShowNumFileViews (const struct UsrData *UsrDat,
|
|||
/********* Show number of timeline publications in user's profile ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumTimelinePubs (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumTimelinePubs (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures)
|
||||
{
|
||||
extern const char *Txt_Timeline;
|
||||
|
@ -680,7 +680,7 @@ static void Prf_ShowNumTimelinePubs (const struct UsrData *UsrDat,
|
|||
/********** Show number of timeline publications in user's profile ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumForumPosts (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumForumPosts (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures)
|
||||
{
|
||||
extern const char *Txt_Forums;
|
||||
|
@ -717,7 +717,7 @@ static void Prf_ShowNumForumPosts (const struct UsrData *UsrDat,
|
|||
/************** Show number of messages sent in user's profile ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowNumMessagesSent (const struct UsrData *UsrDat,
|
||||
static void Prf_ShowNumMessagesSent (const struct Usr_Data *UsrDat,
|
||||
const struct Prf_UsrFigures *UsrFigures)
|
||||
{
|
||||
extern const char *Txt_Messages;
|
||||
|
@ -1172,7 +1172,7 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs)
|
|||
MYSQL_ROW row;
|
||||
unsigned NumUsr;
|
||||
unsigned Rank;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ItsMe;
|
||||
long FigureHigh = LONG_MAX;
|
||||
long Figure;
|
||||
|
@ -1242,7 +1242,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
|||
unsigned NumUsrs = 0; // Initialized to avoid warning
|
||||
unsigned NumUsr;
|
||||
unsigned Rank;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool ItsMe;
|
||||
double NumClicksPerDayHigh = (double) LONG_MAX;
|
||||
double NumClicksPerDay;
|
||||
|
@ -1304,7 +1304,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
|||
/************** Show user's photo and nickname in ranking list ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsMe)
|
||||
static void Prf_ShowUsrInRanking (struct Usr_Data *UsrDat,unsigned Rank,bool ItsMe)
|
||||
{
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
|
|
|
@ -59,11 +59,11 @@ void Prf_PutLinkRequestAnotherUserProfile (void);
|
|||
void Prf_RequestUserProfile (void);
|
||||
void Prf_GetUsrDatAndShowUserProfile (void);
|
||||
|
||||
bool Prf_ShowUserProfile (struct UsrData *UsrDat);
|
||||
bool Prf_ShowUserProfile (struct Usr_Data *UsrDat);
|
||||
void Prf_ChangeBasicProfileVis (void);
|
||||
void Prf_ChangeExtendedProfileVis (void);
|
||||
|
||||
void Prf_ShowDetailsUserProfile (const struct UsrData *UsrDat);
|
||||
void Prf_ShowDetailsUserProfile (const struct Usr_Data *UsrDat);
|
||||
void Prf_GetUsrFigures (long UsrCod,struct Prf_UsrFigures *UsrFigures);
|
||||
void Prf_CalculateFigures (void);
|
||||
bool Prf_GetAndStoreAllUsrFigures (long UsrCod,struct Prf_UsrFigures *UsrFigures);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "swad_assignment_resource.h"
|
||||
#include "swad_attendance.h"
|
||||
#include "swad_browser.h"
|
||||
#include "swad_browser_resource.h"
|
||||
#include "swad_call_for_exam_resource.h"
|
||||
#include "swad_error.h"
|
||||
#include "swad_exam_resource.h"
|
||||
|
@ -42,7 +42,7 @@
|
|||
#include "swad_program.h"
|
||||
#include "swad_program_database.h"
|
||||
#include "swad_program_resource.h"
|
||||
#include "swad_survey.h"
|
||||
#include "swad_survey_resource.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Private constants ******************************/
|
||||
|
|
|
@ -109,7 +109,7 @@ static const struct
|
|||
|
||||
/***** List of users to select one or more members
|
||||
to be added to a project *****/
|
||||
struct SelectedUsrs Prj_MembersToAdd =
|
||||
struct Usr_SelectedUsrs Prj_MembersToAdd =
|
||||
{
|
||||
.List =
|
||||
{
|
||||
|
|
106
swad_record.c
106
swad_record.c
|
@ -111,7 +111,7 @@ static void Rec_PutParamsShowOfficeHoursOneTch (void);
|
|||
static void Rec_PutParamsShowOfficeHoursSeveralTchs (void);
|
||||
static bool Rec_GetParamShowOfficeHours (void);
|
||||
static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
||||
struct UsrData *UsrDat,const char *Anchor);
|
||||
struct Usr_Data *UsrDat,const char *Anchor);
|
||||
static void Rec_ShowMyCrsRecordUpdated (void);
|
||||
static bool Rec_CheckIfICanEditField (Rec_VisibilityRecordFields_t Visibility);
|
||||
|
||||
|
@ -122,36 +122,36 @@ static void Rec_PutParamsWorks (__attribute__((unused)) void *Args);
|
|||
static void Rec_PutParamsStudent (__attribute__((unused)) void *Args);
|
||||
static void Rec_PutParamsMsgUsr (__attribute__((unused)) void *Args);
|
||||
static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks);
|
||||
static void Rec_ShowPhoto (struct UsrData *UsrDat);
|
||||
static void Rec_ShowFullName (struct UsrData *UsrDat);
|
||||
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks);
|
||||
static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData);
|
||||
static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat,
|
||||
static void Rec_ShowPhoto (struct Usr_Data *UsrDat);
|
||||
static void Rec_ShowFullName (struct Usr_Data *UsrDat);
|
||||
static void Rec_ShowNickname (struct Usr_Data *UsrDat,bool PutFormLinks);
|
||||
static void Rec_ShowCountryInHead (struct Usr_Data *UsrDat,bool ShowData);
|
||||
static void Rec_ShowWebsAndSocialNets (struct Usr_Data *UsrDat,
|
||||
Rec_SharedRecordViewType_t TypeOfView);
|
||||
static void Rec_ShowEmail (struct UsrData *UsrDat);
|
||||
static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *Anchor);
|
||||
static void Rec_ShowRole (struct UsrData *UsrDat,
|
||||
static void Rec_ShowEmail (struct Usr_Data *UsrDat);
|
||||
static void Rec_ShowUsrIDs (struct Usr_Data *UsrDat,const char *Anchor);
|
||||
static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
||||
Rec_SharedRecordViewType_t TypeOfView);
|
||||
static void Rec_ShowSurname1 (struct UsrData *UsrDat,bool PutForm);
|
||||
static void Rec_ShowSurname2 (struct UsrData *UsrDat,bool PutForm);
|
||||
static void Rec_ShowFirstName (struct UsrData *UsrDat,bool PutForm);
|
||||
static void Rec_ShowCountry (struct UsrData *UsrDat,bool PutForm);
|
||||
static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,bool ShowData,bool PutForm);
|
||||
static void Rec_ShowPhone (struct UsrData *UsrDat,bool ShowData,bool PutForm,
|
||||
static void Rec_ShowSurname1 (struct Usr_Data *UsrDat,bool PutForm);
|
||||
static void Rec_ShowSurname2 (struct Usr_Data *UsrDat,bool PutForm);
|
||||
static void Rec_ShowFirstName (struct Usr_Data *UsrDat,bool PutForm);
|
||||
static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm);
|
||||
static void Rec_ShowDateOfBirth (struct Usr_Data *UsrDat,bool ShowData,bool PutForm);
|
||||
static void Rec_ShowPhone (struct Usr_Data *UsrDat,bool ShowData,bool PutForm,
|
||||
unsigned NumPhone);
|
||||
static void Rec_ShowComments (struct UsrData *UsrDat,bool ShowData,bool PutForm);
|
||||
static void Rec_ShowTeacherRows (struct UsrData *UsrDat,struct Ins_Instit *Ins,
|
||||
static void Rec_ShowComments (struct Usr_Data *UsrDat,bool ShowData,bool PutForm);
|
||||
static void Rec_ShowTeacherRows (struct Usr_Data *UsrDat,struct Ins_Instit *Ins,
|
||||
bool ShowData);
|
||||
static void Rec_ShowInstitution (struct Ins_Instit *Ins,bool ShowData);
|
||||
static void Rec_ShowCenter (struct UsrData *UsrDat,bool ShowData);
|
||||
static void Rec_ShowDepartment (struct UsrData *UsrDat,bool ShowData);
|
||||
static void Rec_ShowOffice (struct UsrData *UsrDat,bool ShowData);
|
||||
static void Rec_ShowOfficePhone (struct UsrData *UsrDat,bool ShowData);
|
||||
static void Rec_ShowCenter (struct Usr_Data *UsrDat,bool ShowData);
|
||||
static void Rec_ShowDepartment (struct Usr_Data *UsrDat,bool ShowData);
|
||||
static void Rec_ShowOffice (struct Usr_Data *UsrDat,bool ShowData);
|
||||
static void Rec_ShowOfficePhone (struct Usr_Data *UsrDat,bool ShowData);
|
||||
|
||||
static void Rec_WriteLinkToDataProtectionClause (void);
|
||||
|
||||
static void Rec_GetUsrExtraDataFromRecordForm (struct UsrData *UsrDat);
|
||||
static void Rec_GetUsrCommentsFromForm (struct UsrData *UsrDat);
|
||||
static void Rec_GetUsrExtraDataFromRecordForm (struct Usr_Data *UsrDat);
|
||||
static void Rec_GetUsrCommentsFromForm (struct Usr_Data *UsrDat);
|
||||
|
||||
static void Rec_ShowFormMyInsCtrDpt (bool IAmATeacher);
|
||||
|
||||
|
@ -872,7 +872,7 @@ static void Rec_ListRecordsGsts (Rec_SharedRecordViewType_t TypeOfView)
|
|||
{
|
||||
unsigned NumUsr = 0;
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
char RecordSectionId[32];
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
|
@ -1067,7 +1067,7 @@ static void Rec_ListRecordsStds (Rec_SharedRecordViewType_t ShaTypeOfView,
|
|||
{
|
||||
unsigned NumUsr = 0;
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
char RecordSectionId[32];
|
||||
|
||||
/***** Get list of selected users if not already got *****/
|
||||
|
@ -1280,7 +1280,7 @@ static void Rec_ListRecordsTchs (Rec_SharedRecordViewType_t TypeOfView)
|
|||
struct Tmt_Timetable Timetable;
|
||||
unsigned NumUsr = 0;
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
char RecordSectionId[32];
|
||||
bool ShowOfficeHours;
|
||||
char Width[Cns_MAX_DECIMAL_DIGITS_UINT + 2 + 1];
|
||||
|
@ -1568,7 +1568,7 @@ void Rec_UpdateAndShowOtherCrsRecord (void)
|
|||
// Show form or only data depending on TypeOfView
|
||||
|
||||
static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
||||
struct UsrData *UsrDat,const char *Anchor)
|
||||
struct Usr_Data *UsrDat,const char *Anchor)
|
||||
{
|
||||
extern const char *Hlp_USERS_Students_course_record_card;
|
||||
extern const char *Txt_RECORD_FIELD_VISIBILITY_RECORD[Rec_NUM_TYPES_VISIBILITY];
|
||||
|
@ -1933,7 +1933,7 @@ void Rec_ShowFormSignUpInCrsWithMySharedRecord (void)
|
|||
/*************** Show form to edit the record of a new user ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_ShowFormOtherNewSharedRecord (struct UsrData *UsrDat,Rol_Role_t DefaultRole)
|
||||
void Rec_ShowFormOtherNewSharedRecord (struct Usr_Data *UsrDat,Rol_Role_t DefaultRole)
|
||||
{
|
||||
/***** Show the form *****/
|
||||
/* In this case UsrDat->Roles.InCurrentCrs
|
||||
|
@ -1974,7 +1974,7 @@ void Rec_ShowMySharedRecordUpd (void)
|
|||
/********************** Show user's record for check *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat)
|
||||
void Rec_ShowSharedRecordUnmodifiable (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Get password, user type and user's data from database *****/
|
||||
Usr_GetAllUsrDataFromUsrCod (UsrDat,
|
||||
|
@ -2003,7 +2003,7 @@ void Rec_ShowPublicSharedRecordOtherUsr (void)
|
|||
// Show form or only data depending on TypeOfView
|
||||
|
||||
void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
||||
struct UsrData *UsrDat,const char *Anchor)
|
||||
struct Usr_Data *UsrDat,const char *Anchor)
|
||||
{
|
||||
extern const char *Hlp_USERS_SignUp;
|
||||
extern const char *Hlp_PROFILE_Record;
|
||||
|
@ -2572,7 +2572,7 @@ static void Rec_ShowInstitutionInHead (struct Ins_Instit *Ins,bool PutFormLinks)
|
|||
/********************** Show user's photo in record card *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowPhoto (struct UsrData *UsrDat)
|
||||
static void Rec_ShowPhoto (struct Usr_Data *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -2594,7 +2594,7 @@ static void Rec_ShowPhoto (struct UsrData *UsrDat)
|
|||
/*************************** Show user's full name ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowFullName (struct UsrData *UsrDat)
|
||||
static void Rec_ShowFullName (struct Usr_Data *UsrDat)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"REC_C2_MID LT\"");
|
||||
HTM_DIV_Begin ("class=\"REC_NAME\"");
|
||||
|
@ -2618,7 +2618,7 @@ static void Rec_ShowFullName (struct UsrData *UsrDat)
|
|||
/*************************** Show user's nickname ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
||||
static void Rec_ShowNickname (struct Usr_Data *UsrDat,bool PutFormLinks)
|
||||
{
|
||||
extern const char *Txt_My_public_profile;
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
|
@ -2653,7 +2653,7 @@ static void Rec_ShowNickname (struct UsrData *UsrDat,bool PutFormLinks)
|
|||
/**************************** Show user's country ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData)
|
||||
static void Rec_ShowCountryInHead (struct Usr_Data *UsrDat,bool ShowData)
|
||||
{
|
||||
|
||||
|
||||
|
@ -2669,7 +2669,7 @@ static void Rec_ShowCountryInHead (struct UsrData *UsrDat,bool ShowData)
|
|||
/******************* Show user's webs and social networks ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat,
|
||||
static void Rec_ShowWebsAndSocialNets (struct Usr_Data *UsrDat,
|
||||
Rec_SharedRecordViewType_t TypeOfView)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"REC_C3_MID CT\"");
|
||||
|
@ -2682,7 +2682,7 @@ static void Rec_ShowWebsAndSocialNets (struct UsrData *UsrDat,
|
|||
/***************************** Show user's email *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowEmail (struct UsrData *UsrDat)
|
||||
static void Rec_ShowEmail (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_Email;
|
||||
|
||||
|
@ -2718,7 +2718,7 @@ static void Rec_ShowEmail (struct UsrData *UsrDat)
|
|||
/******************************* Show user's IDs *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *Anchor)
|
||||
static void Rec_ShowUsrIDs (struct Usr_Data *UsrDat,const char *Anchor)
|
||||
{
|
||||
extern const char *Txt_ID;
|
||||
|
||||
|
@ -2741,7 +2741,7 @@ static void Rec_ShowUsrIDs (struct UsrData *UsrDat,const char *Anchor)
|
|||
/************************** Show user's role / sex ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowRole (struct UsrData *UsrDat,
|
||||
static void Rec_ShowRole (struct Usr_Data *UsrDat,
|
||||
Rec_SharedRecordViewType_t TypeOfView)
|
||||
{
|
||||
extern const char *Usr_StringsSexIcons[Usr_NUM_SEXS];
|
||||
|
@ -3018,7 +3018,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
|
|||
/*************************** Show user's surname 1 ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowSurname1 (struct UsrData *UsrDat,bool PutForm)
|
||||
static void Rec_ShowSurname1 (struct Usr_Data *UsrDat,bool PutForm)
|
||||
{
|
||||
extern const char *Txt_Surname_1;
|
||||
char *Label;
|
||||
|
@ -3060,7 +3060,7 @@ static void Rec_ShowSurname1 (struct UsrData *UsrDat,bool PutForm)
|
|||
/*************************** Show user's surname 2 ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowSurname2 (struct UsrData *UsrDat,bool PutForm)
|
||||
static void Rec_ShowSurname2 (struct Usr_Data *UsrDat,bool PutForm)
|
||||
{
|
||||
extern const char *Txt_Surname_2;
|
||||
|
||||
|
@ -3096,7 +3096,7 @@ static void Rec_ShowSurname2 (struct UsrData *UsrDat,bool PutForm)
|
|||
/************************** Show user's first name ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowFirstName (struct UsrData *UsrDat,bool PutForm)
|
||||
static void Rec_ShowFirstName (struct Usr_Data *UsrDat,bool PutForm)
|
||||
{
|
||||
extern const char *Txt_First_name;
|
||||
char *Label;
|
||||
|
@ -3140,7 +3140,7 @@ static void Rec_ShowFirstName (struct UsrData *UsrDat,bool PutForm)
|
|||
/**************************** Show user's country ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowCountry (struct UsrData *UsrDat,bool PutForm)
|
||||
static void Rec_ShowCountry (struct Usr_Data *UsrDat,bool PutForm)
|
||||
{
|
||||
extern const char *Txt_Country;
|
||||
extern const char *Txt_Another_country;
|
||||
|
@ -3193,7 +3193,7 @@ static void Rec_ShowCountry (struct UsrData *UsrDat,bool PutForm)
|
|||
/************************ Show user's date of birth **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,bool ShowData,bool PutForm)
|
||||
static void Rec_ShowDateOfBirth (struct Usr_Data *UsrDat,bool ShowData,bool PutForm)
|
||||
{
|
||||
extern const char *Txt_Date_of_birth;
|
||||
|
||||
|
@ -3229,7 +3229,7 @@ static void Rec_ShowDateOfBirth (struct UsrData *UsrDat,bool ShowData,bool PutFo
|
|||
/*****************************************************************************/
|
||||
// NumPhone can be 0 or 1
|
||||
|
||||
static void Rec_ShowPhone (struct UsrData *UsrDat,bool ShowData,bool PutForm,
|
||||
static void Rec_ShowPhone (struct Usr_Data *UsrDat,bool ShowData,bool PutForm,
|
||||
unsigned NumPhone)
|
||||
{
|
||||
extern const char *Txt_Phone;
|
||||
|
@ -3286,7 +3286,7 @@ static void Rec_ShowPhone (struct UsrData *UsrDat,bool ShowData,bool PutForm,
|
|||
/************************** Show user's comments *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowComments (struct UsrData *UsrDat,bool ShowData,bool PutForm)
|
||||
static void Rec_ShowComments (struct Usr_Data *UsrDat,bool ShowData,bool PutForm)
|
||||
{
|
||||
extern const char *Txt_USER_comments;
|
||||
|
||||
|
@ -3328,7 +3328,7 @@ static void Rec_ShowComments (struct UsrData *UsrDat,bool ShowData,bool PutForm)
|
|||
/************************** Show user's institution **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowTeacherRows (struct UsrData *UsrDat,struct Ins_Instit *Ins,
|
||||
static void Rec_ShowTeacherRows (struct Usr_Data *UsrDat,struct Ins_Instit *Ins,
|
||||
bool ShowData)
|
||||
{
|
||||
/***** Institution *****/
|
||||
|
@ -3384,7 +3384,7 @@ static void Rec_ShowInstitution (struct Ins_Instit *Ins,bool ShowData)
|
|||
/*************************** Show user's center ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowCenter (struct UsrData *UsrDat,bool ShowData)
|
||||
static void Rec_ShowCenter (struct Usr_Data *UsrDat,bool ShowData)
|
||||
{
|
||||
extern const char *Txt_Center;
|
||||
struct Ctr_Center Ctr;
|
||||
|
@ -3422,7 +3422,7 @@ static void Rec_ShowCenter (struct UsrData *UsrDat,bool ShowData)
|
|||
/************************* Show user's department ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowDepartment (struct UsrData *UsrDat,bool ShowData)
|
||||
static void Rec_ShowDepartment (struct Usr_Data *UsrDat,bool ShowData)
|
||||
{
|
||||
extern const char *Txt_Department;
|
||||
struct Dpt_Department Dpt;
|
||||
|
@ -3460,7 +3460,7 @@ static void Rec_ShowDepartment (struct UsrData *UsrDat,bool ShowData)
|
|||
/*************************** Show user's office ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowOffice (struct UsrData *UsrDat,bool ShowData)
|
||||
static void Rec_ShowOffice (struct Usr_Data *UsrDat,bool ShowData)
|
||||
{
|
||||
extern const char *Txt_Office;
|
||||
|
||||
|
@ -3484,7 +3484,7 @@ static void Rec_ShowOffice (struct UsrData *UsrDat,bool ShowData)
|
|||
/************************ Show user's office phone ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_ShowOfficePhone (struct UsrData *UsrDat,bool ShowData)
|
||||
static void Rec_ShowOfficePhone (struct Usr_Data *UsrDat,bool ShowData)
|
||||
{
|
||||
extern const char *Txt_Phone;
|
||||
|
||||
|
@ -3595,7 +3595,7 @@ Rol_Role_t Rec_GetRoleFromRecordForm (void)
|
|||
/*************** Get data fields of shared record from form ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rec_GetUsrNameFromRecordForm (struct UsrData *UsrDat)
|
||||
void Rec_GetUsrNameFromRecordForm (struct Usr_Data *UsrDat)
|
||||
{
|
||||
char Surname1[Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1]; // Temporary surname 1
|
||||
char FrstName[Usr_MAX_BYTES_FIRSTNAME_OR_SURNAME + 1]; // Temporary first name
|
||||
|
@ -3622,7 +3622,7 @@ void Rec_GetUsrNameFromRecordForm (struct UsrData *UsrDat)
|
|||
Usr_BuildFullName (UsrDat);
|
||||
}
|
||||
|
||||
static void Rec_GetUsrExtraDataFromRecordForm (struct UsrData *UsrDat)
|
||||
static void Rec_GetUsrExtraDataFromRecordForm (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Get sex from form *****/
|
||||
UsrDat->Sex = (Usr_Sex_t)
|
||||
|
@ -3650,7 +3650,7 @@ static void Rec_GetUsrExtraDataFromRecordForm (struct UsrData *UsrDat)
|
|||
/********** Get the comments of the record of a user from the form ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Rec_GetUsrCommentsFromForm (struct UsrData *UsrDat)
|
||||
static void Rec_GetUsrCommentsFromForm (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Check if memory is allocated for comments *****/
|
||||
if (!UsrDat->Comments)
|
||||
|
|
|
@ -155,18 +155,18 @@ void Rec_AllocMemFieldsRecordsCrs (void);
|
|||
void Rec_FreeMemFieldsRecordsCrs (void);
|
||||
|
||||
void Rec_ShowFormSignUpInCrsWithMySharedRecord (void);
|
||||
void Rec_ShowFormOtherNewSharedRecord (struct UsrData *UsrDat,Rol_Role_t DefaultRole);
|
||||
void Rec_ShowFormOtherNewSharedRecord (struct Usr_Data *UsrDat,Rol_Role_t DefaultRole);
|
||||
void Rec_ShowOtherSharedRecordEditable (void);
|
||||
void Rec_ShowMySharedRecordUpd (void);
|
||||
void Rec_ShowSharedRecordUnmodifiable (struct UsrData *UsrDat);
|
||||
void Rec_ShowSharedRecordUnmodifiable (struct Usr_Data *UsrDat);
|
||||
void Rec_ShowPublicSharedRecordOtherUsr (void);
|
||||
void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
||||
struct UsrData *UsrDat,const char *Anchor);
|
||||
struct Usr_Data *UsrDat,const char *Anchor);
|
||||
void Rec_PutParamUsrCodEncrypted (__attribute__((unused)) void *Args);
|
||||
|
||||
void Rec_UpdateMyRecord (void);
|
||||
Rol_Role_t Rec_GetRoleFromRecordForm (void);
|
||||
void Rec_GetUsrNameFromRecordForm (struct UsrData *UsrDat);
|
||||
void Rec_GetUsrNameFromRecordForm (struct Usr_Data *UsrDat);
|
||||
|
||||
void Rec_ShowMySharedRecordAndMore (void);
|
||||
void Rec_ChgCountryOfMyInstitution (void);
|
||||
|
|
|
@ -407,7 +407,7 @@ Rol_Role_t Rol_GetRoleUsrInCrs (long UsrCod,long CrsCod)
|
|||
// Roles >=0 ==> already filled/calculated ==> nothing to do
|
||||
// Roles <0 ==> not yet filled/calculated ==> get roles
|
||||
|
||||
void Rol_GetRolesInAllCrss (struct UsrData *UsrDat)
|
||||
void Rol_GetRolesInAllCrss (struct Usr_Data *UsrDat)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
|
|
@ -45,7 +45,7 @@ void Rol_FlushCacheMyRoleInCurrentCrs (void);
|
|||
Rol_Role_t Rol_GetMyRoleInCrs (long CrsCod);
|
||||
void Rol_FlushCacheRoleUsrInCrs (void);
|
||||
Rol_Role_t Rol_GetRoleUsrInCrs (long UsrCod,long CrsCod);
|
||||
void Rol_GetRolesInAllCrss (struct UsrData *UsrDat);
|
||||
void Rol_GetRolesInAllCrss (struct Usr_Data *UsrDat);
|
||||
|
||||
Rol_Role_t Rol_ConvertUnsignedStrToRole (const char *UnsignedStr);
|
||||
unsigned Rol_ConvertUnsignedStrToRoles (const char *UnsignedStr);
|
||||
|
|
|
@ -1086,7 +1086,7 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
|||
unsigned NumPagesAfter;
|
||||
unsigned NumPagsTotal;
|
||||
char *Title;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
MYSQL_ROW row;
|
||||
long LogCod;
|
||||
Rol_Role_t RoleFromLog;
|
||||
|
@ -1336,7 +1336,7 @@ static void Sta_ShowNumHitsPerUsr (Sta_CountType_t CountType,
|
|||
unsigned NumHit;
|
||||
struct Sta_Hits Hits;
|
||||
unsigned BarWidth;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Initialize user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
|
|
@ -295,7 +295,7 @@ void Str_AnalyzeTxtAndStoreNotifyEventToMentionedUsrs (long PubCod,const char *T
|
|||
const char *PtrEnd;
|
||||
size_t Length; // Length of the nickname
|
||||
} Nickname;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool CreateNotif;
|
||||
bool NotifyByEmail;
|
||||
|
||||
|
|
101
swad_survey.c
101
swad_survey.c
|
@ -88,9 +88,6 @@ struct Svy_Question // Must be initialized to 0 before using it
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Svy_ResetSurveys (struct Svy_Surveys *Surveys);
|
||||
|
||||
static void Svy_ListAllSurveys (struct Svy_Surveys *Surveys);
|
||||
static bool Svy_CheckIfICanCreateSvy (void);
|
||||
static void Svy_PutIconsListSurveys (void *Surveys);
|
||||
static void Svy_PutIconToCreateNewSvy (struct Svy_Surveys *Surveys);
|
||||
|
@ -114,9 +111,6 @@ static void Svy_GetListSurveys (struct Svy_Surveys *Surveys);
|
|||
static void Svy_SetAllowedAndHiddenScopes (unsigned *ScopesAllowed,
|
||||
unsigned *HiddenAllowed);
|
||||
|
||||
static void Svy_PutParamSvyCod (long SvyCod);
|
||||
static long Svy_GetParamSvyCod (void);
|
||||
|
||||
static void Svy_PutButtonToResetSurvey (struct Svy_Surveys *Surveys);
|
||||
|
||||
static void Svy_SetDefaultAndAllowedScope (struct Svy_Survey *Svy);
|
||||
|
@ -160,7 +154,7 @@ static void Svy_ReceiveAndStoreUserAnswersToASurvey (long SvyCod);
|
|||
/*************************** Reset surveys context ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Svy_ResetSurveys (struct Svy_Surveys *Surveys)
|
||||
void Svy_ResetSurveys (struct Svy_Surveys *Surveys)
|
||||
{
|
||||
Surveys->LstIsRead = false; // Is the list already read from database, or it needs to be read?
|
||||
Surveys->Num = 0; // Number of surveys
|
||||
|
@ -195,7 +189,7 @@ void Svy_SeeAllSurveys (void)
|
|||
/***************************** Show all surveys ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Svy_ListAllSurveys (struct Svy_Surveys *Surveys)
|
||||
void Svy_ListAllSurveys (struct Svy_Surveys *Surveys)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Surveys;
|
||||
extern const char *Txt_Surveys;
|
||||
|
@ -1400,7 +1394,7 @@ void Svy_GetNotifSurvey (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
|||
/******************* Write parameter with code of survey *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Svy_PutParamSvyCod (long SvyCod)
|
||||
void Svy_PutParamSvyCod (long SvyCod)
|
||||
{
|
||||
Par_PutHiddenParamLong (NULL,"SvyCod",SvyCod);
|
||||
}
|
||||
|
@ -1409,7 +1403,7 @@ static void Svy_PutParamSvyCod (long SvyCod)
|
|||
/******************** Get parameter with code of survey **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static long Svy_GetParamSvyCod (void)
|
||||
long Svy_GetParamSvyCod (void)
|
||||
{
|
||||
/***** Get code of survey *****/
|
||||
return Par_GetParToLong ("SvyCod");
|
||||
|
@ -3453,90 +3447,3 @@ void Svy_GetAndShowSurveysStats (void)
|
|||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************************** Get link to survey *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Svy_GetLinkToSurvey (void)
|
||||
{
|
||||
extern const char *Txt_Link_to_resource_X_copied_into_clipboard;
|
||||
struct Svy_Surveys Surveys;
|
||||
long SvyCod;
|
||||
char Title[Svy_MAX_BYTES_SURVEY_TITLE + 1];
|
||||
|
||||
/***** Reset surveys context *****/
|
||||
Svy_ResetSurveys (&Surveys);
|
||||
|
||||
/***** Get survey code *****/
|
||||
if ((SvyCod = Svy_GetParamSvyCod ()) <= 0)
|
||||
Err_WrongSurveyExit ();
|
||||
|
||||
/***** Get survey title *****/
|
||||
Svy_DB_GetSurveyTitle (SvyCod,Title);
|
||||
|
||||
/***** Copy link to survey into resource clipboard *****/
|
||||
Prg_DB_CopyToClipboard (PrgRsc_SURVEY,SvyCod);
|
||||
|
||||
/***** Write sucess message *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Link_to_resource_X_copied_into_clipboard,
|
||||
Title);
|
||||
|
||||
/***** Show surveys again *****/
|
||||
Svy_ListAllSurveys (&Surveys);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Write survey in course program ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void SvyRsc_WriteSurveyInCrsProgram (long SvyCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle)
|
||||
{
|
||||
extern const char *Txt_Actions[Act_NUM_ACTIONS];
|
||||
char Title[Svy_MAX_BYTES_SURVEY_TITLE + 1];
|
||||
|
||||
/***** Get survey title *****/
|
||||
Svy_DB_GetSurveyTitle (SvyCod,Title);
|
||||
|
||||
/***** Begin form to go to survey *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
Frm_BeginForm (ActSeeSvy);
|
||||
Svy_PutParamSvyCod (SvyCod);
|
||||
HTM_BUTTON_Submit_Begin (Txt_Actions[ActSeeSvy],
|
||||
"class=\"LM BT_LINK PRG_LNK_%s\"",
|
||||
The_GetSuffix ());
|
||||
}
|
||||
|
||||
/***** Icon depending on type ******/
|
||||
if (PutFormToGo)
|
||||
Ico_PutIconLink (Icon,Ico_BLACK,ActSeeSvy);
|
||||
else
|
||||
Ico_PutIconOn (Icon,Ico_BLACK,IconTitle);
|
||||
|
||||
/***** Write Name of the course and date of exam *****/
|
||||
HTM_Txt (Title);
|
||||
|
||||
/***** End form to download file *****/
|
||||
if (PutFormToGo)
|
||||
{
|
||||
/* End form */
|
||||
HTM_BUTTON_End ();
|
||||
|
||||
Frm_EndForm ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Get survey title from survey code *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void SvyRsc_GetTitleFromSvyCod (long SvyCod,char *Title,size_t TitleSize)
|
||||
{
|
||||
char TitleFromDB[Svy_MAX_BYTES_SURVEY_TITLE + 1];
|
||||
|
||||
/***** Get survey title *****/
|
||||
Svy_DB_GetSurveyTitle (SvyCod,TitleFromDB);
|
||||
Str_Copy (Title,TitleFromDB,TitleSize);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
/*****************************************************************************/
|
||||
|
||||
#include "swad_date.h"
|
||||
#include "swad_hierarchy_level.h"
|
||||
#include "swad_notification.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Public types and constants ***********************/
|
||||
|
@ -85,7 +87,10 @@ typedef enum
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Svy_ResetSurveys (struct Svy_Surveys *Surveys);
|
||||
|
||||
void Svy_SeeAllSurveys (void);
|
||||
void Svy_ListAllSurveys (struct Svy_Surveys *Surveys);
|
||||
void Svy_SeeOneSurvey (void);
|
||||
void Svy_PutHiddenParamSvyOrder (Dat_StartEndTime_t SelectedOrder);
|
||||
void Svy_RequestCreatOrEditSvy (void);
|
||||
|
@ -95,6 +100,8 @@ void Svy_FreeListSurveys (struct Svy_Surveys *Surveys);
|
|||
void Svy_GetNotifSurvey (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
char **ContentStr,
|
||||
long SvyCod,bool GetContent);
|
||||
void Svy_PutParamSvyCod (long SvyCod);
|
||||
long Svy_GetParamSvyCod (void);
|
||||
void Svy_AskRemSurvey (void);
|
||||
void Svy_RemoveSurvey (void);
|
||||
void Svy_AskResetSurvey (void);
|
||||
|
@ -117,9 +124,4 @@ unsigned Svy_GetNumCrsSurveys (HieLvl_Level_t Scope,unsigned *NumNotif);
|
|||
//-------------------------------- Figures ------------------------------------
|
||||
void Svy_GetAndShowSurveysStats (void);
|
||||
|
||||
//--------------------------- Program resources -------------------------------
|
||||
void Svy_GetLinkToSurvey (void);
|
||||
void SvyRsc_WriteSurveyInCrsProgram (long SvyCod,bool PutFormToGo,
|
||||
const char *Icon,const char *IconTitle);
|
||||
void SvyRsc_GetTitleFromSvyCod (long SvyCod,char *Title,size_t TitleSize);
|
||||
#endif
|
||||
|
|
|
@ -98,7 +98,7 @@ static void TstPrn_WriteTxtAnsToFill (const struct TstPrn_PrintedQuestion *Print
|
|||
|
||||
static void TstPrn_PutCheckBoxAllowTeachers (bool AllowTeachers);
|
||||
|
||||
static void TstPrn_WriteQstAndAnsExam (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
|
||||
struct TstPrn_PrintedQuestion PrintedQuestions[TstCfg_MAX_QUESTIONS_PER_TEST],
|
||||
unsigned QstInd,
|
||||
time_t TimeUTC[Dat_NUM_START_END_TIME],
|
||||
|
@ -118,31 +118,31 @@ static void TstPrn_GetCorrectAndComputeChoAnsScore (struct TstPrn_PrintedQuestio
|
|||
static void TstPrn_GetCorrectAndComputeTxtAnsScore (struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question);
|
||||
//-----------------------------------------------------------------------------
|
||||
static void TstPrn_WriteIntAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteIntAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
__attribute__((unused)) const char *ClassTxt,
|
||||
__attribute__((unused)) const char *ClassFeedback);
|
||||
static void TstPrn_WriteFltAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteFltAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
__attribute__((unused)) const char *ClassTxt,
|
||||
__attribute__((unused)) const char *ClassFeedback);
|
||||
static void TstPrn_WriteTF_AnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteTF_AnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
__attribute__((unused)) const char *ClassTxt,
|
||||
__attribute__((unused)) const char *ClassFeedback);
|
||||
static void TstPrn_WriteChoAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteChoAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
const char *ClassTxt,
|
||||
const char *ClassFeedback);
|
||||
static void TstPrn_WriteTxtAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteTxtAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -150,13 +150,13 @@ static void TstPrn_WriteTxtAnsPrint (struct UsrData *UsrDat,
|
|||
__attribute__((unused)) const char *ClassFeedback);
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void TstPrn_WriteHeadUserCorrect (struct UsrData *UsrDat);
|
||||
static void TstPrn_WriteHeadUserCorrect (struct Usr_Data *UsrDat);
|
||||
|
||||
static void TstPrn_PutFormToSelectUsrsToViewUsrsPrints (__attribute__((unused)) void *Args);
|
||||
|
||||
static void TstPrn_ShowUsrsPrints (__attribute__((unused)) void *Args);
|
||||
static void TstPrn_ShowHeaderPrints (Usr_MeOrOther_t MeOrOther);
|
||||
static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat);
|
||||
static void TstPrn_ShowUsrPrints (struct Usr_Data *UsrDat);
|
||||
static void TstPrn_ShowPrintsSummaryRow (bool ItsMe,
|
||||
unsigned NumPrints,
|
||||
struct TstPrn_NumQuestions *NumTotalQsts,
|
||||
|
@ -581,7 +581,7 @@ void TstPrn_ShowPrintAfterAssess (struct TstPrn_Print *Print)
|
|||
/********** Write a row of a test, with one question and its answer **********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteQstAndAnsExam (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
|
||||
struct TstPrn_PrintedQuestion PrintedQuestions[TstCfg_MAX_QUESTIONS_PER_TEST],
|
||||
unsigned QstInd,
|
||||
time_t TimeUTC[Dat_NUM_START_END_TIME],
|
||||
|
@ -1154,14 +1154,14 @@ void TstPrn_ShowGrade (double Grade,double MaxGrade)
|
|||
/************* Write answers of a question when assessing a test *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void TstPrn_WriteAnswersExam (struct UsrData *UsrDat,
|
||||
void TstPrn_WriteAnswersExam (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
const char *ClassTxt,
|
||||
const char *ClassFeedback)
|
||||
{
|
||||
void (*TstPrn_WriteAnsExam[Qst_NUM_ANS_TYPES]) (struct UsrData *UsrDat,
|
||||
void (*TstPrn_WriteAnsExam[Qst_NUM_ANS_TYPES]) (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -1185,7 +1185,7 @@ void TstPrn_WriteAnswersExam (struct UsrData *UsrDat,
|
|||
/******************* Write integer answer in a test print ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteIntAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteIntAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -1249,7 +1249,7 @@ static void TstPrn_WriteIntAnsPrint (struct UsrData *UsrDat,
|
|||
/******************** Write float answer in an test print ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteFltAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteFltAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -1313,7 +1313,7 @@ static void TstPrn_WriteFltAnsPrint (struct UsrData *UsrDat,
|
|||
/***************** Write false / true answer in a test print *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteTF_AnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteTF_AnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -1365,7 +1365,7 @@ static void TstPrn_WriteTF_AnsPrint (struct UsrData *UsrDat,
|
|||
/********** Write single or multiple choice answer in a test print ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteChoAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteChoAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -1509,7 +1509,7 @@ static void TstPrn_WriteChoAnsPrint (struct UsrData *UsrDat,
|
|||
/************** Write text answer when assessing a test print ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteTxtAnsPrint (struct UsrData *UsrDat,
|
||||
static void TstPrn_WriteTxtAnsPrint (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -1636,7 +1636,7 @@ static void TstPrn_WriteTxtAnsPrint (struct UsrData *UsrDat,
|
|||
/********* one for the user's answer and other for the correct answer ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_WriteHeadUserCorrect (struct UsrData *UsrDat)
|
||||
static void TstPrn_WriteHeadUserCorrect (struct Usr_Data *UsrDat)
|
||||
{
|
||||
extern const char *Txt_User[Usr_NUM_SEXS];
|
||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
@ -1841,7 +1841,7 @@ static void TstPrn_ShowHeaderPrints (Usr_MeOrOther_t MeOrOther)
|
|||
/************ Show the test prints of a user in the current course ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstPrn_ShowUsrPrints (struct UsrData *UsrDat)
|
||||
static void TstPrn_ShowUsrPrints (struct Usr_Data *UsrDat)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumPrints;
|
||||
|
@ -2481,7 +2481,7 @@ static void TstPrn_ShowTagsPresentInAPrint (long PrnCod)
|
|||
/**************** Show user's and correct answers of a test ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void TstPrn_ShowPrintAnswers (struct UsrData *UsrDat,
|
||||
void TstPrn_ShowPrintAnswers (struct Usr_Data *UsrDat,
|
||||
unsigned NumQsts,
|
||||
struct TstPrn_PrintedQuestion PrintedQuestions[TstCfg_MAX_QUESTIONS_PER_TEST],
|
||||
time_t TimeUTC[Dat_NUM_START_END_TIME],
|
||||
|
|
|
@ -128,7 +128,7 @@ void TstPrn_ComputeAndShowGrade (unsigned NumQsts,double Score,double MaxGrade);
|
|||
double TstPrn_ComputeGrade (unsigned NumQsts,double Score,double MaxGrade);
|
||||
void TstPrn_ShowGrade (double Grade,double MaxGrade);
|
||||
|
||||
void TstPrn_WriteAnswersExam (struct UsrData *UsrDat,
|
||||
void TstPrn_WriteAnswersExam (struct Usr_Data *UsrDat,
|
||||
const struct TstPrn_PrintedQuestion *PrintedQuestion,
|
||||
struct Qst_Question *Question,
|
||||
bool ICanView[TstVis_NUM_ITEMS_VISIBILITY],
|
||||
|
@ -144,7 +144,7 @@ void TstPrn_PutParamPrnCod (long ExaCod);
|
|||
long TstPrn_GetParamPrnCod (void);
|
||||
|
||||
void TstPrn_ShowOnePrint (void);
|
||||
void TstPrn_ShowPrintAnswers (struct UsrData *UsrDat,
|
||||
void TstPrn_ShowPrintAnswers (struct Usr_Data *UsrDat,
|
||||
unsigned NumQsts,
|
||||
struct TstPrn_PrintedQuestion PrintedQuestions[TstCfg_MAX_QUESTIONS_PER_TEST],
|
||||
time_t TimeUTC[Dat_NUM_START_END_TIME],
|
||||
|
|
|
@ -66,7 +66,7 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TmlCom_ShowAuthorPhoto (struct UsrData *UsrDat);
|
||||
static void TmlCom_ShowAuthorPhoto (struct Usr_Data *UsrDat);
|
||||
static void TmlCom_PutFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
||||
long NotCod);
|
||||
|
||||
|
@ -88,12 +88,12 @@ static void TmlCom_CheckAndWriteComm (const struct Tml_Timeline *Timeline,
|
|||
static void TmlCom_WriteComm (const struct Tml_Timeline *Timeline,
|
||||
struct TmlCom_Comment *Com);
|
||||
static void TmlCom_WriteAuthorTimeAndContent (struct TmlCom_Comment *Com,
|
||||
const struct UsrData *UsrDat);
|
||||
static void TmlCom_WriteAuthorName (const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
static void TmlCom_WriteAuthorName (const struct Usr_Data *UsrDat);
|
||||
static void TmlCom_WriteContent (struct TmlCom_Comment *Com);
|
||||
static void TmlCom_WriteButtons (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlCom_Comment *Com,
|
||||
const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
|
||||
static void TmlCom_PutFormToRemoveComm (const struct Tml_Timeline *Timeline,
|
||||
long PubCod);
|
||||
|
@ -183,7 +183,7 @@ void TmlCom_PutPhotoAndFormToWriteNewComm (const struct Tml_Timeline *Timeline,
|
|||
/********************* Show photo of author of a comment *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TmlCom_ShowAuthorPhoto (struct UsrData *UsrDat)
|
||||
static void TmlCom_ShowAuthorPhoto (struct Usr_Data *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -560,7 +560,7 @@ static void TmlCom_CheckAndWriteComm (const struct Tml_Timeline *Timeline,
|
|||
static void TmlCom_WriteComm (const struct Tml_Timeline *Timeline,
|
||||
struct TmlCom_Comment *Com)
|
||||
{
|
||||
struct UsrData UsrDat; // Author of the comment
|
||||
struct Usr_Data UsrDat; // Author of the comment
|
||||
|
||||
/***** Get author's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -594,7 +594,7 @@ static void TmlCom_WriteComm (const struct Tml_Timeline *Timeline,
|
|||
/*****************************************************************************/
|
||||
|
||||
static void TmlCom_WriteAuthorTimeAndContent (struct TmlCom_Comment *Com,
|
||||
const struct UsrData *UsrDat) // Author
|
||||
const struct Usr_Data *UsrDat) // Author
|
||||
{
|
||||
/***** Write author's full name and nickname *****/
|
||||
TmlCom_WriteAuthorName (UsrDat);
|
||||
|
@ -610,7 +610,7 @@ static void TmlCom_WriteAuthorTimeAndContent (struct TmlCom_Comment *Com,
|
|||
/*************** Write name of author of a comment to a note *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TmlCom_WriteAuthorName (const struct UsrData *UsrDat) // Author
|
||||
static void TmlCom_WriteAuthorName (const struct Usr_Data *UsrDat) // Author
|
||||
{
|
||||
extern const char *Txt_My_public_profile;
|
||||
extern const char *Txt_Another_user_s_profile;
|
||||
|
@ -658,7 +658,7 @@ static void TmlCom_WriteContent (struct TmlCom_Comment *Com)
|
|||
|
||||
static void TmlCom_WriteButtons (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlCom_Comment *Com,
|
||||
const struct UsrData *UsrDat) // Author
|
||||
const struct Usr_Data *UsrDat) // Author
|
||||
{
|
||||
static unsigned NumDiv = 0; // Used to create unique div id for fav
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ static void TmlNot_WriteTopMessage (Tml_TopMessage_t TopMessage,long PublisherCo
|
|||
static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not);
|
||||
static void TmlNot_WriteAuthorTimeAndContent (const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
|
||||
static void TmlNot_WriteContent (const struct TmlNot_Note *Not);
|
||||
static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not);
|
||||
|
@ -95,16 +95,16 @@ static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
|||
|
||||
static void TmlNot_WriteButtonsAndComms (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
static void TmlNot_WriteButtonToAddAComm (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const char IdNewComm[Frm_MAX_BYTES_ID + 1]);
|
||||
static void TmlNot_WriteFavShaRemAndComms (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
static void TmlNot_WriteFavShaRem (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat);
|
||||
const struct Usr_Data *UsrDat);
|
||||
|
||||
static void TmlNot_PutFormToRemoveNote (const struct Tml_Timeline *Timeline,
|
||||
long NotCod);
|
||||
|
@ -127,7 +127,7 @@ static void TmlNot_ResetNote (struct TmlNot_Note *Not);
|
|||
void TmlNot_ShowHighlightedNote (struct Tml_Timeline *Timeline,
|
||||
struct TmlNot_Note *Not)
|
||||
{
|
||||
struct UsrData PublisherDat;
|
||||
struct Usr_Data PublisherDat;
|
||||
Ntf_NotifyEvent_t NotifyEvent;
|
||||
static const Tml_TopMessage_t TopMessages[Ntf_NUM_NOTIFY_EVENTS] =
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
|
|||
static void TmlNot_WriteTopMessage (Tml_TopMessage_t TopMessage,long PublisherCod)
|
||||
{
|
||||
extern const char *Txt_TIMELINE_NOTE_TOP_MESSAGES[Tml_NUM_TOP_MESSAGES];
|
||||
struct UsrData PublisherDat;
|
||||
struct Usr_Data PublisherDat;
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&PublisherDat);
|
||||
|
@ -263,7 +263,7 @@ static void TmlNot_WriteTopMessage (Tml_TopMessage_t TopMessage,long PublisherCo
|
|||
static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not)
|
||||
{
|
||||
struct UsrData UsrDat; // Author of the note
|
||||
struct Usr_Data UsrDat; // Author of the note
|
||||
|
||||
/***** Get author data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -289,7 +289,7 @@ static void TmlNot_WriteNote (const struct Tml_Timeline *Timeline,
|
|||
/*********************** Show photo of author of a note **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void TmlNot_ShowAuthorPhoto (struct UsrData *UsrDat,bool FormUnique)
|
||||
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ void TmlNot_ShowAuthorPhoto (struct UsrData *UsrDat,bool FormUnique)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void TmlNot_WriteAuthorTimeAndContent (const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat)
|
||||
const struct Usr_Data *UsrDat)
|
||||
{
|
||||
char *Class;
|
||||
|
||||
|
@ -344,7 +344,7 @@ static void TmlNot_WriteAuthorTimeAndContent (const struct TmlNot_Note *Not,
|
|||
/*************** Write name and nickname of author of a note *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void TmlNot_WriteAuthorName (const struct UsrData *UsrDat,
|
||||
void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
|
||||
const char *Class)
|
||||
{
|
||||
extern const char *Txt_My_public_profile;
|
||||
|
@ -751,7 +751,7 @@ void TmlNot_GetNoteSummary (const struct TmlNot_Note *Not,
|
|||
|
||||
static void TmlNot_WriteButtonsAndComms (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat) // Author
|
||||
const struct Usr_Data *UsrDat) // Author
|
||||
{
|
||||
char IdNewComm[Frm_MAX_BYTES_ID + 1];
|
||||
|
||||
|
@ -795,7 +795,7 @@ static void TmlNot_WriteButtonToAddAComm (const struct Tml_Timeline *Timeline,
|
|||
|
||||
static void TmlNot_WriteFavShaRemAndComms (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat) // Author
|
||||
const struct Usr_Data *UsrDat) // Author
|
||||
{
|
||||
/***** Begin container *****/
|
||||
HTM_DIV_Begin ("class=\"Tml_BOTTOM_RIGHT Tml_RIGHT_WIDTH\"");
|
||||
|
@ -816,7 +816,7 @@ static void TmlNot_WriteFavShaRemAndComms (const struct Tml_Timeline *Timeline,
|
|||
|
||||
static void TmlNot_WriteFavShaRem (const struct Tml_Timeline *Timeline,
|
||||
const struct TmlNot_Note *Not,
|
||||
const struct UsrData *UsrDat) // Author
|
||||
const struct Usr_Data *UsrDat) // Author
|
||||
{
|
||||
static unsigned NumDiv = 0; // Used to create unique div id for fav and shared
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ void TmlNot_CheckAndWriteNoteWithTopMsg (const struct Tml_Timeline *Timeline,
|
|||
const struct TmlNot_Note *Not,
|
||||
Tml_TopMessage_t TopMessage,
|
||||
long PublisherCod);
|
||||
void TmlNot_ShowAuthorPhoto (struct UsrData *UsrDat,bool FormUnique);
|
||||
void TmlNot_WriteAuthorName (const struct UsrData *UsrDat,
|
||||
void TmlNot_ShowAuthorPhoto (struct Usr_Data *UsrDat,bool FormUnique);
|
||||
void TmlNot_WriteAuthorName (const struct Usr_Data *UsrDat,
|
||||
const char *Class);
|
||||
|
||||
void TmlNot_GetNoteSummary (const struct TmlNot_Note *Not,
|
||||
|
|
|
@ -50,7 +50,7 @@ extern struct Globals Gbl;
|
|||
void TmlNtf_CreateNotifToAuthor (long AuthorCod,long PubCod,
|
||||
Ntf_NotifyEvent_t NotifyEvent)
|
||||
{
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
bool CreateNotif;
|
||||
bool NotifyByEmail;
|
||||
|
||||
|
|
|
@ -194,7 +194,7 @@ static void TmlUsr_ListSharersOrFavers (MYSQL_RES **mysql_res,
|
|||
[PhoSha_SHAPE_RECTANGLE] = "PHOTOR12x16",
|
||||
};
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Trivial check 1: are there favers or sharers? *****/
|
||||
if (!NumUsrs)
|
||||
|
|
162
swad_user.c
162
swad_user.c
|
@ -159,7 +159,7 @@ static void (*Usr_FuncParamsBigList) (void *Args); // Used to pass pointer to fu
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Usr_GetMyLastData (void);
|
||||
static void Usr_GetUsrCommentsFromString (char *Str,struct UsrData *UsrDat);
|
||||
static void Usr_GetUsrCommentsFromString (char *Str,struct Usr_Data *UsrDat);
|
||||
static Usr_Sex_t Usr_GetSexFromStr (const char *Str);
|
||||
|
||||
static void Usr_GetParamOtherUsrIDNickOrEMail (void);
|
||||
|
@ -173,13 +173,13 @@ static void Usr_SetMyPrefsAndRoles (void);
|
|||
|
||||
static void Usr_PutLinkToLogOut (__attribute__((unused)) void *Args);
|
||||
|
||||
static void Usr_WriteRowGstAllData (struct UsrData *UsrDat);
|
||||
static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames);
|
||||
static void Usr_WriteRowTchAllData (struct UsrData *UsrDat);
|
||||
static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat);
|
||||
static void Usr_WriteMainUsrDataExceptUsrID (struct UsrData *UsrDat,
|
||||
static void Usr_WriteRowGstAllData (struct Usr_Data *UsrDat);
|
||||
static void Usr_WriteRowStdAllData (struct Usr_Data *UsrDat,char *GroupNames);
|
||||
static void Usr_WriteRowTchAllData (struct Usr_Data *UsrDat);
|
||||
static void Usr_WriteRowAdmData (unsigned NumUsr,struct Usr_Data *UsrDat);
|
||||
static void Usr_WriteMainUsrDataExceptUsrID (struct Usr_Data *UsrDat,
|
||||
const char *BgColor);
|
||||
static void Usr_WriteEmail (struct UsrData *UsrDat,const char *BgColor);
|
||||
static void Usr_WriteEmail (struct Usr_Data *UsrDat,const char *BgColor);
|
||||
static void Usr_WriteUsrData (const char *BgColor,
|
||||
const char *Data,const char *Link,
|
||||
bool NonBreak,bool Accepted);
|
||||
|
@ -196,19 +196,19 @@ static void Usr_BuildParamName (char **ParamName,
|
|||
const char *ParamRoot,
|
||||
const char *ParamSuffix);
|
||||
|
||||
static void Usr_AllocateListSelectedEncryptedUsrCods (struct SelectedUsrs *SelectedUsrs,
|
||||
static void Usr_AllocateListSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
Rol_Role_t Role);
|
||||
static void Usr_AllocateListOtherRecipients (void);
|
||||
|
||||
static void Set_FormToSelectUsrListType (void (*FuncParams) (void *Args),void *Args,
|
||||
Set_ShowUsrsType_t ListType);
|
||||
static void Usr_PutCheckboxToSelectAllUsers (Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs);
|
||||
struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
static Usr_Sex_t Usr_GetSexOfUsrsLst (Rol_Role_t Role);
|
||||
static void Usr_PutCheckboxToSelectUser (Rol_Role_t Role,
|
||||
const char *EncryptedUsrCod,
|
||||
bool UsrIsTheMsgSender,
|
||||
struct SelectedUsrs *SelectedUsrs);
|
||||
struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
static void Usr_PutCheckboxListWithPhotos (void);
|
||||
|
||||
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr);
|
||||
|
@ -216,7 +216,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr);
|
|||
static void Usr_ListMainDataTchs (Rol_Role_t Role,
|
||||
bool PutCheckBoxToSelectUsr);
|
||||
static void Usr_ListUsrsForSelection (Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs);
|
||||
struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
||||
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_TCH],
|
||||
unsigned NumColumns);
|
||||
|
@ -247,7 +247,7 @@ static void Usr_ShowTchsAllDataParams (__attribute__((unused)) void *Args);
|
|||
|
||||
static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
||||
Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs,
|
||||
struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
bool PutCheckBoxToSelectUsr);
|
||||
|
||||
static void Usr_GetAndShowNumUsrsInCrss (Rol_Role_t Role);
|
||||
|
@ -280,7 +280,7 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
|
|||
/************************** Create data for a user ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_UsrDataConstructor (struct UsrData *UsrDat)
|
||||
void Usr_UsrDataConstructor (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Allocate memory for the comments *****/
|
||||
if ((UsrDat->Comments = malloc (Cns_MAX_BYTES_TEXT + 1)) == NULL)
|
||||
|
@ -297,7 +297,7 @@ void Usr_UsrDataConstructor (struct UsrData *UsrDat)
|
|||
/*****************************************************************************/
|
||||
// UsrCod and ID are not changed
|
||||
|
||||
void Usr_ResetUsrDataExceptUsrCodAndIDs (struct UsrData *UsrDat)
|
||||
void Usr_ResetUsrDataExceptUsrCodAndIDs (struct Usr_Data *UsrDat)
|
||||
{
|
||||
UsrDat->EnUsrCod[0] = '\0';
|
||||
UsrDat->Nickname[0] = '\0';
|
||||
|
@ -368,7 +368,7 @@ void Usr_ResetMyLastData (void)
|
|||
/**************** Free memory used to store the data of a user ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_UsrDataDestructor (struct UsrData *UsrDat)
|
||||
void Usr_UsrDataDestructor (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Free memory allocated for comments *****/
|
||||
if (UsrDat->Comments)
|
||||
|
@ -386,7 +386,7 @@ void Usr_UsrDataDestructor (struct UsrData *UsrDat)
|
|||
/*****************************************************************************/
|
||||
// Input: UsrDat->UsrCod must hold user's code
|
||||
|
||||
void Usr_GetAllUsrDataFromUsrCod (struct UsrData *UsrDat,
|
||||
void Usr_GetAllUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
||||
Usr_GetPrefs_t GetPrefs,
|
||||
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs)
|
||||
{
|
||||
|
@ -398,7 +398,7 @@ void Usr_GetAllUsrDataFromUsrCod (struct UsrData *UsrDat,
|
|||
/**************** Allocate memory for the list of users' codes ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_AllocateListUsrCods (struct ListUsrCods *ListUsrCods)
|
||||
void Usr_AllocateListUsrCods (struct Usr_ListUsrCods *ListUsrCods)
|
||||
{
|
||||
if ((ListUsrCods->Lst = malloc (ListUsrCods->NumUsrs *
|
||||
sizeof (*ListUsrCods->Lst))) == NULL)
|
||||
|
@ -409,7 +409,7 @@ void Usr_AllocateListUsrCods (struct ListUsrCods *ListUsrCods)
|
|||
/****************** Free memory for the list of users' codes *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_FreeListUsrCods (struct ListUsrCods *ListUsrCods)
|
||||
void Usr_FreeListUsrCods (struct Usr_ListUsrCods *ListUsrCods)
|
||||
{
|
||||
if (ListUsrCods->NumUsrs && ListUsrCods->Lst)
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ bool Usr_ItsMe (long UsrCod)
|
|||
/*****************************************************************************/
|
||||
// Input: UsrDat->EncryptedUsrCod must hold user's encrypted code
|
||||
|
||||
void Usr_GetUsrCodFromEncryptedUsrCod (struct UsrData *UsrDat)
|
||||
void Usr_GetUsrCodFromEncryptedUsrCod (struct Usr_Data *UsrDat)
|
||||
{
|
||||
if (UsrDat->EnUsrCod[0])
|
||||
/***** Get user's code from database *****/
|
||||
|
@ -448,7 +448,7 @@ void Usr_GetUsrCodFromEncryptedUsrCod (struct UsrData *UsrDat)
|
|||
/*****************************************************************************/
|
||||
// UsrDat->UsrCod must contain an existing user's code
|
||||
|
||||
void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,
|
||||
void Usr_GetUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
||||
Usr_GetPrefs_t GetPrefs,
|
||||
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs)
|
||||
{
|
||||
|
@ -575,7 +575,7 @@ void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,
|
|||
/********* Get the comments in the record of a user from a string ************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_GetUsrCommentsFromString (char *Str,struct UsrData *UsrDat)
|
||||
static void Usr_GetUsrCommentsFromString (char *Str,struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Check that memory for comments is allocated *****/
|
||||
if (UsrDat->Comments)
|
||||
|
@ -681,7 +681,7 @@ static Usr_Sex_t Usr_GetSexFromStr (const char *Str)
|
|||
/********** Build full name using FirstName, Surname1 and Surname2 ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_BuildFullName (struct UsrData *UsrDat)
|
||||
void Usr_BuildFullName (struct Usr_Data *UsrDat)
|
||||
{
|
||||
Str_Copy (UsrDat->FullName,UsrDat->FrstName,sizeof (UsrDat->FullName) - 1);
|
||||
if (UsrDat->Surname1[0])
|
||||
|
@ -700,7 +700,7 @@ void Usr_BuildFullName (struct UsrData *UsrDat)
|
|||
/********* Write user name in two lines. 1: first name, 2: surnames **********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_WriteFirstNameBRSurnames (const struct UsrData *UsrDat)
|
||||
void Usr_WriteFirstNameBRSurnames (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** Write first name and surname 1 *****/
|
||||
HTM_Txt (UsrDat->FrstName);
|
||||
|
@ -762,7 +762,7 @@ bool Usr_CheckIfUsrIsSuperuser (long UsrCod)
|
|||
/**************** Check if I can change another user's data ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_ICanChangeOtherUsrData (const struct UsrData *UsrDat)
|
||||
bool Usr_ICanChangeOtherUsrData (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** I can change my data *****/
|
||||
if (Usr_ItsMe (UsrDat->UsrCod))
|
||||
|
@ -795,7 +795,7 @@ bool Usr_ICanChangeOtherUsrData (const struct UsrData *UsrDat)
|
|||
/***************** Check if I can edit another user's data *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_ICanEditOtherUsr (const struct UsrData *UsrDat)
|
||||
bool Usr_ICanEditOtherUsr (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** I can edit me *****/
|
||||
if (Usr_ItsMe (UsrDat->UsrCod))
|
||||
|
@ -838,7 +838,7 @@ bool Usr_ICanEditOtherUsr (const struct UsrData *UsrDat)
|
|||
/************ Check if I can view the record card of a student ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_CheckIfICanViewRecordStd (const struct UsrData *UsrDat)
|
||||
bool Usr_CheckIfICanViewRecordStd (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
@ -892,7 +892,7 @@ bool Usr_CheckIfICanViewRecordStd (const struct UsrData *UsrDat)
|
|||
// - a non-editing teacher
|
||||
// - or a teacher
|
||||
|
||||
bool Usr_CheckIfICanViewRecordTch (struct UsrData *UsrDat)
|
||||
bool Usr_CheckIfICanViewRecordTch (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
@ -915,7 +915,7 @@ bool Usr_CheckIfICanViewRecordTch (struct UsrData *UsrDat)
|
|||
/********* Check if I can view test/exam/match result of another user ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_CheckIfICanViewTstExaMchResult (const struct UsrData *UsrDat)
|
||||
bool Usr_CheckIfICanViewTstExaMchResult (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
@ -961,7 +961,7 @@ bool Usr_CheckIfICanViewTstExaMchResult (const struct UsrData *UsrDat)
|
|||
/********** Check if I can view assigments / works of another user ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_CheckIfICanViewAsgWrk (const struct UsrData *UsrDat)
|
||||
bool Usr_CheckIfICanViewAsgWrk (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
@ -1008,7 +1008,7 @@ bool Usr_CheckIfICanViewAsgWrk (const struct UsrData *UsrDat)
|
|||
/************** Check if I can view attendance of another user ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_CheckIfICanViewAtt (const struct UsrData *UsrDat)
|
||||
bool Usr_CheckIfICanViewAtt (const struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
@ -1050,7 +1050,7 @@ bool Usr_CheckIfICanViewAtt (const struct UsrData *UsrDat)
|
|||
/******************* Check if I can view a user's agenda *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_CheckIfICanViewUsrAgenda (struct UsrData *UsrDat)
|
||||
bool Usr_CheckIfICanViewUsrAgenda (struct Usr_Data *UsrDat)
|
||||
{
|
||||
/***** 1. Fast check: Am I logged? *****/
|
||||
if (!Gbl.Usrs.Me.Logged)
|
||||
|
@ -1301,7 +1301,7 @@ void Usr_WelcomeUsr (void)
|
|||
/*****************************************************************************/
|
||||
// It can include start and ending apostrophes
|
||||
|
||||
void Usr_CreateBirthdayStrDB (const struct UsrData *UsrDat,
|
||||
void Usr_CreateBirthdayStrDB (const struct Usr_Data *UsrDat,
|
||||
char BirthdayStrDB[Usr_BIRTHDAY_STR_DB_LENGTH + 1])
|
||||
{
|
||||
if (UsrDat->Birthday.Year == 0 ||
|
||||
|
@ -1442,7 +1442,7 @@ static void Usr_GetParamOtherUsrIDNickOrEMail (void)
|
|||
/*****************************************************************************/
|
||||
// Returns the number of users for a given ID, @nick or email
|
||||
|
||||
unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct ListUsrCods *ListUsrCods)
|
||||
unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct Usr_ListUsrCods *ListUsrCods)
|
||||
{
|
||||
extern const char *Txt_The_ID_nickname_or_email_X_is_not_valid;
|
||||
bool Wrong = false;
|
||||
|
@ -1530,7 +1530,7 @@ void Usr_PutParamUsrCodEncrypted (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED
|
|||
/********* Get hidden parameter encrypted user's code of other user **********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_GetParamOtherUsrCodEncrypted (struct UsrData *UsrDat)
|
||||
void Usr_GetParamOtherUsrCodEncrypted (struct Usr_Data *UsrDat)
|
||||
{
|
||||
Par_GetParToText ("OtherUsrCod",UsrDat->EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
|
@ -1745,7 +1745,7 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
|
||||
static bool Usr_ChkUsrAndGetUsrDataFromDirectLogin (void)
|
||||
{
|
||||
struct ListUsrCods ListUsrCods;
|
||||
struct Usr_ListUsrCods ListUsrCods;
|
||||
bool PasswordCorrect = false;
|
||||
|
||||
/***** Check if user typed anything *****/
|
||||
|
@ -2099,7 +2099,7 @@ static void Usr_PutLinkToLogOut (__attribute__((unused)) void *Args)
|
|||
// Output: When true ==> UsrDat will hold all user's data
|
||||
// When false ==> UsrDat is reset, except user's code
|
||||
|
||||
bool Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (struct UsrData *UsrDat,
|
||||
bool Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
||||
Usr_GetPrefs_t GetPrefs,
|
||||
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs)
|
||||
{
|
||||
|
@ -2138,9 +2138,9 @@ void Usr_UpdateMyLastData (void)
|
|||
|
||||
#define Usr_MAX_BYTES_BG_COLOR (16 - 1)
|
||||
|
||||
void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
||||
void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
||||
bool PutCheckBoxToSelectUsr,Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs)
|
||||
struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
extern const char *Txt_Enrolment_confirmed;
|
||||
extern const char *Txt_Enrolment_not_confirmed;
|
||||
|
@ -2239,7 +2239,7 @@ void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
|||
/*************** Write a row of a table with the data of a guest *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
||||
static void Usr_WriteRowGstAllData (struct Usr_Data *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -2330,7 +2330,7 @@ static void Usr_WriteRowGstAllData (struct UsrData *UsrDat)
|
|||
/************ Write a row of a table with the data of a student **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
||||
static void Usr_WriteRowStdAllData (struct Usr_Data *UsrDat,char *GroupNames)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -2442,7 +2442,7 @@ static void Usr_WriteRowStdAllData (struct UsrData *UsrDat,char *GroupNames)
|
|||
/*** Write a row of a table with the data of a teacher or an administrator ***/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
||||
static void Usr_WriteRowTchAllData (struct Usr_Data *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -2524,7 +2524,7 @@ static void Usr_WriteRowTchAllData (struct UsrData *UsrDat)
|
|||
/********** Write a row of a table with the data of an administrator *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
||||
static void Usr_WriteRowAdmData (unsigned NumUsr,struct Usr_Data *UsrDat)
|
||||
{
|
||||
static const char *ClassPhoto[PhoSha_NUM_SHAPES] =
|
||||
{
|
||||
|
@ -2586,7 +2586,7 @@ static void Usr_WriteRowAdmData (unsigned NumUsr,struct UsrData *UsrDat)
|
|||
/************************* Write main data of a user *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_WriteMainUsrDataExceptUsrID (struct UsrData *UsrDat,
|
||||
static void Usr_WriteMainUsrDataExceptUsrID (struct Usr_Data *UsrDat,
|
||||
const char *BgColor)
|
||||
{
|
||||
Usr_WriteUsrData (BgColor,
|
||||
|
@ -2607,7 +2607,7 @@ static void Usr_WriteMainUsrDataExceptUsrID (struct UsrData *UsrDat,
|
|||
/**************************** Write user's email *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Usr_WriteEmail (struct UsrData *UsrDat,const char *BgColor)
|
||||
static void Usr_WriteEmail (struct Usr_Data *UsrDat,const char *BgColor)
|
||||
{
|
||||
bool ShowEmail;
|
||||
char MailLink[7 + Cns_MAX_BYTES_EMAIL_ADDRESS + 1]; // mailto:mail_address
|
||||
|
@ -2758,7 +2758,7 @@ void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,HieLvl_Level_t Scope)
|
|||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NumUsr;
|
||||
struct UsrInList *UsrInList;
|
||||
struct Usr_InList *UsrInList;
|
||||
bool Abort = false;
|
||||
|
||||
if (Query == NULL)
|
||||
|
@ -2925,8 +2925,8 @@ void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,HieLvl_Level_t Scope)
|
|||
/********************** Copy user's basic data from list *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_CopyBasicUsrDataFromList (struct UsrData *UsrDat,
|
||||
const struct UsrInList *UsrInList)
|
||||
void Usr_CopyBasicUsrDataFromList (struct Usr_Data *UsrDat,
|
||||
const struct Usr_InList *UsrInList)
|
||||
{
|
||||
UsrDat->UsrCod = UsrInList->UsrCod;
|
||||
Str_Copy (UsrDat->EnUsrCod,UsrInList->EnUsrCod,sizeof (UsrDat->EnUsrCod) - 1);
|
||||
|
@ -3042,7 +3042,7 @@ static void Usr_PutParamsConfirmIWantToSeeBigList (void *Args)
|
|||
/************ Create list of selected users with one given user **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (struct SelectedUsrs *SelectedUsrs)
|
||||
void Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
/***** Create list of user codes and put encrypted user code in it *****/
|
||||
if (!SelectedUsrs->List[Rol_UNK])
|
||||
|
@ -3060,7 +3060,7 @@ void Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (struct SelectedUsrs *Sel
|
|||
/************* Write parameter with the list of users selected ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_PutHiddenParSelectedUsrsCods (struct SelectedUsrs *SelectedUsrs)
|
||||
void Usr_PutHiddenParSelectedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
char *ParamName;
|
||||
|
||||
|
@ -3087,7 +3087,7 @@ void Usr_PutHiddenParSelectedUsrsCods (struct SelectedUsrs *SelectedUsrs)
|
|||
/************************* Get list of selected users ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_GetListsSelectedEncryptedUsrsCods (struct SelectedUsrs *SelectedUsrs)
|
||||
void Usr_GetListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
extern const char *Par_SEPARATOR_PARAM_MULTIPLE;
|
||||
char *ParamName;
|
||||
|
@ -3191,8 +3191,8 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
size_t LengthUsrCod;
|
||||
const char *Ptr;
|
||||
char UsrIDNickOrEmail[Cns_MAX_BYTES_USR_LOGIN + 1];
|
||||
struct UsrData UsrDat;
|
||||
struct ListUsrCods ListUsrCods;
|
||||
struct Usr_Data UsrDat;
|
||||
struct Usr_ListUsrCods ListUsrCods;
|
||||
bool Error = false;
|
||||
|
||||
/***** Get list of selected encrypted users's codes if not already got.
|
||||
|
@ -3361,7 +3361,7 @@ bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs)
|
|||
// Returns true if EncryptedUsrCodToFind is in list
|
||||
|
||||
bool Usr_FindEncryptedUsrCodInListOfSelectedEncryptedUsrCods (const char *EncryptedUsrCodToFind,
|
||||
struct SelectedUsrs *SelectedUsrs)
|
||||
struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
const char *Ptr;
|
||||
char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
|
||||
|
@ -3384,10 +3384,10 @@ bool Usr_FindEncryptedUsrCodInListOfSelectedEncryptedUsrCods (const char *Encryp
|
|||
/******* Check if there are valid users in list of encrypted user codes ******/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct SelectedUsrs *SelectedUsrs)
|
||||
bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Loop over the list to check if there are valid users *****/
|
||||
Ptr = SelectedUsrs->List[Rol_UNK];
|
||||
|
@ -3406,11 +3406,11 @@ bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct SelectedUsr
|
|||
/******** Count number of valid users in list of encrypted user codes ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct SelectedUsrs *SelectedUsrs)
|
||||
unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
const char *Ptr;
|
||||
unsigned NumUsrs = 0;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Loop over the list to count the number of users *****/
|
||||
Ptr = SelectedUsrs->List[Rol_UNK];
|
||||
|
@ -3430,7 +3430,7 @@ unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct SelectedUsrs *
|
|||
/*****************************************************************************/
|
||||
// Role = Rol_UNK here means all users
|
||||
|
||||
static void Usr_AllocateListSelectedEncryptedUsrCods (struct SelectedUsrs *SelectedUsrs,
|
||||
static void Usr_AllocateListSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
Rol_Role_t Role)
|
||||
{
|
||||
if (!SelectedUsrs->List[Role])
|
||||
|
@ -3447,7 +3447,7 @@ static void Usr_AllocateListSelectedEncryptedUsrCods (struct SelectedUsrs *Selec
|
|||
/*****************************************************************************/
|
||||
// Role = Rol_UNK here means all users
|
||||
|
||||
void Usr_FreeListsSelectedEncryptedUsrsCods (struct SelectedUsrs *SelectedUsrs)
|
||||
void Usr_FreeListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
Rol_Role_t Role;
|
||||
|
||||
|
@ -3474,13 +3474,13 @@ void Usr_FreeListsSelectedEncryptedUsrsCods (struct SelectedUsrs *SelectedUsrs)
|
|||
/************* Get list of users selected to show their projects *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_GetListSelectedUsrCods (struct SelectedUsrs *SelectedUsrs,
|
||||
void Usr_GetListSelectedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
unsigned NumUsrsInList,
|
||||
long **LstSelectedUsrCods)
|
||||
{
|
||||
unsigned NumUsr;
|
||||
const char *Ptr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Create list of user codes *****/
|
||||
if ((*LstSelectedUsrCods = calloc (NumUsrsInList,
|
||||
|
@ -3664,7 +3664,7 @@ static void Set_FormToSelectUsrListType (void (*FuncParams) (void *Args),void *A
|
|||
/******************** List users to select some of them **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||
void Usr_PutFormToSelectUsrsToGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
Act_Action_t NextAction,
|
||||
void (*FuncParams) (void *Args),void *Args,
|
||||
const char *Title,
|
||||
|
@ -3796,7 +3796,7 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs,
|
|||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||
void Usr_GetSelectedUsrsAndGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
void (*FuncWhenUsrsSelected) (void *ArgsSelected),void *ArgsSelected,
|
||||
void (*FuncWhenNoUsrsSelected) (void *ArgsNoSelected),void *ArgsNoSelected)
|
||||
{
|
||||
|
@ -3824,7 +3824,7 @@ void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
|||
/*********** List users with a given role to select some of them *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_ListUsersToSelect (Rol_Role_t Role,struct SelectedUsrs *SelectedUsrs)
|
||||
void Usr_ListUsersToSelect (Rol_Role_t Role,struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
/***** If there are no users, don't list anything *****/
|
||||
if (!Gbl.Usrs.LstUsrs[Role].NumUsrs)
|
||||
|
@ -3850,7 +3850,7 @@ void Usr_ListUsersToSelect (Rol_Role_t Role,struct SelectedUsrs *SelectedUsrs)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Usr_PutCheckboxToSelectAllUsers (Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs)
|
||||
struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
extern const char *Txt_ROLES_SINGUL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
||||
|
@ -3926,7 +3926,7 @@ unsigned Usr_GetColumnsForSelectUsrs (void)
|
|||
static void Usr_PutCheckboxToSelectUser (Rol_Role_t Role,
|
||||
const char *EncryptedUsrCod,
|
||||
bool UsrIsTheMsgSender,
|
||||
struct SelectedUsrs *SelectedUsrs)
|
||||
struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
bool CheckboxChecked;
|
||||
char *ParamName;
|
||||
|
@ -4030,7 +4030,7 @@ void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr)
|
|||
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr)
|
||||
{
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
if (Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs)
|
||||
{
|
||||
|
@ -4082,7 +4082,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
|||
{
|
||||
unsigned NumUsr;
|
||||
char *GroupNames;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Initialize field names *****/
|
||||
Usr_SetUsrDatMainFieldNames ();
|
||||
|
@ -4160,7 +4160,7 @@ static void Usr_ListMainDataTchs (Rol_Role_t Role,
|
|||
{
|
||||
unsigned NumCol;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
if (Gbl.Usrs.LstUsrs[Role].NumUsrs)
|
||||
{
|
||||
|
@ -4232,7 +4232,7 @@ void Usr_ListAllDataGsts (void)
|
|||
unsigned NumColumnsCommonCard;
|
||||
unsigned NumCol;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_GST];
|
||||
|
||||
/***** Initialize field names *****/
|
||||
|
@ -4344,7 +4344,7 @@ void Usr_ListAllDataStds (void)
|
|||
unsigned NumUsr;
|
||||
char *GroupNames;
|
||||
unsigned NumGrpTyp,NumField;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_STD];
|
||||
size_t Length;
|
||||
|
||||
|
@ -4534,10 +4534,10 @@ void Usr_ListAllDataStds (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
static void Usr_ListUsrsForSelection (Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs)
|
||||
struct Usr_SelectedUsrs *SelectedUsrs)
|
||||
{
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
if (Gbl.Usrs.LstUsrs[Role].NumUsrs)
|
||||
{
|
||||
|
@ -4673,7 +4673,7 @@ static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
|||
unsigned NumColumns)
|
||||
{
|
||||
unsigned NumCol;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
unsigned NumUsr;
|
||||
|
||||
/***** Heading row *****/
|
||||
|
@ -4727,9 +4727,9 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
|||
unsigned NumUsrs;
|
||||
unsigned NumUsr;
|
||||
char *Title;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
Usr_Sex_t Sex;
|
||||
struct UsrInList *UsrInList;
|
||||
struct Usr_InList *UsrInList;
|
||||
|
||||
/***** Initialize field names *****/
|
||||
Usr_SetUsrDatMainFieldNames ();
|
||||
|
@ -4840,7 +4840,7 @@ void Usr_ListDataAdms (void)
|
|||
extern const char *Txt_Institution;
|
||||
unsigned NumCol;
|
||||
unsigned NumUsr;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *FieldNames[Usr_NUM_MAIN_FIELDS_DATA_ADM];
|
||||
|
||||
/***** Put contextual links *****/
|
||||
|
@ -6092,7 +6092,7 @@ void Usr_SeeTchClassPhotoPrn (void)
|
|||
|
||||
static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
||||
Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs,
|
||||
struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
bool PutCheckBoxToSelectUsr)
|
||||
{
|
||||
static const char *ClassPhoto[Usr_NUM_CLASS_PHOTO_TYPE][PhoSha_NUM_SHAPES] =
|
||||
|
@ -6113,7 +6113,7 @@ static void Usr_DrawClassPhoto (Usr_ClassPhotoType_t ClassPhotoType,
|
|||
unsigned NumUsr;
|
||||
bool TRIsOpen = false;
|
||||
bool UsrIsTheMsgSender;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
if (Gbl.Usrs.LstUsrs[Role].NumUsrs)
|
||||
{
|
||||
|
@ -6342,7 +6342,7 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
|
|||
};
|
||||
bool ShowPhoto = false;
|
||||
char PhotoURL[PATH_MAX + 1];
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
@ -6375,7 +6375,7 @@ void Usr_WriteAuthor1Line (long UsrCod,bool Hidden)
|
|||
/*************** Show a table cell with the data of a user *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows)
|
||||
void Usr_ShowTableCellWithUsrData (struct Usr_Data *UsrDat,unsigned NumRows)
|
||||
{
|
||||
static const Act_Action_t NextAction[Rol_NUM_ROLES] =
|
||||
{
|
||||
|
|
90
swad_user.h
90
swad_user.h
|
@ -155,7 +155,7 @@ typedef enum
|
|||
#define Usr_WHO_DEFAULT Usr_WHO_ALL
|
||||
|
||||
// Related with user's data
|
||||
struct UsrData
|
||||
struct Usr_Data
|
||||
{
|
||||
long UsrCod;
|
||||
char EnUsrCod [Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
|
||||
|
@ -220,7 +220,7 @@ struct UsrData
|
|||
} Prefs;
|
||||
};
|
||||
|
||||
struct UsrLast
|
||||
struct Usr_Last
|
||||
{
|
||||
Sch_WhatToSearch_t WhatToSearch; // Search courses, teachers, documents...?
|
||||
struct
|
||||
|
@ -234,7 +234,7 @@ struct UsrLast
|
|||
long LastAccNotif;
|
||||
};
|
||||
|
||||
struct UsrInList
|
||||
struct Usr_InList
|
||||
{
|
||||
long UsrCod;
|
||||
char EnUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1];
|
||||
|
@ -252,13 +252,13 @@ struct UsrInList
|
|||
bool Remove; // A boolean associated with each user that indicates if it must be removed
|
||||
};
|
||||
|
||||
struct ListUsrs
|
||||
struct Usr_ListUsrs
|
||||
{
|
||||
struct UsrInList *Lst; // List of users
|
||||
struct Usr_InList *Lst; // List of users
|
||||
unsigned NumUsrs; // Number of users in the list
|
||||
};
|
||||
|
||||
struct SelectedUsrs
|
||||
struct Usr_SelectedUsrs
|
||||
{
|
||||
char *List[Rol_NUM_ROLES]; // Lists of encrypted codes of users selected from a form
|
||||
bool Filled; // If lists are already filled/readed
|
||||
|
@ -266,7 +266,7 @@ struct SelectedUsrs
|
|||
Usr_ListUsrsOption_t Option; // What option I have selected to do with these selected users
|
||||
};
|
||||
|
||||
struct ListUsrCods
|
||||
struct Usr_ListUsrCods
|
||||
{
|
||||
long *Lst; // List of users' codes
|
||||
unsigned NumUsrs; // Number of users in the list
|
||||
|
@ -278,39 +278,39 @@ struct ListUsrCods
|
|||
|
||||
void Usr_InformAboutNumClicksBeforePhoto (void);
|
||||
|
||||
void Usr_UsrDataConstructor (struct UsrData *UsrDat);
|
||||
void Usr_ResetUsrDataExceptUsrCodAndIDs (struct UsrData *UsrDat);
|
||||
void Usr_UsrDataConstructor (struct Usr_Data *UsrDat);
|
||||
void Usr_ResetUsrDataExceptUsrCodAndIDs (struct Usr_Data *UsrDat);
|
||||
void Usr_ResetMyLastData (void);
|
||||
void Usr_UsrDataDestructor (struct UsrData *UsrDat);
|
||||
void Usr_GetAllUsrDataFromUsrCod (struct UsrData *UsrDat,
|
||||
void Usr_UsrDataDestructor (struct Usr_Data *UsrDat);
|
||||
void Usr_GetAllUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
||||
Usr_GetPrefs_t GetPrefs,
|
||||
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs);
|
||||
void Usr_AllocateListUsrCods (struct ListUsrCods *ListUsrCods);
|
||||
void Usr_FreeListUsrCods (struct ListUsrCods *ListUsrCods);
|
||||
void Usr_AllocateListUsrCods (struct Usr_ListUsrCods *ListUsrCods);
|
||||
void Usr_FreeListUsrCods (struct Usr_ListUsrCods *ListUsrCods);
|
||||
bool Usr_ItsMe (long UsrCod);
|
||||
void Usr_GetUsrCodFromEncryptedUsrCod (struct UsrData *UsrDat);
|
||||
void Usr_GetUsrDataFromUsrCod (struct UsrData *UsrDat,
|
||||
void Usr_GetUsrCodFromEncryptedUsrCod (struct Usr_Data *UsrDat);
|
||||
void Usr_GetUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
||||
Usr_GetPrefs_t GetPrefs,
|
||||
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs);
|
||||
|
||||
void Usr_BuildFullName (struct UsrData *UsrDat);
|
||||
void Usr_BuildFullName (struct Usr_Data *UsrDat);
|
||||
|
||||
void Usr_WriteFirstNameBRSurnames (const struct UsrData *UsrDat);
|
||||
void Usr_WriteFirstNameBRSurnames (const struct Usr_Data *UsrDat);
|
||||
|
||||
void Usr_FlushCachesUsr (void);
|
||||
|
||||
void Usr_FlushCacheUsrIsSuperuser (void);
|
||||
bool Usr_CheckIfUsrIsSuperuser (long UsrCod);
|
||||
|
||||
bool Usr_ICanChangeOtherUsrData (const struct UsrData *UsrDat);
|
||||
bool Usr_ICanEditOtherUsr (const struct UsrData *UsrDat);
|
||||
bool Usr_ICanChangeOtherUsrData (const struct Usr_Data *UsrDat);
|
||||
bool Usr_ICanEditOtherUsr (const struct Usr_Data *UsrDat);
|
||||
|
||||
bool Usr_CheckIfICanViewRecordStd (const struct UsrData *UsrDat);
|
||||
bool Usr_CheckIfICanViewRecordTch (struct UsrData *UsrDat);
|
||||
bool Usr_CheckIfICanViewTstExaMchResult (const struct UsrData *UsrDat);
|
||||
bool Usr_CheckIfICanViewAsgWrk (const struct UsrData *UsrDat);
|
||||
bool Usr_CheckIfICanViewAtt (const struct UsrData *UsrDat);
|
||||
bool Usr_CheckIfICanViewUsrAgenda (struct UsrData *UsrDat);
|
||||
bool Usr_CheckIfICanViewRecordStd (const struct Usr_Data *UsrDat);
|
||||
bool Usr_CheckIfICanViewRecordTch (struct Usr_Data *UsrDat);
|
||||
bool Usr_CheckIfICanViewTstExaMchResult (const struct Usr_Data *UsrDat);
|
||||
bool Usr_CheckIfICanViewAsgWrk (const struct Usr_Data *UsrDat);
|
||||
bool Usr_CheckIfICanViewAtt (const struct Usr_Data *UsrDat);
|
||||
bool Usr_CheckIfICanViewUsrAgenda (struct Usr_Data *UsrDat);
|
||||
|
||||
void Usr_WriteLandingPage (void);
|
||||
void Usr_WriteFormLogout (void);
|
||||
|
@ -319,7 +319,7 @@ void Usr_PutLinkToLogin (void);
|
|||
void Usr_WriteFormLogin (Act_Action_t NextAction,void (*FuncParams) (void));
|
||||
void Usr_WelcomeUsr (void);
|
||||
|
||||
void Usr_CreateBirthdayStrDB (const struct UsrData *UsrDat,
|
||||
void Usr_CreateBirthdayStrDB (const struct Usr_Data *UsrDat,
|
||||
char BirthdayStrDB[Usr_BIRTHDAY_STR_DB_LENGTH + 1]);
|
||||
void Usr_FilterUsrBirthday (struct Dat_Date *Birthday);
|
||||
|
||||
|
@ -327,12 +327,12 @@ void Usr_PutFormLogIn (void);
|
|||
void Usr_WriteLoggedUsrHead (void);
|
||||
void Usr_PutFormLogOut (void);
|
||||
void Usr_GetParamUsrIdLogin (void);
|
||||
unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct ListUsrCods *ListUsrCods);
|
||||
unsigned Usr_GetParamOtherUsrIDNickOrEMailAndGetUsrCods (struct Usr_ListUsrCods *ListUsrCods);
|
||||
|
||||
void Usr_PutParamMyUsrCodEncrypted (void *EncryptedUsrCod);
|
||||
void Usr_PutParamOtherUsrCodEncrypted (void *EncryptedUsrCod);
|
||||
void Usr_PutParamUsrCodEncrypted (const char EncryptedUsrCod[Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64 + 1]);
|
||||
void Usr_GetParamOtherUsrCodEncrypted (struct UsrData *UsrDat);
|
||||
void Usr_GetParamOtherUsrCodEncrypted (struct Usr_Data *UsrDat);
|
||||
void Usr_GetParamOtherUsrCodEncryptedAndGetListIDs (void);
|
||||
bool Usr_GetParamOtherUsrCodEncryptedAndGetUsrData (void);
|
||||
|
||||
|
@ -340,15 +340,15 @@ void Usr_ChkUsrAndGetUsrData (void);
|
|||
|
||||
void Usr_ShowFormsLogoutAndRole (void);
|
||||
|
||||
bool Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (struct UsrData *UsrDat,
|
||||
bool Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (struct Usr_Data *UsrDat,
|
||||
Usr_GetPrefs_t GetPrefs,
|
||||
Usr_GetRoleInCurrentCrs_t GetRoleInCurrentCrs);
|
||||
void Usr_UpdateMyLastData (void);
|
||||
void Usr_InsertMyLastCrsTabAndTime (void);
|
||||
|
||||
void Usr_WriteRowUsrMainData (unsigned NumUsr,struct UsrData *UsrDat,
|
||||
void Usr_WriteRowUsrMainData (unsigned NumUsr,struct Usr_Data *UsrDat,
|
||||
bool PutCheckBoxToSelectUsr,Rol_Role_t Role,
|
||||
struct SelectedUsrs *SelectedUsrs);
|
||||
struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
|
||||
void Usr_GetListUsrs (HieLvl_Level_t Scope,Rol_Role_t Role);
|
||||
|
||||
|
@ -358,27 +358,27 @@ void Usr_GetUnorderedStdsCodesInDeg (long DegCod);
|
|||
|
||||
void Usr_GetListUsrsFromQuery (char *Query,Rol_Role_t Role,HieLvl_Level_t Scope);
|
||||
|
||||
void Usr_CopyBasicUsrDataFromList (struct UsrData *UsrDat,
|
||||
const struct UsrInList *UsrInList);
|
||||
void Usr_CopyBasicUsrDataFromList (struct Usr_Data *UsrDat,
|
||||
const struct Usr_InList *UsrInList);
|
||||
void Usr_FreeUsrsList (Rol_Role_t Role);
|
||||
|
||||
bool Usr_GetIfShowBigList (unsigned NumUsrs,
|
||||
void (*FuncParams) (void *Args),void *Args,
|
||||
const char *OnSubmit);
|
||||
|
||||
void Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (struct SelectedUsrs *SelectedUsrs);
|
||||
void Usr_PutHiddenParSelectedUsrsCods (struct SelectedUsrs *SelectedUsrs);
|
||||
void Usr_GetListsSelectedEncryptedUsrsCods (struct SelectedUsrs *SelectedUsrs);
|
||||
void Usr_CreateListSelectedUsrsCodsAndFillWithOtherUsr (struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
void Usr_PutHiddenParSelectedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
void Usr_GetListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
|
||||
bool Usr_GetListMsgRecipientsWrittenExplicitelyBySender (bool WriteErrorMsgs);
|
||||
|
||||
bool Usr_FindEncryptedUsrCodInListOfSelectedEncryptedUsrCods (const char *EncryptedUsrCodToFind,
|
||||
struct SelectedUsrs *SelectedUsrs);
|
||||
bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct SelectedUsrs *SelectedUsrs);
|
||||
unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct SelectedUsrs *SelectedUsrs);
|
||||
void Usr_FreeListsSelectedEncryptedUsrsCods (struct SelectedUsrs *SelectedUsrs);
|
||||
struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
bool Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
unsigned Usr_CountNumUsrsInListOfSelectedEncryptedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
void Usr_FreeListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
|
||||
void Usr_GetListSelectedUsrCods (struct SelectedUsrs *SelectedUsrs,
|
||||
void Usr_GetListSelectedUsrCods (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
unsigned NumUsrsInList,
|
||||
long **LstSelectedUsrCods);
|
||||
void Usr_FreeListSelectedUsrCods (long *LstSelectedUsrCods);
|
||||
|
@ -395,17 +395,17 @@ unsigned Usr_GetColumnsForSelectUsrs (void);
|
|||
void Usr_SetUsrDatMainFieldNames (void);
|
||||
void Usr_WriteHeaderFieldsUsrDat (bool PutCheckBoxToSelectUsr);
|
||||
|
||||
void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||
void Usr_PutFormToSelectUsrsToGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
Act_Action_t NextAction,
|
||||
void (*FuncParams) (void *Args),void *Args,
|
||||
const char *Title,
|
||||
const char *HelpLink,
|
||||
const char *TxtButton,
|
||||
bool PutFormDateRange);
|
||||
void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||
void Usr_GetSelectedUsrsAndGoToAct (struct Usr_SelectedUsrs *SelectedUsrs,
|
||||
void (*FuncWhenUsrsSelected) (void *ArgsSelected),void *ArgsSelected,
|
||||
void (*FuncWhenNoUsrsSelected) (void *ArgsNoSelected),void *ArgsNoSelected);
|
||||
void Usr_ListUsersToSelect (Rol_Role_t Role,struct SelectedUsrs *SelectedUsrs);
|
||||
void Usr_ListUsersToSelect (Rol_Role_t Role,struct Usr_SelectedUsrs *SelectedUsrs);
|
||||
|
||||
void Usr_ListAllDataGsts (void);
|
||||
void Usr_ListAllDataStds (void);
|
||||
|
@ -434,7 +434,7 @@ unsigned Usr_GetTotalNumberOfUsers (void);
|
|||
|
||||
void Usr_WriteAuthor1Line (long UsrCod,bool Hidden);
|
||||
|
||||
void Usr_ShowTableCellWithUsrData (struct UsrData *UsrDat,unsigned NumRows);
|
||||
void Usr_ShowTableCellWithUsrData (struct Usr_Data *UsrDat,unsigned NumRows);
|
||||
|
||||
void Usr_PutWhoIcon (Usr_Who_t Who);
|
||||
void Usr_PutHiddenParamWho (Usr_Who_t Who);
|
||||
|
|
|
@ -69,7 +69,7 @@ extern struct Globals Gbl;
|
|||
static void ZIP_PutLinkToCreateZIPAsgWrkParams (__attribute__((unused)) void *Args);
|
||||
|
||||
static void ZIP_CreateTmpDirForCompression (void);
|
||||
static void ZIP_CreateDirCompressionUsr (struct UsrData *UsrDat);
|
||||
static void ZIP_CreateDirCompressionUsr (struct Usr_Data *UsrDat);
|
||||
|
||||
static void ZIP_CompressFolderIntoZIP (void);
|
||||
static unsigned long long ZIP_CloneDir (const char *Path,const char *PathClone,const char *PathInTree);
|
||||
|
@ -114,7 +114,7 @@ bool ZIP_GetCreateZIPFromForm (void)
|
|||
void ZIP_CreateZIPAsgWrk (void)
|
||||
{
|
||||
extern const char *Txt_works_ZIP_FILE_NAME;
|
||||
struct UsrData UsrDat;
|
||||
struct Usr_Data UsrDat;
|
||||
const char *Ptr;
|
||||
char StrZip[128 + PATH_MAX];
|
||||
char Path[PATH_MAX + 1 +
|
||||
|
@ -237,7 +237,7 @@ static void ZIP_CreateTmpDirForCompression (void)
|
|||
/**************** in the temporary directory of compression ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void ZIP_CreateDirCompressionUsr (struct UsrData *UsrDat)
|
||||
static void ZIP_CreateDirCompressionUsr (struct Usr_Data *UsrDat)
|
||||
{
|
||||
char FullNameAndUsrID[NAME_MAX + 1];
|
||||
char PathFolderUsrInsideCrs[128 + PATH_MAX + NAME_MAX];
|
||||
|
|
Loading…
Reference in New Issue