mirror of https://github.com/acanas/swad-core.git
Version 16.232.2
This commit is contained in:
parent
3c84e615e8
commit
e3ad05d77b
|
@ -5099,11 +5099,14 @@ void Act_AdjustCurrentAction (void)
|
|||
return;
|
||||
}
|
||||
|
||||
/***** Check if I am a teacher *****/
|
||||
Rol_GetRolesInAllCrssIfNotYetGot (&Gbl.Usrs.Me.UsrDat);
|
||||
IAmATeacher = (Gbl.Usrs.Me.UsrDat.Roles & ((1 << Rol_NET) | // I am a non-editing teacher...
|
||||
(1 << Rol_TCH))); // ...or a teacher in any course
|
||||
|
||||
/***** If I haven't filled my institution,
|
||||
or if I'm a teacher and I haven't filled my centre or department,
|
||||
the only action possible is to show a form to change my common record *****/
|
||||
Rol_GetRolesInAllCrssIfNotYetGot (&Gbl.Usrs.Me.UsrDat);
|
||||
IAmATeacher = (Gbl.Usrs.Me.UsrDat.Roles & (1 << Rol_TCH));
|
||||
if (Gbl.Usrs.Me.UsrDat.InsCod < 0 ||
|
||||
(IAmATeacher && (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0 ||
|
||||
Gbl.Usrs.Me.UsrDat.Tch.DptCod < 0)))
|
||||
|
|
|
@ -233,13 +233,14 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.232.1 (2017-05-31)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.232.2 (2017-05-31)"
|
||||
#define CSS_FILE "swad16.226.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.232.2: May 31, 2017 Fixed bug in selection of user's centre and department. (221089 lines)
|
||||
Version 16.232.1: May 31, 2017 Improvements in selection of user's institution, centre and department. (221085 lines)
|
||||
Version 16.232: May 31, 2017 Fix bug in selection of user's centre. (221042 lines)
|
||||
Version 16.231.4: May 31, 2017 Changes in layout of statistics about institutions.
|
||||
|
|
|
@ -3990,20 +3990,21 @@ void Rec_ShowFormMyInsCtrDpt (void)
|
|||
unsigned NumIns;
|
||||
unsigned NumCtr;
|
||||
unsigned NumDpt;
|
||||
bool IAmTeacher;
|
||||
bool IAmATeacher;
|
||||
|
||||
/***** Get my roles if not yet got *****/
|
||||
Rol_GetRolesInAllCrssIfNotYetGot (&Gbl.Usrs.Me.UsrDat);
|
||||
|
||||
/***** Check if I am a teacher *****/
|
||||
IAmTeacher = (Gbl.Usrs.Me.UsrDat.Roles & (1 << Rol_TCH));
|
||||
IAmATeacher = (Gbl.Usrs.Me.UsrDat.Roles & ((1 << Rol_NET) | // I am a non-editing teacher...
|
||||
(1 << Rol_TCH))); // ...or a teacher in any course
|
||||
|
||||
/***** If there is no country, institution, centre or department *****/
|
||||
if (Gbl.Usrs.Me.UsrDat.InsCtyCod < 0)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_select_the_country_of_your_institution);
|
||||
else if (Gbl.Usrs.Me.UsrDat.InsCod < 0)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_institution);
|
||||
else if ((Gbl.Usrs.Me.UsrDat.Roles & (1 << Rol_TCH)))
|
||||
else if (IAmATeacher)
|
||||
{
|
||||
if (Gbl.Usrs.Me.UsrDat.Tch.CtrCod < 0)
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_centre);
|
||||
|
@ -4013,8 +4014,8 @@ void Rec_ShowFormMyInsCtrDpt (void)
|
|||
|
||||
/***** Start table *****/
|
||||
Lay_StartRoundFrameTable ("800px",
|
||||
IAmTeacher ? Txt_Institution_centre_and_department :
|
||||
Txt_Institution,
|
||||
IAmATeacher ? Txt_Institution_centre_and_department :
|
||||
Txt_Institution,
|
||||
NULL,Hlp_PROFILE_Institution,2);
|
||||
|
||||
/***** Country *****/
|
||||
|
@ -4104,7 +4105,7 @@ void Rec_ShowFormMyInsCtrDpt (void)
|
|||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
if (IAmTeacher)
|
||||
if (IAmATeacher)
|
||||
{
|
||||
/***** Centre *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
|
Loading…
Reference in New Issue