mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 14:25:27 +02:00
Version 15.222.1
This commit is contained in:
parent
d823690c63
commit
77014a0cb1
|
@ -135,13 +135,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.222 (2016-06-09)"
|
#define Log_PLATFORM_VERSION "SWAD 15.222.1 (2016-06-09)"
|
||||||
#define CSS_FILE "swad15.218.css"
|
#define CSS_FILE "swad15.218.css"
|
||||||
#define JS_FILE "swad15.216.js"
|
#define JS_FILE "swad15.216.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 15.222.1: Jun 09, 2016 Optimization in number of indicators. (202230 lines)
|
||||||
Version 15.222: Jun 09, 2016 Number of indicators is stored in table of courses. (202224 lines)
|
Version 15.222: Jun 09, 2016 Number of indicators is stored in table of courses. (202224 lines)
|
||||||
Version 15.221.4: Jun 09, 2016 New columns in table of courses to store number of indicators. (202153 lines)
|
Version 15.221.4: Jun 09, 2016 New columns in table of courses to store number of indicators. (202153 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
|
|
|
@ -71,7 +71,10 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1
|
||||||
unsigned NumCrss,bool PutForm);
|
unsigned NumCrss,bool PutForm);
|
||||||
static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t IndicatorsLayout,
|
static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t IndicatorsLayout,
|
||||||
unsigned NumCrss,MYSQL_RES *mysql_res);
|
unsigned NumCrss,MYSQL_RES *mysql_res);
|
||||||
static void Ind_StoreIndicatorsCrs (long CrsCod,unsigned NumIndicators);
|
static int Ind_GetNumIndicatorsCrsFromDB (long CrsCod);
|
||||||
|
static void Ind_StoreIndicatorsCrsIntoDB (long CrsCod,unsigned NumIndicators);
|
||||||
|
static void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
||||||
|
struct Ind_IndicatorsCrs *Indicators);
|
||||||
static unsigned long Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod);
|
static unsigned long Ind_GetNumFilesInDocumZonesOfCrsFromDB (long CrsCod);
|
||||||
static unsigned long Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod);
|
static unsigned long Ind_GetNumFilesInShareZonesOfCrsFromDB (long CrsCod);
|
||||||
static unsigned long Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod);
|
static unsigned long Ind_GetNumFilesInAssigZonesOfCrsFromDB (long CrsCod);
|
||||||
|
@ -705,7 +708,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
||||||
long CrsCod;
|
long CrsCod;
|
||||||
unsigned NumTchs;
|
unsigned NumTchs;
|
||||||
unsigned NumStds;
|
unsigned NumStds;
|
||||||
int NumIndicatorsFromDB;
|
unsigned NumIndicators;
|
||||||
struct Ind_IndicatorsCrs Indicators;
|
struct Ind_IndicatorsCrs Indicators;
|
||||||
|
|
||||||
/***** Table start *****/
|
/***** Table start *****/
|
||||||
|
@ -985,10 +988,14 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
||||||
if ((CrsCod = Str_ConvertStrCodToLongCod (row[2])) < 0)
|
if ((CrsCod = Str_ConvertStrCodToLongCod (row[2])) < 0)
|
||||||
Lay_ShowErrorAndExit ("Wrong code of course.");
|
Lay_ShowErrorAndExit ("Wrong code of course.");
|
||||||
|
|
||||||
/* Compute indicators of this course */
|
/* Get stored number of indicators of this course */
|
||||||
NumIndicatorsFromDB = Ind_GetNumIndicatorsCrsFromDB (CrsCod);
|
NumIndicators = Ind_GetAndUpdateNumIndicatorsCrs (CrsCod);
|
||||||
Ind_ComputeAndStoreIndicatorsCrs (CrsCod,NumIndicatorsFromDB,&Indicators);
|
if (Gbl.Stat.IndicatorsSelected[NumIndicators])
|
||||||
|
{
|
||||||
|
/* Compute and store indicators */
|
||||||
|
Ind_ComputeAndStoreIndicatorsCrs (CrsCod,(int) NumIndicators,&Indicators);
|
||||||
|
|
||||||
|
/* The number of indicators may have changed */
|
||||||
if (Gbl.Stat.IndicatorsSelected[Indicators.CountIndicators])
|
if (Gbl.Stat.IndicatorsSelected[Indicators.CountIndicators])
|
||||||
{
|
{
|
||||||
/* Write a row for this course */
|
/* Write a row for this course */
|
||||||
|
@ -1338,6 +1345,7 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
fprintf (Gbl.F.Out,"</table>");
|
fprintf (Gbl.F.Out,"</table>");
|
||||||
|
@ -1370,7 +1378,7 @@ unsigned Ind_GetAndUpdateNumIndicatorsCrs (long CrsCod)
|
||||||
/************ Get number of indicators of a course from database *************/
|
/************ Get number of indicators of a course from database *************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
int Ind_GetNumIndicatorsCrsFromDB (long CrsCod)
|
static int Ind_GetNumIndicatorsCrsFromDB (long CrsCod)
|
||||||
{
|
{
|
||||||
char Query[128];
|
char Query[128];
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
|
@ -1400,7 +1408,7 @@ int Ind_GetNumIndicatorsCrsFromDB (long CrsCod)
|
||||||
/************ Store number of indicators of a course in database *************/
|
/************ Store number of indicators of a course in database *************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Ind_StoreIndicatorsCrs (long CrsCod,unsigned NumIndicators)
|
static void Ind_StoreIndicatorsCrsIntoDB (long CrsCod,unsigned NumIndicators)
|
||||||
{
|
{
|
||||||
char Query[128];
|
char Query[128];
|
||||||
|
|
||||||
|
@ -1416,7 +1424,7 @@ static void Ind_StoreIndicatorsCrs (long CrsCod,unsigned NumIndicators)
|
||||||
/* If number of indicators stored in database is different
|
/* If number of indicators stored in database is different
|
||||||
from number of indicators just computed ==> update it into database */
|
from number of indicators just computed ==> update it into database */
|
||||||
|
|
||||||
void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
static void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
||||||
struct Ind_IndicatorsCrs *Indicators)
|
struct Ind_IndicatorsCrs *Indicators)
|
||||||
{
|
{
|
||||||
/***** Initialize number of indicators *****/
|
/***** Initialize number of indicators *****/
|
||||||
|
@ -1477,7 +1485,7 @@ void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
||||||
/***** Update number of indicators into database
|
/***** Update number of indicators into database
|
||||||
if different to the stored one *****/
|
if different to the stored one *****/
|
||||||
if (NumIndicatorsFromDB != (int) Indicators->CountIndicators)
|
if (NumIndicatorsFromDB != (int) Indicators->CountIndicators)
|
||||||
Ind_StoreIndicatorsCrs (CrsCod,Indicators->CountIndicators);
|
Ind_StoreIndicatorsCrsIntoDB (CrsCod,Indicators->CountIndicators);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -66,8 +66,5 @@ struct Ind_IndicatorsCrs
|
||||||
void Ind_ReqIndicatorsCourses (void);
|
void Ind_ReqIndicatorsCourses (void);
|
||||||
void Ind_ShowIndicatorsCourses (void);
|
void Ind_ShowIndicatorsCourses (void);
|
||||||
unsigned Ind_GetAndUpdateNumIndicatorsCrs (long CrsCod);
|
unsigned Ind_GetAndUpdateNumIndicatorsCrs (long CrsCod);
|
||||||
int Ind_GetNumIndicatorsCrsFromDB (long CrsCod);
|
|
||||||
void Ind_ComputeAndStoreIndicatorsCrs (long CrsCod,int NumIndicatorsFromDB,
|
|
||||||
struct Ind_IndicatorsCrs *Indicators);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user