Version19.75

This commit is contained in:
Antonio Cañas Vargas 2019-11-21 00:40:35 +01:00
parent 6943411612
commit 7cf99be5e1
12 changed files with 1130 additions and 1137 deletions

View File

@ -620,21 +620,21 @@ void Asg_GetListAssignments (void)
{ {
static const char *HiddenSubQuery[Rol_NUM_ROLES] = static const char *HiddenSubQuery[Rol_NUM_ROLES] =
{ {
" AND Hidden='N'", // Rol_UNK [Rol_UNK ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_GST [Rol_GST ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_USR [Rol_USR ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_STD [Rol_STD ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_NET [Rol_NET ] = " AND Hidden='N'",
"", // Rol_TCH [Rol_TCH ] = "",
" AND Hidden='N'", // Rol_DEG_ADM [Rol_DEG_ADM] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_CTR_ADM [Rol_CTR_ADM] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_INS_ADM [Rol_INS_ADM] = " AND Hidden='N'",
"", // Rol_SYS_ADM [Rol_SYS_ADM] = "",
}; };
static const char *OrderBySubQuery[Dat_NUM_START_END_TIME] = static const char *OrderBySubQuery[Dat_NUM_START_END_TIME] =
{ {
"StartTime DESC,EndTime DESC,Title DESC", // Dat_START_TIME [Dat_START_TIME] = "StartTime DESC,EndTime DESC,Title DESC",
"EndTime DESC,StartTime DESC,Title DESC", // Dat_END_TIME [Dat_END_TIME ] = "EndTime DESC,StartTime DESC,Title DESC",
}; };
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;

View File

@ -608,27 +608,24 @@ static void Att_GetListAttEvents (Att_OrderNewestOldest_t OrderNewestOldest)
{ {
static const char *HiddenSubQuery[Rol_NUM_ROLES] = static const char *HiddenSubQuery[Rol_NUM_ROLES] =
{ {
" AND Hidden='N'", // Rol_UNK [Rol_UNK ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_GST [Rol_GST ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_USR [Rol_USR ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_STD [Rol_STD ] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_NET [Rol_NET ] = " AND Hidden='N'",
"", // Rol_TCH [Rol_TCH ] = "",
" AND Hidden='N'", // Rol_DEG_ADM [Rol_DEG_ADM] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_CTR_ADM [Rol_CTR_ADM] = " AND Hidden='N'",
" AND Hidden='N'", // Rol_INS_ADM [Rol_INS_ADM] = " AND Hidden='N'",
"", // Rol_SYS_ADM [Rol_SYS_ADM] = "",
}; };
static const char *OrderBySubQuery[Dat_NUM_START_END_TIME][Att_NUM_ORDERS_NEWEST_OLDEST] = static const char *OrderBySubQuery[Dat_NUM_START_END_TIME][Att_NUM_ORDERS_NEWEST_OLDEST] =
{ {
{ // Dat_START_TIME [Dat_START_TIME][Att_NEWEST_FIRST] = "StartTime DESC,EndTime DESC,Title DESC",
"StartTime DESC,EndTime DESC,Title DESC", // Att_NEWEST_FIRST [Dat_START_TIME][Att_OLDEST_FIRST] = "StartTime,EndTime,Title",
"StartTime,EndTime,Title", // Att_OLDEST_FIRST
}, [Dat_END_TIME ][Att_NEWEST_FIRST] = "EndTime DESC,StartTime DESC,Title DESC",
{ // Dat_END_TIME [Dat_END_TIME ][Att_OLDEST_FIRST] = "EndTime,StartTime,Title",
"EndTime DESC,StartTime DESC,Title DESC", // Att_NEWEST_FIRST
"EndTime,StartTime,Title", // Att_OLDEST_FIRST
}
}; };
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;

View File

@ -44,18 +44,18 @@
extern struct Globals Gbl; extern struct Globals Gbl;
/*****************************************************************************/ /*****************************************************************************/
/**************************** Private constants ******************************/ /***************************** Public constants ******************************/
/*****************************************************************************/ /*****************************************************************************/
const bool Cal_DayIsValidAsFirstDayOfWeek[7] = const bool Cal_DayIsValidAsFirstDayOfWeek[7] =
{ {
true, // 0: monday [0] = true, // monday
false, // 1: tuesday [1] = false, // tuesday
false, // 2: wednesday [2] = false, // wednesday
false, // 3: thursday [3] = false, // thursday
false, // 4: friday [4] = false, // friday
false, // 5: saturday [5] = false, // saturday
true, // 6: sunday [6] = true, // sunday
}; };
/*****************************************************************************/ /*****************************************************************************/

View File

@ -1051,8 +1051,8 @@ void Ctr_GetListCentres (long InsCod)
{ {
static const char *OrderBySubQuery[Ctr_NUM_ORDERS] = static const char *OrderBySubQuery[Ctr_NUM_ORDERS] =
{ {
"FullName", // Ctr_ORDER_BY_CENTRE [Ctr_ORDER_BY_CENTRE ] = "FullName",
"NumUsrs DESC,FullName", // Ctr_ORDER_BY_NUM_TCHS [Ctr_ORDER_BY_NUM_TCHS] = "NumUsrs DESC,FullName",
}; };
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;

View File

@ -488,14 +488,15 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.74.4 (2019-11-20)" #define Log_PLATFORM_VERSION "SWAD 19.75 (2019-11-21)"
#define CSS_FILE "swad19.74.3.css" #define CSS_FILE "swad19.74.3.css"
#define JS_FILE "swad19.70.js" #define JS_FILE "swad19.70.js"
/* /*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables. // TODO: Impedir la creación y edición de proyectos si no son editables.
Version 19.74.4: Nov 20, 2019 Code refactoring related to vectos. (247021 lines) Version 19.75: Nov 21, 2019 Code refactoring related to vectors. (247012 lines)
Version 19.74.4: Nov 20, 2019 Code refactoring related to vectors. (247021 lines)
Version 19.74.3: Nov 20, 2019 Minor bug fixes and changes in layout and users' ranking. (247020 lines) Version 19.74.3: Nov 20, 2019 Minor bug fixes and changes in layout and users' ranking. (247020 lines)
Version 19.74.2: Nov 20, 2019 Changes in layout of timeline. (247006 lines) Version 19.74.2: Nov 20, 2019 Changes in layout of timeline. (247006 lines)
Version 19.74.1: Nov 20, 2019 Fixed bug in CSS related to buttons. (247020 lines) Version 19.74.1: Nov 20, 2019 Fixed bug in CSS related to buttons. (247020 lines)

View File

@ -300,10 +300,10 @@ void Cla_GetListClassrooms (Cla_WhichData_t WhichData)
{ {
static const char *OrderBySubQuery[Cla_NUM_ORDERS] = static const char *OrderBySubQuery[Cla_NUM_ORDERS] =
{ {
"ShortName", // Cla_ORDER_BY_SHRT_NAME [Cla_ORDER_BY_SHRT_NAME] = "ShortName",
"FullName", // Cla_ORDER_BY_FULL_NAME [Cla_ORDER_BY_FULL_NAME] = "FullName",
"Capacity DESC,ShortName", // Cla_ORDER_BY_CAPACITY [Cla_ORDER_BY_CAPACITY ] = "Capacity DESC,ShortName",
"Location,ShortName", // Cla_ORDER_BY_LOCATION [Cla_ORDER_BY_LOCATION ] = "Location,ShortName",
}; };
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;

View File

@ -52,38 +52,38 @@ extern struct Globals Gbl;
/***************************** Public constants ******************************/ /***************************** Public constants ******************************/
/*****************************************************************************/ /*****************************************************************************/
const char *Dat_TimeStatusClassVisible[Dat_NUM_TIME_STATUS] =
{
[Dat_PAST ] = "DATE_RED",
[Dat_PRESENT] = "DATE_GREEN",
[Dat_FUTURE ] = "DATE_BLUE",
};
const char *Dat_TimeStatusClassHidden[Dat_NUM_TIME_STATUS] =
{
[Dat_PAST ] = "DATE_RED_LIGHT",
[Dat_PRESENT] = "DATE_GREEN_LIGHT",
[Dat_FUTURE ] = "DATE_BLUE_LIGHT",
};
/*****************************************************************************/ /*****************************************************************************/
/**************************** Private constants ******************************/ /**************************** Private constants ******************************/
/*****************************************************************************/ /*****************************************************************************/
const unsigned Dat_NumDaysMonth[1 + 12] = static const unsigned Dat_NumDaysMonth[1 + 12] =
{ {
0, [ 0] = 0,
31, // 1: January [ 1] = 31, // January
28, // 2: February [ 2] = 28, // February
31, // 3: Mars [ 3] = 31, // March
30, // 4: April [ 4] = 30, // April
31, // 5: May [ 5] = 31, // May
30, // 6: June [ 6] = 30, // June
31, // 7: July [ 7] = 31, // July
31, // 8: Agoust [ 8] = 31, // Agoust
30, // 9: September [ 9] = 30, // September
31, // 10: October [10] = 31, // October
30, // 11: November [11] = 30, // November
31, // 12: December [12] = 31, // December
};
const char *Dat_TimeStatusClassVisible[Dat_NUM_TIME_STATUS] =
{
"DATE_RED", // Dat_PAST
"DATE_GREEN", // Dat_PRESENT
"DATE_BLUE", // Dat_FUTURE
};
const char *Dat_TimeStatusClassHidden[Dat_NUM_TIME_STATUS] =
{
"DATE_RED_LIGHT", // Dat_PAST
"DATE_GREEN_LIGHT", // Dat_PRESENT
"DATE_BLUE_LIGHT", // Dat_FUTURE
}; };
/*****************************************************************************/ /*****************************************************************************/
@ -551,10 +551,10 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
unsigned Hour; unsigned Hour;
unsigned Minute; unsigned Minute;
unsigned Second; unsigned Second;
unsigned MinutesIInterval[Dat_NUM_FORM_SECONDS] = static unsigned MinutesIInterval[Dat_NUM_FORM_SECONDS] =
{ {
5, // Dat_FORM_SECONDS_OFF [Dat_FORM_SECONDS_OFF] = 5,
1, // Dat_FORM_SECONDS_ON [Dat_FORM_SECONDS_ON ] = 1,
}; };
char *IdTimeUTC; char *IdTimeUTC;
char *ParamNameTimeUTC; char *ParamNameTimeUTC;
@ -1043,30 +1043,30 @@ void Dat_GetIniEndDatesFromForm (void)
void Dat_WriteRFC822DateFromTM (FILE *File,struct tm *tm_ptr) void Dat_WriteRFC822DateFromTM (FILE *File,struct tm *tm_ptr)
{ {
const char *StrDayOfWeek[7] = static const char *StrDayOfWeek[7] =
{ {
"Sun", [0] = "Sun",
"Mon", [1] = "Mon",
"Tue", [2] = "Tue",
"Wed", [3] = "Wed",
"Thu", [4] = "Thu",
"Fri", [5] = "Fri",
"Sat", [6] = "Sat",
}; };
const char *StrMonth[12] = static const char *StrMonth[12] =
{ {
"Jan", [ 0] = "Jan",
"Feb", [ 1] = "Feb",
"Mar", [ 2] = "Mar",
"Apr", [ 3] = "Apr",
"May", [ 4] = "May",
"Jun", [ 5] = "Jun",
"Jul", [ 6] = "Jul",
"Aug", [ 7] = "Aug",
"Sep", [ 8] = "Sep",
"Oct", [ 9] = "Oct",
"Nov", [10] = "Nov",
"Dec", [11] = "Dec",
}; };
fprintf (File,"%s, %d %s %d %02d:%02d:%02d UT", fprintf (File,"%s, %d %s %d %02d:%02d:%02d UT",
@ -1647,9 +1647,9 @@ void Dat_WriteLocalDateHMSFromUTC (const char *Id,time_t TimeUTC,
extern const char *Txt_Today; extern const char *Txt_Today;
static const char *SeparatorStr[] = static const char *SeparatorStr[] =
{ {
"", // Dat_SEPARATOR_NONE [Dat_SEPARATOR_NONE ] = "",
", ", // Dat_SEPARATOR_COMMA [Dat_SEPARATOR_COMMA] = ", ",
"<br />", // Dat_SEPARATOR_BREAK [Dat_SEPARATOR_BREAK] = "<br />",
}; };
HTM_SCRIPT_Begin (NULL,NULL); HTM_SCRIPT_Begin (NULL,NULL);

View File

@ -571,8 +571,8 @@ void DT_GetListDegreeTypes (Hie_Level_t Scope,DT_Order_t Order)
{ {
static const char *OrderBySubQuery[DT_NUM_ORDERS] = static const char *OrderBySubQuery[DT_NUM_ORDERS] =
{ {
"DegTypName", // DT_ORDER_BY_DEGREE_TYPE [DT_ORDER_BY_DEGREE_TYPE] = "DegTypName",
"NumDegs DESC,DegTypName", // DT_ORDER_BY_NUM_DEGREES [DT_ORDER_BY_NUM_DEGREES] = "NumDegs DESC,DegTypName",
}; };
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;

View File

@ -300,8 +300,8 @@ void Dpt_GetListDepartments (long InsCod)
{ {
static const char *OrderBySubQuery[Dpt_NUM_ORDERS] = static const char *OrderBySubQuery[Dpt_NUM_ORDERS] =
{ {
"FullName", // Dpt_ORDER_BY_DEPARTMENT [Dpt_ORDER_BY_DEPARTMENT] = "FullName",
"NumTchs DESC,FullName", // Dpt_ORDER_BY_NUM_TCHS [Dpt_ORDER_BY_NUM_TCHS ] = "NumTchs DESC,FullName",
}; };
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
MYSQL_ROW row; MYSQL_ROW row;

View File

@ -57,18 +57,18 @@
static const bool Enr_ICanAdminOtherUsrs[Rol_NUM_ROLES] = static const bool Enr_ICanAdminOtherUsrs[Rol_NUM_ROLES] =
{ {
/* Users who can not admin */ /* Users who can not admin */
false, // Rol_UNK [Rol_UNK ] = false,
false, // Rol_GST [Rol_GST ] = false,
false, // Rol_USR [Rol_USR ] = false,
false, // Rol_STD [Rol_STD ] = false,
false, // Rol_NET [Rol_NET ] = false,
/* Users who can admin */ /* Users who can admin */
true, // Rol_TCH [Rol_TCH ] = true,
true, // Rol_DEG_ADM [Rol_DEG_ADM] = true,
true, // Rol_CTR_ADM [Rol_CTR_ADM] = true,
true, // Rol_INS_ADM [Rol_INS_ADM] = true,
true, // Rol_SYS_ADM [Rol_SYS_ADM] = true,
}; };
/*****************************************************************************/ /*****************************************************************************/
@ -3588,13 +3588,13 @@ static void Enr_ReqAddAdm (Hie_Level_t Scope,long Cod,const char *InsCtrDegName)
extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE; extern const char *Txt_Register_user_IN_A_COURSE_OR_DEGREE;
static const Act_Action_t Enr_ActNewAdm[Hie_NUM_LEVELS] = static const Act_Action_t Enr_ActNewAdm[Hie_NUM_LEVELS] =
{ {
ActUnk, // Hie_UNK [Hie_UNK] = ActUnk,
ActUnk, // Hie_SYS, [Hie_SYS] = ActUnk,
ActUnk, // Hie_CTY, [Hie_CTY] = ActUnk,
ActNewAdmIns, // Hie_INS, [Hie_INS] = ActNewAdmIns,
ActNewAdmCtr, // Hie_CTR, [Hie_CTR] = ActNewAdmCtr,
ActNewAdmDeg, // Hie_DEG, [Hie_DEG] = ActNewAdmDeg,
ActUnk, // Hie_CRS, [Hie_CRS] = ActUnk,
}; };
bool ICanRegister; bool ICanRegister;
@ -4170,13 +4170,13 @@ static void Enr_AskIfRemAdm (bool ItsMe,Hie_Level_t Scope,
extern const char *Txt_Remove_USER_as_an_administrator; extern const char *Txt_Remove_USER_as_an_administrator;
static const Act_Action_t Enr_ActRemAdm[Hie_NUM_LEVELS] = static const Act_Action_t Enr_ActRemAdm[Hie_NUM_LEVELS] =
{ {
ActUnk, // Hie_UNK [Hie_UNK] = ActUnk,
ActUnk, // Hie_SYS, [Hie_SYS] = ActUnk,
ActUnk, // Hie_CTY, [Hie_CTY] = ActUnk,
ActRemAdmIns, // Hie_INS, [Hie_INS] = ActRemAdmIns,
ActRemAdmCtr, // Hie_CTR, [Hie_CTR] = ActRemAdmCtr,
ActRemAdmDeg, // Hie_DEG, [Hie_DEG] = ActRemAdmDeg,
ActUnk, // Hie_CRS, [Hie_CRS] = ActUnk,
}; };
if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod)) if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod))

View File

@ -965,23 +965,19 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
const char *Width; const char *Width;
void (*FunctionToDrawContextualIcons) (void); void (*FunctionToDrawContextualIcons) (void);
const char *HelpLink; const char *HelpLink;
const char *ClassExaAnnouncement[Exa_NUM_VIEWS][Exa_NUM_STATUS] = static const char *ClassExaAnnouncement[Exa_NUM_VIEWS][Exa_NUM_STATUS] =
{ {
{ // Exa_NORMAL_VIEW [Exa_NORMAL_VIEW][Exa_VISIBLE_EXAM_ANNOUNCEMENT] = "EXA_ANN_VISIBLE",
"EXA_ANN_VISIBLE", // Exa_VISIBLE_EXAM_ANNOUNCEMENT [Exa_NORMAL_VIEW][Exa_HIDDEN_EXAM_ANNOUNCEMENT ] = "EXA_ANN_HIDDEN",
"EXA_ANN_HIDDEN", // Exa_HIDDEN_EXAM_ANNOUNCEMENT [Exa_NORMAL_VIEW][Exa_DELETED_EXAM_ANNOUNCEMENT] = NULL, // Not applicable here
NULL, // Exa_DELETED_EXAM_ANNOUNCEMENT, Not applicable here
}, [Exa_PRINT_VIEW ][Exa_VISIBLE_EXAM_ANNOUNCEMENT] = "EXA_ANN_VISIBLE",
{ // Exa_PRINT_VIEW [Exa_PRINT_VIEW ][Exa_HIDDEN_EXAM_ANNOUNCEMENT ] = "EXA_ANN_VISIBLE",
"EXA_ANN_VISIBLE", // Exa_VISIBLE_EXAM_ANNOUNCEMENT [Exa_PRINT_VIEW ][Exa_DELETED_EXAM_ANNOUNCEMENT] = NULL, // Not applicable here
"EXA_ANN_VISIBLE", // Exa_HIDDEN_EXAM_ANNOUNCEMENT
NULL, // Exa_DELETED_EXAM_ANNOUNCEMENT, Not applicable here [Exa_FORM_VIEW ][Exa_VISIBLE_EXAM_ANNOUNCEMENT] = "EXA_ANN_VISIBLE",
}, [Exa_FORM_VIEW ][Exa_HIDDEN_EXAM_ANNOUNCEMENT ] = "EXA_ANN_VISIBLE",
{ // Exa_FORM_VIEW [Exa_FORM_VIEW ][Exa_DELETED_EXAM_ANNOUNCEMENT] = NULL, // Not applicable here
"EXA_ANN_VISIBLE", // Exa_VISIBLE_EXAM_ANNOUNCEMENT
"EXA_ANN_VISIBLE", // Exa_HIDDEN_EXAM_ANNOUNCEMENT
NULL, // Exa_DELETED_EXAM_ANNOUNCEMENT, Not applicable here
},
}; };
/***** Get data of institution of this degree *****/ /***** Get data of institution of this degree *****/

File diff suppressed because it is too large Load Diff