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] =
{
" AND Hidden='N'", // Rol_UNK
" AND Hidden='N'", // Rol_GST
" AND Hidden='N'", // Rol_USR
" AND Hidden='N'", // Rol_STD
" AND Hidden='N'", // Rol_NET
"", // Rol_TCH
" AND Hidden='N'", // Rol_DEG_ADM
" AND Hidden='N'", // Rol_CTR_ADM
" AND Hidden='N'", // Rol_INS_ADM
"", // Rol_SYS_ADM
[Rol_UNK ] = " AND Hidden='N'",
[Rol_GST ] = " AND Hidden='N'",
[Rol_USR ] = " AND Hidden='N'",
[Rol_STD ] = " AND Hidden='N'",
[Rol_NET ] = " AND Hidden='N'",
[Rol_TCH ] = "",
[Rol_DEG_ADM] = " AND Hidden='N'",
[Rol_CTR_ADM] = " AND Hidden='N'",
[Rol_INS_ADM] = " AND Hidden='N'",
[Rol_SYS_ADM] = "",
};
static const char *OrderBySubQuery[Dat_NUM_START_END_TIME] =
{
"StartTime DESC,EndTime DESC,Title DESC", // Dat_START_TIME
"EndTime DESC,StartTime DESC,Title DESC", // Dat_END_TIME
[Dat_START_TIME] = "StartTime DESC,EndTime DESC,Title DESC",
[Dat_END_TIME ] = "EndTime DESC,StartTime DESC,Title DESC",
};
MYSQL_RES *mysql_res;
MYSQL_ROW row;

View File

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

View File

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

View File

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

View File

@ -488,14 +488,15 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
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 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: 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.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)

View File

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

View File

@ -52,38 +52,38 @@ extern struct Globals Gbl;
/***************************** 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 ******************************/
/*****************************************************************************/
const unsigned Dat_NumDaysMonth[1 + 12] =
static const unsigned Dat_NumDaysMonth[1 + 12] =
{
0,
31, // 1: January
28, // 2: February
31, // 3: Mars
30, // 4: April
31, // 5: May
30, // 6: June
31, // 7: July
31, // 8: Agoust
30, // 9: September
31, // 10: October
30, // 11: November
31, // 12: 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
[ 0] = 0,
[ 1] = 31, // January
[ 2] = 28, // February
[ 3] = 31, // March
[ 4] = 30, // April
[ 5] = 31, // May
[ 6] = 30, // June
[ 7] = 31, // July
[ 8] = 31, // Agoust
[ 9] = 30, // September
[10] = 31, // October
[11] = 30, // November
[12] = 31, // December
};
/*****************************************************************************/
@ -551,10 +551,10 @@ void Dat_WriteFormClientLocalDateTimeFromTimeUTC (const char *Id,
unsigned Hour;
unsigned Minute;
unsigned Second;
unsigned MinutesIInterval[Dat_NUM_FORM_SECONDS] =
static unsigned MinutesIInterval[Dat_NUM_FORM_SECONDS] =
{
5, // Dat_FORM_SECONDS_OFF
1, // Dat_FORM_SECONDS_ON
[Dat_FORM_SECONDS_OFF] = 5,
[Dat_FORM_SECONDS_ON ] = 1,
};
char *IdTimeUTC;
char *ParamNameTimeUTC;
@ -1043,30 +1043,30 @@ void Dat_GetIniEndDatesFromForm (void)
void Dat_WriteRFC822DateFromTM (FILE *File,struct tm *tm_ptr)
{
const char *StrDayOfWeek[7] =
static const char *StrDayOfWeek[7] =
{
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
[0] = "Sun",
[1] = "Mon",
[2] = "Tue",
[3] = "Wed",
[4] = "Thu",
[5] = "Fri",
[6] = "Sat",
};
const char *StrMonth[12] =
static const char *StrMonth[12] =
{
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
[ 0] = "Jan",
[ 1] = "Feb",
[ 2] = "Mar",
[ 3] = "Apr",
[ 4] = "May",
[ 5] = "Jun",
[ 6] = "Jul",
[ 7] = "Aug",
[ 8] = "Sep",
[ 9] = "Oct",
[10] = "Nov",
[11] = "Dec",
};
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;
static const char *SeparatorStr[] =
{
"", // Dat_SEPARATOR_NONE
", ", // Dat_SEPARATOR_COMMA
"<br />", // Dat_SEPARATOR_BREAK
[Dat_SEPARATOR_NONE ] = "",
[Dat_SEPARATOR_COMMA] = ",&nbsp;",
[Dat_SEPARATOR_BREAK] = "<br />",
};
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] =
{
"DegTypName", // DT_ORDER_BY_DEGREE_TYPE
"NumDegs DESC,DegTypName", // DT_ORDER_BY_NUM_DEGREES
[DT_ORDER_BY_DEGREE_TYPE] = "DegTypName",
[DT_ORDER_BY_NUM_DEGREES] = "NumDegs DESC,DegTypName",
};
MYSQL_RES *mysql_res;
MYSQL_ROW row;

View File

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

View File

@ -57,18 +57,18 @@
static const bool Enr_ICanAdminOtherUsrs[Rol_NUM_ROLES] =
{
/* Users who can not admin */
false, // Rol_UNK
false, // Rol_GST
false, // Rol_USR
false, // Rol_STD
false, // Rol_NET
[Rol_UNK ] = false,
[Rol_GST ] = false,
[Rol_USR ] = false,
[Rol_STD ] = false,
[Rol_NET ] = false,
/* Users who can admin */
true, // Rol_TCH
true, // Rol_DEG_ADM
true, // Rol_CTR_ADM
true, // Rol_INS_ADM
true, // Rol_SYS_ADM
[Rol_TCH ] = true,
[Rol_DEG_ADM] = true,
[Rol_CTR_ADM] = true,
[Rol_INS_ADM] = true,
[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;
static const Act_Action_t Enr_ActNewAdm[Hie_NUM_LEVELS] =
{
ActUnk, // Hie_UNK
ActUnk, // Hie_SYS,
ActUnk, // Hie_CTY,
ActNewAdmIns, // Hie_INS,
ActNewAdmCtr, // Hie_CTR,
ActNewAdmDeg, // Hie_DEG,
ActUnk, // Hie_CRS,
[Hie_UNK] = ActUnk,
[Hie_SYS] = ActUnk,
[Hie_CTY] = ActUnk,
[Hie_INS] = ActNewAdmIns,
[Hie_CTR] = ActNewAdmCtr,
[Hie_DEG] = ActNewAdmDeg,
[Hie_CRS] = ActUnk,
};
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;
static const Act_Action_t Enr_ActRemAdm[Hie_NUM_LEVELS] =
{
ActUnk, // Hie_UNK
ActUnk, // Hie_SYS,
ActUnk, // Hie_CTY,
ActRemAdmIns, // Hie_INS,
ActRemAdmCtr, // Hie_CTR,
ActRemAdmDeg, // Hie_DEG,
ActUnk, // Hie_CRS,
[Hie_UNK] = ActUnk,
[Hie_SYS] = ActUnk,
[Hie_CTY] = ActUnk,
[Hie_INS] = ActRemAdmIns,
[Hie_CTR] = ActRemAdmCtr,
[Hie_DEG] = ActRemAdmDeg,
[Hie_CRS] = ActUnk,
};
if (Usr_ChkIfUsrCodExists (Gbl.Usrs.Other.UsrDat.UsrCod))

View File

@ -965,23 +965,19 @@ static void Exa_ShowExamAnnouncement (long ExaCod,
const char *Width;
void (*FunctionToDrawContextualIcons) (void);
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_ANN_VISIBLE", // Exa_VISIBLE_EXAM_ANNOUNCEMENT
"EXA_ANN_HIDDEN", // Exa_HIDDEN_EXAM_ANNOUNCEMENT
NULL, // Exa_DELETED_EXAM_ANNOUNCEMENT, Not applicable here
},
{ // Exa_PRINT_VIEW
"EXA_ANN_VISIBLE", // Exa_VISIBLE_EXAM_ANNOUNCEMENT
"EXA_ANN_VISIBLE", // Exa_HIDDEN_EXAM_ANNOUNCEMENT
NULL, // Exa_DELETED_EXAM_ANNOUNCEMENT, Not applicable here
},
{ // Exa_FORM_VIEW
"EXA_ANN_VISIBLE", // Exa_VISIBLE_EXAM_ANNOUNCEMENT
"EXA_ANN_VISIBLE", // Exa_HIDDEN_EXAM_ANNOUNCEMENT
NULL, // Exa_DELETED_EXAM_ANNOUNCEMENT, Not applicable here
},
[Exa_NORMAL_VIEW][Exa_VISIBLE_EXAM_ANNOUNCEMENT] = "EXA_ANN_VISIBLE",
[Exa_NORMAL_VIEW][Exa_HIDDEN_EXAM_ANNOUNCEMENT ] = "EXA_ANN_HIDDEN",
[Exa_NORMAL_VIEW][Exa_DELETED_EXAM_ANNOUNCEMENT] = NULL, // Not applicable here
[Exa_PRINT_VIEW ][Exa_VISIBLE_EXAM_ANNOUNCEMENT] = "EXA_ANN_VISIBLE",
[Exa_PRINT_VIEW ][Exa_HIDDEN_EXAM_ANNOUNCEMENT ] = "EXA_ANN_VISIBLE",
[Exa_PRINT_VIEW ][Exa_DELETED_EXAM_ANNOUNCEMENT] = NULL, // 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_DELETED_EXAM_ANNOUNCEMENT] = NULL, // Not applicable here
};
/***** Get data of institution of this degree *****/

File diff suppressed because it is too large Load Diff