mirror of https://github.com/acanas/swad-core.git
Version 22.78.5: Mar 22, 2023 Code refactoring in banners.
This commit is contained in:
parent
3c0524d640
commit
fc87db628c
70
swad_API.c
70
swad_API.c
|
@ -298,11 +298,11 @@ static bool API_WriteRowFileBrowser (FILE *XML,unsigned Level,
|
|||
const char *FileName);
|
||||
static void API_IndentXMLLine (FILE *XML,unsigned Level);
|
||||
|
||||
static void API_GetDataOfLocation (struct soap *soap,
|
||||
struct swad__location *location,
|
||||
time_t *CheckInTime,
|
||||
MYSQL_RES **mysql_res,
|
||||
unsigned NumLocs);
|
||||
static void API_GetLocationData (struct soap *soap,
|
||||
struct swad__location *location,
|
||||
time_t *CheckInTime,
|
||||
MYSQL_RES **mysql_res,
|
||||
unsigned NumLocs);
|
||||
static void API_ResetLocation (struct soap *soap,
|
||||
struct swad__location *location);
|
||||
|
||||
|
@ -914,7 +914,7 @@ int swad__loginBySessionKey (struct soap *soap,
|
|||
|
||||
/***** Get course (row[2]) *****/
|
||||
Gbl.Hierarchy.Crs.CrsCod = Str_ConvertStrCodToLongCod (row[2]);
|
||||
Crs_GetDataOfCourseByCod (&Gbl.Hierarchy.Crs);
|
||||
Crs_GetCourseDataByCod (&Gbl.Hierarchy.Crs);
|
||||
loginBySessionKeyOut->courseCode = (int) Gbl.Hierarchy.Crs.CrsCod;
|
||||
Str_Copy (loginBySessionKeyOut->courseName,Gbl.Hierarchy.Crs.FullName,
|
||||
Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
|
@ -925,7 +925,7 @@ int swad__loginBySessionKey (struct soap *soap,
|
|||
|
||||
/***** Get degree (row[1]) *****/
|
||||
Gbl.Hierarchy.Deg.DegCod = Str_ConvertStrCodToLongCod (row[1]);
|
||||
Deg_GetDataOfDegreeByCod (&Gbl.Hierarchy.Deg);
|
||||
Deg_GetDegreeDataByCod (&Gbl.Hierarchy.Deg);
|
||||
loginBySessionKeyOut->degreeCode = (int) Gbl.Hierarchy.Deg.DegCod;
|
||||
Str_Copy (loginBySessionKeyOut->degreeName,Gbl.Hierarchy.Deg.FullName,
|
||||
Cns_HIERARCHY_MAX_BYTES_FULL_NAME);
|
||||
|
@ -2286,7 +2286,7 @@ int swad__getAttendanceEvents (struct soap *soap,
|
|||
"Requester must be a teacher");
|
||||
|
||||
/***** Query list of attendance events *****/
|
||||
NumAttEvents = Att_DB_GetDataOfAllAttEvents (&mysql_res,courseCode);
|
||||
NumAttEvents = Att_DB_GetAllEventsData (&mysql_res,courseCode);
|
||||
|
||||
getAttendanceEventsOut->eventsArray.__size =
|
||||
getAttendanceEventsOut->numEvents = (int) NumAttEvents;
|
||||
|
@ -2307,7 +2307,7 @@ int swad__getAttendanceEvents (struct soap *soap,
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get attendance event (except Txt) */
|
||||
Att_GetAttendanceEventDataFromRow (row,&Event);
|
||||
Att_GetEventDataFromRow (row,&Event);
|
||||
|
||||
getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].attendanceEventCode = (int) Event.AttCod;
|
||||
getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].hidden = Event.Hidden ? 1 :
|
||||
|
@ -2472,7 +2472,7 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
|||
/* Course code */
|
||||
if (Event.AttCod > 0) // The event already exists
|
||||
{
|
||||
Att_GetDataOfAttEventByCod (&Event);
|
||||
Att_GetEventDataByCod (&Event);
|
||||
if (Event.CrsCod != (long) courseCode)
|
||||
return soap_receiver_fault (soap,
|
||||
"Request forbidden",
|
||||
|
@ -2512,9 +2512,9 @@ int swad__sendAttendanceEvent (struct soap *soap,
|
|||
|
||||
/***** Create or update attendance event *****/
|
||||
if (ItsANewAttEvent)
|
||||
Att_CreateAttEvent (&Event,text); // Add new attendance event to database
|
||||
Att_CreateEvent (&Event,text); // Add new attendance event to database
|
||||
else
|
||||
Att_UpdateAttEvent (&Event,text); // Modify existing attendance event
|
||||
Att_UpdateEvent (&Event,text); // Modify existing attendance event
|
||||
|
||||
/***** Free memory for list of selected groups *****/
|
||||
Grp_FreeListCodSelectedGrps ();
|
||||
|
@ -2555,7 +2555,7 @@ int swad__removeAttendanceEvent (struct soap *soap,
|
|||
/* Course code */
|
||||
if (Event.AttCod > 0) // The event already exists
|
||||
{
|
||||
Att_GetDataOfAttEventByCod (&Event);
|
||||
Att_GetEventDataByCod (&Event);
|
||||
Gbl.Hierarchy.Crs.CrsCod = Event.CrsCod;
|
||||
}
|
||||
else
|
||||
|
@ -2584,7 +2584,7 @@ int swad__removeAttendanceEvent (struct soap *soap,
|
|||
"Requester must be a teacher");
|
||||
|
||||
/***** Remove the attendance event from database *****/
|
||||
Att_RemoveAttEventFromDB (Event.AttCod);
|
||||
Att_RemoveEventFromDB (Event.AttCod);
|
||||
|
||||
removeAttendanceEventOut->attendanceEventCode = Event.AttCod;
|
||||
|
||||
|
@ -2663,7 +2663,7 @@ int swad__getAttendanceUsers (struct soap *soap,
|
|||
|
||||
/***** Get course of this attendance event *****/
|
||||
Event.AttCod = (long) attendanceEventCode;
|
||||
Att_GetDataOfAttEventByCod (&Event);
|
||||
Att_GetEventDataByCod (&Event);
|
||||
Gbl.Hierarchy.Crs.CrsCod = Event.CrsCod;
|
||||
|
||||
/***** Get some of my data *****/
|
||||
|
@ -2685,7 +2685,7 @@ int swad__getAttendanceUsers (struct soap *soap,
|
|||
"AttCod",
|
||||
Event.AttCod);
|
||||
|
||||
NumUsrs = Att_DB_GetListUsrsInAttEvent (&mysql_res,Event.AttCod,AttEventIsAsociatedToGrps);
|
||||
NumUsrs = Att_DB_GetListUsrsInEvent (&mysql_res,Event.AttCod,AttEventIsAsociatedToGrps);
|
||||
|
||||
getAttendanceUsersOut->numUsers =
|
||||
getAttendanceUsersOut->usersArray.__size = (int) NumUsrs;
|
||||
|
@ -2810,7 +2810,7 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
|||
|
||||
/***** Get course of this attendance event *****/
|
||||
Event.AttCod = (long) attendanceEventCode;
|
||||
if (!Att_GetDataOfAttEventByCod (&Event))
|
||||
if (!Att_GetEventDataByCod (&Event))
|
||||
return SOAP_OK; // return with success = 0
|
||||
Gbl.Hierarchy.Crs.CrsCod = Event.CrsCod;
|
||||
|
||||
|
@ -2833,7 +2833,7 @@ int swad__sendAttendanceUsers (struct soap *soap,
|
|||
|
||||
/***** Purge absent users without comments from table *****/
|
||||
if (setOthersAsAbsent)
|
||||
Att_DB_RemoveUsrsAbsentWithoutCommentsFromAttEvent (Event.AttCod);
|
||||
Att_DB_RemoveUsrsAbsentWithoutCommentsFromEvent (Event.AttCod);
|
||||
|
||||
sendAttendanceUsersOut->success = 1;
|
||||
|
||||
|
@ -2931,7 +2931,7 @@ int swad__getNotifications (struct soap *soap,
|
|||
|
||||
/* Get course (row[7]) */
|
||||
Hie.Crs.CrsCod = Str_ConvertStrCodToLongCod (row[7]);
|
||||
Crs_GetDataOfCourseByCod (&Hie.Crs);
|
||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
||||
|
||||
/* Get user's code of the user who caused the event (row[3]) */
|
||||
Gbl.Usrs.Other.UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[3]);
|
||||
|
@ -2979,15 +2979,15 @@ int swad__getNotifications (struct soap *soap,
|
|||
|
||||
/* Get institution (row[4]) */
|
||||
Hie.Ins.InsCod = Str_ConvertStrCodToLongCod (row[4]);
|
||||
Ins_GetDataOfInstitByCod (&Hie.Ins);
|
||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
||||
|
||||
/* Get center (row[5]) */
|
||||
Hie.Ctr.CtrCod = Str_ConvertStrCodToLongCod (row[5]);
|
||||
Ctr_GetDataOfCenterByCod (&Hie.Ctr);
|
||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
||||
|
||||
/* Get degree (row[6]) */
|
||||
Hie.Deg.DegCod = Str_ConvertStrCodToLongCod (row[6]);
|
||||
Deg_GetDataOfDegreeByCod (&Hie.Deg);
|
||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
||||
|
||||
/* Get message/post/... code (row[8]) */
|
||||
Cod = Str_ConvertStrCodToLongCod (row[8]);
|
||||
|
@ -3952,7 +3952,7 @@ int swad__getTrivialQuestion (struct soap *soap,
|
|||
if (QstCod > 0)
|
||||
{
|
||||
/***** Get answer from database *****/
|
||||
NumAnss = Qst_DB_GetDataOfAnswers (&mysql_res,QstCod,
|
||||
NumAnss = Qst_DB_GetAnswersData (&mysql_res,QstCod,
|
||||
false); // Don't shuffle
|
||||
|
||||
getTrivialQuestionOut->answersArray.__size = (int) NumAnss;
|
||||
|
@ -4209,7 +4209,7 @@ int swad__getMatches (struct soap *soap,
|
|||
return soap_sender_fault (soap,
|
||||
"Bad game code",
|
||||
"Game code must be a integer greater than 0");
|
||||
Gam_GetDataOfGameByCod (&Game);
|
||||
Gam_GetGameDataByCod (&Game);
|
||||
|
||||
/***** Get some of my data *****/
|
||||
if (!API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Me.UsrDat,Gbl.Hierarchy.Crs.CrsCod))
|
||||
|
@ -4370,14 +4370,14 @@ int swad__getMatchStatus (struct soap *soap,
|
|||
return soap_sender_fault (soap,
|
||||
"Bad game code",
|
||||
"Game code must be a integer greater than 0");
|
||||
Gam_GetDataOfGameByCod (&Game);
|
||||
Gam_GetGameDataByCod (&Game);
|
||||
|
||||
/***** Get match data from database *****/
|
||||
if (Match.MchCod <= 0)
|
||||
return soap_sender_fault (soap,
|
||||
"Bad match code",
|
||||
"Match code must be a integer greater than 0");
|
||||
Mch_GetDataOfMatchByCod (&Match);
|
||||
Mch_GetMatchDataByCod (&Match);
|
||||
|
||||
/* Check that match belongs to game */
|
||||
if (Match.GamCod != Game.GamCod)
|
||||
|
@ -4492,14 +4492,14 @@ int swad__answerMatchQuestion (struct soap *soap,
|
|||
return soap_sender_fault (soap,
|
||||
"Bad game code",
|
||||
"Game code must be a integer greater than 0");
|
||||
Gam_GetDataOfGameByCod (&Game);
|
||||
Gam_GetGameDataByCod (&Game);
|
||||
|
||||
/***** Get match data from database *****/
|
||||
if (Match.MchCod <= 0)
|
||||
return soap_sender_fault (soap,
|
||||
"Bad match code",
|
||||
"Match code must be a integer greater than 0");
|
||||
Mch_GetDataOfMatchByCod (&Match);
|
||||
Mch_GetMatchDataByCod (&Match);
|
||||
|
||||
/***** Check that match belongs to game *****/
|
||||
if (Match.GamCod != Game.GamCod)
|
||||
|
@ -5184,7 +5184,7 @@ int swad__getLocation (struct soap *soap,
|
|||
/***** Get location *****/
|
||||
NumLocs = Roo_DB_GetLocationByMAC (&mysql_res,MACnum);
|
||||
|
||||
API_GetDataOfLocation (soap,
|
||||
API_GetLocationData (soap,
|
||||
&(getLocationOut->location),
|
||||
NULL, // Don't get check in time
|
||||
&mysql_res,NumLocs);
|
||||
|
@ -5271,7 +5271,7 @@ int swad__getLastLocation (struct soap *soap,
|
|||
{
|
||||
/***** Get list of locations *****/
|
||||
NumLocs = Roo_DB_GetUsrLastLocation (&mysql_res,(long) userCode);
|
||||
API_GetDataOfLocation (soap,
|
||||
API_GetLocationData (soap,
|
||||
&(getLastLocationOut->location),
|
||||
&(getLastLocationOut->checkinTime), // Get check in time
|
||||
&mysql_res,NumLocs);
|
||||
|
@ -5290,11 +5290,11 @@ int swad__getLastLocation (struct soap *soap,
|
|||
/************************* Get assignment data *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void API_GetDataOfLocation (struct soap *soap,
|
||||
struct swad__location *location,
|
||||
time_t *CheckInTime,
|
||||
MYSQL_RES **mysql_res,
|
||||
unsigned NumLocs)
|
||||
static void API_GetLocationData (struct soap *soap,
|
||||
struct swad__location *location,
|
||||
time_t *CheckInTime,
|
||||
MYSQL_RES **mysql_res,
|
||||
unsigned NumLocs)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
size_t Length;
|
||||
|
|
|
@ -977,7 +977,7 @@ void Acc_CompletelyEliminateAccount (struct Usr_Data *UsrDat,
|
|||
Prj_RemoveUsrFromProjects (UsrDat->UsrCod);
|
||||
|
||||
/***** Remove user from all attendance events *****/
|
||||
Att_DB_RemoveUsrFromAllAttEvents (UsrDat->UsrCod);
|
||||
Att_DB_RemoveUsrFromAllEvents (UsrDat->UsrCod);
|
||||
|
||||
/***** Remove user from all groups of all courses *****/
|
||||
Grp_RemUsrFromAllGrps (UsrDat->UsrCod);
|
||||
|
|
|
@ -1344,7 +1344,7 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
|
|||
[ActLstStd ] = { 678, 1,TabUsr,ActLstStd ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_SeeStudents ,"users" },
|
||||
[ActLstTch ] = { 679, 2,TabUsr,ActLstTch ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_SeeTeachers ,"user-tie" },
|
||||
[ActLstOth ] = {1186, 3,TabUsr,ActLstOth ,0x3F8,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,0x3C6,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Usr_ListDataAdms ,"user-friends" },
|
||||
[ActSeeAtt ] = { 861, 4,TabUsr,ActSeeAtt ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_SeeAttEvents ,"calendar-check" },
|
||||
[ActSeeAtt ] = { 861, 4,TabUsr,ActSeeAtt ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_SeeEvents ,"calendar-check" },
|
||||
[ActReqSignUp ] = {1054, 5,TabUsr,ActReqSignUp , 0,0x006, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Enr_ReqSignUpInCrs ,"hand-point-up" },
|
||||
[ActSeeSignUpReq ] = {1057, 6,TabUsr,ActSeeSignUpReq ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Enr_ShowEnrolmentRequests ,"hand-point-up" },
|
||||
[ActLstCon ] = { 995, 7,TabUsr,ActLstCon ,0x3F8,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,0x3C7,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Con_ShowConnectedUsrs ,"user-clock" },
|
||||
|
@ -1421,18 +1421,18 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
|
|||
[ActPrnLstMyAtt ] = {1474,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Att_PrintMyAttendanceCrs ,NULL},
|
||||
[ActSeeLstUsrAtt ] = {1074,-1,TabUnk,ActSeeAtt ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ListUsrsAttendanceCrs ,NULL},
|
||||
[ActPrnLstUsrAtt ] = {1075,-1,TabUnk,ActSeeAtt ,0x230,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_NEW_TAB,NULL ,Att_PrintUsrsAttendanceCrs ,NULL},
|
||||
[ActFrmNewAtt ] = {1063,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReqCreatOrEditAttEvent ,NULL},
|
||||
[ActEdiOneAtt ] = {1064,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReqCreatOrEditAttEvent ,NULL},
|
||||
[ActNewAtt ] = {1065,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReceiveFormAttEvent ,NULL},
|
||||
[ActChgAtt ] = {1066,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReceiveFormAttEvent ,NULL},
|
||||
[ActReqRemAtt ] = {1067,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_AskRemAttEvent ,NULL},
|
||||
[ActRemAtt ] = {1068,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_GetAndRemAttEvent ,NULL},
|
||||
[ActHidAtt ] = {1069,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_HideAttEvent ,NULL},
|
||||
[ActUnhAtt ] = {1070,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_UnhideAttEvent ,NULL},
|
||||
[ActSeeOneAtt ] = {1071,-1,TabUnk,ActSeeAtt ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_SeeOneAttEvent ,NULL},
|
||||
[ActFrmNewAtt ] = {1063,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReqCreatOrEditEvent ,NULL},
|
||||
[ActEdiOneAtt ] = {1064,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReqCreatOrEditEvent ,NULL},
|
||||
[ActNewAtt ] = {1065,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReceiveFormEvent ,NULL},
|
||||
[ActChgAtt ] = {1066,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_ReceiveFormEvent ,NULL},
|
||||
[ActReqRemAtt ] = {1067,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_AskRemEvent ,NULL},
|
||||
[ActRemAtt ] = {1068,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_GetAndRemEvent ,NULL},
|
||||
[ActHidAtt ] = {1069,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_HideEvent ,NULL},
|
||||
[ActUnhAtt ] = {1070,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_UnhideEvent ,NULL},
|
||||
[ActSeeOneAtt ] = {1071,-1,TabUnk,ActSeeAtt ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_SeeOneEvent ,NULL},
|
||||
[ActReqLnkAtt ] = {1938,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,AttRsc_GetLinkToEvent ,NULL},
|
||||
[ActRecAttStd ] = {1072,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_RegisterStudentsInAttEvent ,NULL},
|
||||
[ActRecAttMe ] = {1076,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_RegisterMeAsStdInAttEvent ,NULL},
|
||||
[ActRecAttStd ] = {1072,-1,TabUnk,ActSeeAtt ,0x220,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_RegisterStudentsInEvent ,NULL},
|
||||
[ActRecAttMe ] = {1076,-1,TabUnk,ActSeeAtt ,0x008, 0, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Att_RegisterMeAsStdInEvent ,NULL},
|
||||
|
||||
[ActSignUp ] = {1056,-1,TabUnk,ActReqSignUp , 0,0x006, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Enr_SignUpInCrs ,NULL},
|
||||
[ActUpdSignUpReq ] = {1522,-1,TabUnk,ActSeeSignUpReq ,0x3E0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Enr_UpdateEnrolmentRequests ,NULL},
|
||||
|
|
|
@ -115,7 +115,7 @@ static void Agd_GetPars (struct Agd_Agenda *Agenda,
|
|||
|
||||
static void Agd_GetListEvents (struct Agd_Agenda *Agenda,
|
||||
Agd_AgendaType_t AgendaType);
|
||||
static void Agd_GetDataOfEventByCod (struct Agd_Event *AgdEvent);
|
||||
static void Agd_GetventDataByCod (struct Agd_Event *AgdEvent);
|
||||
|
||||
static void Agd_FreeListEvents (struct Agd_Agenda *Agenda);
|
||||
|
||||
|
@ -789,7 +789,7 @@ static void Agd_ShowOneEvent (struct Agd_Agenda *Agenda,
|
|||
AgdEvent.UsrCod = Gbl.Usrs.Other.UsrDat.UsrCod;
|
||||
break;
|
||||
}
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Set anchor string *****/
|
||||
Frm_SetAnchorStr (AgdEvent.AgdCod,&Anchor);
|
||||
|
@ -1079,13 +1079,13 @@ static void Agd_GetListEvents (struct Agd_Agenda *Agenda,
|
|||
/*********************** Get event data using its code ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Agd_GetDataOfEventByCod (struct Agd_Event *AgdEvent)
|
||||
static void Agd_GetventDataByCod (struct Agd_Event *AgdEvent)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
||||
/***** Get data of event from database *****/
|
||||
if (Agd_DB_GetDataOfEventByCod (&mysql_res,AgdEvent)) // Event found...
|
||||
if (Agd_DB_GetEventDataByCod (&mysql_res,AgdEvent)) // Event found...
|
||||
{
|
||||
/* Get row:
|
||||
row[0] AgdCod
|
||||
|
@ -1176,7 +1176,7 @@ void Agd_AskRemEvent (void)
|
|||
|
||||
/***** Get data of the event from database *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Show question and button to remove event *****/
|
||||
Agenda.AgdCodToEdit = AgdEvent.AgdCod;
|
||||
|
@ -1211,7 +1211,7 @@ void Agd_RemoveEvent (void)
|
|||
|
||||
/***** Get data of the event from database *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Remove event *****/
|
||||
Agd_DB_RemoveEvent (&AgdEvent);
|
||||
|
@ -1244,7 +1244,7 @@ void Agd_HideEvent (void)
|
|||
|
||||
/***** Get data of the event from database *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Hide event *****/
|
||||
Agd_DB_HideOrUnhideEvent (AgdEvent.AgdCod,AgdEvent.UsrCod,true);
|
||||
|
@ -1273,7 +1273,7 @@ void Agd_UnhideEvent (void)
|
|||
|
||||
/***** Get data of the event from database *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Unhide event *****/
|
||||
Agd_DB_HideOrUnhideEvent (AgdEvent.AgdCod,AgdEvent.UsrCod,false);
|
||||
|
@ -1303,7 +1303,7 @@ void Agd_MakeEventPrivate (void)
|
|||
|
||||
/***** Get data of the event from database *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Make event private *****/
|
||||
Agd_DB_MakeEventPrivate (&AgdEvent);
|
||||
|
@ -1337,7 +1337,7 @@ void Agd_MakeEventPublic (void)
|
|||
|
||||
/***** Get data of the event from database *****/
|
||||
AgdEvent.UsrCod = Gbl.Usrs.Me.UsrDat.UsrCod;
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/***** Make event public *****/
|
||||
Agd_DB_MakeEventPublic (&AgdEvent);
|
||||
|
@ -1399,7 +1399,7 @@ void Agd_ReqCreatOrEditEvent (void)
|
|||
else
|
||||
{
|
||||
/* Get data of the event from database */
|
||||
Agd_GetDataOfEventByCod (&AgdEvent);
|
||||
Agd_GetventDataByCod (&AgdEvent);
|
||||
|
||||
/* Get text of the event from database */
|
||||
Agd_DB_GetEventTxt (&AgdEvent,Txt);
|
||||
|
|
|
@ -172,8 +172,8 @@ unsigned Agd_DB_GetListEvents (MYSQL_RES **mysql_res,
|
|||
/*********************** Get event data using its code ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Agd_DB_GetDataOfEventByCod (MYSQL_RES **mysql_res,
|
||||
const struct Agd_Event *AgdEvent)
|
||||
unsigned Agd_DB_GetEventDataByCod (MYSQL_RES **mysql_res,
|
||||
const struct Agd_Event *AgdEvent)
|
||||
{
|
||||
/***** Get data of event from database *****/
|
||||
return (unsigned)
|
||||
|
|
|
@ -39,8 +39,8 @@ unsigned Agd_DB_GetListEvents (MYSQL_RES **mysql_res,
|
|||
const struct Agd_Agenda *Agenda,
|
||||
Agd_AgendaType_t AgendaType);
|
||||
|
||||
unsigned Agd_DB_GetDataOfEventByCod (MYSQL_RES **mysql_res,
|
||||
const struct Agd_Event *AgdEvent);
|
||||
unsigned Agd_DB_GetEventDataByCod (MYSQL_RES **mysql_res,
|
||||
const struct Agd_Event *AgdEvent);
|
||||
void Agd_DB_GetEventTxt (const struct Agd_Event *AgdEvent,
|
||||
char Txt[Cns_MAX_BYTES_TEXT + 1]);
|
||||
|
||||
|
|
|
@ -493,7 +493,7 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
|||
char Txt[Cns_MAX_BYTES_TEXT + 1];
|
||||
|
||||
/***** Get data of this assignment *****/
|
||||
Asg_GetDataOfAssignmentByCod (&Assignments->Asg);
|
||||
Asg_GetAssignmentDataByCod (&Assignments->Asg);
|
||||
|
||||
/***** Set anchor string *****/
|
||||
Frm_SetAnchorStr (Assignments->Asg.AsgCod,&Anchor);
|
||||
|
@ -824,7 +824,7 @@ static void Asg_GetListAssignments (struct Asg_Assignments *Assignments)
|
|||
/******************* Get assignment data using its code **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Asg_GetDataOfAssignmentByCod (struct Asg_Assignment *Asg)
|
||||
void Asg_GetAssignmentDataByCod (struct Asg_Assignment *Asg)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumAsgs;
|
||||
|
@ -832,7 +832,7 @@ void Asg_GetDataOfAssignmentByCod (struct Asg_Assignment *Asg)
|
|||
if (Asg->AsgCod > 0)
|
||||
{
|
||||
/***** Build query *****/
|
||||
NumAsgs = Asg_DB_GetDataOfAssignmentByCod (&mysql_res,Asg->AsgCod);
|
||||
NumAsgs = Asg_DB_GetAssignmentDataByCod (&mysql_res,Asg->AsgCod);
|
||||
|
||||
/***** Get data of assignment *****/
|
||||
Asg_GetAssignmentDataFromRow (&mysql_res,Asg,NumAsgs);
|
||||
|
@ -849,7 +849,7 @@ void Asg_GetDataOfAssignmentByCod (struct Asg_Assignment *Asg)
|
|||
/*************** Get assignment data using its folder name *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Asg_GetDataOfAssignmentByFolder (struct Asg_Assignment *Asg)
|
||||
void Asg_GetAssignmentDataByFolder (struct Asg_Assignment *Asg)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumAsgs;
|
||||
|
@ -857,7 +857,7 @@ void Asg_GetDataOfAssignmentByFolder (struct Asg_Assignment *Asg)
|
|||
if (Asg->Folder[0])
|
||||
{
|
||||
/***** Query database *****/
|
||||
NumAsgs = Asg_DB_GetDataOfAssignmentByFolder (&mysql_res,Asg->Folder);
|
||||
NumAsgs = Asg_DB_GetAssignmentDataByFolder (&mysql_res,Asg->Folder);
|
||||
|
||||
/***** Get data of assignment *****/
|
||||
Asg_GetAssignmentDataFromRow (&mysql_res,Asg,NumAsgs);
|
||||
|
@ -1025,7 +1025,7 @@ void Asg_ReqRemAssignment (void)
|
|||
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
|
||||
|
||||
/***** Get data of the assignment from database *****/
|
||||
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
|
||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||
|
||||
/***** Show question and button to remove the assignment *****/
|
||||
Ale_ShowAlertAndButton (ActRemAsg,NULL,NULL,
|
||||
|
@ -1059,7 +1059,7 @@ void Asg_RemoveAssignment (void)
|
|||
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
|
||||
|
||||
/***** Get data of the assignment from database *****/
|
||||
Asg_GetDataOfAssignmentByCod (&Assignments.Asg); // Inside this function, the course is checked to be the current one
|
||||
Asg_GetAssignmentDataByCod (&Assignments.Asg); // Inside this function, the course is checked to be the current one
|
||||
|
||||
/***** Remove all folders associated to this assignment *****/
|
||||
if (Assignments.Asg.Folder[0])
|
||||
|
@ -1102,7 +1102,7 @@ void Asg_HideAssignment (void)
|
|||
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
|
||||
|
||||
/***** Get data of the assignment from database *****/
|
||||
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
|
||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||
|
||||
/***** Hide assignment *****/
|
||||
Asg_DB_HideOrUnhideAssignment (Assignments.Asg.AsgCod,true);
|
||||
|
@ -1131,7 +1131,7 @@ void Asg_UnhideAssignment (void)
|
|||
Assignments.Asg.AsgCod = ParCod_GetAndCheckPar (ParCod_Asg);
|
||||
|
||||
/***** Get data of the assignment from database *****/
|
||||
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
|
||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||
|
||||
/***** Unhide assignment *****/
|
||||
Asg_DB_HideOrUnhideAssignment (Assignments.Asg.AsgCod,false);
|
||||
|
@ -1197,7 +1197,7 @@ void Asg_ReqCreatOrEditAsg (void)
|
|||
else
|
||||
{
|
||||
/* Get data of the assignment from database */
|
||||
Asg_GetDataOfAssignmentByCod (&Assignments.Asg);
|
||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||
|
||||
/* Get text of the assignment from database */
|
||||
Asg_DB_GetAssignmentTxtByCod (Assignments.Asg.AsgCod,Txt);
|
||||
|
@ -1411,7 +1411,7 @@ void Asg_ReceiveFormAssignment (void)
|
|||
{
|
||||
/***** Get data of the old (current) assignment from database *****/
|
||||
OldAsg.AsgCod = Assignments.Asg.AsgCod;
|
||||
Asg_GetDataOfAssignmentByCod (&OldAsg);
|
||||
Asg_GetAssignmentDataByCod (&OldAsg);
|
||||
}
|
||||
|
||||
/***** Get start/end date-times *****/
|
||||
|
|
|
@ -91,8 +91,8 @@ void Asg_ShowOneAssignmentInBox (struct Asg_Assignments *Assignments);
|
|||
Dat_StartEndTime_t Asg_GetParAsgOrder (void);
|
||||
|
||||
void Asg_ReqCreatOrEditAsg (void);
|
||||
void Asg_GetDataOfAssignmentByCod (struct Asg_Assignment *Asg);
|
||||
void Asg_GetDataOfAssignmentByFolder (struct Asg_Assignment *Asg);
|
||||
void Asg_GetAssignmentDataByCod (struct Asg_Assignment *Asg);
|
||||
void Asg_GetAssignmentDataByFolder (struct Asg_Assignment *Asg);
|
||||
|
||||
void Asg_GetNotifAssignment (char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1],
|
||||
char **ContentStr,
|
||||
|
|
|
@ -136,7 +136,7 @@ unsigned Asg_DB_GetListAssignmentsAllGrps (MYSQL_RES **mysql_res,
|
|||
/******************* Get assignment data using its code **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Asg_DB_GetDataOfAssignmentByCod (MYSQL_RES **mysql_res,long AsgCod)
|
||||
unsigned Asg_DB_GetAssignmentDataByCod (MYSQL_RES **mysql_res,long AsgCod)
|
||||
{
|
||||
return (unsigned)
|
||||
DB_QuerySELECT (mysql_res,"can not get assignment data",
|
||||
|
@ -159,8 +159,8 @@ unsigned Asg_DB_GetDataOfAssignmentByCod (MYSQL_RES **mysql_res,long AsgCod)
|
|||
/**************** Get assignment data using its folder name ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
unsigned Asg_DB_GetDataOfAssignmentByFolder (MYSQL_RES **mysql_res,
|
||||
const char Folder[Brw_MAX_BYTES_FOLDER + 1])
|
||||
unsigned Asg_DB_GetAssignmentDataByFolder (MYSQL_RES **mysql_res,
|
||||
const char Folder[Brw_MAX_BYTES_FOLDER + 1])
|
||||
{
|
||||
return (unsigned)
|
||||
DB_QuerySELECT (mysql_res,"can not get assignment data",
|
||||
|
|
|
@ -42,9 +42,9 @@ unsigned Asg_DB_GetListAssignmentsMyGrps (MYSQL_RES **mysql_res,
|
|||
unsigned Asg_DB_GetListAssignmentsAllGrps (MYSQL_RES **mysql_res,
|
||||
Dat_StartEndTime_t SelectedOrder);
|
||||
|
||||
unsigned Asg_DB_GetDataOfAssignmentByCod (MYSQL_RES **mysql_res,long AsgCod);
|
||||
unsigned Asg_DB_GetDataOfAssignmentByFolder (MYSQL_RES **mysql_res,
|
||||
const char Folder[Brw_MAX_BYTES_FOLDER + 1]);
|
||||
unsigned Asg_DB_GetAssignmentDataByCod (MYSQL_RES **mysql_res,long AsgCod);
|
||||
unsigned Asg_DB_GetAssignmentDataByFolder (MYSQL_RES **mysql_res,
|
||||
const char Folder[Brw_MAX_BYTES_FOLDER + 1]);
|
||||
unsigned Asg_DB_GetAssignmentTitleAndTxtByCod (MYSQL_RES **mysql_res,long AsgCod);
|
||||
void Asg_DB_GetAssignmentTitleByCod (long AsgCod,char Title[Asg_MAX_BYTES_ASSIGNMENT_TITLE + 1]);
|
||||
void Asg_DB_GetAssignmentTxtByCod (long AsgCod,char Txt[Cns_MAX_BYTES_TEXT + 1]);
|
||||
|
|
|
@ -85,52 +85,52 @@ typedef enum
|
|||
|
||||
static void Att_ResetEvents (struct Att_Events *Events);
|
||||
|
||||
static void Att_ShowAllAttEvents (struct Att_Events *Events);
|
||||
static void Att_ShowAllEvents (struct Att_Events *Events);
|
||||
static void Att_ParsWhichGroupsToShow (void *Events);
|
||||
static void Att_PutIconsInListOfAttEvents (void *Events);
|
||||
static void Att_PutIconToCreateNewAttEvent (struct Att_Events *Events);
|
||||
static void Att_PutButtonToCreateNewAttEvent (struct Att_Events *Events);
|
||||
static void Att_PutParsToCreateNewAttEvent (void *Events);
|
||||
static void Att_PutIconsInListOfEvents (void *Events);
|
||||
static void Att_PutIconToCreateNewEvent (struct Att_Events *Events);
|
||||
static void Att_PutButtonToCreateNewEvent (struct Att_Events *Events);
|
||||
static void Att_PutParsToCreateNewEvent (void *Events);
|
||||
static void Att_PutParsToListUsrsAttendance (void *Events);
|
||||
|
||||
static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
||||
bool ShowOnlyThisAttEventComplete);
|
||||
static void Att_WriteAttEventAuthor (struct Att_Event *Event);
|
||||
static void Att_ShowOneEventRow (struct Att_Events *Events,
|
||||
bool ShowOnlyThisAttEventComplete);
|
||||
static void Att_WriteEventAuthor (struct Att_Event *Event);
|
||||
static Dat_StartEndTime_t Att_GetParAttOrder (void);
|
||||
|
||||
static void Att_PutFormsToRemEditOneAttEvent (struct Att_Events *Events,
|
||||
const char *Anchor);
|
||||
static void Att_PutFormsToRemEditOneEvent (struct Att_Events *Events,
|
||||
const char *Anchor);
|
||||
static void Att_PutPars (void *Events);
|
||||
static void Att_GetListAttEvents (struct Att_Events *Events,
|
||||
Att_OrderNewestOldest_t OrderNewestOldest);
|
||||
static void Att_GetDataOfAttEventByCodAndCheckCrs (struct Att_Event *Event);
|
||||
static void Att_ResetAttendanceEvent (struct Att_Event *Event);
|
||||
static void Att_GetListEvents (struct Att_Events *Events,
|
||||
Att_OrderNewestOldest_t OrderNewestOldest);
|
||||
static void Att_GetEventDataByCodAndCheckCrs (struct Att_Event *Event);
|
||||
static void Att_ResetEvent (struct Att_Event *Event);
|
||||
|
||||
static void Att_FreeListAttEvents (struct Att_Events *Events);
|
||||
static void Att_FreeListEvents (struct Att_Events *Events);
|
||||
|
||||
static void Att_PutParAttCod (void *Events);
|
||||
|
||||
static void Att_ShowLstGrpsToEditAttEvent (long AttCod);
|
||||
static void Att_ShowLstGrpsToEditEvent (long AttCod);
|
||||
static void Att_CreateGroups (long AttCod);
|
||||
static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct Att_Event *Event);
|
||||
static void Att_GetAndWriteNamesOfGrpsAssociatedToEvent (struct Att_Event *Event);
|
||||
|
||||
static void Att_ShowEvent (struct Att_Events *Events);
|
||||
static void Att_PutIconsOneAtt (void *Events);
|
||||
static void Att_PutIconsOneEvent (void *Events);
|
||||
|
||||
static void Att_ListAttOnlyMeAsStudent (struct Att_Event *Event);
|
||||
static void Att_ListAttStudents (struct Att_Events *Events);
|
||||
static void Att_ListEventOnlyMeAsStudent (struct Att_Event *Event);
|
||||
static void Att_ListEventStudents (struct Att_Events *Events);
|
||||
static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
|
||||
struct Usr_Data *UsrDat,
|
||||
struct Att_Event *Event);
|
||||
static void Att_PutLinkAttEvent (struct Att_Event *Event,
|
||||
const char *Title,const char *Txt);
|
||||
static unsigned Att_GetNumUsrsFromAListWhoAreInAttEvent (long AttCod,
|
||||
long LstSelectedUsrCods[],
|
||||
unsigned NumUsrsInList);
|
||||
static bool Att_CheckIfUsrIsPresentInAttEvent (long AttCod,long UsrCod);
|
||||
static bool Att_CheckIfUsrIsPresentInAttEventAndGetComments (long AttCod,long UsrCod,
|
||||
char CommentStd[Cns_MAX_BYTES_TEXT + 1],
|
||||
char CommentTch[Cns_MAX_BYTES_TEXT + 1]);
|
||||
static void Att_PutLinkEvent (struct Att_Event *Event,
|
||||
const char *Title,const char *Txt);
|
||||
static unsigned Att_GetNumUsrsFromAListWhoAreInEvent (long AttCod,
|
||||
long LstSelectedUsrCods[],
|
||||
unsigned NumUsrsInList);
|
||||
static bool Att_CheckIfUsrIsPresentInEvent (long AttCod,long UsrCod);
|
||||
static bool Att_CheckIfUsrIsPresentInEventAndGetComments (long AttCod,long UsrCod,
|
||||
char CommentStd[Cns_MAX_BYTES_TEXT + 1],
|
||||
char CommentTch[Cns_MAX_BYTES_TEXT + 1]);
|
||||
|
||||
static void Att_ReqListOrPrintUsrsAttendanceCrs (void *TypeOfView);
|
||||
static void Att_ListOrPrintMyAttendanceCrs (Att_TypeOfView_t TypeOfView);
|
||||
|
@ -183,7 +183,7 @@ static void Att_ResetEvents (struct Att_Events *Events)
|
|||
/************************ List all attendance events *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_SeeAttEvents (void)
|
||||
void Att_SeeEvents (void)
|
||||
{
|
||||
struct Att_Events Events;
|
||||
|
||||
|
@ -196,17 +196,17 @@ void Att_SeeAttEvents (void)
|
|||
Events.CurrentPage = Pag_GetParPagNum (Pag_ATT_EVENTS);
|
||||
|
||||
/***** Get list of attendance events *****/
|
||||
Att_GetListAttEvents (&Events,Att_NEWEST_FIRST);
|
||||
Att_GetListEvents (&Events,Att_NEWEST_FIRST);
|
||||
|
||||
/***** Show all attendance events *****/
|
||||
Att_ShowAllAttEvents (&Events);
|
||||
Att_ShowAllEvents (&Events);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Show all attendance events ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
||||
static void Att_ShowAllEvents (struct Att_Events *Events)
|
||||
{
|
||||
extern const char *Hlp_USERS_Attendance;
|
||||
extern const char *Txt_Events;
|
||||
|
@ -230,7 +230,7 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
|||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin ("100%",Txt_Events,
|
||||
Att_PutIconsInListOfAttEvents,Events,
|
||||
Att_PutIconsInListOfEvents,Events,
|
||||
Hlp_USERS_Attendance,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Select whether show only my groups or all groups *****/
|
||||
|
@ -294,11 +294,11 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
|||
{
|
||||
/***** Get data of this attendance event *****/
|
||||
Events->Event.AttCod = Events->Lst[NumAttEvent - 1].AttCod;
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Events->Event);
|
||||
Events->Event.NumStdsTotal = Att_DB_GetNumStdsTotalWhoAreInAttEvent (Events->Event.AttCod);
|
||||
Att_GetEventDataByCodAndCheckCrs (&Events->Event);
|
||||
Events->Event.NumStdsTotal = Att_DB_GetNumStdsTotalWhoAreInEvent (Events->Event.AttCod);
|
||||
|
||||
/***** Show one attendance event *****/
|
||||
Att_ShowOneAttEventRow (Events,
|
||||
Att_ShowOneEventRow (Events,
|
||||
false); // Don't show only this event
|
||||
}
|
||||
|
||||
|
@ -314,13 +314,13 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
|||
|
||||
/***** Button to create a new attendance event *****/
|
||||
if (ICanEdit)
|
||||
Att_PutButtonToCreateNewAttEvent (Events);
|
||||
Att_PutButtonToCreateNewEvent (Events);
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
|
||||
/***** Free list of attendance events *****/
|
||||
Att_FreeListAttEvents (Events);
|
||||
Att_FreeListEvents (Events);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -340,7 +340,7 @@ static void Att_ParsWhichGroupsToShow (void *Events)
|
|||
/************* Put contextual icons in list of attendance events *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutIconsInListOfAttEvents (void *Events)
|
||||
static void Att_PutIconsInListOfEvents (void *Events)
|
||||
{
|
||||
bool ICanEdit;
|
||||
|
||||
|
@ -350,7 +350,7 @@ static void Att_PutIconsInListOfAttEvents (void *Events)
|
|||
ICanEdit = (Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM);
|
||||
if (ICanEdit)
|
||||
Att_PutIconToCreateNewAttEvent ((struct Att_Events *) Events);
|
||||
Att_PutIconToCreateNewEvent ((struct Att_Events *) Events);
|
||||
|
||||
/***** Put icon to show attendance list *****/
|
||||
if (((struct Att_Events *) Events)->Num)
|
||||
|
@ -385,23 +385,23 @@ static void Att_PutIconsInListOfAttEvents (void *Events)
|
|||
/**************** Put icon to create a new attendance event ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutIconToCreateNewAttEvent (struct Att_Events *Events)
|
||||
static void Att_PutIconToCreateNewEvent (struct Att_Events *Events)
|
||||
{
|
||||
Ico_PutContextualIconToAdd (ActFrmNewAtt,NULL,
|
||||
Att_PutParsToCreateNewAttEvent,Events);
|
||||
Att_PutParsToCreateNewEvent,Events);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put button to create a new attendance event ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutButtonToCreateNewAttEvent (struct Att_Events *Events)
|
||||
static void Att_PutButtonToCreateNewEvent (struct Att_Events *Events)
|
||||
{
|
||||
extern const char *Txt_New_event;
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (ActFrmNewAtt);
|
||||
Att_PutParsToCreateNewAttEvent (Events);
|
||||
Att_PutParsToCreateNewEvent (Events);
|
||||
|
||||
/***** Button to create new event *****/
|
||||
Btn_PutConfirmButton (Txt_New_event);
|
||||
|
@ -414,7 +414,7 @@ static void Att_PutButtonToCreateNewAttEvent (struct Att_Events *Events)
|
|||
/************** Put parameters to create a new attendance event **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutParsToCreateNewAttEvent (void *Events)
|
||||
static void Att_PutParsToCreateNewEvent (void *Events)
|
||||
{
|
||||
Grp_WhichGroups_t WhichGroups;
|
||||
|
||||
|
@ -449,8 +449,8 @@ static void Att_PutParsToListUsrsAttendance (void *Events)
|
|||
/*****************************************************************************/
|
||||
// Only Event->AttCod must be filled
|
||||
|
||||
static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
||||
bool ShowOnlyThisAttEventComplete)
|
||||
static void Att_ShowOneEventRow (struct Att_Events *Events,
|
||||
bool ShowOnlyThisAttEventComplete)
|
||||
{
|
||||
extern const char *Txt_View_event;
|
||||
char *Anchor = NULL;
|
||||
|
@ -470,7 +470,7 @@ static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
|||
{
|
||||
HTM_TD_Begin ("rowspan=\"2\" class=\"CONTEXT_COL %s\"",
|
||||
The_GetColorRows ());
|
||||
Att_PutFormsToRemEditOneAttEvent (Events,Anchor);
|
||||
Att_PutFormsToRemEditOneEvent (Events,Anchor);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
|
@ -512,7 +512,7 @@ static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
|||
else
|
||||
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
|
||||
HTM_ARTICLE_Begin (Anchor);
|
||||
Att_PutLinkAttEvent (&Events->Event,Txt_View_event,Events->Event.Title);
|
||||
Att_PutLinkEvent (&Events->Event,Txt_View_event,Events->Event.Title);
|
||||
HTM_ARTICLE_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -539,11 +539,11 @@ static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
|||
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
|
||||
else
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
||||
Att_WriteAttEventAuthor (&Events->Event);
|
||||
Att_WriteEventAuthor (&Events->Event);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Text of the attendance event */
|
||||
Att_DB_GetAttEventDescription (Events->Event.AttCod,Description);
|
||||
Att_DB_GetEventDescription (Events->Event.AttCod,Description);
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
Description,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
|
||||
ALn_InsertLinks (Description,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||
|
@ -552,7 +552,7 @@ static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
|||
else
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
||||
if (Gbl.Crs.Grps.NumGrps)
|
||||
Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (&Events->Event);
|
||||
Att_GetAndWriteNamesOfGrpsAssociatedToEvent (&Events->Event);
|
||||
|
||||
HTM_DIV_Begin ("class=\"%s_%s\"",
|
||||
Events->Event.Hidden ? "DAT_LIGHT" :
|
||||
|
@ -573,7 +573,7 @@ static void Att_ShowOneAttEventRow (struct Att_Events *Events,
|
|||
/****************** Write the author of an attendance event ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_WriteAttEventAuthor (struct Att_Event *Event)
|
||||
static void Att_WriteEventAuthor (struct Att_Event *Event)
|
||||
{
|
||||
Usr_WriteAuthor1Line (Event->UsrCod,Event->Hidden);
|
||||
}
|
||||
|
@ -595,8 +595,8 @@ static Dat_StartEndTime_t Att_GetParAttOrder (void)
|
|||
/************** Put a link (form) to edit one attendance event ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_PutFormsToRemEditOneAttEvent (struct Att_Events *Events,
|
||||
const char *Anchor)
|
||||
static void Att_PutFormsToRemEditOneEvent (struct Att_Events *Events,
|
||||
const char *Anchor)
|
||||
{
|
||||
static Act_Action_t ActionHideUnhide[2] =
|
||||
{
|
||||
|
@ -604,7 +604,7 @@ static void Att_PutFormsToRemEditOneAttEvent (struct Att_Events *Events,
|
|||
[true ] = ActUnhAtt, // Hidden ==> action to unhide
|
||||
};
|
||||
|
||||
if (Att_CheckIfICanEditAttEvents ())
|
||||
if (Att_CheckIfICanEditEvents ())
|
||||
{
|
||||
/***** Icon to remove attendance event *****/
|
||||
Ico_PutContextualIconToRemove (ActReqRemAtt,NULL,
|
||||
|
@ -631,7 +631,7 @@ static void Att_PutFormsToRemEditOneAttEvent (struct Att_Events *Events,
|
|||
/******************* Check if I can edit calls for exams *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
bool Att_CheckIfICanEditAttEvents (void)
|
||||
bool Att_CheckIfICanEditEvents (void)
|
||||
{
|
||||
static const bool ICanEditAttEvents[Rol_NUM_ROLES] =
|
||||
{
|
||||
|
@ -664,8 +664,8 @@ static void Att_PutPars (void *Events)
|
|||
/************************ List all attendance events *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_GetListAttEvents (struct Att_Events *Events,
|
||||
Att_OrderNewestOldest_t OrderNewestOldest)
|
||||
static void Att_GetListEvents (struct Att_Events *Events,
|
||||
Att_OrderNewestOldest_t OrderNewestOldest)
|
||||
{
|
||||
extern unsigned (*Att_DB_GetListAttEvents[Grp_NUM_WHICH_GROUPS]) (MYSQL_RES **mysql_res,
|
||||
Dat_StartEndTime_t SelectedOrder,
|
||||
|
@ -674,7 +674,7 @@ static void Att_GetListAttEvents (struct Att_Events *Events,
|
|||
unsigned NumAttEvent;
|
||||
|
||||
if (Events->LstIsRead)
|
||||
Att_FreeListAttEvents (Events);
|
||||
Att_FreeListEvents (Events);
|
||||
|
||||
/***** Get list of attendance events from database *****/
|
||||
Events->Num = Att_DB_GetListAttEvents[Gbl.Crs.Grps.WhichGrps] (&mysql_res,
|
||||
|
@ -708,9 +708,9 @@ static void Att_GetListAttEvents (struct Att_Events *Events,
|
|||
/********* Get attendance event data using its code and check course *********/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_GetDataOfAttEventByCodAndCheckCrs (struct Att_Event *Event)
|
||||
static void Att_GetEventDataByCodAndCheckCrs (struct Att_Event *Event)
|
||||
{
|
||||
if (Att_GetDataOfAttEventByCod (Event))
|
||||
if (Att_GetEventDataByCod (Event))
|
||||
{
|
||||
if (Event->CrsCod != Gbl.Hierarchy.Crs.CrsCod)
|
||||
Err_WrongEventExit ();
|
||||
|
@ -725,7 +725,7 @@ static void Att_GetDataOfAttEventByCodAndCheckCrs (struct Att_Event *Event)
|
|||
// Returns true if attendance event exists
|
||||
// This function can be called from web service, so do not display messages
|
||||
|
||||
bool Att_GetDataOfAttEventByCod (struct Att_Event *Event)
|
||||
bool Att_GetEventDataByCod (struct Att_Event *Event)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
@ -733,12 +733,12 @@ bool Att_GetDataOfAttEventByCod (struct Att_Event *Event)
|
|||
bool Found = false;
|
||||
|
||||
/***** Reset attendance event data *****/
|
||||
Att_ResetAttendanceEvent (Event);
|
||||
Att_ResetEvent (Event);
|
||||
|
||||
if (Event->AttCod > 0)
|
||||
{
|
||||
/***** Build query *****/
|
||||
NumAttEvents = Att_DB_GetDataOfAttEventByCod (&mysql_res,Event->AttCod);
|
||||
NumAttEvents = Att_DB_GetEventDataByCod (&mysql_res,Event->AttCod);
|
||||
|
||||
/***** Get data of attendance event from database *****/
|
||||
if ((Found = (NumAttEvents != 0))) // Attendance event found...
|
||||
|
@ -747,7 +747,7 @@ bool Att_GetDataOfAttEventByCod (struct Att_Event *Event)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get attendance event (except Txt) */
|
||||
Att_GetAttendanceEventDataFromRow (row,Event);
|
||||
Att_GetEventDataFromRow (row,Event);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -761,7 +761,7 @@ bool Att_GetDataOfAttEventByCod (struct Att_Event *Event)
|
|||
/********************** Clear all attendance event data **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_ResetAttendanceEvent (struct Att_Event *Event)
|
||||
static void Att_ResetEvent (struct Att_Event *Event)
|
||||
{
|
||||
if (Event->AttCod <= 0) // If > 0 ==> keep values of AttCod and Selected
|
||||
{
|
||||
|
@ -782,7 +782,7 @@ static void Att_ResetAttendanceEvent (struct Att_Event *Event)
|
|||
/************************* Get attendance event data *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_GetAttendanceEventDataFromRow (MYSQL_ROW row,struct Att_Event *Event)
|
||||
void Att_GetEventDataFromRow (MYSQL_ROW row,struct Att_Event *Event)
|
||||
{
|
||||
/***** Get code of attendance event (row[0]) and code of course (row[1]) *****/
|
||||
Event->AttCod = Str_ConvertStrCodToLongCod (row[0]);
|
||||
|
@ -812,7 +812,7 @@ void Att_GetAttendanceEventDataFromRow (MYSQL_ROW row,struct Att_Event *Event)
|
|||
/********************** Free list of attendance events ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_FreeListAttEvents (struct Att_Events *Events)
|
||||
static void Att_FreeListEvents (struct Att_Events *Events)
|
||||
{
|
||||
if (Events->LstIsRead && Events->Lst)
|
||||
{
|
||||
|
@ -828,7 +828,7 @@ static void Att_FreeListAttEvents (struct Att_Events *Events)
|
|||
/********* Ask for confirmation of removing of an attendance event ***********/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_AskRemAttEvent (void)
|
||||
void Att_AskRemEvent (void)
|
||||
{
|
||||
extern const char *Txt_Do_you_really_want_to_remove_the_event_X;
|
||||
extern const char *Txt_Remove_event;
|
||||
|
@ -846,7 +846,7 @@ void Att_AskRemAttEvent (void)
|
|||
Events.Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
|
||||
|
||||
/***** Get data of the attendance event from database *****/
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Events.Event);
|
||||
Att_GetEventDataByCodAndCheckCrs (&Events.Event);
|
||||
|
||||
/***** Show question and button to remove event *****/
|
||||
Ale_ShowAlertAndButton (ActRemAtt,NULL,NULL,
|
||||
|
@ -856,14 +856,14 @@ void Att_AskRemAttEvent (void)
|
|||
Events.Event.Title);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
Att_SeeEvents ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/** Get param., remove an attendance event and show attendance events again **/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_GetAndRemAttEvent (void)
|
||||
void Att_GetAndRemEvent (void)
|
||||
{
|
||||
extern const char *Txt_Event_X_removed;
|
||||
struct Att_Event Event;
|
||||
|
@ -873,40 +873,40 @@ void Att_GetAndRemAttEvent (void)
|
|||
|
||||
/***** Get data of the attendance event from database *****/
|
||||
// Inside this function, the course is checked to be the current one
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Event);
|
||||
Att_GetEventDataByCodAndCheckCrs (&Event);
|
||||
|
||||
/***** Remove the attendance event from database *****/
|
||||
Att_RemoveAttEventFromDB (Event.AttCod);
|
||||
Att_RemoveEventFromDB (Event.AttCod);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Ale_ShowAlert (Ale_SUCCESS,Txt_Event_X_removed,
|
||||
Event.Title);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
Att_SeeEvents ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Remove an attendance event from database *******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_RemoveAttEventFromDB (long AttCod)
|
||||
void Att_RemoveEventFromDB (long AttCod)
|
||||
{
|
||||
/***** Remove users registered in the attendance event *****/
|
||||
Att_DB_RemoveAllUsrsFromAnAttEvent (AttCod);
|
||||
Att_DB_RemoveAllUsrsFromAnEvent (AttCod);
|
||||
|
||||
/***** Remove all groups of this attendance event *****/
|
||||
Att_DB_RemoveGrpsAssociatedToAnAttEvent (AttCod);
|
||||
Att_DB_RemoveGrpsAssociatedToAnEvent (AttCod);
|
||||
|
||||
/***** Remove attendance event *****/
|
||||
Att_DB_RemoveAttEventFromCurrentCrs (AttCod);
|
||||
Att_DB_RemoveEventFromCurrentCrs (AttCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Hide an attendance event **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_HideAttEvent (void)
|
||||
void Att_HideEvent (void)
|
||||
{
|
||||
struct Att_Event Event;
|
||||
|
||||
|
@ -914,20 +914,20 @@ void Att_HideAttEvent (void)
|
|||
Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
|
||||
|
||||
/***** Get data of the attendance event from database *****/
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Event);
|
||||
Att_GetEventDataByCodAndCheckCrs (&Event);
|
||||
|
||||
/***** Hide attendance event *****/
|
||||
Att_DB_HideOrUnhideAttEvent (Event.AttCod,true);
|
||||
Att_DB_HideOrUnhideEvent (Event.AttCod,true);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
Att_SeeEvents ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Unhide an attendance event *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_UnhideAttEvent (void)
|
||||
void Att_UnhideEvent (void)
|
||||
{
|
||||
struct Att_Event Event;
|
||||
|
||||
|
@ -935,20 +935,20 @@ void Att_UnhideAttEvent (void)
|
|||
Event.AttCod = ParCod_GetAndCheckPar (ParCod_Att);
|
||||
|
||||
/***** Get data of the attendance event from database *****/
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Event);
|
||||
Att_GetEventDataByCodAndCheckCrs (&Event);
|
||||
|
||||
/***** Unhide attendance event *****/
|
||||
Att_DB_HideOrUnhideAttEvent (Event.AttCod,false);
|
||||
Att_DB_HideOrUnhideEvent (Event.AttCod,false);
|
||||
|
||||
/***** Show attendance events again *****/
|
||||
Att_SeeAttEvents ();
|
||||
Att_SeeEvents ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Put a form to create a new attendance event *****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_ReqCreatOrEditAttEvent (void)
|
||||
void Att_ReqCreatOrEditEvent (void)
|
||||
{
|
||||
extern const char *Hlp_USERS_Attendance_new_event;
|
||||
extern const char *Hlp_USERS_Attendance_edit_event;
|
||||
|
@ -987,7 +987,7 @@ void Att_ReqCreatOrEditAttEvent (void)
|
|||
{
|
||||
/* Reset attendance event data */
|
||||
Events.Event.AttCod = -1L;
|
||||
Att_ResetAttendanceEvent (&Events.Event);
|
||||
Att_ResetEvent (&Events.Event);
|
||||
|
||||
/* Initialize some fields */
|
||||
Events.Event.CrsCod = Gbl.Hierarchy.Crs.CrsCod;
|
||||
|
@ -999,10 +999,10 @@ void Att_ReqCreatOrEditAttEvent (void)
|
|||
else
|
||||
{
|
||||
/* Get data of the attendance event from database */
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&Events.Event);
|
||||
Att_GetEventDataByCodAndCheckCrs (&Events.Event);
|
||||
|
||||
/* Get text of the attendance event from database */
|
||||
Att_DB_GetAttEventDescription (Events.Event.AttCod,Description);
|
||||
Att_DB_GetEventDescription (Events.Event.AttCod,Description);
|
||||
}
|
||||
|
||||
/***** Begin form *****/
|
||||
|
@ -1092,7 +1092,7 @@ void Att_ReqCreatOrEditAttEvent (void)
|
|||
HTM_TR_End ();
|
||||
|
||||
/***** Groups *****/
|
||||
Att_ShowLstGrpsToEditAttEvent (Events.Event.AttCod);
|
||||
Att_ShowLstGrpsToEditEvent (Events.Event.AttCod);
|
||||
|
||||
/***** End table, send button and end box *****/
|
||||
if (ItsANewAttEvent)
|
||||
|
@ -1104,15 +1104,15 @@ void Att_ReqCreatOrEditAttEvent (void)
|
|||
Frm_EndForm ();
|
||||
|
||||
/***** Show current attendance events *****/
|
||||
Att_GetListAttEvents (&Events,Att_NEWEST_FIRST);
|
||||
Att_ShowAllAttEvents (&Events);
|
||||
Att_GetListEvents (&Events,Att_NEWEST_FIRST);
|
||||
Att_ShowAllEvents (&Events);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Show list of groups to edit and attendance event **************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
||||
static void Att_ShowLstGrpsToEditEvent (long AttCod)
|
||||
{
|
||||
extern const char *Txt_Groups;
|
||||
extern const char *Txt_The_whole_course;
|
||||
|
@ -1177,7 +1177,7 @@ static void Att_ShowLstGrpsToEditAttEvent (long AttCod)
|
|||
/*************** Receive form to create a new attendance event ***************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_ReceiveFormAttEvent (void)
|
||||
void Att_ReceiveFormEvent (void)
|
||||
{
|
||||
extern const char *Txt_Already_existed_an_event_with_the_title_X;
|
||||
extern const char *Txt_Created_new_event_X;
|
||||
|
@ -1195,7 +1195,7 @@ void Att_ReceiveFormAttEvent (void)
|
|||
{
|
||||
/* Get data of the old (current) attendance event from database */
|
||||
OldAtt.AttCod = ReceivedAtt.AttCod;
|
||||
Att_GetDataOfAttEventByCodAndCheckCrs (&OldAtt);
|
||||
Att_GetEventDataByCodAndCheckCrs (&OldAtt);
|
||||
ReceivedAtt.Hidden = OldAtt.Hidden;
|
||||
}
|
||||
|
||||
|
@ -1222,7 +1222,7 @@ void Att_ReceiveFormAttEvent (void)
|
|||
if (ReceivedAtt.Title[0]) // If there's an attendance event title
|
||||
{
|
||||
/* If title of attendance event was in database... */
|
||||
if (Att_DB_CheckIfSimilarAttEventExists ("Title",ReceivedAtt.Title,ReceivedAtt.AttCod))
|
||||
if (Att_DB_CheckIfSimilarEventExists ("Title",ReceivedAtt.Title,ReceivedAtt.AttCod))
|
||||
{
|
||||
ReceivedAttEventIsCorrect = false;
|
||||
|
||||
|
@ -1245,7 +1245,7 @@ void Att_ReceiveFormAttEvent (void)
|
|||
if (ItsANewAttEvent)
|
||||
{
|
||||