Version 16.220.2

This commit is contained in:
Antonio Cañas Vargas 2017-05-21 14:43:10 +02:00
parent a65d5b0524
commit f5b33ab1c1
11 changed files with 145 additions and 154 deletions

View File

@ -79,6 +79,7 @@ extern struct Globals Gbl;
static void Ctr_Configuration (bool PrintView);
static void Ctr_PutIconsToPrintAndUpload (void);
static void Ctr_PutIconToChangePhoto (void);
static void Ctr_ShowNumUsrsInCrssOfCtr (Rol_Role_t Role);
static void Ctr_ListCentres (void);
static bool Ctr_CheckIfICanCreateCentres (void);
@ -288,7 +289,6 @@ static void Ctr_Configuration (bool PrintView)
extern const char *Txt_Degrees;
extern const char *Txt_Degrees_of_CENTRE_X;
extern const char *Txt_Courses;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
unsigned NumIns;
struct Place Plc;
char PathPhoto[PATH_MAX + 1];
@ -618,59 +618,11 @@ static void Ctr_Configuration (bool PrintView)
Txt_Courses,
Crs_GetNumCrssInCtr (Gbl.CurrentCtr.Ctr.CtrCod));
/***** Number of teachers in courses of this centre *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_TCH,Gbl.CurrentCtr.Ctr.CtrCod));
/***** Number of non-editing teachers in courses of this centre *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_NED_TCH][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_NED_TCH,Gbl.CurrentCtr.Ctr.CtrCod));
/***** Number of students in courses of this centre *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_STD,Gbl.CurrentCtr.Ctr.CtrCod));
/***** Number of users in courses of this centre *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s + %s + %s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_TCH ][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol_NED_TCH][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol_STD ][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Rol_UNK,Gbl.CurrentCtr.Ctr.CtrCod));
Ctr_ShowNumUsrsInCrssOfCtr (Rol_TCH);
Ctr_ShowNumUsrsInCrssOfCtr (Rol_NED_TCH);
Ctr_ShowNumUsrsInCrssOfCtr (Rol_STD);
Ctr_ShowNumUsrsInCrssOfCtr (Rol_UNK);
}
/***** End table *****/
@ -727,6 +679,30 @@ static void Ctr_PutIconToChangePhoto (void)
NULL);
}
/*****************************************************************************/
/**************** Number of users in courses of this centre ******************/
/*****************************************************************************/
static void Ctr_ShowNumUsrsInCrssOfCtr (Rol_Role_t Role)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Users_in_courses;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
(Role == Rol_UNK) ? Txt_Users_in_courses :
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCtr (Role,Gbl.CurrentCtr.Ctr.CtrCod));
}
/*****************************************************************************/
/*************** Show the centres of the current institution *****************/
/*****************************************************************************/

View File

@ -233,13 +233,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.220.1 (2017-05-20)"
#define Log_PLATFORM_VERSION "SWAD 16.220.2 (2017-05-21)"
#define CSS_FILE "swad16.209.3.css"
#define JS_FILE "swad16.206.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.220.2: May 21, 2017 Changes related with new role. Not finished. (219319 lines)
Version 16.220.1: May 20, 2017 Changes related with new role. Not finished. (219332 lines)
Version 16.220: May 19, 2017 Changes permission of actions after creating new role. Not finished. (219227 lines)
Version 16.219: May 19, 2017 New role: non-editing teacher. Not finished. (219226 lines)

View File

@ -65,6 +65,7 @@ extern struct Globals Gbl;
static void Cty_Configuration (bool PrintView);
static void Cty_PutIconToPrint (void);
static void Cty_ShowNumUsrsInCrssOfCty (Rol_Role_t Role);
static void Cty_PutHeadCountriesForSeeing (bool OrderSelectable);
static void Cty_ListOneCountryForSeeing (struct Country *Cty,unsigned NumCty);
@ -232,7 +233,6 @@ static void Cty_Configuration (bool PrintView)
extern const char *Txt_Degrees;
extern const char *Txt_Courses;
extern const char *Txt_Users_of_the_country;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
char *MapAttribution = NULL;
bool PutLink = !PrintView && Gbl.CurrentCty.Cty.WWW[Gbl.Prefs.Language][0];
@ -428,45 +428,11 @@ static void Cty_Configuration (bool PrintView)
Txt_Courses,
Crs_GetNumCrssInCty (Gbl.CurrentCty.Cty.CtyCod));
/***** Number of teachers in courses of this country *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCty (Rol_TCH,Gbl.CurrentCty.Cty.CtyCod));
/***** Number of students in courses of this country *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCty (Rol_STD,Gbl.CurrentCty.Cty.CtyCod));
/***** Number of users in courses of this country *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s + %s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCty (Rol_UNK,Gbl.CurrentCty.Cty.CtyCod));
Cty_ShowNumUsrsInCrssOfCty (Rol_TCH);
Cty_ShowNumUsrsInCrssOfCty (Rol_NED_TCH);
Cty_ShowNumUsrsInCrssOfCty (Rol_STD);
Cty_ShowNumUsrsInCrssOfCty (Rol_UNK);
}
/***** End table *****/
@ -486,6 +452,30 @@ static void Cty_PutIconToPrint (void)
Lay_PutContextualIconToPrint (ActPrnCtyInf,NULL);
}
/*****************************************************************************/
/**************** Number of users in courses of this country *****************/
/*****************************************************************************/
static void Cty_ShowNumUsrsInCrssOfCty (Rol_Role_t Role)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_Users_in_courses;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
(Role == Rol_UNK) ? Txt_Users_in_courses :
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN],
Usr_GetNumUsrsInCrssOfCty (Role,Gbl.CurrentCty.Cty.CtyCod));
}
/*****************************************************************************/
/*************************** List all the countries **************************/
/*****************************************************************************/

View File

@ -73,6 +73,7 @@ extern struct Globals Gbl;
static void Crs_Configuration (bool PrintView);
static void Crs_PutIconToPrint (void);
static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role);
static void Crs_WriteListMyCoursesToSelectOne (void);
@ -170,7 +171,6 @@ static void Crs_Configuration (bool PrintView)
extern const char *Txt_Shortcut;
extern const char *Txt_STR_LANG_ID[1 + Txt_NUM_LANGUAGES];
extern const char *Txt_QR_code;
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
extern const char *Txt_Indicators;
extern const char *Txt_of_PART_OF_A_TOTAL;
unsigned NumDeg;
@ -427,29 +427,10 @@ static void Crs_Configuration (bool PrintView)
}
else
{
/***** Number of teachers *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN],Gbl.CurrentCrs.Crs.NumTchs);
/***** Number of students *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Rol_STD][Usr_SEX_UNKNOWN],Gbl.CurrentCrs.Crs.NumStds);
/***** Number of users *****/
Crs_ShowNumUsrsInCrs (Rol_TCH);
Crs_ShowNumUsrsInCrs (Rol_NED_TCH);
Crs_ShowNumUsrsInCrs (Rol_STD);
/***** Indicators *****/
NumIndicatorsFromDB = Ind_GetNumIndicatorsCrsFromDB (Gbl.CurrentCrs.Crs.CrsCod);
@ -495,6 +476,28 @@ static void Crs_PutIconToPrint (void)
Lay_PutContextualIconToPrint (ActPrnCrsInf,NULL);
}
/*****************************************************************************/
/**************** Number of users in courses of this country *****************/
/*****************************************************************************/
static void Crs_ShowNumUsrsInCrs (Rol_Role_t Role)
{
extern const char *The_ClassForm[The_NUM_THEMES];
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%u"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme],
Txt_ROLES_PLURAL_Abc[Role][Usr_SEX_UNKNOWN],
Gbl.CurrentCrs.Crs.NumUsrs[Role]);
}
/*****************************************************************************/
/************************ Write menu with my courses *************************/
/*****************************************************************************/
@ -1245,12 +1248,12 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
"</td>",
BgColor,
Gbl.Prefs.IconsURL,
Crs->NumUsrs ? "ok_green" :
"tr",
Crs->NumUsrs ? Txt_COURSE_With_users :
Txt_COURSE_Without_users,
Crs->NumUsrs ? Txt_COURSE_With_users :
Txt_COURSE_Without_users);
Crs->NumUsrs[Rol_UNK] ? "ok_green" :
"tr",
Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users :
Txt_COURSE_Without_users,
Crs->NumUsrs[Rol_UNK] ? Txt_COURSE_With_users :
Txt_COURSE_Without_users);
/* Institutional code of the course */
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_MIDDLE %s\">"
@ -1282,13 +1285,13 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClassNormal,BgColor,Crs->NumTchs);
TxtClassNormal,BgColor,Crs->NumUsrs[Rol_TCH]);
/* Current number of students in this course */
fprintf (Gbl.F.Out,"<td class=\"%s RIGHT_MIDDLE %s\">"
"%u"
"</td>",
TxtClassNormal,BgColor,Crs->NumStds);
TxtClassNormal,BgColor,Crs->NumUsrs[Rol_STD]);
/* Course status */
StatusTxt = Crs_GetStatusTxtFromStatusBits (Crs->Status);
@ -1404,7 +1407,7 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
/* Put icon to remove course */
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"BM\">");
if (Crs->NumUsrs || // Course has users ==> deletion forbidden
if (Crs->NumUsrs[Rol_UNK] || // Course has users ==> deletion forbidden
!ICanEdit)
Lay_PutIconRemovalNotAllowed ();
else // Crs->NumUsrs == 0 && ICanEdit
@ -1506,13 +1509,13 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
"%u"
"</td>",
Crs->NumTchs);
Crs->NumUsrs[Rol_TCH]);
/* Current number of students in this course */
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_MIDDLE\">"
"%u"
"</td>",
Crs->NumStds);
Crs->NumUsrs[Rol_STD]);
/* Course requester */
UsrDat.UsrCod = Crs->RequesterUsrCod;
@ -1946,9 +1949,9 @@ void Crs_RemoveCourse (void)
if (Crs_CheckIfICanEdit (&Crs))
{
/***** Check if this course has users *****/
if (Crs.NumUsrs) // Course has users ==> don't remove
if (Crs.NumUsrs[Rol_UNK]) // Course has users ==> don't remove
Ale_ShowAlert (Ale_WARNING,Txt_To_remove_a_course_you_must_first_remove_all_users_in_the_course);
else // Course has no users ==> remove it
else // Course has no users ==> remove it
{
/***** Remove course *****/
Crs_RemoveCourseCompletely (Crs.CrsCod);
@ -1984,9 +1987,9 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs)
Crs->RequesterUsrCod = -1L;
Crs->ShrtName[0] = '\0';
Crs->FullName[0] = '\0';
Crs->NumStds = 0;
Crs->NumTchs = 0;
Crs->NumUsrs = 0;
Crs->NumUsrs[Rol_UNK] = 0;
Crs->NumUsrs[Rol_STD] = 0;
Crs->NumUsrs[Rol_TCH] = 0;
/***** Check if course code is correct *****/
if (Crs->CrsCod > 0)
@ -2047,14 +2050,15 @@ static void Crs_GetDataOfCourseFromRow (struct Course *Crs,MYSQL_ROW row)
Str_Copy (Crs->FullName,row[7],
Hie_MAX_BYTES_FULL_NAME);
/***** Get number of teachers *****/
Crs->NumTchs = Usr_GetNumUsrsInCrs (Rol_TCH,Crs->CrsCod);
/***** Get number of students *****/
Crs->NumStds = Usr_GetNumUsrsInCrs (Rol_STD,Crs->CrsCod);
Crs->NumUsrs[Rol_STD] = Usr_GetNumUsrsInCrs (Rol_STD,Crs->CrsCod);
Crs->NumUsrs = Crs->NumStds +
Crs->NumTchs;
/***** Get number of teachers *****/
Crs->NumUsrs[Rol_TCH] = Usr_GetNumUsrsInCrs (Rol_TCH,Crs->CrsCod);
/***** Compute total of users in course *****/
Crs->NumUsrs[Rol_UNK] = Crs->NumUsrs[Rol_STD] +
Crs->NumUsrs[Rol_TCH];
}
/*****************************************************************************/

View File

@ -85,9 +85,7 @@ struct Course
long RequesterUsrCod; // User code of the person who requested the creation of this course
char ShrtName[Hie_MAX_BYTES_SHRT_NAME + 1]; // Short name of course
char FullName[Hie_MAX_BYTES_FULL_NAME + 1]; // Full name of course
unsigned NumUsrs; // Number of users (students + teachers)
unsigned NumTchs; // Number of teachers
unsigned NumStds; // Number of students
unsigned NumUsrs[Rol_NUM_ROLES]; // Number of users
};
/*****************************************************************************/

View File

@ -595,9 +595,9 @@ static void Enr_ShowFormRegRemSeveralUsrs (Rol_Role_t Role)
extern const char *Txt_Confirm;
/***** Put contextual links *****/
if (Role == Rol_STD && // Users to admin: students
Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
Gbl.CurrentCrs.Crs.NumStds) // This course has students
if (Role == Rol_STD && // Users to admin: students
Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD]) // This course has students
{
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
@ -1946,7 +1946,8 @@ void Enr_SignUpInCrs (void)
/***** Notify teachers or admins by email about the new enrolment request *****/
// If this course has teachers ==> send notification to teachers
// If this course has no teachers and I want to be a teacher ==> send notification to administrators or superusers
if (Gbl.CurrentCrs.Crs.NumTchs || RoleFromForm == Rol_TCH)
if (Gbl.CurrentCrs.Crs.NumUsrs[Rol_TCH] ||
RoleFromForm == Rol_TCH)
Ntf_StoreNotifyEventsToAllUsrs (Ntf_EVENT_ENROLMENT_REQUEST,ReqCod);
}
}
@ -2764,7 +2765,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
fprintf (Gbl.F.Out,"<td class=\"DAT RIGHT_TOP\">"
"%u"
"</td>",
Crs.NumTchs);
Crs.NumUsrs[Rol_TCH]);
/***** User photo *****/
fprintf (Gbl.F.Out,"<td class=\"DAT CENTER_TOP\""

View File

@ -149,8 +149,8 @@ void Hlp_ShowHelpWhatWouldYouLikeToDo (void)
if (Gbl.Usrs.Me.MyCrss.Num) // I am enroled in some courses
{
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
!Gbl.CurrentCrs.Crs.NumStds && // Current course has no students
if (Gbl.CurrentCrs.Crs.CrsCod > 0 && // Course selected
!Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD] && // Current course has no students
Gbl.Usrs.Me.UsrDat.RoleInCurrentCrsDB == Rol_TCH) // I am a teacher in current course
{
/* Request students enrolment */

View File

@ -642,7 +642,7 @@ void Mrk_ShowMyMarks (void)
}
else // Course zone
{
if (Gbl.CurrentCrs.Crs.NumStds) // If there are students in this course
if (Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD]) // If there are students in this course
{
Gbl.Usrs.Other.UsrDat.UsrCod = Usr_GetRamdomStdFromCrs (Gbl.CurrentCrs.Crs.CrsCod);
UsrDat = &Gbl.Usrs.Other.UsrDat;

View File

@ -1267,7 +1267,7 @@ unsigned Ntf_StoreNotifyEventsToAllUsrs (Ntf_NotifyEvent_t NotifyEvent,long Cod)
case Ntf_EVENT_ENROLMENT_TEACHER: // This function should not be called in this case
return 0;
case Ntf_EVENT_ENROLMENT_REQUEST:
if (Gbl.CurrentCrs.Crs.NumTchs)
if (Gbl.CurrentCrs.Crs.NumUsrs[Rol_TCH])
// If this course has teachers ==> send notification to teachers
sprintf (Query,"SELECT UsrCod FROM crs_usr"
" WHERE CrsCod=%ld"

View File

@ -50236,6 +50236,27 @@ const char *Txt_X_users_have_been_removed = // Warning: it is very important to
"%u users have been removed."; // Necessita de tradução
#endif
const char *Txt_Users_in_courses =
#if L==1
"Usuaris en assignatures";
#elif L==2
"Benutzer in Kursen";
#elif L==3
"Users in courses";
#elif L==4
"Usuarios en asignaturas";
#elif L==5
"Utilisateurs dans mati&egrave;res";
#elif L==6
"Puruh&aacute;ra en asignaturas"; // Okoteve traducción
#elif L==7
"Utenti nei corsi";
#elif L==8
"U&zdot;ytkownicy kurs&oacute;w";
#elif L==9
"Utilizadores em disciplinas";
#endif
const char *Txt_Users_of_the_centre =
#if L==1
"Usuaris del centre";

View File

@ -8445,9 +8445,9 @@ static float Usr_GetNumUsrsPerCrs (Rol_Role_t Role)
(unsigned) Role);
break;
case Sco_SCOPE_CRS:
return (float) ( Role == Rol_UNK ? Gbl.CurrentCrs.Crs.NumUsrs : // Any user
(Role == Rol_TCH ? Gbl.CurrentCrs.Crs.NumTchs : // Teachers
Gbl.CurrentCrs.Crs.NumStds)); // Students
return (float) ( Role == Rol_UNK ? Gbl.CurrentCrs.Crs.NumUsrs[Rol_UNK] : // Any user
(Role == Rol_TCH ? Gbl.CurrentCrs.Crs.NumUsrs[Rol_TCH] : // Teachers
Gbl.CurrentCrs.Crs.NumUsrs[Rol_STD])); // Students
default:
Lay_ShowErrorAndExit ("Wrong scope.");
break;