Version 16.120.1

This commit is contained in:
Antonio Cañas Vargas 2017-01-19 18:32:28 +01:00
parent badae5b805
commit b0a9ad9582
3 changed files with 18 additions and 11 deletions

View File

@ -193,13 +193,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.120 (2017-01-19)"
#define Log_PLATFORM_VERSION "SWAD 16.120.1 (2017-01-19)"
#define CSS_FILE "swad16.119.4.css"
#define JS_FILE "swad16.119.3.js"
// 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
/*
Version 16.120.1: Jan 19, 2017 From now on, a teacher A can enroll another user B as a teacher in their courses, although user B is not yet a teacher in any course. (? lines)
Version 16.120: Jan 19, 2017 Fixed bug when limiting length of links. (211934 lines)
Version 16.119.4: Jan 18, 2017 Changes in layout of current data and time. (211882 lines)
Version 16.119.3: Jan 17, 2017 Changes in layout of current data and time. (211881 lines)

View File

@ -2795,6 +2795,7 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
(unsigned) Gbl.Usrs.Me.LoggedRole,
Txt_ROLES_SINGUL_Abc[Gbl.Usrs.Me.LoggedRole][UsrDat->Sex]);
break;
/*
case Rol_TEACHER:
for (Role = Rol_STUDENT;
Role <= Rol_TEACHER;
@ -2809,6 +2810,8 @@ static void Rec_ShowRole (struct UsrData *UsrDat,
Txt_ROLES_SINGUL_Abc[Role][UsrDat->Sex]);
}
break;
*/
case Rol_TEACHER:
case Rol_DEG_ADM:
case Rol_CTR_ADM:
case Rol_INS_ADM:
@ -3527,20 +3530,23 @@ Rol_Role_t Rec_GetRoleFromRecordForm (void)
if (Role == Rol_STUDENT)
RoleOK = true;
break;
/*
case Rol_TEACHER: // I am logged as teacher
/* A teacher can only register another user as teacher
if the other is already teacher in any course.
That is, a teacher can not upgrade a student
(in all other courses) to teacher */
// A teacher can only register another user as teacher
// if the other is already teacher in any course.
// That is, a teacher can not upgrade a student
// (in all other courses) to teacher
Rol_GetRolesInAllCrssIfNotYetGot (&Gbl.Usrs.Other.UsrDat);
if ( Role == Rol_STUDENT ||
(Role == Rol_TEACHER && // He/she will be a teacher in current course
(Gbl.Usrs.Other.UsrDat.Roles & (1 << Rol_TEACHER)))) // He/she was a teacher in some courses
RoleOK = true;
break;
case Rol_DEG_ADM: // I am logged as admin
case Rol_CTR_ADM:
case Rol_INS_ADM:
*/
case Rol_TEACHER: // I am logged as teacher
case Rol_DEG_ADM: // I am logged as degree admin
case Rol_CTR_ADM: // I am logged as centre admin
case Rol_INS_ADM: // I am logged as institution admin
if (Role == Rol_STUDENT ||
Role == Rol_TEACHER)
RoleOK = true;

View File

@ -639,17 +639,17 @@ static unsigned Str_FindHTMLEntity (const char *Ptr)
size_t Length = 0;
char Ch;
/***** Check first character *****/
/***** The first character must be '&' *****/
if (Ptr[Length] != '&')
return 0; // No HTML entity found
/***** Check second character *****/
/***** The second character can be '#' *****/
Length++;
if (Ptr[Length] == '#')
/* Go to third character */
Length++;
/***** Now some alphanumeric characters are expected *****/
/***** Now one or more alphanumeric characters are expected *****/
/* Check second/third character */
Ch = Ptr[Length];
if (!((Ch >= '0' && Ch <= '9') ||