mirror of https://github.com/acanas/swad-core.git
Version 22.78.3: Mar 22, 2023 Code refactoring.
This commit is contained in:
parent
467c4bca9e
commit
bad934242f
|
@ -2307,7 +2307,7 @@ int swad__getAttendanceEvents (struct soap *soap,
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get attendance event (except Txt) */
|
||||
Att_GetAttendanceEventFromRow (row,&Event);
|
||||
Att_GetAttendanceEventDataFromRow (row,&Event);
|
||||
|
||||
getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].attendanceEventCode = (int) Event.AttCod;
|
||||
getAttendanceEventsOut->eventsArray.__ptr[NumAttEvent].hidden = Event.Hidden ? 1 :
|
||||
|
|
|
@ -84,9 +84,9 @@ static void Asg_PutIconsToRemEditOneAsg (struct Asg_Assignments *Assignments,
|
|||
const char *Anchor);
|
||||
static void Asg_PutPars (void *Assignments);
|
||||
static void Asg_GetListAssignments (struct Asg_Assignments *Assignments);
|
||||
static void Asg_GetDataOfAssignmentFromRow (MYSQL_RES **mysql_res,
|
||||
struct Asg_Assignment *Asg,
|
||||
unsigned NumAsgs);
|
||||
static void Asg_GetAssignmentDataFromRow (MYSQL_RES **mysql_res,
|
||||
struct Asg_Assignment *Asg,
|
||||
unsigned NumAsgs);
|
||||
static void Asg_ResetAssignment (struct Asg_Assignment *Asg);
|
||||
static void Asg_FreeListAssignments (struct Asg_Assignments *Assignments);
|
||||
static void Asg_ShowLstGrpsToEditAssignment (long AsgCod);
|
||||
|
@ -835,7 +835,7 @@ void Asg_GetDataOfAssignmentByCod (struct Asg_Assignment *Asg)
|
|||
NumAsgs = Asg_DB_GetDataOfAssignmentByCod (&mysql_res,Asg->AsgCod);
|
||||
|
||||
/***** Get data of assignment *****/
|
||||
Asg_GetDataOfAssignmentFromRow (&mysql_res,Asg,NumAsgs);
|
||||
Asg_GetAssignmentDataFromRow (&mysql_res,Asg,NumAsgs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -860,7 +860,7 @@ void Asg_GetDataOfAssignmentByFolder (struct Asg_Assignment *Asg)
|
|||
NumAsgs = Asg_DB_GetDataOfAssignmentByFolder (&mysql_res,Asg->Folder);
|
||||
|
||||
/***** Get data of assignment *****/
|
||||
Asg_GetDataOfAssignmentFromRow (&mysql_res,Asg,NumAsgs);
|
||||
Asg_GetAssignmentDataFromRow (&mysql_res,Asg,NumAsgs);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -874,9 +874,9 @@ void Asg_GetDataOfAssignmentByFolder (struct Asg_Assignment *Asg)
|
|||
/************************* Get assignment data *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Asg_GetDataOfAssignmentFromRow (MYSQL_RES **mysql_res,
|
||||
struct Asg_Assignment *Asg,
|
||||
unsigned NumAsgs)
|
||||
static void Asg_GetAssignmentDataFromRow (MYSQL_RES **mysql_res,
|
||||
struct Asg_Assignment *Asg,
|
||||
unsigned NumAsgs)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -747,7 +747,7 @@ bool Att_GetDataOfAttEventByCod (struct Att_Event *Event)
|
|||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get attendance event (except Txt) */
|
||||
Att_GetAttendanceEventFromRow (row,Event);
|
||||
Att_GetAttendanceEventDataFromRow (row,Event);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -782,7 +782,7 @@ static void Att_ResetAttendanceEvent (struct Att_Event *Event)
|
|||
/************************* Get attendance event data *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Att_GetAttendanceEventFromRow (MYSQL_ROW row,struct Att_Event *Event)
|
||||
void Att_GetAttendanceEventDataFromRow (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]);
|
||||
|
|
|
@ -89,7 +89,7 @@ bool Att_CheckIfICanEditAttEvents (void);
|
|||
|
||||
void Att_ReqCreatOrEditAttEvent (void);
|
||||
bool Att_GetDataOfAttEventByCod (struct Att_Event *Event);
|
||||
void Att_GetAttendanceEventFromRow (MYSQL_ROW row,struct Att_Event *Event);
|
||||
void Att_GetAttendanceEventDataFromRow (MYSQL_ROW row,struct Att_Event *Event);
|
||||
|
||||
void Att_AskRemAttEvent (void);
|
||||
void Att_GetAndRemAttEvent (void);
|
||||
|
|
|
@ -86,6 +86,9 @@ static void Ban_GetListBanners (struct Ban_Banners *Banners,
|
|||
MYSQL_RES **mysql_res);
|
||||
static void Ban_FreeListBanners (struct Ban_Banners *Banners);
|
||||
|
||||
static void Ban_GetBannerDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ban_Banner *Ban);
|
||||
|
||||
static void Ban_PutIconsEditingBanners (__attribute__((unused)) void *Args);
|
||||
|
||||
static void Ban_ListBannersForEdition (struct Ban_Banners *Banners);
|
||||
|
@ -270,9 +273,7 @@ static void Ban_EditBannersInternal (struct Ban_Banners *Banners,
|
|||
static void Ban_GetListBanners (struct Ban_Banners *Banners,
|
||||
MYSQL_RES **mysql_res)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
unsigned NumBan;
|
||||
struct Ban_Banner *Ban;
|
||||
|
||||
/***** Get banners from database *****/
|
||||
if (Banners->Num) // Banners found...
|
||||
|
@ -285,26 +286,7 @@ static void Ban_GetListBanners (struct Ban_Banners *Banners,
|
|||
for (NumBan = 0;
|
||||
NumBan < Banners->Num;
|
||||
NumBan++)
|
||||
{
|
||||
Ban = &(Banners->Lst[NumBan]);
|
||||
|
||||
/* Get next banner */
|
||||
row = mysql_fetch_row (*mysql_res);
|
||||
|
||||
/* Get banner code (row[0]) */
|
||||
if ((Ban->BanCod = Str_ConvertStrCodToLongCod (row[0])) <= 0)
|
||||
Err_WrongBannerExit ();
|
||||
|
||||
/* Get if banner is hidden (row[1]) */
|
||||
Ban->Hidden = (row[1][0] == 'Y');
|
||||
|
||||
/* Get short name (row[2]), full name (row[3]),
|
||||
image (row[4]) and URL (row[5]) of the banner */
|
||||
Str_Copy (Ban->ShrtName,row[2],sizeof (Ban->ShrtName) - 1);
|
||||
Str_Copy (Ban->FullName,row[3],sizeof (Ban->FullName) - 1);
|
||||
Str_Copy (Ban->Img ,row[4],sizeof (Ban->Img ) - 1);
|
||||
Str_Copy (Ban->WWW ,row[5],sizeof (Ban->WWW ) - 1);
|
||||
}
|
||||
Ban_GetBannerDataFromRow (*mysql_res,&(Banners->Lst[NumBan]));
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -312,13 +294,12 @@ static void Ban_GetListBanners (struct Ban_Banners *Banners,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************************** Get banner full name ****************************/
|
||||
/************************* Get banner data by code ***************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Ban_GetDataOfBannerByCod (struct Ban_Banner *Ban)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
|
||||
/***** Clear data *****/
|
||||
Ban->Hidden = false;
|
||||
|
@ -329,20 +310,7 @@ void Ban_GetDataOfBannerByCod (struct Ban_Banner *Ban)
|
|||
{
|
||||
/***** Get data of a banner from database *****/
|
||||
if (Ban_DB_GetDataOfBannerByCod (&mysql_res,Ban->BanCod)) // Banner found...
|
||||
{
|
||||
/* Get row */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/* Get if the banner is hidden (row[0]) */
|
||||
Ban->Hidden = (row[0][0] == 'Y');
|
||||
|
||||
/* Get short name (row[1]), full name (row[2]),
|
||||
image (row[3]) and URL (row[4]) of the banner */
|
||||
Str_Copy (Ban->ShrtName,row[1],sizeof (Ban->ShrtName) - 1);
|
||||
Str_Copy (Ban->FullName,row[2],sizeof (Ban->FullName) - 1);
|
||||
Str_Copy (Ban->Img ,row[3],sizeof (Ban->Img ) - 1);
|
||||
Str_Copy (Ban->WWW ,row[4],sizeof (Ban->WWW ) - 1);
|
||||
}
|
||||
Ban_GetBannerDataFromRow (mysql_res,Ban);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -364,6 +332,33 @@ static void Ban_FreeListBanners (struct Ban_Banners *Banners)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Get banner data *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ban_GetBannerDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ban_Banner *Ban)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
/***** Get row *****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/***** Get banner code (row[0]) *****/
|
||||
if ((Ban->BanCod = Str_ConvertStrCodToLongCod (row[0])) <= 0)
|
||||
Err_WrongBannerExit ();
|
||||
|
||||
/***** Get if the banner is hidden (row[1]) *****/
|
||||
Ban->Hidden = (row[1][0] == 'Y');
|
||||
|
||||
/***** Get short name (row[2]), full name (row[3]),
|
||||
image (row[4]) and URL (row[5]) of the banner *****/
|
||||
Str_Copy (Ban->ShrtName,row[2],sizeof (Ban->ShrtName) - 1);
|
||||
Str_Copy (Ban->FullName,row[3],sizeof (Ban->FullName) - 1);
|
||||
Str_Copy (Ban->Img ,row[4],sizeof (Ban->Img ) - 1);
|
||||
Str_Copy (Ban->WWW ,row[5],sizeof (Ban->WWW ) - 1);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put contextual icons in edition of banners *****************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -106,11 +106,12 @@ unsigned Ban_DB_GetDataOfBannerByCod (MYSQL_RES **mysql_res,long BanCod)
|
|||
{
|
||||
return (unsigned)
|
||||
DB_QuerySELECT (mysql_res,"can not get data of a banner",
|
||||
"SELECT Hidden," // row[0]
|
||||
"ShortName," // row[1]
|
||||
"FullName," // row[2]
|
||||
"Img," // row[3]
|
||||
"WWW" // row[4]
|
||||
"SELECT BanCod," // row[0]
|
||||
"Hidden," // row[1]
|
||||
"ShortName," // row[2]
|
||||
"FullName," // row[3]
|
||||
"Img," // row[4]
|
||||
"WWW" // row[5]
|
||||
" FROM ban_banners"
|
||||
" WHERE BanCod=%ld",
|
||||
BanCod);
|
||||
|
|
|
@ -84,9 +84,9 @@ static void Ctr_GetParCtrOrder (void);
|
|||
static void Ctr_EditCentersInternal (void);
|
||||
static void Ctr_PutIconsEditingCenters (__attribute__((unused)) void *Args);
|
||||
|
||||
static void Ctr_GetDataOfCenterFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ctr_Center *Ctr,
|
||||
bool GetNumUsrsWhoClaimToBelongToCtr);
|
||||
static void Ctr_GetCenterDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ctr_Center *Ctr,
|
||||
bool GetNumUsrsWhoClaimToBelongToCtr);
|
||||
|
||||
static void Ctr_ListCentersForEdition (const struct Plc_Places *Places);
|
||||
static bool Ctr_CheckIfICanEditACenter (struct Ctr_Center *Ctr);
|
||||
|
@ -535,7 +535,7 @@ void Ctr_GetBasicListOfCenters (long InsCod)
|
|||
NumCtr < Gbl.Hierarchy.Ctrs.Num;
|
||||
NumCtr++)
|
||||
/* Get center data */
|
||||
Ctr_GetDataOfCenterFromRow (mysql_res,&(Gbl.Hierarchy.Ctrs.Lst[NumCtr]),
|
||||
Ctr_GetCenterDataFromRow (mysql_res,&(Gbl.Hierarchy.Ctrs.Lst[NumCtr]),
|
||||
false); // Don't get number of users who claim to belong to this center
|
||||
}
|
||||
|
||||
|
@ -568,7 +568,7 @@ void Ctr_GetFullListOfCenters (long InsCod,Ctr_Order_t SelectedOrder)
|
|||
NumCtr < Gbl.Hierarchy.Ctrs.Num;
|
||||
NumCtr++)
|
||||
/* Get center data */
|
||||
Ctr_GetDataOfCenterFromRow (mysql_res,&(Gbl.Hierarchy.Ctrs.Lst[NumCtr]),
|
||||
Ctr_GetCenterDataFromRow (mysql_res,&(Gbl.Hierarchy.Ctrs.Lst[NumCtr]),
|
||||
true); // Get number of users who claim to belong to this center
|
||||
}
|
||||
|
||||
|
@ -602,7 +602,7 @@ bool Ctr_GetDataOfCenterByCod (struct Ctr_Center *Ctr)
|
|||
if (Ctr_DB_GetDataOfCenterByCod (&mysql_res,Ctr->CtrCod)) // Center found...
|
||||
{
|
||||
/* Get center data */
|
||||
Ctr_GetDataOfCenterFromRow (mysql_res,Ctr,
|
||||
Ctr_GetCenterDataFromRow (mysql_res,Ctr,
|
||||
false); // Don't get number of users who claim to belong to this center
|
||||
|
||||
/* Set return value */
|
||||
|
@ -620,9 +620,9 @@ bool Ctr_GetDataOfCenterByCod (struct Ctr_Center *Ctr)
|
|||
/********** Get data of a center from a row resulting of a query *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ctr_GetDataOfCenterFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ctr_Center *Ctr,
|
||||
bool GetNumUsrsWhoClaimToBelongToCtr)
|
||||
static void Ctr_GetCenterDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ctr_Center *Ctr,
|
||||
bool GetNumUsrsWhoClaimToBelongToCtr)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
|
|||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.78.2 (2023-03-22)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.78.3 (2023-03-22)"
|
||||
#define CSS_FILE "swad22.57.1.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.78.3: Mar 22, 2023 Code refactoring. (337767 lines)
|
||||
Version 22.78.2: Mar 22, 2023 Code refactoring in attendance. (337779 lines)
|
||||
Version 22.78.1: Mar 22, 2023 Code refactoring in exam sets and announcements. (337781 lines)
|
||||
Version 22.78: Mar 22, 2023 New fields Source and Cod in rubric criteria. (337770 lines)
|
||||
|
|
|
@ -110,8 +110,8 @@ static void Crs_PutHeadCoursesForEdition (void);
|
|||
static void Crs_ReceiveFormRequestOrCreateCrs (Hie_Status_t Status);
|
||||
static void Crs_GetParsNewCourse (struct Crs_Course *Crs);
|
||||
|
||||
static void Crs_GetDataOfCourseFromRow (MYSQL_RES *mysql_res,
|
||||
struct Crs_Course *Crs);
|
||||
static void Crs_GetCourseDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Crs_Course *Crs);
|
||||
|
||||
static void Crs_EmptyCourseCompletely (long CrsCod);
|
||||
|
||||
|
@ -724,7 +724,7 @@ static void Crs_GetListCrssInCurrentDeg (void)
|
|||
NumCrs < NumCrss;
|
||||
NumCrs++)
|
||||
/* Get data of next course */
|
||||
Crs_GetDataOfCourseFromRow (mysql_res,&Gbl.Hierarchy.Crss.Lst[NumCrs]);
|
||||
Crs_GetCourseDataFromRow (mysql_res,&Gbl.Hierarchy.Crss.Lst[NumCrs]);
|
||||
}
|
||||
|
||||
Gbl.Hierarchy.Crss.Num = NumCrss;
|
||||
|
@ -1630,7 +1630,7 @@ bool Crs_GetDataOfCourseByCod (struct Crs_Course *Crs)
|
|||
if (Crs_DB_GetDataOfCourseByCod (&mysql_res,Crs->CrsCod)) // Course found...
|
||||
{
|
||||
/***** Get data of the course *****/
|
||||
Crs_GetDataOfCourseFromRow (mysql_res,Crs);
|
||||
Crs_GetCourseDataFromRow (mysql_res,Crs);
|
||||
|
||||
/* Set return value */
|
||||
CrsFound = true;
|
||||
|
@ -1647,8 +1647,8 @@ bool Crs_GetDataOfCourseByCod (struct Crs_Course *Crs)
|
|||
/********** Get data of a course from a row resulting of a query *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Crs_GetDataOfCourseFromRow (MYSQL_RES *mysql_res,
|
||||
struct Crs_Course *Crs)
|
||||
static void Crs_GetCourseDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Crs_Course *Crs)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -100,7 +100,8 @@ static void Deg_PutIconsEditingDegrees (__attribute__((unused)) void *Args);
|
|||
|
||||
static void Deg_ReceiveFormRequestOrCreateDeg (Hie_Status_t Status);
|
||||
|
||||
static void Deg_GetDataOfDegreeFromRow (struct Deg_Degree *Deg,MYSQL_ROW row);
|
||||
static void Deg_GetDegreeDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Deg_Degree *Deg);
|
||||
|
||||
static void Deg_ShowAlertAndButtonToGoToDeg (void);
|
||||
|
||||
|
@ -973,7 +974,6 @@ void Deg_PutIconToViewDegrees (void)
|
|||
void Deg_GetListAllDegsWithStds (struct ListDegrees *Degs)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NumDeg;
|
||||
|
||||
/***** Get degrees admin by me from database *****/
|
||||
|
@ -987,11 +987,7 @@ void Deg_GetListAllDegsWithStds (struct ListDegrees *Degs)
|
|||
for (NumDeg = 0;
|
||||
NumDeg < Degs->Num;
|
||||
NumDeg++)
|
||||
{
|
||||
/* Get next degree */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
Deg_GetDataOfDegreeFromRow (&(Degs->Lst[NumDeg]),row);
|
||||
}
|
||||
Deg_GetDegreeDataFromRow (mysql_res,&(Degs->Lst[NumDeg]));
|
||||
}
|
||||
else
|
||||
Degs->Lst = NULL;
|
||||
|
@ -1007,7 +1003,6 @@ void Deg_GetListAllDegsWithStds (struct ListDegrees *Degs)
|
|||
void Deg_GetListDegsInCurrentCtr (void)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
unsigned NumDeg;
|
||||
struct Deg_Degree *Deg;
|
||||
|
||||
|
@ -1026,13 +1021,7 @@ void Deg_GetListDegsInCurrentCtr (void)
|
|||
for (NumDeg = 0;
|
||||
NumDeg < Gbl.Hierarchy.Degs.Num;
|
||||
NumDeg++)
|
||||
{
|
||||
Deg = &Gbl.Hierarchy.Degs.Lst[NumDeg];
|
||||
|
||||
/* Get next degree */
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
Deg_GetDataOfDegreeFromRow (Deg,row);
|
||||
}
|
||||
Deg_GetDegreeDataFromRow (mysql_res,&Gbl.Hierarchy.Degs.Lst[NumDeg]);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -1177,7 +1166,6 @@ void Deg_RemoveDegree (void)
|
|||
bool Deg_GetDataOfDegreeByCod (struct Deg_Degree *Deg)
|
||||
{
|
||||
MYSQL_RES *mysql_res;
|
||||
MYSQL_ROW row;
|
||||
bool DegFound = false;
|
||||
|
||||
/***** Clear data *****/
|
||||
|
@ -1196,8 +1184,7 @@ bool Deg_GetDataOfDegreeByCod (struct Deg_Degree *Deg)
|
|||
if (Deg_DB_GetDataOfDegreeByCod (&mysql_res,Deg->DegCod)) // Degree found...
|
||||
{
|
||||
/***** Get data of degree *****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
Deg_GetDataOfDegreeFromRow (Deg,row);
|
||||
Deg_GetDegreeDataFromRow (mysql_res,Deg);
|
||||
|
||||
/* Set return value */
|
||||
DegFound = true;
|
||||
|
@ -1214,8 +1201,14 @@ bool Deg_GetDataOfDegreeByCod (struct Deg_Degree *Deg)
|
|||
/********** Get data of a degree from a row resulting of a query *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Deg_GetDataOfDegreeFromRow (struct Deg_Degree *Deg,MYSQL_ROW row)
|
||||
static void Deg_GetDegreeDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Deg_Degree *Deg)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
/**** Get row ****/
|
||||
row = mysql_fetch_row (mysql_res);
|
||||
|
||||
/***** Get degree code (row[0]) *****/
|
||||
if ((Deg->DegCod = Str_ConvertStrCodToLongCod (row[0])) <= 0)
|
||||
Err_WrongDegreeExit ();
|
||||
|
|
|
@ -86,9 +86,9 @@ static void Ins_EditInstitutionsInternal (void);
|
|||
static void Ins_PutIconsEditingInstitutions (__attribute__((unused)) void *Args);
|
||||
static void Ins_PutIconToViewInstitutions (void);
|
||||
|
||||
static void Ins_GetDataOfInstitFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ins_Instit *Ins,
|
||||
bool GetNumUsrsWhoClaimToBelongToIns);
|
||||
static void Ins_GetInstitDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ins_Instit *Ins,
|
||||
bool GetNumUsrsWhoClaimToBelongToIns);
|
||||
|
||||
static void Ins_ListInstitutionsForEdition (void);
|
||||
static bool Ins_CheckIfICanEdit (struct Ins_Instit *Ins);
|
||||
|
@ -622,8 +622,8 @@ void Ins_GetBasicListOfInstitutions (long CtyCod)
|
|||
NumIns < Gbl.Hierarchy.Inss.Num;
|
||||
NumIns++)
|
||||
/* Get institution data */
|
||||
Ins_GetDataOfInstitFromRow (mysql_res,&(Gbl.Hierarchy.Inss.Lst[NumIns]),
|
||||
false); // Don't get number of users who claim to belong to this institution
|
||||
Ins_GetInstitDataFromRow (mysql_res,&(Gbl.Hierarchy.Inss.Lst[NumIns]),
|
||||
false); // Don't get number of users who claim to belong to this institution
|
||||
}
|
||||
else
|
||||
Gbl.Hierarchy.Inss.Lst = NULL;
|
||||
|
@ -655,8 +655,8 @@ void Ins_GetFullListOfInstitutions (long CtyCod)
|
|||
NumIns < Gbl.Hierarchy.Inss.Num;
|
||||
NumIns++)
|
||||
/* Get institution data */
|
||||
Ins_GetDataOfInstitFromRow (mysql_res,&(Gbl.Hierarchy.Inss.Lst[NumIns]),
|
||||
true); // Get number of users who claim to belong to this institution
|
||||
Ins_GetInstitDataFromRow (mysql_res,&(Gbl.Hierarchy.Inss.Lst[NumIns]),
|
||||
true); // Get number of users who claim to belong to this institution
|
||||
}
|
||||
else
|
||||
Gbl.Hierarchy.Inss.Lst = NULL;
|
||||
|
@ -708,8 +708,8 @@ bool Ins_GetDataOfInstitByCod (struct Ins_Instit *Ins)
|
|||
if (Ins_DB_GetDataOfInstitutionByCod (&mysql_res,Ins->InsCod)) // Institution found...
|
||||
{
|
||||
/* Get institution data */
|
||||
Ins_GetDataOfInstitFromRow (mysql_res,Ins,
|
||||
false); // Don't get number of users who claim to belong to this institution
|
||||
Ins_GetInstitDataFromRow (mysql_res,Ins,
|
||||
false); // Don't get number of users who claim to belong to this institution
|
||||
|
||||
/* Set return value */
|
||||
InsFound = true;
|
||||
|
@ -726,9 +726,9 @@ bool Ins_GetDataOfInstitByCod (struct Ins_Instit *Ins)
|
|||
/********** Get data of a center from a row resulting of a query *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ins_GetDataOfInstitFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ins_Instit *Ins,
|
||||
bool GetNumUsrsWhoClaimToBelongToIns)
|
||||
static void Ins_GetInstitDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Ins_Instit *Ins,
|
||||
bool GetNumUsrsWhoClaimToBelongToIns)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -297,8 +297,8 @@ static void Prj_UpdateProject (struct Prj_Project *Prj);
|
|||
|
||||
static bool Prj_CheckIfICanConfigAllProjects (void);
|
||||
static void Prj_GetCrsPrjsConfig (struct Prj_Projects *Projects);
|
||||
static void Prj_GetConfigFromRow (MYSQL_RES *mysql_res,
|
||||
struct Prj_Projects *Projects);
|
||||
static void Prj_GetConfigDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Prj_Projects *Projects);
|
||||
static bool Prj_GetEditableFromForm (void);
|
||||
static void Prj_PutIconsToLockUnlockAllProjects (struct Prj_Projects *Projects);
|
||||
|
||||
|
@ -4225,7 +4225,7 @@ static void Prj_GetCrsPrjsConfig (struct Prj_Projects *Projects)
|
|||
|
||||
/***** Get configuration of projects for current course from database *****/
|
||||
if (Prj_DB_GetCrsPrjsConfig (&mysql_res))
|
||||
Prj_GetConfigFromRow (mysql_res,Projects);
|
||||
Prj_GetConfigDataFromRow (mysql_res,Projects);
|
||||
else
|
||||
Projects->Config.Editable = Prj_EDITABLE_DEFAULT;
|
||||
|
||||
|
@ -4237,8 +4237,8 @@ static void Prj_GetCrsPrjsConfig (struct Prj_Projects *Projects)
|
|||
/************ Get configuration values from a database table row *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prj_GetConfigFromRow (MYSQL_RES *mysql_res,
|
||||
struct Prj_Projects *Projects)
|
||||
static void Prj_GetConfigDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Prj_Projects *Projects)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -128,9 +128,9 @@ static void Svy_FreeTextChoiceAnswer (struct Svy_Question *SvyQst,unsigned NumAn
|
|||
|
||||
static unsigned Svy_GetNextQuestionIndexInSvy (long SvyCod);
|
||||
static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys);
|
||||
static void Svy_GetDataOfQstFromRow (MYSQL_RES *mysql_res,
|
||||
struct Svy_Question *SvyQst,
|
||||
char Stem[Cns_MAX_BYTES_TEXT + 1]);
|
||||
static void Svy_GetQstDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Svy_Question *SvyQst,
|
||||
char Stem[Cns_MAX_BYTES_TEXT + 1]);
|
||||
static void Svy_PutParsToEditQuestion (void *Surveys);
|
||||
static void Svy_PutIconToAddNewQuestion (void *Surveys);
|
||||
static void Svy_PutButtonToCreateNewQuestion (struct Svy_Surveys *Surveys);
|
||||
|
@ -2310,7 +2310,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
|
|||
{
|
||||
/***** Get question data from database *****/
|
||||
if (Svy_DB_GetQstDataByCod (&mysql_res,SvyQst->QstCod,Surveys->Svy.SvyCod))
|
||||
Svy_GetDataOfQstFromRow (mysql_res,SvyQst,Stem);
|
||||
Svy_GetQstDataFromRow (mysql_res,SvyQst,Stem);
|
||||
else
|
||||
Err_WrongQuestionExit ();
|
||||
|
||||
|
@ -2761,7 +2761,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys)
|
|||
Svy_InitQst (&SvyQst);
|
||||
|
||||
/* Get question data from row */
|
||||
Svy_GetDataOfQstFromRow (mysql_res,&SvyQst,Stem);
|
||||
Svy_GetQstDataFromRow (mysql_res,&SvyQst,Stem);
|
||||
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
|
@ -2839,9 +2839,9 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys)
|
|||
/************************* Get question data from row ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Svy_GetDataOfQstFromRow (MYSQL_RES *mysql_res,
|
||||
struct Svy_Question *SvyQst,
|
||||
char Stem[Cns_MAX_BYTES_TEXT + 1])
|
||||
static void Svy_GetQstDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct Svy_Question *SvyQst,
|
||||
char Stem[Cns_MAX_BYTES_TEXT + 1])
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ static void TstCfg_ShowFormConfig (void);
|
|||
static void TstCfg_PutInputFieldNumQsts (const char *Field,const char *Label,
|
||||
unsigned Value);
|
||||
|
||||
static void TstCfg_GetConfigFromRow (MYSQL_RES *mysql_res);
|
||||
static void TstCfg_GetConfigDataFromRow (MYSQL_RES *mysql_res);
|
||||
|
||||
static TstCfg_Pluggable_t TstCfg_GetPluggableFromForm (void);
|
||||
static void TstCfg_CheckAndCorrectMinDefMax (void);
|
||||
|
@ -311,7 +311,7 @@ void TstCfg_GetConfig (void)
|
|||
|
||||
/***** Get configuration of test for current course from database *****/
|
||||
if (Tst_DB_GetConfig (&mysql_res,Gbl.Hierarchy.Crs.CrsCod))
|
||||
TstCfg_GetConfigFromRow (mysql_res);
|
||||
TstCfg_GetConfigDataFromRow (mysql_res);
|
||||
else
|
||||
{
|
||||
TstCfg_SetConfigPluggable (TstCfg_PLUGGABLE_UNKNOWN);
|
||||
|
@ -330,7 +330,7 @@ void TstCfg_GetConfig (void)
|
|||
/************ Get configuration values from a database table row *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TstCfg_GetConfigFromRow (MYSQL_RES *mysql_res)
|
||||
static void TstCfg_GetConfigDataFromRow (MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Tst_DB_Pluggable[TstCfg_NUM_OPTIONS_PLUGGABLE];
|
||||
MYSQL_ROW row;
|
||||
|
|
|
@ -108,8 +108,8 @@ static void TmlCom_RequestRemovalComm (struct Tml_Timeline *Timeline);
|
|||
static void TmlCom_PutParsRemoveComm (void *Timeline);
|
||||
static void TmlCom_RemoveComm (void);
|
||||
|
||||
static void TmlCom_GetDataOfCommFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlCom_Comment *Com);
|
||||
static void TmlCom_GetCommDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlCom_Comment *Com);
|
||||
|
||||
static void TmlCom_ResetComm (struct TmlCom_Comment *Com);
|
||||
|
||||
|
@ -443,7 +443,7 @@ static void TmlCom_WriteOneCommInList (const struct Tml_Timeline *Timeline,
|
|||
Med_MediaConstructor (&Com.Content.Media);
|
||||
|
||||
/***** Get data of comment *****/
|
||||
TmlCom_GetDataOfCommFromRow (mysql_res,&Com);
|
||||
TmlCom_GetCommDataFromRow (mysql_res,&Com);
|
||||
|
||||
/***** Write comment *****/
|
||||
HTM_LI_Begin ("class=\"Tml_COM\"");
|
||||
|
@ -1054,7 +1054,7 @@ void TmlCom_GetDataOfCommByCod (struct TmlCom_Comment *Com)
|
|||
|
||||
/***** Get data of comment from database *****/
|
||||
if (Tml_DB_GetDataOfCommByCod (Com->PubCod,&mysql_res))
|
||||
TmlCom_GetDataOfCommFromRow (mysql_res,Com);
|
||||
TmlCom_GetCommDataFromRow (mysql_res,Com);
|
||||
else
|
||||
/* Reset fields of comment */
|
||||
TmlCom_ResetComm (Com);
|
||||
|
@ -1067,8 +1067,8 @@ void TmlCom_GetDataOfCommByCod (struct TmlCom_Comment *Com)
|
|||
/********************** Get data of comment from row *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TmlCom_GetDataOfCommFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlCom_Comment *Com)
|
||||
static void TmlCom_GetCommDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlCom_Comment *Com)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
|
|
@ -116,8 +116,8 @@ static void TmlNot_PutParsRemoveNote (void *Timeline);
|
|||
static void TmlNot_RemoveNote (void);
|
||||
static void TmlNot_RemoveNoteMediaAndDBEntries (struct TmlNot_Note *Not);
|
||||
|
||||
static void TmlNot_GetDataOfNoteFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlNot_Note *Not);
|
||||
static void TmlNot_GetNoteDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlNot_Note *Not);
|
||||
|
||||
static TmlNot_Type_t TmlNot_GetNoteTypeFromStr (const char *Str);
|
||||
|
||||
|
@ -1196,8 +1196,8 @@ static void TmlNot_RemoveNoteMediaAndDBEntries (struct TmlNot_Note *Not)
|
|||
/************************ Get data of note from row **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void TmlNot_GetDataOfNoteFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlNot_Note *Not)
|
||||
static void TmlNot_GetNoteDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct TmlNot_Note *Not)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
@ -1286,7 +1286,7 @@ void TmlNot_GetDataOfNoteByCod (struct TmlNot_Note *Not)
|
|||
|
||||
/***** Get data of note from database *****/
|
||||
if (Tml_DB_GetDataOfNoteByCod (Not->NotCod,&mysql_res))
|
||||
TmlNot_GetDataOfNoteFromRow (mysql_res,Not);
|
||||
TmlNot_GetNoteDataFromRow (mysql_res,Not);
|
||||
else
|
||||
/* Reset fields of note */
|
||||
TmlNot_ResetNote (Not);
|
||||
|
|
Loading…
Reference in New Issue