Version 15.144.1

This commit is contained in:
Antonio Cañas Vargas 2016-03-03 01:24:58 +01:00
parent 09e9d53a02
commit 96bd8be2db
3 changed files with 14 additions and 13 deletions

View File

@ -123,13 +123,14 @@
/****************************** Public constants *****************************/ /****************************** Public constants *****************************/
/*****************************************************************************/ /*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.144 (2016-03-03)" #define Log_PLATFORM_VERSION "SWAD 15.144.1 (2016-03-03)"
#define CSS_FILE "swad15.137.2.css" #define CSS_FILE "swad15.137.2.css"
#define JS_FILE "swad15.131.3.js" #define JS_FILE "swad15.131.3.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.144.1: Mar 03, 2016 Fixed bugs related to last chages made. (195756 lines)
Version 15.144: Mar 03, 2016 Direct login always available. (195755 lines) Version 15.144: Mar 03, 2016 Direct login always available. (195755 lines)
3 changes necessary in database: 3 changes necessary in database:
ALTER TABLE courses DROP COLUMN AllowDirectLogIn; ALTER TABLE courses DROP COLUMN AllowDirectLogIn;

View File

@ -2054,19 +2054,19 @@ static void Crs_GetDataOfCourseFromRow (struct Course *Crs,MYSQL_ROW row)
strncpy (Crs->InstitutionalCrsCod,row[3],Crs_LENGTH_INSTITUTIONAL_CRS_COD); strncpy (Crs->InstitutionalCrsCod,row[3],Crs_LENGTH_INSTITUTIONAL_CRS_COD);
Crs->InstitutionalCrsCod[Crs_LENGTH_INSTITUTIONAL_CRS_COD] = '\0'; Crs->InstitutionalCrsCod[Crs_LENGTH_INSTITUTIONAL_CRS_COD] = '\0';
/***** Get course status (row[5]) *****/ /***** Get course status (row[4]) *****/
if (sscanf (row[5],"%u",&(Crs->Status)) != 1) if (sscanf (row[4],"%u",&(Crs->Status)) != 1)
Lay_ShowErrorAndExit ("Wrong course status."); Lay_ShowErrorAndExit ("Wrong course status.");
/***** Get requester user'code (row[6]) *****/ /***** Get requester user'code (row[5]) *****/
Crs->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[6]); Crs->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[5]);
/***** Get the short name of the course (row[7]) *****/ /***** Get the short name of the course (row[6]) *****/
strncpy (Crs->ShortName,row[7],Crs_MAX_LENGTH_COURSE_SHORT_NAME); strncpy (Crs->ShortName,row[6],Crs_MAX_LENGTH_COURSE_SHORT_NAME);
Crs->ShortName[Crs_MAX_LENGTH_COURSE_SHORT_NAME] = '\0'; Crs->ShortName[Crs_MAX_LENGTH_COURSE_SHORT_NAME] = '\0';
/***** Get the full name of the course (row[8]) *****/ /***** Get the full name of the course (row[7]) *****/
strncpy (Crs->FullName,row[8],Crs_MAX_LENGTH_COURSE_FULL_NAME); strncpy (Crs->FullName,row[7],Crs_MAX_LENGTH_COURSE_FULL_NAME);
Crs->FullName[Crs_MAX_LENGTH_COURSE_FULL_NAME] = '\0'; Crs->FullName[Crs_MAX_LENGTH_COURSE_FULL_NAME] = '\0';
/***** Get number of students *****/ /***** Get number of students *****/

View File

@ -2128,11 +2128,11 @@ static void Deg_GetListDegTypes (void)
/***** Get types of degree from database *****/ /***** Get types of degree from database *****/
sprintf (Query,"(SELECT deg_types.DegTypCod,deg_types.DegTypName AS DegTypName," sprintf (Query,"(SELECT deg_types.DegTypCod,deg_types.DegTypName AS DegTypName,"
" deg_types.AllowDirectLogin AS AllowDirectLogin,COUNT(degrees.DegCod)" " COUNT(degrees.DegCod)"
" FROM deg_types,degrees WHERE deg_types.DegTypCod=degrees.DegTypCod" " FROM deg_types,degrees WHERE deg_types.DegTypCod=degrees.DegTypCod"
" GROUP BY degrees.DegTypCod)" " GROUP BY degrees.DegTypCod)"
" UNION " " UNION "
"(SELECT DegTypCod,DegTypName,AllowDirectLogin,'0'" "(SELECT DegTypCod,DegTypName,'0'"
" FROM deg_types WHERE DegTypCod NOT IN (SELECT DegTypCod FROM degrees))" " FROM deg_types WHERE DegTypCod NOT IN (SELECT DegTypCod FROM degrees))"
" ORDER BY DegTypName"); " ORDER BY DegTypName");
Gbl.Degs.DegTypes.Num = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get types of degree"); Gbl.Degs.DegTypes.Num = (unsigned) DB_QuerySELECT (Query,&mysql_res,"can not get types of degree");
@ -2160,8 +2160,8 @@ static void Deg_GetListDegTypes (void)
strncpy (Gbl.Degs.DegTypes.Lst[NumRow].DegTypName,row[1],Deg_MAX_LENGTH_DEGREE_TYPE_NAME); strncpy (Gbl.Degs.DegTypes.Lst[NumRow].DegTypName,row[1],Deg_MAX_LENGTH_DEGREE_TYPE_NAME);
Gbl.Degs.DegTypes.Lst[NumRow].DegTypName[Deg_MAX_LENGTH_DEGREE_TYPE_NAME] = '\0'; Gbl.Degs.DegTypes.Lst[NumRow].DegTypName[Deg_MAX_LENGTH_DEGREE_TYPE_NAME] = '\0';
/* Number of degrees of this type (row[3]) */ /* Number of degrees of this type (row[2]) */
if (sscanf (row[3],"%u",&Gbl.Degs.DegTypes.Lst[NumRow].NumDegs) != 1) if (sscanf (row[2],"%u",&Gbl.Degs.DegTypes.Lst[NumRow].NumDegs) != 1)
Lay_ShowErrorAndExit ("Error when getting number of degrees of a type"); Lay_ShowErrorAndExit ("Error when getting number of degrees of a type");
} }
} }