mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-15 21:24:07 +02:00
Version 21.116: Sep 02, 2022 Code refactoring in edition of program items.
This commit is contained in:
parent
68e1bc6eb4
commit
fc2e821e23
|
@ -228,7 +228,7 @@ void Acc_CheckIfEmptyAccountExists (void)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List users found *****/
|
/***** List users found *****/
|
||||||
for (NumUsr = 1;
|
for (NumUsr = 1, The_ResetRowColor ();
|
||||||
NumUsr <= NumUsrs;
|
NumUsr <= NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -523,9 +523,9 @@ static void Agd_ShowEvents (struct Agd_Agenda *Agenda,
|
||||||
Agd_WriteHeaderListEvents (Agenda,AgendaType);
|
Agd_WriteHeaderListEvents (Agenda,AgendaType);
|
||||||
|
|
||||||
/***** Write all events *****/
|
/***** Write all events *****/
|
||||||
for (NumEvent = Pagination.FirstItemVisible;
|
for (NumEvent = Pagination.FirstItemVisible, The_ResetRowColor ();
|
||||||
NumEvent <= Pagination.LastItemVisible;
|
NumEvent <= Pagination.LastItemVisible;
|
||||||
NumEvent++)
|
NumEvent++, The_ChangeRowColor ())
|
||||||
Agd_ShowOneEvent (Agenda,AgendaType,Agenda->LstAgdCods[NumEvent - 1]);
|
Agd_ShowOneEvent (Agenda,AgendaType,Agenda->LstAgdCods[NumEvent - 1]);
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -592,9 +592,9 @@ static void Agd_ShowEventsToday (struct Agd_Agenda *Agenda,
|
||||||
Agd_WriteHeaderListEvents (Agenda,AgendaType);
|
Agd_WriteHeaderListEvents (Agenda,AgendaType);
|
||||||
|
|
||||||
/***** Write all events *****/
|
/***** Write all events *****/
|
||||||
for (NumEvent = 0;
|
for (NumEvent = 0, The_ResetRowColor ();
|
||||||
NumEvent < Agenda->Num;
|
NumEvent < Agenda->Num;
|
||||||
NumEvent++)
|
NumEvent++, The_ChangeRowColor ())
|
||||||
Agd_ShowOneEvent (Agenda,AgendaType,Agenda->LstAgdCods[NumEvent]);
|
Agd_ShowOneEvent (Agenda,AgendaType,Agenda->LstAgdCods[NumEvent]);
|
||||||
|
|
||||||
/***** End table and box *****/
|
/***** End table and box *****/
|
||||||
|
@ -876,8 +876,6 @@ static void Agd_ShowOneEvent (struct Agd_Agenda *Agenda,
|
||||||
|
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
Frm_FreeAnchorStr (Anchor);
|
Frm_FreeAnchorStr (Anchor);
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -179,9 +179,9 @@ static void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
|
||||||
Asg_PutHeadForSeeing (Assignments,false); // Not print view
|
Asg_PutHeadForSeeing (Assignments,false); // Not print view
|
||||||
|
|
||||||
/***** Write all assignments *****/
|
/***** Write all assignments *****/
|
||||||
for (NumAsg = Pagination.FirstItemVisible;
|
for (NumAsg = Pagination.FirstItemVisible, The_ResetRowColor ();
|
||||||
NumAsg <= Pagination.LastItemVisible;
|
NumAsg <= Pagination.LastItemVisible;
|
||||||
NumAsg++)
|
NumAsg++, The_ChangeRowColor ())
|
||||||
Asg_ShowOneAssignment (Assignments,
|
Asg_ShowOneAssignment (Assignments,
|
||||||
Assignments->LstAsgCods[NumAsg - 1],
|
Assignments->LstAsgCods[NumAsg - 1],
|
||||||
false); // Not print view
|
false); // Not print view
|
||||||
|
@ -517,8 +517,6 @@ static void Asg_ShowOneAssignment (struct Asg_Assignments *Assignments,
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
Frm_FreeAnchorStr (Anchor);
|
Frm_FreeAnchorStr (Anchor);
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
|
|
||||||
/***** Mark possible notification as seen *****/
|
/***** Mark possible notification as seen *****/
|
||||||
Ntf_DB_MarkNotifAsSeenUsingCod (Ntf_EVENT_ASSIGNMENT,AsgCod);
|
Ntf_DB_MarkNotifAsSeenUsingCod (Ntf_EVENT_ASSIGNMENT,AsgCod);
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,9 +290,9 @@ static void Att_ShowAllAttEvents (struct Att_Events *Events)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write all attendance events *****/
|
/***** Write all attendance events *****/
|
||||||
for (NumAttEvent = Pagination.FirstItemVisible;
|
for (NumAttEvent = Pagination.FirstItemVisible, The_ResetRowColor ();
|
||||||
NumAttEvent <= Pagination.LastItemVisible;
|
NumAttEvent <= Pagination.LastItemVisible;
|
||||||
NumAttEvent++)
|
NumAttEvent++, The_ChangeRowColor ())
|
||||||
Att_ShowOneAttEvent (Events,
|
Att_ShowOneAttEvent (Events,
|
||||||
&Events->Lst[NumAttEvent - 1],
|
&Events->Lst[NumAttEvent - 1],
|
||||||
false);
|
false);
|
||||||
|
@ -570,8 +570,6 @@ static void Att_ShowOneAttEvent (struct Att_Events *Events,
|
||||||
|
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
Frm_FreeAnchorStr (Anchor);
|
Frm_FreeAnchorStr (Anchor);
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -141,7 +141,7 @@ void Bld_SeeBuildings (void)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write list of buildings *****/
|
/***** Write list of buildings *****/
|
||||||
for (NumBuilding = 0;
|
for (NumBuilding = 0, The_ResetRowColor ();
|
||||||
NumBuilding < Buildings.Num;
|
NumBuilding < Buildings.Num;
|
||||||
NumBuilding++, The_ChangeRowColor ())
|
NumBuilding++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,7 +135,7 @@ void Ctr_SeeCtrWithPendingDegs (void)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** List the centers *****/
|
/***** List the centers *****/
|
||||||
for (NumCtr = 0;
|
for (NumCtr = 0, The_ResetRowColor ();
|
||||||
NumCtr < NumCtrs;
|
NumCtr < NumCtrs;
|
||||||
NumCtr++, The_ChangeRowColor ())
|
NumCtr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -404,8 +404,6 @@ static void Ctr_ListOneCenterForSeeing (struct Ctr_Center *Ctr,unsigned NumCtr)
|
||||||
Hie_WriteStatusCell (Ctr->Status,TxtClassNormal,BgColor,Txt_CENTER_STATUS);
|
Hie_WriteStatusCell (Ctr->Status,TxtClassNormal,BgColor,Txt_CENTER_STATUS);
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1857,9 +1855,9 @@ void Ctr_ListCtrsFound (MYSQL_RES **mysql_res,unsigned NumCtrs)
|
||||||
Ctr_PutHeadCentersForSeeing (false); // Order not selectable
|
Ctr_PutHeadCentersForSeeing (false); // Order not selectable
|
||||||
|
|
||||||
/***** List the centers (one row per center) *****/
|
/***** List the centers (one row per center) *****/
|
||||||
for (NumCtr = 1;
|
for (NumCtr = 1, The_ResetRowColor ();
|
||||||
NumCtr <= NumCtrs;
|
NumCtr <= NumCtrs;
|
||||||
NumCtr++)
|
NumCtr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get next center */
|
/* Get next center */
|
||||||
Ctr.CtrCod = DB_GetNextCode (*mysql_res);
|
Ctr.CtrCod = DB_GetNextCode (*mysql_res);
|
||||||
|
|
|
@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
|
||||||
|
|
||||||
TODO: Attach pdf files in multimedia.
|
TODO: Attach pdf files in multimedia.
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 21.115 (2022-09-01)"
|
#define Log_PLATFORM_VERSION "SWAD 21.116 (2022-09-02)"
|
||||||
#define CSS_FILE "swad21.107.1.css"
|
#define CSS_FILE "swad21.107.1.css"
|
||||||
#define JS_FILE "swad21.100.js"
|
#define JS_FILE "swad21.100.js"
|
||||||
/*
|
/*
|
||||||
|
Version 21.116: Sep 02, 2022 Code refactoring in edition of program items. (329214 lines)
|
||||||
Version 21.115: Sep 01, 2022 Code refactoring in edition of program items. (329212 lines)
|
Version 21.115: Sep 01, 2022 Code refactoring in edition of program items. (329212 lines)
|
||||||
Version 21.114.1: Jul 25, 2022 Fixed bug removing an item resource. (329264 lines)
|
Version 21.114.1: Jul 25, 2022 Fixed bug removing an item resource. (329264 lines)
|
||||||
Version 21.114: Jul 25, 2022 New form and action to create item resource. (329258 lines)
|
Version 21.114: Jul 25, 2022 New form and action to create item resource. (329258 lines)
|
||||||
|
|
|
@ -133,7 +133,7 @@ void Cty_SeeCtyWithPendingInss (void)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** List the countries *****/
|
/***** List the countries *****/
|
||||||
for (NumCty = 0;
|
for (NumCty = 0, The_ResetRowColor ();
|
||||||
NumCty < NumCtys;
|
NumCty < NumCtys;
|
||||||
NumCty++, The_ChangeRowColor ())
|
NumCty++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -462,8 +462,6 @@ static void Cty_ListOneCountryForSeeing (struct Cty_Countr *Cty,unsigned NumCty)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1831,9 +1829,9 @@ void Cty_ListCtysFound (MYSQL_RES **mysql_res,unsigned NumCtys)
|
||||||
Cty_PutHeadCountriesForSeeing (false); // Order not selectable
|
Cty_PutHeadCountriesForSeeing (false); // Order not selectable
|
||||||
|
|
||||||
/***** List the countries (one row per country) *****/
|
/***** List the countries (one row per country) *****/
|
||||||
for (NumCty = 1;
|
for (NumCty = 1, The_ResetRowColor ();
|
||||||
NumCty <= NumCtys;
|
NumCty <= NumCtys;
|
||||||
NumCty++)
|
NumCty++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get next country */
|
/* Get next country */
|
||||||
Cty.CtyCod = DB_GetNextCode (*mysql_res);
|
Cty.CtyCod = DB_GetNextCode (*mysql_res);
|
||||||
|
|
|
@ -137,7 +137,7 @@ void Deg_SeeDegWithPendingCrss (void)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** List the degrees *****/
|
/***** List the degrees *****/
|
||||||
for (NumDeg = 0;
|
for (NumDeg = 0, The_ResetRowColor ();
|
||||||
NumDeg < NumDegs;
|
NumDeg < NumDegs;
|
||||||
NumDeg++, The_ChangeRowColor ())
|
NumDeg++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -866,8 +866,6 @@ static void Deg_ListOneDegreeForSeeing (struct Deg_Degree *Deg,unsigned NumDeg)
|
||||||
|
|
||||||
/***** End table row *****/
|
/***** End table row *****/
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1813,9 +1811,9 @@ void Deg_ListDegsFound (MYSQL_RES **mysql_res,unsigned NumDegs)
|
||||||
Deg_PutHeadDegreesForSeeing ();
|
Deg_PutHeadDegreesForSeeing ();
|
||||||
|
|
||||||
/***** List the degrees (one row per degree) *****/
|
/***** List the degrees (one row per degree) *****/
|
||||||
for (NumDeg = 1;
|
for (NumDeg = 1, The_ResetRowColor ();
|
||||||
NumDeg <= NumDegs;
|
NumDeg <= NumDegs;
|
||||||
NumDeg++)
|
NumDeg++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get next degree */
|
/* Get next degree */
|
||||||
Deg.DegCod = DB_GetNextCode (*mysql_res);
|
Deg.DegCod = DB_GetNextCode (*mysql_res);
|
||||||
|
|
|
@ -316,7 +316,7 @@ static void DegTyp_ListDegreeTypesForSeeing (void)
|
||||||
const char *BgColor;
|
const char *BgColor;
|
||||||
|
|
||||||
/***** List degree types with forms for edition *****/
|
/***** List degree types with forms for edition *****/
|
||||||
for (NumDegTyp = 0;
|
for (NumDegTyp = 0, The_ResetRowColor ();
|
||||||
NumDegTyp < Gbl.DegTypes.Num;
|
NumDegTyp < Gbl.DegTypes.Num;
|
||||||
NumDegTyp++, The_ChangeRowColor ())
|
NumDegTyp++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -138,7 +138,7 @@ void Dup_ListDuplicateUsrs (void)
|
||||||
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||||
|
|
||||||
/***** List users *****/
|
/***** List users *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < NumUsrs;
|
NumUsr < NumUsrs;
|
||||||
NumUsr++)
|
NumUsr++)
|
||||||
{
|
{
|
||||||
|
@ -259,7 +259,7 @@ static void Dup_ListSimilarUsrs (void)
|
||||||
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||||
|
|
||||||
/***** List users *****/
|
/***** List users *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < NumUsrs;
|
NumUsr < NumUsrs;
|
||||||
NumUsr++)
|
NumUsr++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -277,7 +277,7 @@ void ExaLog_ShowExamLog (const struct ExaPrn_Print *Print)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write clicks *****/
|
/***** Write clicks *****/
|
||||||
for (NumClick = 0;
|
for (NumClick = 0, The_ResetRowColor ();
|
||||||
NumClick < NumClicks;
|
NumClick < NumClicks;
|
||||||
NumClick++, The_ChangeRowColor ())
|
NumClick++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -390,12 +390,10 @@ static unsigned ExaPrn_GetSomeQstsFromSetToPrint (struct ExaPrn_Print *Print,
|
||||||
Set->NumQstsToPrint);
|
Set->NumQstsToPrint);
|
||||||
|
|
||||||
/***** Questions in this set *****/
|
/***** Questions in this set *****/
|
||||||
for (NumQstInSet = 0;
|
for (NumQstInSet = 0, The_ResetRowColor ();
|
||||||
NumQstInSet < NumQstsInSet;
|
NumQstInSet < NumQstsInSet;
|
||||||
NumQstInSet++, (*NumQstsInPrint)++)
|
NumQstInSet++, (*NumQstsInPrint)++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
The_ChangeRowColor ();
|
|
||||||
|
|
||||||
/***** Get question data *****/
|
/***** Get question data *****/
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -610,7 +610,7 @@ static void ExaRes_ListExamsToSelect (struct Exa_Exams *Exams)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** List the sessions *****/
|
/***** List the sessions *****/
|
||||||
for (NumExam = 0, UniqueId = 1;
|
for (NumExam = 0, UniqueId = 1, The_ResetRowColor ();
|
||||||
NumExam < Exams->Num;
|
NumExam < Exams->Num;
|
||||||
NumExam++, UniqueId++, The_ChangeRowColor ())
|
NumExam++, UniqueId++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -1821,7 +1821,7 @@ static void ExaRes_ShowExamAnswers (struct UsrData *UsrDat,
|
||||||
unsigned QstInd;
|
unsigned QstInd;
|
||||||
struct Qst_Question Question;
|
struct Qst_Question Question;
|
||||||
|
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < Print->NumQsts.All;
|
QstInd < Print->NumQsts.All;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -287,7 +287,7 @@ static void ExaSes_ListOneOrMoreSessions (struct Exa_Exams *Exams,
|
||||||
ExaSes_ListOneOrMoreSessionsHeading (ICanEditSessions);
|
ExaSes_ListOneOrMoreSessionsHeading (ICanEditSessions);
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (NumSession = 0, UniqueId = 1;
|
for (NumSession = 0, UniqueId = 1, The_ResetRowColor ();
|
||||||
NumSession < NumSessions;
|
NumSession < NumSessions;
|
||||||
NumSession++, UniqueId++, The_ChangeRowColor ())
|
NumSession++, UniqueId++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -729,7 +729,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
||||||
ExaSet_PutTableHeadingForSets ();
|
ExaSet_PutTableHeadingForSets ();
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (NumSet = 0;
|
for (NumSet = 0, The_ResetRowColor ();
|
||||||
NumSet < NumSets;
|
NumSet < NumSets;
|
||||||
NumSet++, The_ChangeRowColor ())
|
NumSet++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -957,7 +957,7 @@ static void ExaSet_ListOneOrMoreQuestionsForEdition (struct Exa_Exams *Exams,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < NumQsts;
|
QstInd < NumQsts;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -2185,7 +2185,7 @@ static void For_ListForumThrs (struct For_Forums *Forums,
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List threads *****/
|
/***** List threads *****/
|
||||||
for (NumThr = PaginationThrs->FirstItemVisible, NumThrInScreen = 0, UniqueId = 0;
|
for (NumThr = PaginationThrs->FirstItemVisible, NumThrInScreen = 0, UniqueId = 0, The_ResetRowColor ();
|
||||||
NumThr <= PaginationThrs->LastItemVisible;
|
NumThr <= PaginationThrs->LastItemVisible;
|
||||||
NumThr++, NumThrInScreen++, The_ChangeRowColor ())
|
NumThr++, NumThrInScreen++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1717,7 +1717,7 @@ static void Gam_ListOneOrMoreQuestionsForEdition (struct Gam_Games *Games,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (NumQst = 0;
|
for (NumQst = 0, The_ResetRowColor ();
|
||||||
NumQst < NumQsts;
|
NumQst < NumQsts;
|
||||||
NumQst++, The_ChangeRowColor ())
|
NumQst++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -409,7 +409,7 @@ static void Ind_GetNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
|
||||||
NumCrssWithIndicatorYes[Ind] = 0;
|
NumCrssWithIndicatorYes[Ind] = 0;
|
||||||
|
|
||||||
/***** List courses *****/
|
/***** List courses *****/
|
||||||
for (NumCrs = 0;
|
for (NumCrs = 0, The_ResetRowColor ();
|
||||||
NumCrs < NumCrss;
|
NumCrs < NumCrss;
|
||||||
NumCrs++, The_ChangeRowColor ())
|
NumCrs++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -676,7 +676,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (const struct Ind_Indicators *I
|
||||||
|
|
||||||
/***** List courses *****/
|
/***** List courses *****/
|
||||||
mysql_data_seek (mysql_res,0);
|
mysql_data_seek (mysql_res,0);
|
||||||
for (NumCrs = 0;
|
for (NumCrs = 0, The_ResetRowColor ();
|
||||||
NumCrs < NumCrss;
|
NumCrs < NumCrss;
|
||||||
NumCrs++, The_ChangeRowColor ())
|
NumCrs++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,9 +157,9 @@ void Ins_SeeInsWithPendingCtrs (void)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** List the institutions *****/
|
/***** List the institutions *****/
|
||||||
for (NumIns = 0;
|
for (NumIns = 0, The_ResetRowColor ();
|
||||||
NumIns < NumInss;
|
NumIns < NumInss;
|
||||||
NumIns++)
|
NumIns++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get next center */
|
/* Get next center */
|
||||||
row = mysql_fetch_row (mysql_res);
|
row = mysql_fetch_row (mysql_res);
|
||||||
|
@ -187,8 +187,6 @@ void Ins_SeeInsWithPendingCtrs (void)
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table and box *****/
|
/***** End table and box *****/
|
||||||
|
@ -308,9 +306,9 @@ static void Ins_ListInstitutions (void)
|
||||||
Ins_PutHeadInstitutionsForSeeing (true); // Order selectable
|
Ins_PutHeadInstitutionsForSeeing (true); // Order selectable
|
||||||
|
|
||||||
/***** Write all institutions and their nuber of users *****/
|
/***** Write all institutions and their nuber of users *****/
|
||||||
for (NumIns = 0;
|
for (NumIns = 0, The_ResetRowColor ();
|
||||||
NumIns < Gbl.Hierarchy.Inss.Num;
|
NumIns < Gbl.Hierarchy.Inss.Num;
|
||||||
NumIns++)
|
NumIns++, The_ChangeRowColor ())
|
||||||
Ins_ListOneInstitutionForSeeing (&(Gbl.Hierarchy.Inss.Lst[NumIns]),
|
Ins_ListOneInstitutionForSeeing (&(Gbl.Hierarchy.Inss.Lst[NumIns]),
|
||||||
NumIns + 1);
|
NumIns + 1);
|
||||||
|
|
||||||
|
@ -447,8 +445,6 @@ static void Ins_ListOneInstitutionForSeeing (struct Ins_Instit *Ins,unsigned Num
|
||||||
Hie_WriteStatusCell (Ins->Status,TxtClassNormal,BgColor,Txt_INSTITUTION_STATUS);
|
Hie_WriteStatusCell (Ins->Status,TxtClassNormal,BgColor,Txt_INSTITUTION_STATUS);
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1833,9 +1829,9 @@ void Ins_ListInssFound (MYSQL_RES **mysql_res,unsigned NumInss)
|
||||||
Ins_PutHeadInstitutionsForSeeing (false); // Order not selectable
|
Ins_PutHeadInstitutionsForSeeing (false); // Order not selectable
|
||||||
|
|
||||||
/***** List the institutions (one row per institution) *****/
|
/***** List the institutions (one row per institution) *****/
|
||||||
for (NumIns = 1;
|
for (NumIns = 1, The_ResetRowColor ();
|
||||||
NumIns <= NumInss;
|
NumIns <= NumInss;
|
||||||
NumIns++)
|
NumIns++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get next institution */
|
/* Get next institution */
|
||||||
Ins.InsCod = DB_GetNextCode (*mysql_res);
|
Ins.InsCod = DB_GetNextCode (*mysql_res);
|
||||||
|
|
|
@ -395,7 +395,7 @@ static void Mch_ListOneOrMoreMatches (struct Gam_Games *Games,
|
||||||
Mch_ListOneOrMoreMatchesHeading (ICanEditMatches);
|
Mch_ListOneOrMoreMatchesHeading (ICanEditMatches);
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (NumMatch = 0, UniqueId = 1;
|
for (NumMatch = 0, UniqueId = 1, The_ResetRowColor ();
|
||||||
NumMatch < NumMatches;
|
NumMatch < NumMatches;
|
||||||
NumMatch++, UniqueId++, The_ChangeRowColor ())
|
NumMatch++, UniqueId++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -567,7 +567,7 @@ static void MchRes_ListGamesToSelect (struct Gam_Games *Games)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** List the events *****/
|
/***** List the events *****/
|
||||||
for (NumGame = 0, UniqueId = 1;
|
for (NumGame = 0, UniqueId = 1, The_ResetRowColor ();
|
||||||
NumGame < Games->Num;
|
NumGame < Games->Num;
|
||||||
NumGame++, UniqueId++, The_ChangeRowColor ())
|
NumGame++, UniqueId++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -2204,7 +2204,7 @@ static void Pho_ShowOrPrintListDegrees (struct Pho_DegPhotos *DegPhotos,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Get degrees *****/
|
/***** Get degrees *****/
|
||||||
for (NumDeg = 0, NumDegsNotEmpty = 0;
|
for (NumDeg = 0, NumDegsNotEmpty = 0, The_ResetRowColor ();
|
||||||
NumDeg < NumDegs;
|
NumDeg < NumDegs;
|
||||||
NumDeg++, The_ChangeRowColor ())
|
NumDeg++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1184,7 +1184,7 @@ void Prf_ShowRankingFigure (MYSQL_RES **mysql_res,unsigned NumUsrs)
|
||||||
|
|
||||||
HTM_TABLE_Begin (NULL);
|
HTM_TABLE_Begin (NULL);
|
||||||
|
|
||||||
for (NumUsr = 1, Rank = 1;
|
for (NumUsr = 1, Rank = 1, The_ResetRowColor ();
|
||||||
NumUsr <= NumUsrs;
|
NumUsr <= NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -1255,7 +1255,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
|
||||||
|
|
||||||
HTM_TABLE_Begin (NULL);
|
HTM_TABLE_Begin (NULL);
|
||||||
|
|
||||||
for (NumUsr = 1, Rank = 1;
|
for (NumUsr = 1, Rank = 1, The_ResetRowColor ();
|
||||||
NumUsr <= NumUsrs;
|
NumUsr <= NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -210,6 +210,7 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
long ParentItmCod = -1L; // Initialized to avoid warning
|
long ParentItmCod = -1L; // Initialized to avoid warning
|
||||||
unsigned NumItem;
|
unsigned NumItem;
|
||||||
unsigned FormLevel = 0; // Initialized to avoid warning
|
unsigned FormLevel = 0; // Initialized to avoid warning
|
||||||
|
Prg_ListingType_t LT;
|
||||||
struct Prg_Item Item;
|
struct Prg_Item Item;
|
||||||
struct Prg_ItemRange ToHighlight;
|
struct Prg_ItemRange ToHighlight;
|
||||||
static bool FirstTBodyOpen = false;
|
static bool FirstTBodyOpen = false;
|
||||||
|
@ -218,7 +219,8 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
[Prg_PRINT ] = NULL,
|
[Prg_PRINT ] = NULL,
|
||||||
[Prg_VIEW ] = Prg_PutIconsListItems,
|
[Prg_VIEW ] = Prg_PutIconsListItems,
|
||||||
[Prg_EDIT_ITEMS ] = Prg_PutIconsEditItems,
|
[Prg_EDIT_ITEMS ] = Prg_PutIconsEditItems,
|
||||||
[Prg_FORM_NEW_ITEM ] = Prg_PutIconsEditItems,
|
[Prg_FORM_NEW_END_ITEM ] = Prg_PutIconsEditItems,
|
||||||
|
[Prg_FORM_NEW_CHILD_ITEM] = Prg_PutIconsEditItems,
|
||||||
[Prg_FORM_EDIT_ITEM ] = Prg_PutIconsEditItems,
|
[Prg_FORM_EDIT_ITEM ] = Prg_PutIconsEditItems,
|
||||||
[Prg_END_EDIT_ITEM ] = Prg_PutIconsEditItems,
|
[Prg_END_EDIT_ITEM ] = Prg_PutIconsEditItems,
|
||||||
[Prg_RECEIVE_ITEM ] = Prg_PutIconsEditItems,
|
[Prg_RECEIVE_ITEM ] = Prg_PutIconsEditItems,
|
||||||
|
@ -247,23 +249,11 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
Prg_SetItemRangeOnlyItem (Prg_GetNumItemFromItmCod (ItmCod),
|
Prg_SetItemRangeOnlyItem (Prg_GetNumItemFromItmCod (ItmCod),
|
||||||
&ToHighlight);
|
&ToHighlight);
|
||||||
break;
|
break;
|
||||||
case Prg_FORM_NEW_ITEM:
|
case Prg_FORM_NEW_CHILD_ITEM:
|
||||||
if (ItmCod > 0)
|
ParentItmCod = ItmCod; // Item code here is parent of the item to create
|
||||||
{
|
|
||||||
ParentItmCod = ItmCod; // Item code here is the code of the parent of the item to create
|
|
||||||
NumItem = Prg_GetNumItemFromItmCod (ItmCod);
|
NumItem = Prg_GetNumItemFromItmCod (ItmCod);
|
||||||
ItmCod = Prg_Gbl.List.Items[Prg_GetLastChild (NumItem)].ItmCod;
|
ItmCod = Prg_Gbl.List.Items[Prg_GetLastChild (NumItem)].ItmCod;
|
||||||
FormLevel = Prg_GetLevelFromNumItem (NumItem) + 1;
|
FormLevel = Prg_GetLevelFromNumItem (NumItem) + 1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ParentItmCod = -1L; // No parent item (user clicked on button to add a new first-level item at the end)
|
|
||||||
if (Prg_Gbl.List.NumItems) // There are items already
|
|
||||||
ItmCod = Prg_Gbl.List.Items[Prg_Gbl.List.NumItems - 1].ItmCod;
|
|
||||||
else // No current items
|
|
||||||
ItmCod = -1L;
|
|
||||||
FormLevel = 1;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -285,9 +275,9 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
FirstTBodyOpen = true;
|
FirstTBodyOpen = true;
|
||||||
|
|
||||||
/***** Write all program items *****/
|
/***** Write all program items *****/
|
||||||
for (NumItem = 0;
|
for (NumItem = 0, The_ResetRowColor ();
|
||||||
NumItem < Prg_Gbl.List.NumItems;
|
NumItem < Prg_Gbl.List.NumItems;
|
||||||
NumItem++)
|
NumItem++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get data of this program item */
|
/* Get data of this program item */
|
||||||
Item.Hierarchy.ItmCod = Prg_Gbl.List.Items[NumItem].ItmCod;
|
Item.Hierarchy.ItmCod = Prg_Gbl.List.Items[NumItem].ItmCod;
|
||||||
|
@ -304,28 +294,27 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
HTM_TBODY_Begin ("id=\"prg_highlighted\""); // Highlighted tbody start
|
HTM_TBODY_Begin ("id=\"prg_highlighted\""); // Highlighted tbody start
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show form to create item */
|
/* Write row with this item */
|
||||||
|
LT = ListingType;
|
||||||
switch (ListingType)
|
switch (ListingType)
|
||||||
{
|
{
|
||||||
case Prg_PRINT:
|
|
||||||
case Prg_VIEW:
|
|
||||||
case Prg_EDIT_ITEMS:
|
|
||||||
Prg_WriteRowItem (ListingType,NumItem,&Item);
|
|
||||||
break;
|
|
||||||
case Prg_FORM_NEW_ITEM:
|
|
||||||
Prg_WriteRowItem (Prg_EDIT_ITEMS,NumItem,&Item);
|
|
||||||
if (Item.Hierarchy.ItmCod == ItmCod)
|
|
||||||
Prg_WriteRowToCreateItem (ParentItmCod,FormLevel);
|
|
||||||
break;
|
|
||||||
case Prg_FORM_EDIT_ITEM:
|
case Prg_FORM_EDIT_ITEM:
|
||||||
case Prg_END_EDIT_ITEM:
|
|
||||||
case Prg_RECEIVE_ITEM:
|
|
||||||
case Prg_EDIT_RESOURCES:
|
case Prg_EDIT_RESOURCES:
|
||||||
case Prg_END_EDIT_RES:
|
case Prg_END_EDIT_RES:
|
||||||
Prg_WriteRowItem (Item.Hierarchy.ItmCod == ItmCod ? ListingType :
|
if (Item.Hierarchy.ItmCod != ItmCod)
|
||||||
Prg_EDIT_ITEMS,
|
LT = Prg_EDIT_ITEMS;
|
||||||
NumItem,&Item);
|
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Prg_WriteRowItem (LT,NumItem,&Item);
|
||||||
|
|
||||||
|
/* Show form to create child item? */
|
||||||
|
if (ListingType == Prg_FORM_NEW_CHILD_ITEM &&
|
||||||
|
Item.Hierarchy.ItmCod == ItmCod)
|
||||||
|
{
|
||||||
|
The_ChangeRowColor ();
|
||||||
|
Prg_WriteRowToCreateItem (ParentItmCod,FormLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End range to highlight? */
|
/* End range to highlight? */
|
||||||
|
@ -335,20 +324,11 @@ void Prg_ShowAllItems (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
if (NumItem < Prg_Gbl.List.NumItems - 1) // Not the last item
|
if (NumItem < Prg_Gbl.List.NumItems - 1) // Not the last item
|
||||||
HTM_TBODY_Begin (NULL); // 3rd tbody begin
|
HTM_TBODY_Begin (NULL); // 3rd tbody begin
|
||||||
}
|
}
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Create item at the end? *****/
|
/***** Create item at the end? *****/
|
||||||
switch (ListingType)
|
if (ListingType == Prg_FORM_NEW_END_ITEM)
|
||||||
{
|
|
||||||
case Prg_FORM_NEW_ITEM:
|
|
||||||
if (ParentItmCod <= 0)
|
|
||||||
Prg_WriteRowToCreateItem (-1L,1);
|
Prg_WriteRowToCreateItem (-1L,1);
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TBODY_End (); // 3rd tbody end
|
HTM_TBODY_End (); // 3rd tbody end
|
||||||
|
@ -461,6 +441,19 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
unsigned NumItem,struct Prg_Item *Item)
|
unsigned NumItem,struct Prg_Item *Item)
|
||||||
{
|
{
|
||||||
static unsigned UniqueId = 0;
|
static unsigned UniqueId = 0;
|
||||||
|
static bool PutFormsToRemEditOneItem[Prg_NUM_LISTING_TYPES] =
|
||||||
|
{
|
||||||
|
[Prg_PRINT ] = false,
|
||||||
|
[Prg_VIEW ] = false,
|
||||||
|
[Prg_EDIT_ITEMS ] = true,
|
||||||
|
[Prg_FORM_NEW_END_ITEM ] = true,
|
||||||
|
[Prg_FORM_NEW_CHILD_ITEM] = true,
|
||||||
|
[Prg_FORM_EDIT_ITEM ] = true,
|
||||||
|
[Prg_END_EDIT_ITEM ] = true,
|
||||||
|
[Prg_RECEIVE_ITEM ] = true,
|
||||||
|
[Prg_EDIT_RESOURCES ] = true,
|
||||||
|
[Prg_END_EDIT_RES ] = true,
|
||||||
|
};
|
||||||
bool LightStyle;
|
bool LightStyle;
|
||||||
char *Id;
|
char *Id;
|
||||||
unsigned ColSpan;
|
unsigned ColSpan;
|
||||||
|
@ -485,21 +478,12 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Forms to remove/edit this program item *****/
|
/***** Forms to remove/edit this program item *****/
|
||||||
switch (ListingType)
|
if (PutFormsToRemEditOneItem[ListingType])
|
||||||
{
|
{
|
||||||
case Prg_EDIT_ITEMS:
|
|
||||||
case Prg_FORM_EDIT_ITEM:
|
|
||||||
case Prg_END_EDIT_ITEM:
|
|
||||||
case Prg_RECEIVE_ITEM:
|
|
||||||
case Prg_EDIT_RESOURCES:
|
|
||||||
case Prg_END_EDIT_RES:
|
|
||||||
HTM_TD_Begin ("rowspan=\"2\" class=\"PRG_COL1 LT %s\"",
|
HTM_TD_Begin ("rowspan=\"2\" class=\"PRG_COL1 LT %s\"",
|
||||||
The_GetColorRows ());
|
The_GetColorRows ());
|
||||||
Prg_PutFormsToRemEditOneItem (ListingType,NumItem,Item);
|
Prg_PutFormsToRemEditOneItem (ListingType,NumItem,Item);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Indent depending on the level *****/
|
/***** Indent depending on the level *****/
|
||||||
|
@ -658,9 +642,6 @@ static void Prg_WriteRowToCreateItem (long ParentItmCod,unsigned FormLevel)
|
||||||
/***** Title CSS class *****/
|
/***** Title CSS class *****/
|
||||||
Prg_SetTitleClass (&TitleClass,FormLevel,false);
|
Prg_SetTitleClass (&TitleClass,FormLevel,false);
|
||||||
|
|
||||||
/***** Change color *****/
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
|
|
||||||
/***** Begin row *****/
|
/***** Begin row *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
@ -1752,7 +1733,9 @@ void Prg_RequestCreateItem (void)
|
||||||
ParentItmCod = Prg_GetParamItmCod ();
|
ParentItmCod = Prg_GetParamItmCod ();
|
||||||
|
|
||||||
/***** Show current program items, if any *****/
|
/***** Show current program items, if any *****/
|
||||||
Prg_ShowAllItems (Prg_FORM_NEW_ITEM,ParentItmCod);
|
Prg_ShowAllItems (ParentItmCod > 0 ? Prg_FORM_NEW_CHILD_ITEM :
|
||||||
|
Prg_FORM_NEW_END_ITEM,
|
||||||
|
ParentItmCod);
|
||||||
|
|
||||||
/***** Free list of program items *****/
|
/***** Free list of program items *****/
|
||||||
Prg_FreeListItems ();
|
Prg_FreeListItems ();
|
||||||
|
|
|
@ -71,14 +71,15 @@ typedef enum
|
||||||
Prg_MOVE_RIGHT,
|
Prg_MOVE_RIGHT,
|
||||||
} Prg_MoveLeftRight_t;
|
} Prg_MoveLeftRight_t;
|
||||||
|
|
||||||
#define Prg_NUM_LISTING_TYPES 9
|
#define Prg_NUM_LISTING_TYPES 10
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Prg_PRINT, // List items ready to be printed
|
Prg_PRINT, // List items ready to be printed
|
||||||
Prg_VIEW, // List items without any edition
|
Prg_VIEW, // List items without any edition
|
||||||
|
|
||||||
Prg_EDIT_ITEMS, // Buttons to edit list of items
|
Prg_EDIT_ITEMS, // Buttons to edit list of items
|
||||||
Prg_FORM_NEW_ITEM, // Form to create a new item
|
Prg_FORM_NEW_END_ITEM, // Form to create a new first level item at the end
|
||||||
|
Prg_FORM_NEW_CHILD_ITEM, // Form to create a new child item
|
||||||
Prg_FORM_EDIT_ITEM, // Form to edit a selected item
|
Prg_FORM_EDIT_ITEM, // Form to edit a selected item
|
||||||
Prg_END_EDIT_ITEM, // List item after edition
|
Prg_END_EDIT_ITEM, // List item after edition
|
||||||
Prg_RECEIVE_ITEM, // Receive item data after create/edit
|
Prg_RECEIVE_ITEM, // Receive item data after create/edit
|
||||||
|
|
|
@ -148,7 +148,8 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
[Prg_PRINT ] = false,
|
[Prg_PRINT ] = false,
|
||||||
[Prg_VIEW ] = false,
|
[Prg_VIEW ] = false,
|
||||||
[Prg_EDIT_ITEMS ] = false,
|
[Prg_EDIT_ITEMS ] = false,
|
||||||
[Prg_FORM_NEW_ITEM ] = false,
|
[Prg_FORM_NEW_END_ITEM ] = false,
|
||||||
|
[Prg_FORM_NEW_CHILD_ITEM] = false,
|
||||||
[Prg_FORM_EDIT_ITEM ] = false,
|
[Prg_FORM_EDIT_ITEM ] = false,
|
||||||
[Prg_END_EDIT_ITEM ] = false,
|
[Prg_END_EDIT_ITEM ] = false,
|
||||||
[Prg_RECEIVE_ITEM ] = false,
|
[Prg_RECEIVE_ITEM ] = false,
|
||||||
|
@ -160,7 +161,8 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
[Prg_PRINT ] = false,
|
[Prg_PRINT ] = false,
|
||||||
[Prg_VIEW ] = false,
|
[Prg_VIEW ] = false,
|
||||||
[Prg_EDIT_ITEMS ] = true,
|
[Prg_EDIT_ITEMS ] = true,
|
||||||
[Prg_FORM_NEW_ITEM ] = true,
|
[Prg_FORM_NEW_END_ITEM ] = true,
|
||||||
|
[Prg_FORM_NEW_CHILD_ITEM] = true,
|
||||||
[Prg_FORM_EDIT_ITEM ] = true,
|
[Prg_FORM_EDIT_ITEM ] = true,
|
||||||
[Prg_END_EDIT_ITEM ] = true,
|
[Prg_END_EDIT_ITEM ] = true,
|
||||||
[Prg_RECEIVE_ITEM ] = true,
|
[Prg_RECEIVE_ITEM ] = true,
|
||||||
|
@ -172,7 +174,8 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
[Prg_PRINT ] = false,
|
[Prg_PRINT ] = false,
|
||||||
[Prg_VIEW ] = false,
|
[Prg_VIEW ] = false,
|
||||||
[Prg_EDIT_ITEMS ] = false,
|
[Prg_EDIT_ITEMS ] = false,
|
||||||
[Prg_FORM_NEW_ITEM ] = false,
|
[Prg_FORM_NEW_END_ITEM ] = false,
|
||||||
|
[Prg_FORM_NEW_CHILD_ITEM] = false,
|
||||||
[Prg_FORM_EDIT_ITEM ] = false,
|
[Prg_FORM_EDIT_ITEM ] = false,
|
||||||
[Prg_END_EDIT_ITEM ] = false,
|
[Prg_END_EDIT_ITEM ] = false,
|
||||||
[Prg_RECEIVE_ITEM ] = false,
|
[Prg_RECEIVE_ITEM ] = false,
|
||||||
|
@ -184,7 +187,8 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
[Prg_PRINT ] = NULL,
|
[Prg_PRINT ] = NULL,
|
||||||
[Prg_VIEW ] = NULL,
|
[Prg_VIEW ] = NULL,
|
||||||
[Prg_EDIT_ITEMS ] = PrgRsc_PutIconsEditResources,
|
[Prg_EDIT_ITEMS ] = PrgRsc_PutIconsEditResources,
|
||||||
[Prg_FORM_NEW_ITEM ] = PrgRsc_PutIconsEditResources,
|
[Prg_FORM_NEW_END_ITEM ] = PrgRsc_PutIconsEditResources,
|
||||||
|
[Prg_FORM_NEW_CHILD_ITEM] = PrgRsc_PutIconsEditResources,
|
||||||
[Prg_FORM_EDIT_ITEM ] = PrgRsc_PutIconsEditResources,
|
[Prg_FORM_EDIT_ITEM ] = PrgRsc_PutIconsEditResources,
|
||||||
[Prg_END_EDIT_ITEM ] = PrgRsc_PutIconsEditResources,
|
[Prg_END_EDIT_ITEM ] = PrgRsc_PutIconsEditResources,
|
||||||
[Prg_RECEIVE_ITEM ] = PrgRsc_PutIconsEditResources,
|
[Prg_RECEIVE_ITEM ] = PrgRsc_PutIconsEditResources,
|
||||||
|
@ -231,9 +235,9 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
HTM_TBODY_Begin (NULL);
|
HTM_TBODY_Begin (NULL);
|
||||||
|
|
||||||
/***** Write all item resources *****/
|
/***** Write all item resources *****/
|
||||||
for (NumRsc = 0;
|
for (NumRsc = 0, The_ResetRowColor1 ();
|
||||||
NumRsc < NumResources;
|
NumRsc < NumResources;
|
||||||
NumRsc++)
|
NumRsc++, The_ChangeRowColor1 ())
|
||||||
{
|
{
|
||||||
/* Get data of this item resource */
|
/* Get data of this item resource */
|
||||||
PrgRsc_GetDataOfResource (&Resource,&mysql_res);
|
PrgRsc_GetDataOfResource (&Resource,&mysql_res);
|
||||||
|
@ -248,8 +252,6 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,long ItmCod)
|
||||||
PrgRsc_WriteRowViewResource (NumRsc,&Resource);
|
PrgRsc_WriteRowViewResource (NumRsc,&Resource);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Form to create a new resource *****/
|
/***** Form to create a new resource *****/
|
||||||
|
@ -392,13 +394,13 @@ static void PrgRsc_WriteRowViewResource (unsigned NumRsc,
|
||||||
|
|
||||||
/***** Resource number *****/
|
/***** Resource number *****/
|
||||||
HTM_TD_Begin ("class=\"PRG_NUM PRG_RSC_%s RT %s\"",
|
HTM_TD_Begin ("class=\"PRG_NUM PRG_RSC_%s RT %s\"",
|
||||||
The_GetSuffix (),The_GetColorRows ());
|
The_GetSuffix (),The_GetColorRows1 ());
|
||||||
HTM_Unsigned (NumRsc + 1);
|
HTM_Unsigned (NumRsc + 1);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Title *****/
|
||||||
HTM_TD_Begin ("class=\"PRG_MAIN PRG_RSC_%s %s\"",
|
HTM_TD_Begin ("class=\"PRG_MAIN PRG_RSC_%s %s\"",
|
||||||
The_GetSuffix (),The_GetColorRows ());
|
The_GetSuffix (),The_GetColorRows1 ());
|
||||||
HTM_Txt (Resource->Title);
|
HTM_Txt (Resource->Title);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -417,18 +419,18 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/***** Forms to remove/edit this item resource *****/
|
/***** Forms to remove/edit this item resource *****/
|
||||||
HTM_TD_Begin ("class=\"PRG_COL1 LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"PRG_COL1 LM %s\"",The_GetColorRows1 ());
|
||||||
PrgRsc_PutFormsToRemEditOneResource (NumRsc,NumResources,Resource);
|
PrgRsc_PutFormsToRemEditOneResource (NumRsc,NumResources,Resource);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Resource number *****/
|
/***** Resource number *****/
|
||||||
HTM_TD_Begin ("class=\"PRG_NUM PRG_RSC_%s RM %s\"",
|
HTM_TD_Begin ("class=\"PRG_NUM PRG_RSC_%s RM %s\"",
|
||||||
The_GetSuffix (),The_GetColorRows ());
|
The_GetSuffix (),The_GetColorRows1 ());
|
||||||
HTM_Unsigned (NumRsc + 1);
|
HTM_Unsigned (NumRsc + 1);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Title *****/
|
||||||
HTM_TD_Begin ("class=\"PRG_MAIN LM %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"PRG_MAIN LM %s\"",The_GetColorRows1 ());
|
||||||
Frm_BeginFormAnchor (ActRenPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
|
Frm_BeginFormAnchor (ActRenPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
|
||||||
PrgRsc_PutParamRscCod (Resource->Rsc.Cod);
|
PrgRsc_PutParamRscCod (Resource->Rsc.Cod);
|
||||||
HTM_INPUT_TEXT ("Title",PrgRsc_MAX_CHARS_PROGRAM_RESOURCE_TITLE,Resource->Title,
|
HTM_INPUT_TEXT ("Title",PrgRsc_MAX_CHARS_PROGRAM_RESOURCE_TITLE,Resource->Title,
|
||||||
|
|
|
@ -420,9 +420,9 @@ void Prj_ShowTableSelectedPrjs (void)
|
||||||
Prj_ShowTableAllProjectsHead ();
|
Prj_ShowTableAllProjectsHead ();
|
||||||
|
|
||||||
/***** Write all projects *****/
|
/***** Write all projects *****/
|
||||||
for (NumPrj = 0;
|
for (NumPrj = 0, The_ResetRowColor ();
|
||||||
NumPrj < Projects.Num;
|
NumPrj < Projects.Num;
|
||||||
NumPrj++)
|
NumPrj++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
Prj.PrjCod = Projects.LstPrjCods[NumPrj];
|
Prj.PrjCod = Projects.LstPrjCods[NumPrj];
|
||||||
Prj_ShowTableAllProjectsOneRow (&Prj);
|
Prj_ShowTableAllProjectsOneRow (&Prj);
|
||||||
|
@ -508,9 +508,9 @@ static void Prj_ShowPrjsInCurrentPage (void *Projects)
|
||||||
Prj_ShowProjectsHead ((struct Prj_Projects *) Projects,Prj_LIST_PROJECTS);
|
Prj_ShowProjectsHead ((struct Prj_Projects *) Projects,Prj_LIST_PROJECTS);
|
||||||
|
|
||||||
/***** Write all projects *****/
|
/***** Write all projects *****/
|
||||||
for (NumPrj = Pagination.FirstItemVisible;
|
for (NumPrj = Pagination.FirstItemVisible, The_ResetRowColor ();
|
||||||
NumPrj <= Pagination.LastItemVisible;
|
NumPrj <= Pagination.LastItemVisible;
|
||||||
NumPrj++)
|
NumPrj++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
/* Get project data */
|
/* Get project data */
|
||||||
Prj.PrjCod = ((struct Prj_Projects *) Projects)->LstPrjCods[NumPrj - 1];
|
Prj.PrjCod = ((struct Prj_Projects *) Projects)->LstPrjCods[NumPrj - 1];
|
||||||
|
@ -1547,8 +1547,6 @@ static void Prj_ShowOneProject (struct Prj_Projects *Projects,
|
||||||
|
|
||||||
/***** Free anchor string *****/
|
/***** Free anchor string *****/
|
||||||
Frm_FreeAnchorStr (Anchor);
|
Frm_FreeAnchorStr (Anchor);
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1751,8 +1749,6 @@ static void Prj_ShowTableAllProjectsOneRow (struct Prj_Project *Prj)
|
||||||
|
|
||||||
/***** End row *****/
|
/***** End row *****/
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
The_ChangeRowColor ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -858,7 +858,7 @@ void Qst_ListOneOrMoreQstsForEdition (struct Qst_Questions *Questions,
|
||||||
Qst_WriteHeadingRowQuestionsForEdition (Questions);
|
Qst_WriteHeadingRowQuestionsForEdition (Questions);
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < Questions->NumQsts;
|
QstInd < Questions->NumQsts;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -1132,7 +1132,7 @@ void Qst_ListOneOrMoreQstsForSelectionForExamSet (struct Exa_Exams *Exams,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < NumQsts;
|
QstInd < NumQsts;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -1214,7 +1214,7 @@ void Qst_ListOneOrMoreQstsForSelectionForGame (struct Gam_Games *Games,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < NumQsts;
|
QstInd < NumQsts;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -2125,7 +2125,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
|
||||||
OptionsDisabled = Question->Answer.Type != Qst_ANS_UNIQUE_CHOICE &&
|
OptionsDisabled = Question->Answer.Type != Qst_ANS_UNIQUE_CHOICE &&
|
||||||
Question->Answer.Type != Qst_ANS_MULTIPLE_CHOICE &&
|
Question->Answer.Type != Qst_ANS_MULTIPLE_CHOICE &&
|
||||||
Question->Answer.Type != Qst_ANS_TEXT;
|
Question->Answer.Type != Qst_ANS_TEXT;
|
||||||
for (NumOpt = 0;
|
for (NumOpt = 0, The_ResetRowColor ();
|
||||||
NumOpt < Qst_MAX_OPTIONS_PER_QUESTION;
|
NumOpt < Qst_MAX_OPTIONS_PER_QUESTION;
|
||||||
NumOpt++, The_ChangeRowColor ())
|
NumOpt++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1680,7 +1680,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Fields of the record that depends on the course *****/
|
/***** Fields of the record that depends on the course *****/
|
||||||
for (NumField = 0;
|
for (NumField = 0, The_ResetRowColor ();
|
||||||
NumField < Gbl.Crs.Records.LstFields.Num;
|
NumField < Gbl.Crs.Records.LstFields.Num;
|
||||||
NumField++, The_ChangeRowColor ())
|
NumField++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -211,7 +211,7 @@ void Roo_SeeRooms (void)
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write list of rooms *****/
|
/***** Write list of rooms *****/
|
||||||
for (NumRoom = 0;
|
for (NumRoom = 0, The_ResetRowColor ();
|
||||||
NumRoom < Rooms.Num;
|
NumRoom < Rooms.Num;
|
||||||
NumRoom++, The_ChangeRowColor ())
|
NumRoom++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1211,7 +1211,7 @@ static void Sta_ShowDetailedAccessesList (const struct Sta_Stats *Stats,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write rows back *****/
|
/***** Write rows back *****/
|
||||||
for (NumRow = LastRow, UniqueId = 1;
|
for (NumRow = LastRow, UniqueId = 1, The_ResetRowColor ();
|
||||||
NumRow >= FirstRow;
|
NumRow >= FirstRow;
|
||||||
NumRow--, UniqueId++, The_ChangeRowColor ())
|
NumRow--, UniqueId++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -1352,7 +1352,7 @@ static void Sta_ShowNumHitsPerUsr (Sta_CountType_t CountType,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write rows *****/
|
/***** Write rows *****/
|
||||||
for (NumHit = 1, Hits.Max = 0.0;
|
for (NumHit = 1, Hits.Max = 0.0, The_ResetRowColor ();
|
||||||
NumHit <= NumHits;
|
NumHit <= NumHits;
|
||||||
NumHit++, The_ChangeRowColor ())
|
NumHit++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -2807,7 +2807,7 @@ static void Svy_ListSvyQuestions (struct Svy_Surveys *Surveys,
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
|
||||||
/***** Write questions one by one *****/
|
/***** Write questions one by one *****/
|
||||||
for (NumQst = 0;
|
for (NumQst = 0, The_ResetRowColor ();
|
||||||
NumQst < NumQsts;
|
NumQst < NumQsts;
|
||||||
NumQst++, The_ChangeRowColor ())
|
NumQst++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
|
@ -229,7 +229,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print,
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
||||||
/***** Write one row for each question *****/
|
/***** Write one row for each question *****/
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < Print->NumQsts.All;
|
QstInd < Print->NumQsts.All;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -537,7 +537,7 @@ void TstPrn_ShowPrintAfterAssess (struct TstPrn_Print *Print)
|
||||||
Print->NumQsts.NotBlank = 0;
|
Print->NumQsts.NotBlank = 0;
|
||||||
Print->Score = 0.0;
|
Print->Score = 0.0;
|
||||||
|
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < Print->NumQsts.All;
|
QstInd < Print->NumQsts.All;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -2491,7 +2491,7 @@ void TstPrn_ShowPrintAnswers (struct UsrData *UsrDat,
|
||||||
struct Qst_Question Question;
|
struct Qst_Question Question;
|
||||||
bool QuestionExists;
|
bool QuestionExists;
|
||||||
|
|
||||||
for (QstInd = 0;
|
for (QstInd = 0, The_ResetRowColor ();
|
||||||
QstInd < NumQsts;
|
QstInd < NumQsts;
|
||||||
QstInd++, The_ChangeRowColor ())
|
QstInd++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
|
34
swad_theme.c
34
swad_theme.c
|
@ -206,10 +206,12 @@ const char *The_GetSuffix (void)
|
||||||
/******** Get background colors for rows depending on selected theme *********/
|
/******** Get background colors for rows depending on selected theme *********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static unsigned The_RowEvenOdd = 0; // To alternate row colors in listings
|
static unsigned The_RowEvenOdd[2] = // To alternate row colors in listings
|
||||||
|
|
||||||
const char *The_GetColorRows (void)
|
|
||||||
{
|
{
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
static const char *The_ClassColorRows[2][The_NUM_THEMES] =
|
static const char *The_ClassColorRows[2][The_NUM_THEMES] =
|
||||||
{
|
{
|
||||||
[0][The_THEME_WHITE ] = "COLOR0_WHITE",
|
[0][The_THEME_WHITE ] = "COLOR0_WHITE",
|
||||||
|
@ -229,12 +231,34 @@ const char *The_GetColorRows (void)
|
||||||
[1][The_THEME_DARK ] = "COLOR1_DARK",
|
[1][The_THEME_DARK ] = "COLOR1_DARK",
|
||||||
};
|
};
|
||||||
|
|
||||||
return The_ClassColorRows[The_RowEvenOdd][Gbl.Prefs.Theme];
|
const char *The_GetColorRows (void)
|
||||||
|
{
|
||||||
|
return The_ClassColorRows[The_RowEvenOdd[0]][Gbl.Prefs.Theme];
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *The_GetColorRows1 (void)
|
||||||
|
{
|
||||||
|
return The_ClassColorRows[The_RowEvenOdd[1]][Gbl.Prefs.Theme];
|
||||||
|
}
|
||||||
|
|
||||||
|
void The_ResetRowColor (void)
|
||||||
|
{
|
||||||
|
The_RowEvenOdd[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void The_ResetRowColor1 (void)
|
||||||
|
{
|
||||||
|
The_RowEvenOdd[1] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void The_ChangeRowColor (void)
|
void The_ChangeRowColor (void)
|
||||||
{
|
{
|
||||||
The_RowEvenOdd = 1 - The_RowEvenOdd;
|
The_RowEvenOdd[0] = 1 - The_RowEvenOdd[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
void The_ChangeRowColor1 (void)
|
||||||
|
{
|
||||||
|
The_RowEvenOdd[1] = 1 - The_RowEvenOdd[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -55,8 +55,15 @@ The_Theme_t The_GetParamTheme (void);
|
||||||
The_Theme_t The_GetThemeFromStr (const char *Str);
|
The_Theme_t The_GetThemeFromStr (const char *Str);
|
||||||
|
|
||||||
const char *The_GetSuffix (void);
|
const char *The_GetSuffix (void);
|
||||||
|
|
||||||
const char *The_GetColorRows (void);
|
const char *The_GetColorRows (void);
|
||||||
|
const char *The_GetColorRows1 (void);
|
||||||
|
|
||||||
|
void The_ResetRowColor (void);
|
||||||
|
void The_ResetRowColor1 (void);
|
||||||
|
|
||||||
void The_ChangeRowColor (void);
|
void The_ChangeRowColor (void);
|
||||||
|
void The_ChangeRowColor1 (void);
|
||||||
|
|
||||||
//-------------------------------- Figures ------------------------------------
|
//-------------------------------- Figures ------------------------------------
|
||||||
void The_GetAndShowNumUsrsPerTheme (void);
|
void The_GetAndShowNumUsrsPerTheme (void);
|
||||||
|
|
18
swad_user.c
18
swad_user.c
|
@ -4048,7 +4048,7 @@ static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List guests' data *****/
|
/***** List guests' data *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs;
|
NumUsr < Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -4118,7 +4118,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List students' data *****/
|
/***** List students' data *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs;
|
NumUsr < Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -4190,7 +4190,7 @@ static void Usr_ListMainDataTchs (Rol_Role_t Role,
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List teachers' data *****/
|
/***** List teachers' data *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs;
|
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -4288,7 +4288,7 @@ void Usr_ListAllDataGsts (void)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List guests' data *****/
|
/***** List guests' data *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs; )
|
NumUsr < Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs; )
|
||||||
{
|
{
|
||||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_GST].Lst[NumUsr].UsrCod;
|
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_GST].Lst[NumUsr].UsrCod;
|
||||||
|
@ -4489,7 +4489,7 @@ void Usr_ListAllDataStds (void)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List students' data *****/
|
/***** List students' data *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs; )
|
NumUsr < Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs; )
|
||||||
{
|
{
|
||||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].UsrCod;
|
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_STD].Lst[NumUsr].UsrCod;
|
||||||
|
@ -4554,7 +4554,7 @@ static void Usr_ListUsrsForSelection (Rol_Role_t Role,
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List users' data *****/
|
/***** List users' data *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs; )
|
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs; )
|
||||||
{
|
{
|
||||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].UsrCod;
|
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].UsrCod;
|
||||||
|
@ -4691,7 +4691,7 @@ static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List data of teachers *****/
|
/***** List data of teachers *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs; )
|
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs; )
|
||||||
{
|
{
|
||||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].UsrCod;
|
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].UsrCod;
|
||||||
|
@ -4762,7 +4762,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List data of users *****/
|
/***** List data of users *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < NumUsrs;
|
NumUsr < NumUsrs;
|
||||||
NumUsr++, The_ChangeRowColor ())
|
NumUsr++, The_ChangeRowColor ())
|
||||||
{
|
{
|
||||||
|
@ -4937,7 +4937,7 @@ void Usr_ListDataAdms (void)
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
/***** List data of administrators *****/
|
/***** List data of administrators *****/
|
||||||
for (NumUsr = 0;
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Rol_DEG_ADM].NumUsrs; )
|
NumUsr < Gbl.Usrs.LstUsrs[Rol_DEG_ADM].NumUsrs; )
|
||||||
{
|
{
|
||||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_DEG_ADM].Lst[NumUsr].UsrCod;
|
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_DEG_ADM].Lst[NumUsr].UsrCod;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user