mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-03 15:25:22 +02:00
Version 15.66.1
This commit is contained in:
parent
3681e3281c
commit
fe76ba8a67
|
@ -707,24 +707,6 @@ static void Ctr_ListOneCentreForSeeing (struct Centre *Ctr,unsigned NumCtr)
|
||||||
TxtClassNormal,BgColor,
|
TxtClassNormal,BgColor,
|
||||||
Ctr->NumCrss);
|
Ctr->NumCrss);
|
||||||
|
|
||||||
/***** Number of teachers in courses of this centre *****/
|
|
||||||
/*
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
TxtClassNormal,BgColor,
|
|
||||||
Ctr->NumTchs);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/***** Number of students in courses of this centre *****/
|
|
||||||
/*
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
TxtClassNormal,BgColor,
|
|
||||||
Ctr->NumStds);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/***** Number of users in courses of this centre *****/
|
/***** Number of users in courses of this centre *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||||
"%u"
|
"%u"
|
||||||
|
@ -909,9 +891,7 @@ void Ctr_GetListCentres (long InsCod)
|
||||||
Ctr->NumCrss = Crs_GetNumCrssInCtr (Ctr->CtrCod);
|
Ctr->NumCrss = Crs_GetNumCrssInCtr (Ctr->CtrCod);
|
||||||
|
|
||||||
/* Get number of users in courses of this centre */
|
/* Get number of users in courses of this centre */
|
||||||
Ctr->NumUsrs = Usr_GetNumUsrsInCrssOfCtr (Rol_UNKNOWN,Ctr->CtrCod); // Here Rol_UNKNOWN means "all users", NumUsrs <= NumStds + NumTchs
|
Ctr->NumUsrs = Usr_GetNumUsrsInCrssOfCtr (Rol_UNKNOWN,Ctr->CtrCod); // Here Rol_UNKNOWN means "all users"
|
||||||
// Ctr->NumTchs = Usr_GetNumUsrsInCrssOfCtr (Rol_TEACHER,Ctr->CtrCod);
|
|
||||||
// Ctr->NumStds = Usr_GetNumUsrsInCrssOfCtr (Rol_STUDENT,Ctr->CtrCod);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -941,11 +921,8 @@ bool Ctr_GetDataOfCentreByCod (struct Centre *Ctr)
|
||||||
Ctr->FullName[0] = '\0';
|
Ctr->FullName[0] = '\0';
|
||||||
Ctr->WWW[0] = '\0';
|
Ctr->WWW[0] = '\0';
|
||||||
Ctr->NumUsrsWhoClaimToBelongToCtr = 0;
|
Ctr->NumUsrsWhoClaimToBelongToCtr = 0;
|
||||||
Ctr->NumDegs = 0;
|
Ctr->NumDegs = Ctr->NumCrss = 0;
|
||||||
Ctr->NumCrss = 0;
|
|
||||||
Ctr->NumUsrs = 0;
|
Ctr->NumUsrs = 0;
|
||||||
// Ctr->NumTchs = 0;
|
|
||||||
// Ctr->NumStds = 0;
|
|
||||||
|
|
||||||
/***** Check if centre code is correct *****/
|
/***** Check if centre code is correct *****/
|
||||||
if (Ctr->CtrCod > 0)
|
if (Ctr->CtrCod > 0)
|
||||||
|
@ -1008,9 +985,7 @@ bool Ctr_GetDataOfCentreByCod (struct Centre *Ctr)
|
||||||
Ctr->NumCrss = Crs_GetNumCrssInCtr (Ctr->CtrCod);
|
Ctr->NumCrss = Crs_GetNumCrssInCtr (Ctr->CtrCod);
|
||||||
|
|
||||||
/* Get number of users in courses of this centre */
|
/* Get number of users in courses of this centre */
|
||||||
Ctr->NumUsrs = Usr_GetNumUsrsInCrssOfCtr (Rol_UNKNOWN,Ctr->CtrCod); // Here Rol_UNKNOWN means "all users", NumUsrs <= NumStds + NumTchs
|
Ctr->NumUsrs = Usr_GetNumUsrsInCrssOfCtr (Rol_UNKNOWN,Ctr->CtrCod); // Here Rol_UNKNOWN means "all users"
|
||||||
// Ctr->NumTchs = Usr_GetNumUsrsInCrssOfCtr (Rol_TEACHER,Ctr->CtrCod);
|
|
||||||
// Ctr->NumStds = Usr_GetNumUsrsInCrssOfCtr (Rol_STUDENT,Ctr->CtrCod);
|
|
||||||
|
|
||||||
/* Set return value */
|
/* Set return value */
|
||||||
CtrFound = true;
|
CtrFound = true;
|
||||||
|
@ -1402,22 +1377,6 @@ static void Ctr_ListCentresForEdition (void)
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Number of teachers */
|
|
||||||
/*
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
Ctr->NumTchs);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Number of degrees */
|
|
||||||
/*
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
Ctr->NumDegs);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Centre status */
|
/* Centre status */
|
||||||
StatusTxt = Ctr_GetStatusTxtFromStatusBits (Ctr->Status);
|
StatusTxt = Ctr_GetStatusTxtFromStatusBits (Ctr->Status);
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT STATUS\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT STATUS\">");
|
||||||
|
@ -2234,12 +2193,6 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable)
|
||||||
"<th class=\"LEFT_MIDDLE\">"
|
"<th class=\"LEFT_MIDDLE\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
// "<th class=\"LEFT_MIDDLE\">"
|
|
||||||
// "%s"
|
|
||||||
// "</th>"
|
|
||||||
// "<th class=\"LEFT_MIDDLE\">"
|
|
||||||
// "%s"
|
|
||||||
// "</th>"
|
|
||||||
"<th class=\"LEFT_MIDDLE\">"
|
"<th class=\"LEFT_MIDDLE\">"
|
||||||
"%s+<br />%s"
|
"%s+<br />%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
|
@ -2250,8 +2203,6 @@ static void Ctr_PutHeadCentresForSeeing (bool OrderSelectable)
|
||||||
Txt_Place,
|
Txt_Place,
|
||||||
Txt_Degrees_ABBREVIATION,
|
Txt_Degrees_ABBREVIATION,
|
||||||
Txt_Courses_ABBREVIATION,
|
Txt_Courses_ABBREVIATION,
|
||||||
// Txt_Teachers_ABBREVIATION,
|
|
||||||
// Txt_Students_ABBREVIATION,
|
|
||||||
Txt_Teachers_ABBREVIATION,
|
Txt_Teachers_ABBREVIATION,
|
||||||
Txt_Students_ABBREVIATION,
|
Txt_Students_ABBREVIATION,
|
||||||
Txt_Status);
|
Txt_Status);
|
||||||
|
|
|
@ -71,8 +71,6 @@ struct Centre
|
||||||
unsigned NumDegs; // Number of degrees in this centre
|
unsigned NumDegs; // Number of degrees in this centre
|
||||||
unsigned NumCrss; // Number of courses in this centre
|
unsigned NumCrss; // Number of courses in this centre
|
||||||
unsigned NumUsrs; // Number of users in courses of this centre
|
unsigned NumUsrs; // Number of users in courses of this centre
|
||||||
// unsigned NumTchs; // Number of teachers in courses of this centre
|
|
||||||
// unsigned NumStds; // Number of students in courses of this centre
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
@ -120,12 +120,13 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.66 (2015/12/14)"
|
#define Log_PLATFORM_VERSION "SWAD 15.66.1 (2015/12/14)"
|
||||||
#define CSS_FILE "swad15.65.1.css"
|
#define CSS_FILE "swad15.65.1.css"
|
||||||
|
|
||||||
// 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.66.1: Dec 14, 2015 Removed unused code related to list of countries, institutions and centres by reasons of speed. (186966 lines)
|
||||||
Version 15.66: Dec 14, 2015 Number of teachers and number of students removed from list of countries, institutions and centres by reasons of speed. (187057 lines)
|
Version 15.66: Dec 14, 2015 Number of teachers and number of students removed from list of countries, institutions and centres by reasons of speed. (187057 lines)
|
||||||
Version 15.65.1: Dec 14, 2015 Changes in layout of profile. (187031 lines)
|
Version 15.65.1: Dec 14, 2015 Changes in layout of profile. (187031 lines)
|
||||||
Version 15.65: Dec 13, 2015 Change in layout of contextual links. (187009 lines)
|
Version 15.65: Dec 13, 2015 Change in layout of contextual links. (187009 lines)
|
||||||
|
|
|
@ -587,12 +587,6 @@ void Cty_ListCountries2 (void)
|
||||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||||
"%u"
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
// "<td class=\"DAT RIGHT_MIDDLE %s\">"
|
|
||||||
// "%u"
|
|
||||||
// "</td>"
|
|
||||||
// "<td class=\"DAT RIGHT_MIDDLE %s\">"
|
|
||||||
// "%u"
|
|
||||||
// "</td>"
|
|
||||||
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
"<td class=\"DAT RIGHT_MIDDLE %s\">"
|
||||||
"%u"
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
|
@ -602,8 +596,6 @@ void Cty_ListCountries2 (void)
|
||||||
BgColor,Gbl.Ctys.Lst[NumCty].NumCtrs,
|
BgColor,Gbl.Ctys.Lst[NumCty].NumCtrs,
|
||||||
BgColor,Gbl.Ctys.Lst[NumCty].NumDegs,
|
BgColor,Gbl.Ctys.Lst[NumCty].NumDegs,
|
||||||
BgColor,Gbl.Ctys.Lst[NumCty].NumCrss,
|
BgColor,Gbl.Ctys.Lst[NumCty].NumCrss,
|
||||||
// BgColor,Gbl.Ctys.Lst[NumCty].NumTchs,
|
|
||||||
// BgColor,Gbl.Ctys.Lst[NumCty].NumStds,
|
|
||||||
BgColor,Gbl.Ctys.Lst[NumCty].NumUsrs);
|
BgColor,Gbl.Ctys.Lst[NumCty].NumUsrs);
|
||||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||||
}
|
}
|
||||||
|
@ -675,12 +667,6 @@ void Cty_ListCountries2 (void)
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
"%u"
|
"%u"
|
||||||
"</td>"
|
"</td>"
|
||||||
// "<td class=\"DAT RIGHT_MIDDLE\">"
|
|
||||||
// "0"
|
|
||||||
// "</td>"
|
|
||||||
// "<td class=\"DAT RIGHT_MIDDLE\">"
|
|
||||||
// "0"
|
|
||||||
// "</td>"
|
|
||||||
"<td class=\"DAT RIGHT_MIDDLE\">"
|
"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
"0"
|
"0"
|
||||||
"</td>"
|
"</td>"
|
||||||
|
@ -1020,7 +1006,6 @@ void Cty_GetListCountries (Cty_GetExtraData_t GetExtraData)
|
||||||
}
|
}
|
||||||
Cty->NumUsrsWhoClaimToBelongToCty = 0;
|
Cty->NumUsrsWhoClaimToBelongToCty = 0;
|
||||||
Cty->NumInss = Cty->NumCtrs = Cty->NumDegs = Cty->NumCrss = 0;
|
Cty->NumInss = Cty->NumCtrs = Cty->NumDegs = Cty->NumCrss = 0;
|
||||||
// Cty->NumUsrs = Cty->NumTchs = Cty->NumStds = 0;
|
|
||||||
Cty->NumUsrs = 0;
|
Cty->NumUsrs = 0;
|
||||||
|
|
||||||
/* Get the name of the country in current language */
|
/* Get the name of the country in current language */
|
||||||
|
@ -1053,9 +1038,7 @@ void Cty_GetListCountries (Cty_GetExtraData_t GetExtraData)
|
||||||
Cty->NumCrss = Crs_GetNumCrssInCty (Cty->CtyCod);
|
Cty->NumCrss = Crs_GetNumCrssInCty (Cty->CtyCod);
|
||||||
|
|
||||||
/* Get number of users in courses of this country */
|
/* Get number of users in courses of this country */
|
||||||
Cty->NumUsrs = Usr_GetNumUsrsInCrssOfCty (Rol_UNKNOWN,Cty->CtyCod); // Here Rol_UNKNOWN means "all users", NumUsrs <= NumStds + NumTchs
|
Cty->NumUsrs = Usr_GetNumUsrsInCrssOfCty (Rol_UNKNOWN,Cty->CtyCod); // Here Rol_UNKNOWN means "all users"
|
||||||
// Cty->NumStds = Usr_GetNumUsrsInCrssOfCty (Rol_STUDENT,Cty->CtyCod);
|
|
||||||
// Cty->NumTchs = Usr_GetNumUsrsInCrssOfCty (Rol_TEACHER,Cty->CtyCod);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1181,10 +1164,8 @@ bool Cty_GetDataOfCountryByCod (struct Country *Cty,Cty_GetExtraData_t GetExtraD
|
||||||
Cty->WWW[Lan][0] = '\0';
|
Cty->WWW[Lan][0] = '\0';
|
||||||
}
|
}
|
||||||
Cty->NumUsrsWhoClaimToBelongToCty = 0;
|
Cty->NumUsrsWhoClaimToBelongToCty = 0;
|
||||||
|
Cty->NumInss = Cty->NumCtrs = Cty->NumDegs = Cty->NumCrss = 0;
|
||||||
Cty->NumUsrs = 0;
|
Cty->NumUsrs = 0;
|
||||||
// Cty->NumStds = 0;
|
|
||||||
// Cty->NumTchs = 0;
|
|
||||||
Cty->NumInss = 0;
|
|
||||||
|
|
||||||
/***** Check if country code is correct *****/
|
/***** Check if country code is correct *****/
|
||||||
if (Cty->CtyCod == 0)
|
if (Cty->CtyCod == 0)
|
||||||
|
@ -1280,9 +1261,7 @@ bool Cty_GetDataOfCountryByCod (struct Country *Cty,Cty_GetExtraData_t GetExtraD
|
||||||
Cty->NumUsrsWhoClaimToBelongToCty = 0;
|
Cty->NumUsrsWhoClaimToBelongToCty = 0;
|
||||||
|
|
||||||
/* Get number of user in courses of this institution */
|
/* Get number of user in courses of this institution */
|
||||||
Cty->NumUsrs = Usr_GetNumUsrsInCrssOfCty (Rol_UNKNOWN,Cty->CtyCod); // Here Rol_UNKNOWN means "all users", NumUsrs <= NumStds + NumTchs
|
Cty->NumUsrs = Usr_GetNumUsrsInCrssOfCty (Rol_UNKNOWN,Cty->CtyCod); // Here Rol_UNKNOWN means "all users"
|
||||||
// Cty->NumStds = Usr_GetNumUsrsInCrssOfCty (Rol_STUDENT,Cty->CtyCod);
|
|
||||||
// Cty->NumTchs = Usr_GetNumUsrsInCrssOfCty (Rol_TEACHER,Cty->CtyCod);
|
|
||||||
|
|
||||||
/* Get number of institutions in this country */
|
/* Get number of institutions in this country */
|
||||||
Cty->NumInss = Ins_GetNumInssInCty (Cty->CtyCod);
|
Cty->NumInss = Ins_GetNumInssInCty (Cty->CtyCod);
|
||||||
|
|
|
@ -53,8 +53,6 @@ struct Country
|
||||||
unsigned NumDegs;
|
unsigned NumDegs;
|
||||||
unsigned NumCrss;
|
unsigned NumCrss;
|
||||||
unsigned NumUsrs; // Number of users in courses of the institution
|
unsigned NumUsrs; // Number of users in courses of the institution
|
||||||
// unsigned NumStds; // Number of students in courses of the institution
|
|
||||||
// unsigned NumTchs; // Number of teachers in courses of the institution
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
|
@ -1051,8 +1051,8 @@ static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses)
|
||||||
|
|
||||||
if (NumRows) // Courses found...
|
if (NumRows) // Courses found...
|
||||||
{
|
{
|
||||||
// NumRows should be equal to Deg->NumCourses
|
// NumRows should be equal to Deg->NumCrss
|
||||||
Gbl.CurrentDeg.Deg.NumCourses = (unsigned) NumRows;
|
Gbl.CurrentDeg.Deg.NumCrss = (unsigned) NumRows;
|
||||||
|
|
||||||
/***** Create list with courses in degree *****/
|
/***** Create list with courses in degree *****/
|
||||||
if ((Gbl.CurrentDeg.Deg.LstCrss = (struct Course *) calloc (NumRows,sizeof (struct Course))) == NULL)
|
if ((Gbl.CurrentDeg.Deg.LstCrss = (struct Course *) calloc (NumRows,sizeof (struct Course))) == NULL)
|
||||||
|
@ -1060,7 +1060,7 @@ static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses)
|
||||||
|
|
||||||
/***** Get the courses in degree *****/
|
/***** Get the courses in degree *****/
|
||||||
for (NumCrs = 0;
|
for (NumCrs = 0;
|
||||||
NumCrs < Gbl.CurrentDeg.Deg.NumCourses;
|
NumCrs < Gbl.CurrentDeg.Deg.NumCrss;
|
||||||
NumCrs++)
|
NumCrs++)
|
||||||
{
|
{
|
||||||
Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]);
|
Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]);
|
||||||
|
@ -1071,7 +1071,7 @@ static void Crs_GetListCoursesInDegree (Crs_WhatCourses_t WhatCourses)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Gbl.CurrentDeg.Deg.NumCourses = 0;
|
Gbl.CurrentDeg.Deg.NumCrss = 0;
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
@ -1088,7 +1088,7 @@ void Crs_FreeListCoursesInDegree (struct Degree *Deg)
|
||||||
/***** Free memory used by the list of courses in degree *****/
|
/***** Free memory used by the list of courses in degree *****/
|
||||||
free ((void *) Deg->LstCrss);
|
free ((void *) Deg->LstCrss);
|
||||||
Deg->LstCrss = NULL;
|
Deg->LstCrss = NULL;
|
||||||
Deg->NumCourses = 0;
|
Deg->NumCrss = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1186,7 +1186,7 @@ static void Crs_ListCourses (void)
|
||||||
extern const char *Txt_Create_course;
|
extern const char *Txt_Create_course;
|
||||||
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
|
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole >= Rol__GUEST_);
|
||||||
|
|
||||||
if (Gbl.CurrentDeg.Deg.NumCourses) // There are courses in the current degree
|
if (Gbl.CurrentDeg.Deg.NumCrss) // There are courses in the current degree
|
||||||
{
|
{
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
Lay_PutFormToEdit (ActEdiCrs);
|
Lay_PutFormToEdit (ActEdiCrs);
|
||||||
|
@ -1210,7 +1210,7 @@ static void Crs_ListCourses (void)
|
||||||
|
|
||||||
static void Crs_EditCourses (void)
|
static void Crs_EditCourses (void)
|
||||||
{
|
{
|
||||||
if (Gbl.CurrentDeg.Deg.NumCourses)
|
if (Gbl.CurrentDeg.Deg.NumCrss)
|
||||||
/***** Put link (form) to view courses *****/
|
/***** Put link (form) to view courses *****/
|
||||||
Lay_PutFormToView (ActSeeCrs);
|
Lay_PutFormToView (ActSeeCrs);
|
||||||
|
|
||||||
|
@ -1218,7 +1218,7 @@ static void Crs_EditCourses (void)
|
||||||
Crs_PutFormToCreateCourse ();
|
Crs_PutFormToCreateCourse ();
|
||||||
|
|
||||||
/***** Forms to edit current courses *****/
|
/***** Forms to edit current courses *****/
|
||||||
if (Gbl.CurrentDeg.Deg.NumCourses)
|
if (Gbl.CurrentDeg.Deg.NumCrss)
|
||||||
Crs_ListCoursesForEdition ();
|
Crs_ListCoursesForEdition ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1271,7 +1271,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
|
||||||
|
|
||||||
/***** Write all the courses of this year *****/
|
/***** Write all the courses of this year *****/
|
||||||
for (NumCrs = 0;
|
for (NumCrs = 0;
|
||||||
NumCrs < Gbl.CurrentDeg.Deg.NumCourses;
|
NumCrs < Gbl.CurrentDeg.Deg.NumCrss;
|
||||||
NumCrs++)
|
NumCrs++)
|
||||||
{
|
{
|
||||||
Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]);
|
Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]);
|
||||||
|
@ -1390,7 +1390,7 @@ static void Crs_ListCoursesForEdition (void)
|
||||||
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
Year <= Deg_MAX_YEARS_PER_DEGREE;
|
||||||
Year++)
|
Year++)
|
||||||
for (NumCrs = 0;
|
for (NumCrs = 0;
|
||||||
NumCrs < Gbl.CurrentDeg.Deg.NumCourses;
|
NumCrs < Gbl.CurrentDeg.Deg.NumCrss;
|
||||||
NumCrs++)
|
NumCrs++)
|
||||||
{
|
{
|
||||||
Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]);
|
Crs = &(Gbl.CurrentDeg.Deg.LstCrss[NumCrs]);
|
||||||
|
|
|
@ -447,7 +447,7 @@ static void Deg_Configuration (bool PrintView)
|
||||||
"</td>"
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],
|
The_ClassForm[Gbl.Prefs.Theme],
|
||||||
Txt_Courses,Gbl.CurrentDeg.Deg.NumCourses);
|
Txt_Courses,Gbl.CurrentDeg.Deg.NumCrss);
|
||||||
|
|
||||||
/***** Number of teachers *****/
|
/***** Number of teachers *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
|
@ -1313,11 +1313,11 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
|
||||||
"</td>",
|
"</td>",
|
||||||
BgColor,
|
BgColor,
|
||||||
Gbl.Prefs.IconsURL,
|
Gbl.Prefs.IconsURL,
|
||||||
Deg->NumCourses ? "ok_green" :
|
Deg->NumCrss ? "ok_green" :
|
||||||
"tr",
|
"tr",
|
||||||
Deg->NumCourses ? Txt_DEGREE_With_courses :
|
Deg->NumCrss ? Txt_DEGREE_With_courses :
|
||||||
Txt_DEGREE_Without_courses,
|
Txt_DEGREE_Without_courses,
|
||||||
Deg->NumCourses ? Txt_DEGREE_With_courses :
|
Deg->NumCrss ? Txt_DEGREE_With_courses :
|
||||||
Txt_DEGREE_Without_courses);
|
Txt_DEGREE_Without_courses);
|
||||||
|
|
||||||
/***** Number of degree in this list *****/
|
/***** Number of degree in this list *****/
|
||||||
|
@ -1355,7 +1355,7 @@ static void Deg_ListOneDegreeForSeeing (struct Degree *Deg,unsigned NumDeg)
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||||
"%u"
|
"%u"
|
||||||
"</td>",
|
"</td>",
|
||||||
TxtClassNormal,BgColor,Deg->NumCourses);
|
TxtClassNormal,BgColor,Deg->NumCrss);
|
||||||
|
|
||||||
/***** Degree status *****/
|
/***** Degree status *****/
|
||||||
StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
|
StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
|
||||||
|
@ -1410,7 +1410,7 @@ static void Deg_ListDegreesForEdition (void)
|
||||||
/* Put icon to remove degree */
|
/* Put icon to remove degree */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"BM\">");
|
"<td class=\"BM\">");
|
||||||
if (Deg->NumCourses || // Degree has courses ==> deletion forbidden
|
if (Deg->NumCrss || // Degree has courses ==> deletion forbidden
|
||||||
!ICanEdit)
|
!ICanEdit)
|
||||||
Lay_PutIconRemovalNotAllowed ();
|
Lay_PutIconRemovalNotAllowed ();
|
||||||
else
|
else
|
||||||
|
@ -1602,7 +1602,7 @@ static void Deg_ListDegreesForEdition (void)
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
|
||||||
"%u"
|
"%u"
|
||||||
"</td>",
|
"</td>",
|
||||||
Deg->NumCourses);
|
Deg->NumCrss);
|
||||||
|
|
||||||
/* Degree status */
|
/* Degree status */
|
||||||
StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
|
StatusTxt = Deg_GetStatusTxtFromStatusBits (Deg->Status);
|
||||||
|
@ -2693,7 +2693,7 @@ void Deg_RemoveDegree (void)
|
||||||
Deg_GetDataOfDegreeByCod (&Deg);
|
Deg_GetDataOfDegreeByCod (&Deg);
|
||||||
|
|
||||||
/***** Check if this degree has courses *****/
|
/***** Check if this degree has courses *****/
|
||||||
if (Deg.NumCourses) // Degree has courses ==> don't remove
|
if (Deg.NumCrss) // Degree has courses ==> don't remove
|
||||||
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_degree_you_must_first_remove_all_courses_in_the_degree);
|
Lay_ShowAlert (Lay_WARNING,Txt_To_remove_a_degree_you_must_first_remove_all_courses_in_the_degree);
|
||||||
else // Degree has no courses ==> remove it
|
else // Degree has no courses ==> remove it
|
||||||
{
|
{
|
||||||
|
@ -2863,7 +2863,7 @@ bool Deg_GetDataOfDegreeByCod (struct Degree *Deg)
|
||||||
Deg->FirstYear = 0;
|
Deg->FirstYear = 0;
|
||||||
Deg->LastYear = 0;
|
Deg->LastYear = 0;
|
||||||
Deg->WWW[0] = '\0';
|
Deg->WWW[0] = '\0';
|
||||||
Deg->NumCourses = 0;
|
Deg->NumCrss = 0;
|
||||||
Deg->LstCrss = NULL;
|
Deg->LstCrss = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2895,7 +2895,7 @@ bool Deg_GetDataOfDegreeByCod (struct Degree *Deg)
|
||||||
Deg->FirstYear = 0;
|
Deg->FirstYear = 0;
|
||||||
Deg->LastYear = 0;
|
Deg->LastYear = 0;
|
||||||
Deg->WWW[0] = '\0';
|
Deg->WWW[0] = '\0';
|
||||||
Deg->NumCourses = 0;
|
Deg->NumCrss = 0;
|
||||||
Deg->LstCrss = NULL;
|
Deg->LstCrss = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -2947,7 +2947,7 @@ static void Deg_GetDataOfDegreeFromRow (struct Degree *Deg,MYSQL_ROW row)
|
||||||
strcpy (Deg->WWW,row[9]);
|
strcpy (Deg->WWW,row[9]);
|
||||||
|
|
||||||
/***** Get number of courses *****/
|
/***** Get number of courses *****/
|
||||||
Deg->NumCourses = Crs_GetNumCrssInDeg (Deg->DegCod);
|
Deg->NumCrss = Crs_GetNumCrssInDeg (Deg->DegCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct Degree
|
||||||
unsigned FirstYear;
|
unsigned FirstYear;
|
||||||
unsigned LastYear;
|
unsigned LastYear;
|
||||||
char WWW[Cns_MAX_LENGTH_WWW+1];
|
char WWW[Cns_MAX_LENGTH_WWW+1];
|
||||||
unsigned NumCourses; // Number of courses in the degree
|
unsigned NumCrss; // Number of courses in the degree
|
||||||
struct Course *LstCrss; // List of courses in this degree
|
struct Course *LstCrss; // List of courses in this degree
|
||||||
};
|
};
|
||||||
struct DegreeType
|
struct DegreeType
|
||||||
|
|
|
@ -244,7 +244,6 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Inss.EditingIns.ShortName[0] = '\0';
|
Gbl.Inss.EditingIns.ShortName[0] = '\0';
|
||||||
Gbl.Inss.EditingIns.FullName[0] = '\0';
|
Gbl.Inss.EditingIns.FullName[0] = '\0';
|
||||||
Gbl.Inss.EditingIns.WWW[0] = '\0';
|
Gbl.Inss.EditingIns.WWW[0] = '\0';
|
||||||
// Gbl.Inss.EditingIns.NumStds = Gbl.Inss.EditingIns.NumTchs = Gbl.Inss.EditingIns.NumUsrs =
|
|
||||||
Gbl.Inss.EditingIns.NumCtrs = Gbl.Inss.EditingIns.NumDpts = Gbl.Inss.EditingIns.NumDegs = 0;
|
Gbl.Inss.EditingIns.NumCtrs = Gbl.Inss.EditingIns.NumDpts = Gbl.Inss.EditingIns.NumDegs = 0;
|
||||||
Gbl.Inss.EditingIns.NumUsrs = 0;
|
Gbl.Inss.EditingIns.NumUsrs = 0;
|
||||||
|
|
||||||
|
@ -310,7 +309,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Degs.EditingDeg.FirstYear =
|
Gbl.Degs.EditingDeg.FirstYear =
|
||||||
Gbl.Degs.EditingDeg.LastYear = 0;
|
Gbl.Degs.EditingDeg.LastYear = 0;
|
||||||
Gbl.Degs.EditingDeg.WWW[0] = '\0';
|
Gbl.Degs.EditingDeg.WWW[0] = '\0';
|
||||||
Gbl.Degs.EditingDeg.NumCourses = 0;
|
Gbl.Degs.EditingDeg.NumCrss = 0;
|
||||||
Gbl.Degs.EditingDeg.LstCrss = NULL;
|
Gbl.Degs.EditingDeg.LstCrss = NULL;
|
||||||
|
|
||||||
Gbl.Degs.EditingCrs.CrsCod = -1L;
|
Gbl.Degs.EditingCrs.CrsCod = -1L;
|
||||||
|
|
|
@ -638,22 +638,6 @@ static void Ins_ListOneInstitutionForSeeing (struct Institution *Ins,unsigned Nu
|
||||||
"</td>",
|
"</td>",
|
||||||
TxtClassNormal,BgColor,Ins->NumDpts);
|
TxtClassNormal,BgColor,Ins->NumDpts);
|
||||||
|
|
||||||
/* Number of teachers in courses of this institution */
|
|
||||||
/*
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
TxtClassNormal,BgColor,Ins->NumTchs);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Number of students in courses of this institution */
|
|
||||||
/*
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
|
||||||
"%u"
|
|
||||||
"</td>",
|
|
||||||
TxtClassNormal,BgColor,Ins->NumStds);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Number of users in courses of this institution */
|
/* Number of users in courses of this institution */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
|
||||||
"%u"
|
"%u"
|
||||||
|
@ -897,7 +881,6 @@ void Ins_GetListInstitutions (long CtyCod,Ins_GetExtraData_t GetExtraData)
|
||||||
Ins->NumUsrsWhoClaimToBelongToIns = 0;
|
Ins->NumUsrsWhoClaimToBelongToIns = 0;
|
||||||
Ins->NumCtrs = Ins->NumDegs = Ins->NumCrss = Ins->NumDpts = 0;
|
Ins->NumCtrs = Ins->NumDegs = Ins->NumCrss = Ins->NumDpts = 0;
|
||||||
Ins->NumUsrs = 0;
|
Ins->NumUsrs = 0;
|
||||||
// Ins->NumUsrs = Ins->NumTchs = Ins->NumStds = 0;
|
|
||||||
break;
|
break;
|
||||||
case Ins_GET_EXTRA_DATA:
|
case Ins_GET_EXTRA_DATA:
|
||||||
/* Get number of users who claim to belong to this institution (row[7]) */
|
/* Get number of users who claim to belong to this institution (row[7]) */
|
||||||
|
@ -917,9 +900,7 @@ void Ins_GetListInstitutions (long CtyCod,Ins_GetExtraData_t GetExtraData)
|
||||||
Ins->NumDpts = Dpt_GetNumberOfDepartmentsInInstitution (Ins->InsCod);
|
Ins->NumDpts = Dpt_GetNumberOfDepartmentsInInstitution (Ins->InsCod);
|
||||||
|
|
||||||
/* Get number of users in courses */
|
/* Get number of users in courses */
|
||||||
Ins->NumUsrs = Usr_GetNumUsrsInCrssOfIns (Rol_UNKNOWN,Ins->InsCod); // Here Rol_UNKNOWN means "all users", NumUsrs <= NumStds + NumTchs
|
Ins->NumUsrs = Usr_GetNumUsrsInCrssOfIns (Rol_UNKNOWN,Ins->InsCod); // Here Rol_UNKNOWN means "all users"
|
||||||
// Ins->NumTchs = Usr_GetNumUsrsInCrssOfIns (Rol_TEACHER,Ins->InsCod);
|
|
||||||
// Ins->NumStds = Usr_GetNumUsrsInCrssOfIns (Rol_STUDENT,Ins->InsCod);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -948,11 +929,11 @@ bool Ins_GetDataOfInstitutionByCod (struct Institution *Ins,
|
||||||
Ins->Status = (Ins_Status_t) 0;
|
Ins->Status = (Ins_Status_t) 0;
|
||||||
Ins->RequesterUsrCod = -1L;
|
Ins->RequesterUsrCod = -1L;
|
||||||
Ins->ShortName[0] =
|
Ins->ShortName[0] =
|
||||||
Ins->FullName[0] =
|
Ins->FullName[0] =
|
||||||
Ins->WWW[0] = '\0';
|
Ins->WWW[0] = '\0';
|
||||||
// Ins->NumStds = Ins->NumTchs = Ins->NumUsrs =
|
Ins->NumUsrsWhoClaimToBelongToIns = 0;
|
||||||
Ins->NumUsrs =
|
Ins->NumCtrs = Ins->NumDegs = Ins->NumCrss = Ins->NumDpts = 0;
|
||||||
Ins->NumCtrs = Ins->NumDpts = Ins->NumDegs = 0;
|
Ins->NumUsrs = 0;
|
||||||
|
|
||||||
/***** Check if institution code is correct *****/
|
/***** Check if institution code is correct *****/
|
||||||
if (Ins->InsCod <= 0)
|
if (Ins->InsCod <= 0)
|
||||||
|
@ -1005,9 +986,7 @@ bool Ins_GetDataOfInstitutionByCod (struct Institution *Ins,
|
||||||
Ins->NumDegs = Deg_GetNumDegsInIns (Ins->InsCod);
|
Ins->NumDegs = Deg_GetNumDegsInIns (Ins->InsCod);
|
||||||
|
|
||||||
/* Get number of users in courses of this institution */
|
/* Get number of users in courses of this institution */
|
||||||
Ins->NumUsrs = Usr_GetNumUsrsInCrssOfIns (Rol_UNKNOWN,Ins->InsCod); // Here Rol_UNKNOWN means "all users", NumUsrs <= NumStds + NumTchs
|
Ins->NumUsrs = Usr_GetNumUsrsInCrssOfIns (Rol_UNKNOWN,Ins->InsCod); // Here Rol_UNKNOWN means "all users"
|
||||||
// Ins->NumStds = Usr_GetNumUsrsInCrssOfIns (Rol_STUDENT,Ins->InsCod);
|
|
||||||
// Ins->NumTchs = Usr_GetNumUsrsInCrssOfIns (Rol_TEACHER,Ins->InsCod);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -70,8 +70,6 @@ struct Institution
|
||||||
unsigned NumCrss;
|
unsigned NumCrss;
|
||||||
unsigned NumDpts;
|
unsigned NumDpts;
|
||||||
unsigned NumUsrs; // Number of users in courses of this institution
|
unsigned NumUsrs; // Number of users in courses of this institution
|
||||||
// unsigned NumTchs; // Number of teachers in courses of this institution
|
|
||||||
// unsigned NumStds; // Number of students in courses of this institution
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
|
Loading…
Reference in New Issue
Block a user