Version 16.111.10

This commit is contained in:
Antonio Cañas Vargas 2016-12-29 22:19:46 +01:00
parent 9d4de6d57a
commit bd0261eddb
2 changed files with 15 additions and 7 deletions

View File

@ -189,13 +189,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.111.9 (2016-12-29)" #define Log_PLATFORM_VERSION "SWAD 16.111.10 (2016-12-29)"
#define CSS_FILE "swad16.111.5.css" #define CSS_FILE "swad16.111.5.css"
#define JS_FILE "swad16.101.js" #define JS_FILE "swad16.101.js"
// Number of lines (includes comments but not blank lines) has been got with the following command: // Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1 // nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/* /*
Version 16.111.10:Dec 29, 2016 Fixed minor bug in groups, reported by Coverity. (211146 lines)
Version 16.111.9: Dec 29, 2016 Fixed bugs in lstat, reported by Coverity. (211138 lines) Version 16.111.9: Dec 29, 2016 Fixed bugs in lstat, reported by Coverity. (211138 lines)
Version 16.111.8: Dec 28, 2016 Fixed bug in notifications, reported by Coverity. (211119 lines) Version 16.111.8: Dec 28, 2016 Fixed bug in notifications, reported by Coverity. (211119 lines)
Version 16.111.7: Dec 28, 2016 Fixed minor bug in groups, reported by Coverity. (211114 lines) Version 16.111.7: Dec 28, 2016 Fixed minor bug in groups, reported by Coverity. (211114 lines)

View File

@ -527,8 +527,8 @@ void Grp_ChangeMyGrps (void)
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** Get the group codes which I want to join to *****/ /***** Get the group codes which I want to join to *****/
LstGrpsIWant.NumGrps = 0; // Initialized to avoid bug reported by Coverity
LstGrpsIWant.GrpCod = NULL; // Initialized to avoid bug reported by Coverity LstGrpsIWant.GrpCod = NULL; // Initialized to avoid bug reported by Coverity
LstGrpsIWant.NumGrps = 0; // Initialized to avoid bug reported by Coverity
Grp_GetLstCodsGrpWanted (&LstGrpsIWant); Grp_GetLstCodsGrpWanted (&LstGrpsIWant);
/***** A student can not be enrolled in more than one group /***** A student can not be enrolled in more than one group
@ -577,8 +577,8 @@ void Grp_ChangeOtherUsrGrps (void)
Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS); Grp_GetListGrpTypesAndGrpsInThisCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
/***** Get the list of groups to which register this user *****/ /***** Get the list of groups to which register this user *****/
LstGrpsUsrWants.NumGrps = 0; // Initialized to avoid bug reported by Coverity // LstGrpsUsrWants.GrpCod = NULL; // Initialized to avoid bug reported by Coverity
LstGrpsUsrWants.GrpCod = NULL; // Initialized to avoid bug reported by Coverity // LstGrpsUsrWants.NumGrps = 0; // Initialized to avoid bug reported by Coverity
Grp_GetLstCodsGrpWanted (&LstGrpsUsrWants); Grp_GetLstCodsGrpWanted (&LstGrpsUsrWants);
/***** A student can not be enrolled in more than one group /***** A student can not be enrolled in more than one group
@ -922,7 +922,10 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
extern const char *Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged; extern const char *Txt_THE_USER_X_has_been_removed_from_the_group_of_type_Y_to_which_it_belonged;
extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_group_of_type_Y_Z; extern const char *Txt_THE_USER_X_has_been_enrolled_in_the_group_of_type_Y_Z;
struct ListCodGrps LstGrpsHeBelongs; struct ListCodGrps LstGrpsHeBelongs;
unsigned NumGrpTyp,NumGrpSel,NumGrpThisType,NumGrpHeBelongs; unsigned NumGrpTyp;
unsigned NumGrpSel;
unsigned NumGrpThisType;
unsigned NumGrpHeBelongs;
bool MultipleEnrollment; bool MultipleEnrollment;
bool AlreadyRegisteredInGrp; bool AlreadyRegisteredInGrp;
@ -934,6 +937,8 @@ void Grp_RegisterUsrIntoGroups (struct UsrData *UsrDat,struct ListCodGrps *LstGr
MultipleEnrollment = Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment; MultipleEnrollment = Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MultipleEnrollment;
/***** Query in the database the group codes of any group of this type the student belongs to *****/ /***** Query in the database the group codes of any group of this type the student belongs to *****/
// LstGrpsHeBelongs.NumGrps = 0; // Initialized to avoid bug reported by Coverity
// LstGrpsHeBelongs.GrpCod = NULL;// Initialized to avoid bug reported by Coverity
Grp_GetLstCodGrpsUsrBelongs (Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod, Grp_GetLstCodGrpsUsrBelongs (Gbl.CurrentCrs.Crs.CrsCod,Gbl.CurrentCrs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod,
UsrDat->UsrCod,&LstGrpsHeBelongs); UsrDat->UsrCod,&LstGrpsHeBelongs);
@ -4201,13 +4206,15 @@ void Grp_GetLstCodsGrpWanted (struct ListCodGrps *LstGrpsWanted)
} }
/*****************************************************************************/ /*****************************************************************************/
/************************* Liberar list of group codes ***********************/ /************************** Free list of group codes *************************/
/*****************************************************************************/ /*****************************************************************************/
void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps) void Grp_FreeListCodGrp (struct ListCodGrps *LstGrps)
{ {
if (LstGrps->NumGrps) if (LstGrps->NumGrps && LstGrps->GrpCod)
free ((void *) LstGrps->GrpCod); free ((void *) LstGrps->GrpCod);
LstGrps->GrpCod = NULL;
LstGrps->NumGrps = 0;
} }
/*****************************************************************************/ /*****************************************************************************/