mirror of
https://github.com/acanas/swad-core.git
synced 2024-05-31 22:05:23 +02:00
Version19.165
This commit is contained in:
parent
e50a4b5644
commit
554768a418
76
swad_API.c
76
swad_API.c
|
@ -2686,7 +2686,7 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
||||||
struct swad__sendAttendanceEventOutput *sendAttendanceEventOut) // output
|
struct swad__sendAttendanceEventOutput *sendAttendanceEventOut) // output
|
||||||
{
|
{
|
||||||
int ReturnCode;
|
int ReturnCode;
|
||||||
struct AttendanceEvent Att;
|
struct Att_Event Event;
|
||||||
bool ItsANewAttEvent;
|
bool ItsANewAttEvent;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
|
@ -2724,13 +2724,13 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
||||||
|
|
||||||
/**** Get data of attendance event *****/
|
/**** Get data of attendance event *****/
|
||||||
/* Event code */
|
/* Event code */
|
||||||
Att.AttCod = (long) attendanceEventCode;
|
Event.AttCod = (long) attendanceEventCode;
|
||||||
|
|
||||||
/* Course code */
|
/* Course code */
|
||||||
if (Att.AttCod > 0) // The event already exists
|
if (Event.AttCod > 0) // The event already exists
|
||||||
{
|
{
|
||||||
Att_GetDataOfAttEventByCod (&Att);
|
Att_GetDataOfAttEventByCod (&Event);
|
||||||
if (Att.CrsCod != (long) courseCode)
|
if (Event.CrsCod != (long) courseCode)
|
||||||
return soap_receiver_fault (soap,
|
return soap_receiver_fault (soap,
|
||||||
"Request forbidden",
|
"Request forbidden",
|
||||||
"Attendance event does not belong to course");
|
"Attendance event does not belong to course");
|
||||||
|
@ -2739,24 +2739,24 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ItsANewAttEvent = true;
|
ItsANewAttEvent = true;
|
||||||
Att.CrsCod = (long) courseCode;
|
Event.CrsCod = (long) courseCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is event hidden? */
|
/* Is event hidden? */
|
||||||
Att.Hidden = (hidden ? true :
|
Event.Hidden = (hidden ? true :
|
||||||
false);
|
false);
|
||||||
|
|
||||||
/* User's code (really not used) */
|
/* User's code (really not used) */
|
||||||
Att.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
Event.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||||
|
|
||||||
/* startTime */
|
/* startTime */
|
||||||
Att.TimeUTC[Att_START_TIME] = (time_t) startTime;
|
Event.TimeUTC[Att_START_TIME] = (time_t) startTime;
|
||||||
|
|
||||||
/* endTime */
|
/* endTime */
|
||||||
Att.TimeUTC[Att_END_TIME ] = (time_t) endTime;
|
Event.TimeUTC[Att_END_TIME ] = (time_t) endTime;
|
||||||
|
|
||||||
/* Are teacher's comments visible? */
|
/* Are teacher's comments visible? */
|
||||||
Att.CommentTchVisible = (commentsTeachersVisible ? true :
|
Event.CommentTchVisible = (commentsTeachersVisible ? true :
|
||||||
false);
|
false);
|
||||||
|
|
||||||
/* Title */
|
/* Title */
|
||||||
|
@ -2764,7 +2764,7 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
||||||
return soap_receiver_fault (soap,
|
return soap_receiver_fault (soap,
|
||||||
"Request forbidden",
|
"Request forbidden",
|
||||||
"Title of attendance event is empty");
|
"Title of attendance event is empty");
|
||||||
Str_Copy (Att.Title,title,
|
Str_Copy (Event.Title,title,
|
||||||
Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE);
|
Att_MAX_BYTES_ATTENDANCE_EVENT_TITLE);
|
||||||
|
|
||||||
/* Create a list of groups selected */
|
/* Create a list of groups selected */
|
||||||
|
@ -2772,14 +2772,14 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
||||||
|
|
||||||
/***** Create or update attendance event *****/
|
/***** Create or update attendance event *****/
|
||||||
if (ItsANewAttEvent)
|
if (ItsANewAttEvent)
|
||||||
Att_CreateAttEvent (&Att,text); // Add new attendance event to database
|
Att_CreateAttEvent (&Event,text); // Add new attendance event to database
|
||||||
else
|
else
|
||||||
Att_UpdateAttEvent (&Att,text); // Modify existing attendance event
|
Att_UpdateAttEvent (&Event,text); // Modify existing attendance event
|
||||||
|
|
||||||
/***** Free memory for list of selected groups *****/
|
/***** Free memory for list of selected groups *****/
|
||||||
Grp_FreeListCodSelectedGrps ();
|
Grp_FreeListCodSelectedGrps ();
|
||||||
|
|
||||||
sendAttendanceEventOut->attendanceEventCode = Att.AttCod;
|
sendAttendanceEventOut->attendanceEventCode = Event.AttCod;
|
||||||
|
|
||||||
return SOAP_OK;
|
return SOAP_OK;
|
||||||
}
|
}
|
||||||
|
@ -2793,7 +2793,7 @@ int swad__removeAttendanceEvent (struct soap *soap,
|
||||||
struct swad__removeAttendanceEventOutput *removeAttendanceEventOut) // output
|
struct swad__removeAttendanceEventOutput *removeAttendanceEventOut) // output
|
||||||
{
|
{
|
||||||
int ReturnCode;
|
int ReturnCode;
|
||||||
struct AttendanceEvent Att;
|
struct Att_Event Event;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
API_Set_gSOAP_RuntimeEnv (soap);
|
API_Set_gSOAP_RuntimeEnv (soap);
|
||||||
|
@ -2810,13 +2810,13 @@ int swad__removeAttendanceEvent (struct soap *soap,
|
||||||
|
|
||||||
/**** Get data of attendance event *****/
|
/**** Get data of attendance event *****/
|
||||||
/* Event code */
|
/* Event code */
|
||||||
Att.AttCod = (long) attendanceEventCode;
|
Event.AttCod = (long) attendanceEventCode;
|
||||||
|
|
||||||
/* Course code */
|
/* Course code */
|
||||||
if (Att.AttCod > 0) // The event already exists
|
if (Event.AttCod > 0) // The event already exists
|
||||||
{
|
{
|
||||||
Att_GetDataOfAttEventByCod (&Att);
|
Att_GetDataOfAttEventByCod (&Event);
|
||||||
Gbl.Hierarchy.Crs.CrsCod = Att.CrsCod;
|
Gbl.Hierarchy.Crs.CrsCod = Event.CrsCod;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return soap_receiver_fault (soap,
|
return soap_receiver_fault (soap,
|
||||||
|
@ -2844,9 +2844,9 @@ int swad__removeAttendanceEvent (struct soap *soap,
|
||||||
"Requester must be a teacher");
|
"Requester must be a teacher");
|
||||||
|
|
||||||
/***** Remove the attendance event from database *****/
|
/***** Remove the attendance event from database *****/
|
||||||
Att_RemoveAttEventFromDB (Att.AttCod);
|
Att_RemoveAttEventFromDB (Event.AttCod);
|
||||||
|
|
||||||
removeAttendanceEventOut->attendanceEventCode = Att.AttCod;
|
removeAttendanceEventOut->attendanceEventCode = Event.AttCod;
|
||||||
|
|
||||||
return SOAP_OK;
|
return SOAP_OK;
|
||||||
}
|
}
|
||||||
|
@ -2899,7 +2899,7 @@ int swad__getAttendanceUsers (struct soap *soap,
|
||||||
struct swad__getAttendanceUsersOutput *getAttendanceUsersOut) // output
|
struct swad__getAttendanceUsersOutput *getAttendanceUsersOut) // output
|
||||||
{
|
{
|
||||||
int ReturnCode;
|
int ReturnCode;
|
||||||
struct AttendanceEvent Att;
|
struct Att_Event Event;
|
||||||
char SubQuery[512];
|
char SubQuery[512];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
@ -2920,9 +2920,9 @@ int swad__getAttendanceUsers (struct soap *soap,
|
||||||
"Web service key does not exist in database");
|
"Web service key does not exist in database");
|
||||||
|
|
||||||
/***** Get course of this attendance event *****/
|
/***** Get course of this attendance event *****/
|
||||||
Att.AttCod = (long) attendanceEventCode;
|
Event.AttCod = (long) attendanceEventCode;
|
||||||
Att_GetDataOfAttEventByCod (&Att);
|
Att_GetDataOfAttEventByCod (&Event);
|
||||||
Gbl.Hierarchy.Crs.CrsCod = Att.CrsCod;
|
Gbl.Hierarchy.Crs.CrsCod = Event.CrsCod;
|
||||||
|
|
||||||
/***** Get some of my data *****/
|
/***** Get some of my data *****/
|
||||||
if (!API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Me.UsrDat,Gbl.Hierarchy.Crs.CrsCod))
|
if (!API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Me.UsrDat,Gbl.Hierarchy.Crs.CrsCod))
|
||||||
|
@ -2939,7 +2939,7 @@ int swad__getAttendanceUsers (struct soap *soap,
|
||||||
"Requester must be a teacher");
|
"Requester must be a teacher");
|
||||||
|
|
||||||
/***** Query list of attendance users *****/
|
/***** Query list of attendance users *****/
|
||||||
if (Att_CheckIfAttEventIsAssociatedToGrps (Att.AttCod))
|
if (Att_CheckIfAttEventIsAssociatedToGrps (Event.AttCod))
|
||||||
// Event for one or more groups
|
// Event for one or more groups
|
||||||
// Subquery: list of users in groups of this attendance event...
|
// Subquery: list of users in groups of this attendance event...
|
||||||
// ...who have no entry in attendance list of users
|
// ...who have no entry in attendance list of users
|
||||||
|
@ -2954,9 +2954,9 @@ int swad__getAttendanceUsers (struct soap *soap,
|
||||||
" AND crs_grp_usr.GrpCod=att_grp.GrpCod"
|
" AND crs_grp_usr.GrpCod=att_grp.GrpCod"
|
||||||
" AND crs_grp_usr.UsrCod NOT IN"
|
" AND crs_grp_usr.UsrCod NOT IN"
|
||||||
" (SELECT UsrCod FROM att_usr WHERE AttCod=%ld)",
|
" (SELECT UsrCod FROM att_usr WHERE AttCod=%ld)",
|
||||||
Att.AttCod,
|
Event.AttCod,
|
||||||
(unsigned) Rol_STD,
|
(unsigned) Rol_STD,
|
||||||
Att.AttCod);
|
Event.AttCod);
|
||||||
else
|
else
|
||||||
// Event for the whole course
|
// Event for the whole course
|
||||||
// Subquery: list of users in the course of this attendance event...
|
// Subquery: list of users in the course of this attendance event...
|
||||||
|
@ -2968,9 +2968,9 @@ int swad__getAttendanceUsers (struct soap *soap,
|
||||||
" AND crs_usr.Role=%u"
|
" AND crs_usr.Role=%u"
|
||||||
" AND crs_usr.UsrCod NOT IN"
|
" AND crs_usr.UsrCod NOT IN"
|
||||||
" (SELECT UsrCod FROM att_usr WHERE AttCod=%ld)",
|
" (SELECT UsrCod FROM att_usr WHERE AttCod=%ld)",
|
||||||
Att.AttCod,
|
Event.AttCod,
|
||||||
(unsigned) Rol_STD,
|
(unsigned) Rol_STD,
|
||||||
Att.AttCod);
|
Event.AttCod);
|
||||||
// Query: list of users in attendance list + rest of users (subquery)
|
// Query: list of users in attendance list + rest of users (subquery)
|
||||||
NumRows =
|
NumRows =
|
||||||
(unsigned) DB_QuerySELECT (&mysql_res,"can not get users"
|
(unsigned) DB_QuerySELECT (&mysql_res,"can not get users"
|
||||||
|
@ -3094,7 +3094,7 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
||||||
struct swad__sendAttendanceUsersOutput *sendAttendanceUsersOut) // output
|
struct swad__sendAttendanceUsersOutput *sendAttendanceUsersOut) // output
|
||||||
{
|
{
|
||||||
int ReturnCode;
|
int ReturnCode;
|
||||||
struct AttendanceEvent Att;
|
struct Att_Event Event;
|
||||||
const char *Ptr;
|
const char *Ptr;
|
||||||
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
char LongStr[Cns_MAX_DECIMAL_DIGITS_LONG + 1];
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
|
@ -3120,10 +3120,10 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
||||||
"Web service key does not exist in database");
|
"Web service key does not exist in database");
|
||||||
|
|
||||||
/***** Get course of this attendance event *****/
|
/***** Get course of this attendance event *****/
|
||||||
Att.AttCod = (long) attendanceEventCode;
|
Event.AttCod = (long) attendanceEventCode;
|
||||||
if (!Att_GetDataOfAttEventByCod (&Att))
|
if (!Att_GetDataOfAttEventByCod (&Event))
|
||||||
return SOAP_OK; // return with success = 0
|
return SOAP_OK; // return with success = 0
|
||||||
Gbl.Hierarchy.Crs.CrsCod = Att.CrsCod;
|
Gbl.Hierarchy.Crs.CrsCod = Event.CrsCod;
|
||||||
|
|
||||||
/***** Get some of my data *****/
|
/***** Get some of my data *****/
|
||||||
if (!API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Me.UsrDat,Gbl.Hierarchy.Crs.CrsCod))
|
if (!API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Me.UsrDat,Gbl.Hierarchy.Crs.CrsCod))
|
||||||
|
@ -3173,7 +3173,7 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
||||||
if (Usr_CheckIfUsrBelongsToCurrentCrs (&UsrDat))
|
if (Usr_CheckIfUsrBelongsToCurrentCrs (&UsrDat))
|
||||||
{
|
{
|
||||||
/* Mark user as present */
|
/* Mark user as present */
|
||||||
Att_RegUsrInAttEventNotChangingComments (Att.AttCod,UsrDat.UsrCod);
|
Att_RegUsrInAttEventNotChangingComments (Event.AttCod,UsrDat.UsrCod);
|
||||||
|
|
||||||
/* Add this user to query used to mark not present users as absent */
|
/* Add this user to query used to mark not present users as absent */
|
||||||
if (setOthersAsAbsent)
|
if (setOthersAsAbsent)
|
||||||
|
@ -3205,13 +3205,13 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
||||||
DB_QueryUPDATE ("can not set other users as absent",
|
DB_QueryUPDATE ("can not set other users as absent",
|
||||||
"UPDATE att_usr SET Present='N'"
|
"UPDATE att_usr SET Present='N'"
|
||||||
" WHERE AttCod=%ld%s",
|
" WHERE AttCod=%ld%s",
|
||||||
Att.AttCod,SubQueryAllUsrs);
|
Event.AttCod,SubQueryAllUsrs);
|
||||||
|
|
||||||
/* Free memory for subquery string */
|
/* Free memory for subquery string */
|
||||||
free (SubQueryAllUsrs);
|
free (SubQueryAllUsrs);
|
||||||
|
|
||||||
/* Clean table att_usr */
|
/* Clean table att_usr */
|
||||||
Att_RemoveUsrsAbsentWithoutCommentsFromAttEvent (Att.AttCod);
|
Att_RemoveUsrsAbsentWithoutCommentsFromAttEvent (Event.AttCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
/***** Free memory used for user's data *****/
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -44,7 +44,7 @@ typedef enum
|
||||||
Att_END_TIME = 1,
|
Att_END_TIME = 1,
|
||||||
} Att_StartOrEndTime_t;
|
} Att_StartOrEndTime_t;
|
||||||
|
|
||||||
struct AttendanceEvent
|
struct Att_Event
|
||||||
{
|
{
|
||||||
/* Fields stored in database */
|
/* Fields stored in database */
|
||||||
long AttCod;
|
long AttCod;
|
||||||
|
@ -77,12 +77,7 @@ typedef enum
|
||||||
|
|
||||||
void Att_SeeAttEvents (void);
|
void Att_SeeAttEvents (void);
|
||||||
void Att_RequestCreatOrEditAttEvent (void);
|
void Att_RequestCreatOrEditAttEvent (void);
|
||||||
bool Att_GetDataOfAttEventByCod (struct AttendanceEvent *Att);
|
bool Att_GetDataOfAttEventByCod (struct Att_Event *Event);
|
||||||
void Att_FreeListAttEvents (void);
|
|
||||||
|
|
||||||
void Att_PutParamSelectedAttCod (void *Args);
|
|
||||||
void Att_PutParamAttCod (long AttCod);
|
|
||||||
long Att_GetParamAttCod (void);
|
|
||||||
|
|
||||||
void Att_AskRemAttEvent (void);
|
void Att_AskRemAttEvent (void);
|
||||||
void Att_GetAndRemAttEvent (void);
|
void Att_GetAndRemAttEvent (void);
|
||||||
|
@ -91,8 +86,8 @@ void Att_RemoveAttEventFromDB (long AttCod);
|
||||||
void Att_HideAttEvent (void);
|
void Att_HideAttEvent (void);
|
||||||
void Att_ShowAttEvent (void);
|
void Att_ShowAttEvent (void);
|
||||||
void Att_RecFormAttEvent (void);
|
void Att_RecFormAttEvent (void);
|
||||||
void Att_CreateAttEvent (struct AttendanceEvent *Att,const char *Description);
|
void Att_CreateAttEvent (struct Att_Event *Event,const char *Description);
|
||||||
void Att_UpdateAttEvent (struct AttendanceEvent *Att,const char *Description);
|
void Att_UpdateAttEvent (struct Att_Event *Event,const char *Description);
|
||||||
bool Att_CheckIfAttEventIsAssociatedToGrps (long AttCod);
|
bool Att_CheckIfAttEventIsAssociatedToGrps (long AttCod);
|
||||||
bool Att_CheckIfAttEventIsAssociatedToGrp (long AsgCod,long GrpCod);
|
bool Att_CheckIfAttEventIsAssociatedToGrp (long AsgCod,long GrpCod);
|
||||||
void Att_RemoveGroupsOfType (long GrpTypCod);
|
void Att_RemoveGroupsOfType (long GrpTypCod);
|
||||||
|
@ -116,7 +111,7 @@ void Att_RegisterStudentsInAttEvent (void);
|
||||||
void Att_RegUsrInAttEventNotChangingComments (long AttCod,long UsrCod);
|
void Att_RegUsrInAttEventNotChangingComments (long AttCod,long UsrCod);
|
||||||
void Att_RemoveUsrsAbsentWithoutCommentsFromAttEvent (long AttCod);
|
void Att_RemoveUsrsAbsentWithoutCommentsFromAttEvent (long AttCod);
|
||||||
|
|
||||||
void Att_ReqListUsrsAttendanceCrs (void);
|
void Att_ReqListUsrsAttendanceCrs (void *Args);
|
||||||
void Att_ListMyAttendanceCrs (void);
|
void Att_ListMyAttendanceCrs (void);
|
||||||
void Att_PrintMyAttendanceCrs (void);
|
void Att_PrintMyAttendanceCrs (void);
|
||||||
void Att_ListUsrsAttendanceCrs (void);
|
void Att_ListUsrsAttendanceCrs (void);
|
||||||
|
|
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.164 (2020-04-05)"
|
#define Log_PLATFORM_VERSION "SWAD 19.165 (2020-04-06)"
|
||||||
#define CSS_FILE "swad19.146.css"
|
#define CSS_FILE "swad19.146.css"
|
||||||
#define JS_FILE "swad19.153.js"
|
#define JS_FILE "swad19.153.js"
|
||||||
/*
|
/*
|
||||||
|
@ -528,6 +528,7 @@ Param
|
||||||
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
|
||||||
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
|
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
|
||||||
|
|
||||||
|
Version 19.165: Apr 06, 2020 Code refactoring in attendance events. (284743 lines)
|
||||||
Version 19.164: Apr 05, 2020 Code refactoring in assignments and pagination. (284644 lines)
|
Version 19.164: Apr 05, 2020 Code refactoring in assignments and pagination. (284644 lines)
|
||||||
Version 19.163: Apr 05, 2020 Log table is now partitioned by years. (284617 lines)
|
Version 19.163: Apr 05, 2020 Log table is now partitioned by years. (284617 lines)
|
||||||
20 changes necessary in database:
|
20 changes necessary in database:
|
||||||
|
|
|
@ -3099,20 +3099,21 @@ static bool Brw_CheckIfQuotaExceded (void)
|
||||||
/************** Request edition of works of users of the course **************/
|
/************** Request edition of works of users of the course **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Brw_AskEditWorksCrs (void)
|
void Brw_AskEditWorksCrs (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_FILES_Homework_for_teachers;
|
extern const char *Hlp_FILES_Homework_for_teachers;
|
||||||
extern const char *Txt_Assignments_and_other_works;
|
extern const char *Txt_Assignments_and_other_works;
|
||||||
extern const char *Txt_View_homework;
|
extern const char *Txt_View_homework;
|
||||||
|
|
||||||
/***** List users to select some of them *****/
|
if (Args)
|
||||||
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
/***** List users to select some of them *****/
|
||||||
ActAdmAsgWrkCrs,
|
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
||||||
NULL,NULL,
|
ActAdmAsgWrkCrs,
|
||||||
Txt_Assignments_and_other_works,
|
NULL,NULL,
|
||||||
Hlp_FILES_Homework_for_teachers,
|
Txt_Assignments_and_other_works,
|
||||||
Txt_View_homework,
|
Hlp_FILES_Homework_for_teachers,
|
||||||
false); // Do not put form with date range
|
Txt_View_homework,
|
||||||
|
false); // Do not put form with date range
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -3459,21 +3460,24 @@ static void Brw_ShowDataOwnerAsgWrk (struct UsrData *UsrDat)
|
||||||
void Brw_GetSelectedUsrsAndShowWorks (void)
|
void Brw_GetSelectedUsrsAndShowWorks (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
Brw_ShowFileBrowserOrWorks, // when user(s) selected
|
Brw_ShowFileBrowserOrWorks,&Gbl, // when user(s) selected
|
||||||
Brw_AskEditWorksCrs); // when no user selected
|
Brw_AskEditWorksCrs,&Gbl); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Show a file browser or users' works *******************/
|
/******************** Show a file browser or users' works *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Brw_ShowFileBrowserOrWorks (void)
|
void Brw_ShowFileBrowserOrWorks (void *Args)
|
||||||
{
|
{
|
||||||
/***** Get parameters related to file browser *****/
|
if (Args)
|
||||||
Brw_GetParAndInitFileBrowser ();
|
{
|
||||||
|
/***** Get parameters related to file browser *****/
|
||||||
|
Brw_GetParAndInitFileBrowser ();
|
||||||
|
|
||||||
/***** Show the file browser or works *****/
|
/***** Show the file browser or works *****/
|
||||||
Brw_ShowAgainFileBrowserOrWorks ();
|
Brw_ShowAgainFileBrowserOrWorks ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -182,7 +182,7 @@ bool Brw_UpdateFoldersAssigmentsIfExistForAllUsrs (const char *OldFolderName,con
|
||||||
void Brw_RemoveFoldersAssignmentsIfExistForAllUsrs (const char *FolderName);
|
void Brw_RemoveFoldersAssignmentsIfExistForAllUsrs (const char *FolderName);
|
||||||
|
|
||||||
void Brw_GetSelectedUsrsAndShowWorks (void);
|
void Brw_GetSelectedUsrsAndShowWorks (void);
|
||||||
void Brw_ShowFileBrowserOrWorks (void);
|
void Brw_ShowFileBrowserOrWorks (void *Args);
|
||||||
void Brw_ShowAgainFileBrowserOrWorks (void);
|
void Brw_ShowAgainFileBrowserOrWorks (void);
|
||||||
|
|
||||||
void Brw_RemoveInsFilesFromDB (long InsCod);
|
void Brw_RemoveInsFilesFromDB (long InsCod);
|
||||||
|
@ -198,7 +198,7 @@ void Brw_RemoveUsrFilesFromDB (long UsrCod);
|
||||||
void Brw_PutHiddenParamFullTreeIfSelected (void *Args);
|
void Brw_PutHiddenParamFullTreeIfSelected (void *Args);
|
||||||
|
|
||||||
void Brw_CreateDirDownloadTmp (void);
|
void Brw_CreateDirDownloadTmp (void);
|
||||||
void Brw_AskEditWorksCrs (void);
|
void Brw_AskEditWorksCrs (void *Args);
|
||||||
void Brw_AskRemFileFromTree (void);
|
void Brw_AskRemFileFromTree (void);
|
||||||
void Brw_RemFileFromTree (void);
|
void Brw_RemFileFromTree (void);
|
||||||
void Brw_RemFolderFromTree (void);
|
void Brw_RemFolderFromTree (void);
|
||||||
|
|
|
@ -312,13 +312,6 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Prjs.SelectedOrder = Prj_ORDER_DEFAULT;
|
Gbl.Prjs.SelectedOrder = Prj_ORDER_DEFAULT;
|
||||||
Gbl.Prjs.PrjCod = -1L;
|
Gbl.Prjs.PrjCod = -1L;
|
||||||
|
|
||||||
Gbl.AttEvents.LstIsRead = false; // List is not read
|
|
||||||
Gbl.AttEvents.Num = 0;
|
|
||||||
Gbl.AttEvents.Lst = NULL;
|
|
||||||
Gbl.AttEvents.SelectedOrder = Att_ORDER_DEFAULT;
|
|
||||||
Gbl.AttEvents.AttCod = -1L;
|
|
||||||
Gbl.AttEvents.StrAttCodsSelected = NULL;
|
|
||||||
|
|
||||||
Gbl.Mails.Num = 0;
|
Gbl.Mails.Num = 0;
|
||||||
Gbl.Mails.Lst = NULL;
|
Gbl.Mails.Lst = NULL;
|
||||||
Gbl.Mails.SelectedOrder = Mai_ORDER_DEFAULT;
|
Gbl.Mails.SelectedOrder = Mai_ORDER_DEFAULT;
|
||||||
|
|
|
@ -541,17 +541,6 @@ struct Globals
|
||||||
unsigned CurrentPage;
|
unsigned CurrentPage;
|
||||||
long PrjCod; // Current project
|
long PrjCod; // Current project
|
||||||
} Prjs;
|
} Prjs;
|
||||||
struct
|
|
||||||
{
|
|
||||||
bool LstIsRead; // Is the list already read from database, or it needs to be read?
|
|
||||||
unsigned Num; // Number of attendance events
|
|
||||||
struct AttendanceEvent *Lst; // List of attendance events
|
|
||||||
Dat_StartEndTime_t SelectedOrder;
|
|
||||||
long AttCod;
|
|
||||||
bool ShowDetails;
|
|
||||||
char *StrAttCodsSelected;
|
|
||||||
unsigned CurrentPage;
|
|
||||||
} AttEvents;
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
Usr_Who_t Who;
|
Usr_Who_t Who;
|
||||||
|
|
30
swad_mail.c
30
swad_mail.c
|
@ -88,7 +88,7 @@ static void Mai_PutFormToCreateMailDomain (void);
|
||||||
static void Mai_PutHeadMailDomains (void);
|
static void Mai_PutHeadMailDomains (void);
|
||||||
static void Mai_CreateMailDomain (struct Mail *Mai);
|
static void Mai_CreateMailDomain (struct Mail *Mai);
|
||||||
|
|
||||||
static void Mai_ListEmails (void);
|
static void Mai_ListEmails (void *Args);
|
||||||
|
|
||||||
static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
|
static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe,
|
||||||
bool IMustFillInEmail,bool IShouldConfirmEmail);
|
bool IMustFillInEmail,bool IShouldConfirmEmail);
|
||||||
|
@ -868,20 +868,21 @@ static void Mai_CreateMailDomain (struct Mail *Mai)
|
||||||
/************** Request edition of works of users of the course **************/
|
/************** Request edition of works of users of the course **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Mai_ReqUsrsToListEmails (void)
|
void Mai_ReqUsrsToListEmails (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_MESSAGES_Email;
|
extern const char *Hlp_MESSAGES_Email;
|
||||||
extern const char *Txt_Email;
|
extern const char *Txt_Email;
|
||||||
extern const char *Txt_View_email_addresses;
|
extern const char *Txt_View_email_addresses;
|
||||||
|
|
||||||
/***** List users to select some of them *****/
|
if (Args)
|
||||||
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
/***** List users to select some of them *****/
|
||||||
ActMaiUsr,
|
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
||||||
NULL,NULL,
|
ActMaiUsr,
|
||||||
Txt_Email,
|
NULL,NULL,
|
||||||
Hlp_MESSAGES_Email,
|
Txt_Email,
|
||||||
Txt_View_email_addresses,
|
Hlp_MESSAGES_Email,
|
||||||
false); // Do not put form with date range
|
Txt_View_email_addresses,
|
||||||
|
false); // Do not put form with date range
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -891,8 +892,8 @@ void Mai_ReqUsrsToListEmails (void)
|
||||||
void Mai_GetSelectedUsrsAndListEmails (void)
|
void Mai_GetSelectedUsrsAndListEmails (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
Mai_ListEmails, // when user(s) selected
|
Mai_ListEmails,&Gbl, // when user(s) selected
|
||||||
Mai_ReqUsrsToListEmails); // when no user selected
|
Mai_ReqUsrsToListEmails,&Gbl); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -901,7 +902,7 @@ void Mai_GetSelectedUsrsAndListEmails (void)
|
||||||
|
|
||||||
#define Mai_MAX_BYTES_STR_ADDR (256 * 1024 - 1)
|
#define Mai_MAX_BYTES_STR_ADDR (256 * 1024 - 1)
|
||||||
|
|
||||||
static void Mai_ListEmails (void)
|
static void Mai_ListEmails (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_MESSAGES_Email;
|
extern const char *Hlp_MESSAGES_Email;
|
||||||
extern const char *The_ClassFormOutBoxBold[The_NUM_THEMES];
|
extern const char *The_ClassFormOutBoxBold[The_NUM_THEMES];
|
||||||
|
@ -916,6 +917,9 @@ static void Mai_ListEmails (void)
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
const char *Ptr;
|
const char *Ptr;
|
||||||
|
|
||||||
|
if (!Args)
|
||||||
|
return;
|
||||||
|
|
||||||
/***** Start the box used to list the emails *****/
|
/***** Start the box used to list the emails *****/
|
||||||
Box_BoxBegin (NULL,Txt_Email_addresses,
|
Box_BoxBegin (NULL,Txt_Email_addresses,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
|
|
|
@ -72,7 +72,7 @@ void Mai_RenameMailDomainFull (void);
|
||||||
void Mai_ContEditAfterChgMai (void);
|
void Mai_ContEditAfterChgMai (void);
|
||||||
void Mai_RecFormNewMailDomain (void);
|
void Mai_RecFormNewMailDomain (void);
|
||||||
|
|
||||||
void Mai_ReqUsrsToListEmails (void);
|
void Mai_ReqUsrsToListEmails (void *Args);
|
||||||
void Mai_GetSelectedUsrsAndListEmails (void);
|
void Mai_GetSelectedUsrsAndListEmails (void);
|
||||||
|
|
||||||
bool Mai_CheckIfEmailIsValid (const char *Email);
|
bool Mai_CheckIfEmailIsValid (const char *Email);
|
||||||
|
|
|
@ -73,7 +73,7 @@ extern struct Globals Gbl;
|
||||||
static void MchRes_ListMyMchResultsInCrs (void);
|
static void MchRes_ListMyMchResultsInCrs (void);
|
||||||
static void MchRes_ListMyMchResultsInGam (long GamCod);
|
static void MchRes_ListMyMchResultsInGam (long GamCod);
|
||||||
static void MchRes_ListMyMchResultsInMch (long MchCod);
|
static void MchRes_ListMyMchResultsInMch (long MchCod);
|
||||||
static void MchRes_ShowAllMchResultsInSelectedGames (void);
|
static void MchRes_ShowAllMchResultsInSelectedGames (void *Args);
|
||||||
static void MchRes_ListAllMchResultsInSelectedGames (void);
|
static void MchRes_ListAllMchResultsInSelectedGames (void);
|
||||||
static void MchRes_ListAllMchResultsInGam (long GamCod);
|
static void MchRes_ListAllMchResultsInGam (long GamCod);
|
||||||
static void MchRes_ListAllMchResultsInMch (long MchCod);
|
static void MchRes_ListAllMchResultsInMch (long MchCod);
|
||||||
|
@ -104,19 +104,20 @@ static bool MchRes_CheckIfICanViewScore (bool ICanViewResult,unsigned Visibility
|
||||||
/*********** Select users and dates to show their matches results ************/
|
/*********** Select users and dates to show their matches results ************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void MchRes_SelUsrsToViewMchResults (void)
|
void MchRes_SelUsrsToViewMchResults (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Games_results;
|
extern const char *Hlp_ASSESSMENT_Games_results;
|
||||||
extern const char *Txt_Results;
|
extern const char *Txt_Results;
|
||||||
extern const char *Txt_View_matches_results;
|
extern const char *Txt_View_matches_results;
|
||||||
|
|
||||||
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
if (Args)
|
||||||
ActSeeAllMchResCrs,
|
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
||||||
NULL,NULL,
|
ActSeeAllMchResCrs,
|
||||||
Txt_Results,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Games_results,
|
Txt_Results,
|
||||||
Txt_View_matches_results,
|
Hlp_ASSESSMENT_Games_results,
|
||||||
false); // Do not put form with date range
|
Txt_View_matches_results,
|
||||||
|
false); // Do not put form with date range
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -246,18 +247,21 @@ static void MchRes_ListMyMchResultsInMch (long MchCod)
|
||||||
void MchRes_ShowAllMchResultsInCrs (void)
|
void MchRes_ShowAllMchResultsInCrs (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
MchRes_ShowAllMchResultsInSelectedGames,
|
MchRes_ShowAllMchResultsInSelectedGames,&Gbl,
|
||||||
MchRes_SelUsrsToViewMchResults);
|
MchRes_SelUsrsToViewMchResults,&Gbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************** Show matches results for several users *******************/
|
/****************** Show matches results for several users *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void MchRes_ShowAllMchResultsInSelectedGames (void)
|
static void MchRes_ShowAllMchResultsInSelectedGames (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Results;
|
extern const char *Txt_Results;
|
||||||
|
|
||||||
|
if (!Args)
|
||||||
|
return;
|
||||||
|
|
||||||
/***** Get list of games *****/
|
/***** Get list of games *****/
|
||||||
Gam_GetListGames (Gam_ORDER_BY_TITLE);
|
Gam_GetListGames (Gam_ORDER_BY_TITLE);
|
||||||
Gam_GetListSelectedGamCods ();
|
Gam_GetListSelectedGamCods ();
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void MchRes_SelUsrsToViewMchResults (void);
|
void MchRes_SelUsrsToViewMchResults (void *Args);
|
||||||
|
|
||||||
void MchRes_ShowMyMchResultsInCrs (void);
|
void MchRes_ShowMyMchResultsInCrs (void);
|
||||||
void MchRes_ShowMyMchResultsInGam (void);
|
void MchRes_ShowMyMchResultsInGam (void);
|
||||||
|
|
|
@ -146,10 +146,10 @@ struct Prj_Faults
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prj_ReqUsrsToSelect (void);
|
static void Prj_ReqUsrsToSelect (void *Args);
|
||||||
static void Prj_GetSelectedUsrsAndShowTheirPrjs (void);
|
static void Prj_GetSelectedUsrsAndShowTheirPrjs (void);
|
||||||
static void Prj_ShowProjects (void);
|
static void Prj_ShowProjects (void);
|
||||||
static void Prj_ShowPrjsInCurrentPage (void);
|
static void Prj_ShowPrjsInCurrentPage (void *Args);
|
||||||
|
|
||||||
static void Prj_ShowFormToFilterByMy_All (void);
|
static void Prj_ShowFormToFilterByMy_All (void);
|
||||||
static void Prj_ShowFormToFilterByAssign (void);
|
static void Prj_ShowFormToFilterByAssign (void);
|
||||||
|
@ -213,9 +213,9 @@ static unsigned Prj_GetUsrsInPrj (long PrjCod,Prj_RoleInProject_t RoleInProject,
|
||||||
static Prj_RoleInProject_t Prj_ConvertUnsignedStrToRoleInProject (const char *UnsignedStr);
|
static Prj_RoleInProject_t Prj_ConvertUnsignedStrToRoleInProject (const char *UnsignedStr);
|
||||||
|
|
||||||
static void Prj_ReqAddUsrs (Prj_RoleInProject_t RoleInProject);
|
static void Prj_ReqAddUsrs (Prj_RoleInProject_t RoleInProject);
|
||||||
static void Prj_AddStds (void);
|
static void Prj_AddStds (void *Args);
|
||||||
static void Prj_AddTuts (void);
|
static void Prj_AddTuts (void *Args);
|
||||||
static void Prj_AddEvls (void);
|
static void Prj_AddEvls (void *Args);
|
||||||
static void Prj_AddUsrsToProject (Prj_RoleInProject_t RoleInProject);
|
static void Prj_AddUsrsToProject (Prj_RoleInProject_t RoleInProject);
|
||||||
static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject);
|
static void Prj_ReqRemUsrFromPrj (Prj_RoleInProject_t RoleInProject);
|
||||||
static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject);
|
static void Prj_RemUsrFromPrj (Prj_RoleInProject_t RoleInProject);
|
||||||
|
@ -263,23 +263,24 @@ void Prj_ListUsrsToSelect (void)
|
||||||
Prj_GetParams ();
|
Prj_GetParams ();
|
||||||
|
|
||||||
/***** Show list of users to select some of them *****/
|
/***** Show list of users to select some of them *****/
|
||||||
Prj_ReqUsrsToSelect ();
|
Prj_ReqUsrsToSelect (&Gbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Prj_ReqUsrsToSelect (void)
|
static void Prj_ReqUsrsToSelect (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Projects;
|
extern const char *Hlp_ASSESSMENT_Projects;
|
||||||
extern const char *Txt_Projects;
|
extern const char *Txt_Projects;
|
||||||
extern const char *Txt_View_projects;
|
extern const char *Txt_View_projects;
|
||||||
|
|
||||||
/***** List users to select some of them *****/
|
if (Args)
|
||||||
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
/***** List users to select some of them *****/
|
||||||
ActSeePrj,
|
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
||||||
Prj_PutCurrentParams,&Gbl,
|
ActSeePrj,
|
||||||
Txt_Projects,
|
Prj_PutCurrentParams,&Gbl,
|
||||||
Hlp_ASSESSMENT_Projects,
|
Txt_Projects,
|
||||||
Txt_View_projects,
|
Hlp_ASSESSMENT_Projects,
|
||||||
false); // Do not put form with date range
|
Txt_View_projects,
|
||||||
|
false); // Do not put form with date range
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -306,7 +307,7 @@ static void Prj_ShowProjects (void)
|
||||||
case Usr_WHO_ME:
|
case Usr_WHO_ME:
|
||||||
case Usr_WHO_ALL:
|
case Usr_WHO_ALL:
|
||||||
/* Show my projects / all projects */
|
/* Show my projects / all projects */
|
||||||
Prj_ShowPrjsInCurrentPage ();
|
Prj_ShowPrjsInCurrentPage (&Gbl);
|
||||||
break;
|
break;
|
||||||
case Usr_WHO_SELECTED:
|
case Usr_WHO_SELECTED:
|
||||||
/* Get selected users and show their projects */
|
/* Get selected users and show their projects */
|
||||||
|
@ -324,8 +325,8 @@ static void Prj_ShowProjects (void)
|
||||||
static void Prj_GetSelectedUsrsAndShowTheirPrjs (void)
|
static void Prj_GetSelectedUsrsAndShowTheirPrjs (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
Prj_ShowPrjsInCurrentPage, // when user(s) selected
|
Prj_ShowPrjsInCurrentPage,&Gbl, // when user(s) selected
|
||||||
Prj_ReqUsrsToSelect); // when no user selected
|
Prj_ReqUsrsToSelect,&Gbl); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -379,7 +380,7 @@ void Prj_ShowTableSelectedPrjs (void)
|
||||||
/****************** Show the projects in current page ************************/
|
/****************** Show the projects in current page ************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prj_ShowPrjsInCurrentPage (void)
|
static void Prj_ShowPrjsInCurrentPage (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Projects;
|
extern const char *Hlp_ASSESSMENT_Projects;
|
||||||
extern const char *Txt_Projects;
|
extern const char *Txt_Projects;
|
||||||
|
@ -389,6 +390,9 @@ static void Prj_ShowPrjsInCurrentPage (void)
|
||||||
unsigned NumIndex;
|
unsigned NumIndex;
|
||||||
struct Project Prj;
|
struct Project Prj;
|
||||||
|
|
||||||
|
if (!Args)
|
||||||
|
return;
|
||||||
|
|
||||||
/***** Get list of projects *****/
|
/***** Get list of projects *****/
|
||||||
Prj_GetListProjects ();
|
Prj_GetListProjects ();
|
||||||
|
|
||||||
|
@ -2261,19 +2265,22 @@ static Prj_RoleInProject_t Prj_ConvertUnsignedStrToRoleInProject (const char *Un
|
||||||
/******************* Request users to be added to project ********************/
|
/******************* Request users to be added to project ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Prj_ReqAddStds (void)
|
void Prj_ReqAddStds (void *Args)
|
||||||
{
|
{
|
||||||
Prj_ReqAddUsrs (Prj_ROLE_STD);
|
if (Args)
|
||||||
|
Prj_ReqAddUsrs (Prj_ROLE_STD);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Prj_ReqAddTuts (void)
|
void Prj_ReqAddTuts (void *Args)
|
||||||
{
|
{
|
||||||
Prj_ReqAddUsrs (Prj_ROLE_TUT);
|
if (Args)
|
||||||
|
Prj_ReqAddUsrs (Prj_ROLE_TUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Prj_ReqAddEvls (void)
|
void Prj_ReqAddEvls (void *Args)
|
||||||
{
|
{
|
||||||
Prj_ReqAddUsrs (Prj_ROLE_EVL);
|
if (Args)
|
||||||
|
Prj_ReqAddUsrs (Prj_ROLE_EVL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Prj_ReqAddUsrs (Prj_RoleInProject_t RoleInProject)
|
static void Prj_ReqAddUsrs (Prj_RoleInProject_t RoleInProject)
|
||||||
|
@ -2319,41 +2326,44 @@ static void Prj_ReqAddUsrs (Prj_RoleInProject_t RoleInProject)
|
||||||
void Prj_GetSelectedUsrsAndAddStds (void)
|
void Prj_GetSelectedUsrsAndAddStds (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Prj_MembersToAdd,
|
Usr_GetSelectedUsrsAndGoToAct (&Prj_MembersToAdd,
|
||||||
Prj_AddStds, // when user(s) selected
|
Prj_AddStds,&Gbl, // when user(s) selected
|
||||||
Prj_ReqAddStds); // when no user selected
|
Prj_ReqAddStds,&Gbl); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
void Prj_GetSelectedUsrsAndAddTuts (void)
|
void Prj_GetSelectedUsrsAndAddTuts (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Prj_MembersToAdd,
|
Usr_GetSelectedUsrsAndGoToAct (&Prj_MembersToAdd,
|
||||||
Prj_AddTuts, // when user(s) selected
|
Prj_AddTuts,&Gbl, // when user(s) selected
|
||||||
Prj_ReqAddTuts); // when no user selected
|
Prj_ReqAddTuts,&Gbl); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
void Prj_GetSelectedUsrsAndAddEvls (void)
|
void Prj_GetSelectedUsrsAndAddEvls (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Prj_MembersToAdd,
|
Usr_GetSelectedUsrsAndGoToAct (&Prj_MembersToAdd,
|
||||||
Prj_AddEvls, // when user(s) selected
|
Prj_AddEvls,&Gbl, // when user(s) selected
|
||||||
Prj_ReqAddEvls); // when no user selected
|
Prj_ReqAddEvls,&Gbl); // when no user selected
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************************** Add users to project ***************************/
|
/**************************** Add users to project ***************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Prj_AddStds (void)
|
static void Prj_AddStds (void *Args)
|
||||||
{
|
{
|
||||||
Prj_AddUsrsToProject (Prj_ROLE_STD);
|
if (Args)
|
||||||
|
Prj_AddUsrsToProject (Prj_ROLE_STD);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Prj_AddTuts (void)
|
static void Prj_AddTuts (void *Args)
|
||||||
{
|
{
|
||||||
Prj_AddUsrsToProject (Prj_ROLE_TUT);
|
if (Args)
|
||||||
|
Prj_AddUsrsToProject (Prj_ROLE_TUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Prj_AddEvls (void)
|
static void Prj_AddEvls (void *Args)
|
||||||
{
|
{
|
||||||
Prj_AddUsrsToProject (Prj_ROLE_EVL);
|
if (Args)
|
||||||
|
Prj_AddUsrsToProject (Prj_ROLE_EVL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Prj_AddUsrsToProject (Prj_RoleInProject_t RoleInProject)
|
static void Prj_AddUsrsToProject (Prj_RoleInProject_t RoleInProject)
|
||||||
|
|
|
@ -172,9 +172,9 @@ void Prj_PrintOneProject (void);
|
||||||
void Prj_FlushCacheMyRolesInProject (void);
|
void Prj_FlushCacheMyRolesInProject (void);
|
||||||
Prj_RoleInProject_t Prj_GetMyRolesInProject (long PrjCod);
|
Prj_RoleInProject_t Prj_GetMyRolesInProject (long PrjCod);
|
||||||
|
|
||||||
void Prj_ReqAddStds (void);
|
void Prj_ReqAddStds (void *Args);
|
||||||
void Prj_ReqAddTuts (void);
|
void Prj_ReqAddTuts (void *Args);
|
||||||
void Prj_ReqAddEvls (void);
|
void Prj_ReqAddEvls (void *Args);
|
||||||
|
|
||||||
void Prj_GetSelectedUsrsAndAddStds (void);
|
void Prj_GetSelectedUsrsAndAddStds (void);
|
||||||
void Prj_GetSelectedUsrsAndAddTuts (void);
|
void Prj_GetSelectedUsrsAndAddTuts (void);
|
||||||
|
|
|
@ -145,7 +145,7 @@ static void TstExa_StoreOneExamQstInDB (const struct TstExa_Exam *Exam,
|
||||||
unsigned NumQst);
|
unsigned NumQst);
|
||||||
static void Tst_UpdateQstScoreInDB (const struct TstExa_Exam *Exam,unsigned NumQst);
|
static void Tst_UpdateQstScoreInDB (const struct TstExa_Exam *Exam,unsigned NumQst);
|
||||||
|
|
||||||
static void TstExa_ShowUsrsExams (void);
|
static void TstExa_ShowUsrsExams (void *Args);
|
||||||
static void TstExa_ShowHeaderExams (void);
|
static void TstExa_ShowHeaderExams (void);
|
||||||
static void TstExa_ShowExams (struct UsrData *UsrDat);
|
static void TstExa_ShowExams (struct UsrData *UsrDat);
|
||||||
static void TstExa_ShowExamsSummaryRow (bool ItsMe,
|
static void TstExa_ShowExamsSummaryRow (bool ItsMe,
|
||||||
|
@ -1451,19 +1451,20 @@ static void Tst_UpdateQstScoreInDB (const struct TstExa_Exam *Exam,unsigned NumQ
|
||||||
/************* Select users and dates to show their test exams ***************/
|
/************* Select users and dates to show their test exams ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TstExa_SelUsrsToViewUsrsExams (void)
|
void TstExa_SelUsrsToViewUsrsExams (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Tests_results;
|
extern const char *Hlp_ASSESSMENT_Tests_results;
|
||||||
extern const char *Txt_Results;
|
extern const char *Txt_Results;
|
||||||
extern const char *Txt_View_test_results;
|
extern const char *Txt_View_test_results;
|
||||||
|
|
||||||
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
if (Args)
|
||||||
ActSeeUsrTstRes,
|
Usr_PutFormToSelectUsrsToGoToAct (&Gbl.Usrs.Selected,
|
||||||
NULL,NULL,
|
ActSeeUsrTstRes,
|
||||||
Txt_Results,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests_results,
|
Txt_Results,
|
||||||
Txt_View_test_results,
|
Hlp_ASSESSMENT_Tests_results,
|
||||||
true); // Put form with date range
|
Txt_View_test_results,
|
||||||
|
true); // Put form with date range
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1532,20 +1533,23 @@ void TstExa_ShowMyExams (void)
|
||||||
void TstExa_GetUsrsAndShowExams (void)
|
void TstExa_GetUsrsAndShowExams (void)
|
||||||
{
|
{
|
||||||
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
Usr_GetSelectedUsrsAndGoToAct (&Gbl.Usrs.Selected,
|
||||||
TstExa_ShowUsrsExams,
|
TstExa_ShowUsrsExams,&Gbl,
|
||||||
TstExa_SelUsrsToViewUsrsExams);
|
TstExa_SelUsrsToViewUsrsExams,&Gbl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********************* Show test exams for several users *********************/
|
/********************* Show test exams for several users *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void TstExa_ShowUsrsExams (void)
|
static void TstExa_ShowUsrsExams (void *Args)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_ASSESSMENT_Tests_results;
|
extern const char *Hlp_ASSESSMENT_Tests_results;
|
||||||
extern const char *Txt_Results;
|
extern const char *Txt_Results;
|
||||||
const char *Ptr;
|
const char *Ptr;
|
||||||
|
|
||||||
|
if (!Args)
|
||||||
|
return;
|
||||||
|
|
||||||
/***** Get starting and ending dates *****/
|
/***** Get starting and ending dates *****/
|
||||||
Dat_GetIniEndDatesFromForm ();
|
Dat_GetIniEndDatesFromForm ();
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ void TstExa_ComputeAndShowGrade (unsigned NumQsts,double Score,double MaxGrade);
|
||||||
double TstExa_ComputeGrade (unsigned NumQsts,double Score,double MaxGrade);
|
double TstExa_ComputeGrade (unsigned NumQsts,double Score,double MaxGrade);
|
||||||
void TstExa_ShowGrade (double Grade,double MaxGrade);
|
void TstExa_ShowGrade (double Grade,double MaxGrade);
|
||||||
|
|
||||||
void TstExa_SelUsrsToViewUsrsExams (void);
|
void TstExa_SelUsrsToViewUsrsExams (void *Args);
|
||||||
void TstExa_SelDatesToSeeMyExams (void);
|
void TstExa_SelDatesToSeeMyExams (void);
|
||||||
void TstExa_ShowMyExams (void);
|
void TstExa_ShowMyExams (void);
|
||||||
void TstExa_GetUsrsAndShowExams (void);
|
void TstExa_GetUsrsAndShowExams (void);
|
||||||
|
|
|
@ -6448,8 +6448,8 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||||
}
|
}
|
||||||
|
|
||||||
void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||||
void (*FuncWhenUsrsSelected) (),
|
void (*FuncWhenUsrsSelected) (void *ArgsSelected),void *ArgsSelected,
|
||||||
void (*FuncWhenNoUsrsSelected) ())
|
void (*FuncWhenNoUsrsSelected) (void *ArgsNoSelected),void *ArgsNoSelected)
|
||||||
{
|
{
|
||||||
extern const char *Txt_You_must_select_one_ore_more_users;
|
extern const char *Txt_You_must_select_one_ore_more_users;
|
||||||
|
|
||||||
|
@ -6458,13 +6458,13 @@ void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||||
|
|
||||||
/***** Check number of users *****/
|
/***** Check number of users *****/
|
||||||
if (Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (SelectedUsrs)) // If some users are selected...
|
if (Usr_CheckIfThereAreUsrsInListOfSelectedEncryptedUsrCods (SelectedUsrs)) // If some users are selected...
|
||||||
FuncWhenUsrsSelected ();
|
FuncWhenUsrsSelected (ArgsSelected);
|
||||||
else // If no users are selected...
|
else // If no users are selected...
|
||||||
{
|
{
|
||||||
// ...write warning alert
|
// ...write warning alert
|
||||||
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
Ale_ShowAlert (Ale_WARNING,Txt_You_must_select_one_ore_more_users);
|
||||||
// ...and show again the form
|
// ...and show again the form
|
||||||
FuncWhenNoUsrsSelected ();
|
FuncWhenNoUsrsSelected (ArgsNoSelected);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free memory used by list of selected users' codes *****/
|
/***** Free memory used by list of selected users' codes *****/
|
||||||
|
|
|
@ -476,8 +476,8 @@ void Usr_PutFormToSelectUsrsToGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||||
const char *TxtButton,
|
const char *TxtButton,
|
||||||
bool PutFormDateRange);
|
bool PutFormDateRange);
|
||||||
void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
void Usr_GetSelectedUsrsAndGoToAct (struct SelectedUsrs *SelectedUsrs,
|
||||||
void (*FuncWhenUsrsSelected) (),
|
void (*FuncWhenUsrsSelected) (void *ArgsSelected),void *ArgsSelected,
|
||||||
void (*FuncWhenNoUsrsSelected) ());
|
void (*FuncWhenNoUsrsSelected) (void *ArgsNoSelected),void *ArgsNoSelected);
|
||||||
void Usr_ListUsersToSelect (Rol_Role_t Role,struct SelectedUsrs *SelectedUsrs);
|
void Usr_ListUsersToSelect (Rol_Role_t Role,struct SelectedUsrs *SelectedUsrs);
|
||||||
|
|
||||||
void Usr_ListAllDataGsts (void);
|
void Usr_ListAllDataGsts (void);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user