mirror of https://github.com/acanas/swad-core.git
Version 18.49.1
This commit is contained in:
parent
264394d5d6
commit
0a9f354212
|
@ -5268,7 +5268,7 @@ void Act_AdjustCurrentAction (void)
|
|||
with available groups in which I must register,
|
||||
the only action possible
|
||||
is show a form to register in groups *****/
|
||||
if (Grp_GetIfAnyMandatoryGrpTypIsAvailable (-1L)) // This query may be slow
|
||||
if (Grp_GetIfAvailableGrpTyp (-1L)) // This query may be slow
|
||||
{
|
||||
Gbl.Action.Act = ActReqSelGrp;
|
||||
Tab_SetCurrentTab ();
|
||||
|
|
|
@ -403,10 +403,11 @@ En OpenSWAD:
|
|||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.49 (2019-02-18)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 18.49.1 (2019-02-18)"
|
||||
#define CSS_FILE "swad18.41.1.css"
|
||||
#define JS_FILE "swad18.32.1.js"
|
||||
/*
|
||||
Version 18.49.1: Feb 18, 2019 Optimization in query about available mandatory group types. (237381 lines)
|
||||
Version 18.49: Feb 18, 2019 Optimizations adjusting actions.
|
||||
Fixed bug in query about available mandatory group types. (237378 lines)
|
||||
1 change necessary in database:
|
||||
|
|
|
@ -1901,7 +1901,7 @@ static void Grp_ShowWarningToStdsToChangeGrps (void)
|
|||
// If I don't belong to any group
|
||||
if (!Grp_CheckIfIBelongToGrpsOfType (GrpTyp->GrpTypCod)) // Fast check (not necesary, but avoid slow check)
|
||||
// If there is any group of this type available
|
||||
if (Grp_GetIfAnyMandatoryGrpTypIsAvailable (GrpTyp->GrpTypCod)) // Slow check
|
||||
if (Grp_GetIfAvailableGrpTyp (GrpTyp->GrpTypCod)) // Slow check
|
||||
{
|
||||
if (GrpTyp->MandatoryEnrolment)
|
||||
Ale_ShowAlert (Ale_WARNING,GrpTyp->MultipleEnrolment ? Txt_You_have_to_register_compulsorily_at_least_in_one_group_of_type_X :
|
||||
|
@ -3479,12 +3479,12 @@ bool Grp_CheckIfUsrSharesAnyOfMyGrpsInCurrentCrs (const struct UsrData *UsrDat)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**** Query if any mandatory group in this course is open and has vacants ****/
|
||||
/**** Get if any group in group-type/this-course is open and has vacants *****/
|
||||
/*****************************************************************************/
|
||||
// If GrpTypCod > 0 ==> restrict to the given group type, mandatory or not
|
||||
// If GrpTypCod <= 0 ==> all mandatory group types in the current course
|
||||
|
||||
bool Grp_GetIfAnyMandatoryGrpTypIsAvailable (long GrpTypCod)
|
||||
bool Grp_GetIfAvailableGrpTyp (long GrpTypCod)
|
||||
{
|
||||
unsigned NumGrpTypes;
|
||||
char *SubQueryGrpTypes;
|
||||
|
@ -3554,6 +3554,8 @@ bool Grp_GetIfAnyMandatoryGrpTypIsAvailable (long GrpTypCod)
|
|||
" FROM crs_grp_types,crs_grp,crs_grp_usr"
|
||||
" WHERE %s" // Which group types?
|
||||
" AND crs_grp_types.GrpTypCod=crs_grp.GrpTypCod"
|
||||
" AND crs_grp.Open='Y'" // Open
|
||||
" AND crs_grp.MaxStudents>0" // Admits students
|
||||
" AND crs_grp.GrpCod=crs_grp_usr.GrpCod"
|
||||
" AND crs_grp_usr.UsrCod=%ld)", // I belong
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ bool Grp_GetIfIBelongToGrp (long GrpCod);
|
|||
void Grp_FlushCacheUsrSharesAnyOfMyGrpsInCurrentCrs (void);
|
||||
bool Grp_CheckIfUsrSharesAnyOfMyGrpsInCurrentCrs (const struct UsrData *UsrDat);
|
||||
|
||||
bool Grp_GetIfAnyMandatoryGrpTypIsAvailable (long GrpTypCod);
|
||||
bool Grp_GetIfAvailableGrpTyp (long GrpTypCod);
|
||||
|
||||
void Grp_GetLstCodGrpsWithFileZonesIBelong (struct ListCodGrps *LstGrps);
|
||||
void Grp_GetNamesGrpsStdBelongsTo (long GrpTypCod,long UsrCod,char *GrpNames);
|
||||
|
|
Loading…
Reference in New Issue