mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-15 21:24:07 +02:00
Version 16.220.10
This commit is contained in:
parent
449fcc10ba
commit
f266182842
79
swad_ID.c
79
swad_ID.c
|
@ -406,6 +406,7 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat)
|
||||||
/***** Check if I have permission to see another user's IDs *****/
|
/***** Check if I have permission to see another user's IDs *****/
|
||||||
switch (Gbl.Usrs.Me.LoggedRole)
|
switch (Gbl.Usrs.Me.LoggedRole)
|
||||||
{
|
{
|
||||||
|
case Rol_NET:
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
/* Check 1: I can see the IDs of users who do not exist in database */
|
/* Check 1: I can see the IDs of users who do not exist in database */
|
||||||
if (UsrDat->UsrCod <= 0) // User does not exist (when creating a new user)
|
if (UsrDat->UsrCod <= 0) // User does not exist (when creating a new user)
|
||||||
|
@ -413,7 +414,7 @@ bool ID_ICanSeeOtherUsrIDs (const struct UsrData *UsrDat)
|
||||||
|
|
||||||
/* Check 2: I can see the IDs of confirmed students */
|
/* Check 2: I can see the IDs of confirmed students */
|
||||||
if (UsrDat->RoleInCurrentCrsDB == Rol_STD && // A student
|
if (UsrDat->RoleInCurrentCrsDB == Rol_STD && // A student
|
||||||
UsrDat->Accepted) // who accepted registration
|
UsrDat->Accepted) // who accepted registration
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Check 3: I can see the IDs of users with user's data empty */
|
/* Check 3: I can see the IDs of users with user's data empty */
|
||||||
|
@ -448,12 +449,23 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
|
||||||
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
|
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
||||||
extern const char *Txt_Confirm_ID;
|
extern const char *Txt_Confirm_ID;
|
||||||
|
Act_Action_t NextAction;
|
||||||
|
|
||||||
/***** Start form *****/
|
/***** Start form *****/
|
||||||
Act_FormStartAnchor ( UsrDat->RoleInCurrentCrsDB == Rol_STD ? ActCnfID_Std :
|
switch (UsrDat->RoleInCurrentCrsDB)
|
||||||
(UsrDat->RoleInCurrentCrsDB == Rol_TCH ? ActCnfID_Tch :
|
{
|
||||||
ActCnfID_Oth),
|
case Rol_STD:
|
||||||
Anchor);
|
NextAction = ActCnfID_Std;
|
||||||
|
break;
|
||||||
|
case Rol_NET:
|
||||||
|
case Rol_TCH:
|
||||||
|
NextAction = ActCnfID_Tch;
|
||||||
|
break;
|
||||||
|
default: // Guest, visitor or admin
|
||||||
|
NextAction = ActCnfID_Oth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Act_FormStartAnchor (NextAction,Anchor);
|
||||||
if (Gbl.Action.Original != ActUnk)
|
if (Gbl.Action.Original != ActUnk)
|
||||||
{
|
{
|
||||||
Par_PutHiddenParamLong ("OriginalActCod",
|
Par_PutHiddenParamLong ("OriginalActCod",
|
||||||
|
@ -490,6 +502,7 @@ static void ID_PutLinkToConfirmID (struct UsrData *UsrDat,unsigned NumID,
|
||||||
void ID_PutLinkToChangeUsrIDs (void)
|
void ID_PutLinkToChangeUsrIDs (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Change_IDs;
|
extern const char *Txt_Change_IDs;
|
||||||
|
Act_Action_t NextAction;
|
||||||
|
|
||||||
/***** Link for changing the password *****/
|
/***** Link for changing the password *****/
|
||||||
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
|
if (Gbl.Usrs.Other.UsrDat.UsrCod == Gbl.Usrs.Me.UsrDat.UsrCod) // It's me
|
||||||
|
@ -498,13 +511,26 @@ void ID_PutLinkToChangeUsrIDs (void)
|
||||||
Txt_Change_IDs,Txt_Change_IDs,
|
Txt_Change_IDs,Txt_Change_IDs,
|
||||||
NULL);
|
NULL);
|
||||||
else // Not me
|
else // Not me
|
||||||
Lay_PutContextualLink ( Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_STD ? ActFrmIDsStd :
|
{
|
||||||
(Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB == Rol_TCH ? ActFrmIDsTch :
|
switch (Gbl.Usrs.Other.UsrDat.RoleInCurrentCrsDB)
|
||||||
ActFrmIDsOth), // Guest, visitor or admin
|
{
|
||||||
NULL,Usr_PutParamOtherUsrCodEncrypted,
|
case Rol_STD:
|
||||||
|
NextAction = ActFrmIDsStd;
|
||||||
|
break;
|
||||||
|
case Rol_NET:
|
||||||
|
case Rol_TCH:
|
||||||
|
NextAction = ActFrmIDsTch;
|
||||||
|
break;
|
||||||
|
default: // Guest, visitor or admin
|
||||||
|
NextAction = ActFrmIDsOth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Lay_PutContextualLink (NextAction,NULL,
|
||||||
|
Usr_PutParamOtherUsrCodEncrypted,
|
||||||
"arroba64x64.gif",
|
"arroba64x64.gif",
|
||||||
Txt_Change_IDs,Txt_Change_IDs,
|
Txt_Change_IDs,Txt_Change_IDs,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -559,6 +585,7 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
||||||
extern const char *Txt_If_there_are_multiple_versions_of_the_ID_;
|
extern const char *Txt_If_there_are_multiple_versions_of_the_ID_;
|
||||||
extern const char *Txt_The_ID_is_used_in_order_to_facilitate_;
|
extern const char *Txt_The_ID_is_used_in_order_to_facilitate_;
|
||||||
unsigned NumID;
|
unsigned NumID;
|
||||||
|
Act_Action_t NextAction;
|
||||||
|
|
||||||
/***** List existing user's IDs *****/
|
/***** List existing user's IDs *****/
|
||||||
for (NumID = 0;
|
for (NumID = 0;
|
||||||
|
@ -587,9 +614,20 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
||||||
Act_FormStart (ActRemID_Me);
|
Act_FormStart (ActRemID_Me);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Act_FormStart ( UsrDat->RoleInCurrentCrsDB == Rol_STD ? ActRemID_Std :
|
switch (UsrDat->RoleInCurrentCrsDB)
|
||||||
(UsrDat->RoleInCurrentCrsDB == Rol_TCH ? ActRemID_Tch :
|
{
|
||||||
ActRemID_Oth)); // Guest, visitor or admin
|
case Rol_STD:
|
||||||
|
NextAction = ActRemID_Std;
|
||||||
|
break;
|
||||||
|
case Rol_NET:
|
||||||
|
case Rol_TCH:
|
||||||
|
NextAction = ActRemID_Tch;
|
||||||
|
break;
|
||||||
|
default: // Guest, visitor or admin
|
||||||
|
NextAction = ActRemID_Oth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Act_FormStart (NextAction);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"UsrID\" value=\"%s\" />",
|
fprintf (Gbl.F.Out,"<input type=\"hidden\" name=\"UsrID\" value=\"%s\" />",
|
||||||
|
@ -641,9 +679,20 @@ void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat,bool ItsMe)
|
||||||
Act_FormStart (ActNewIDMe);
|
Act_FormStart (ActNewIDMe);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Act_FormStart ( UsrDat->RoleInCurrentCrsDB == Rol_STD ? ActNewID_Std :
|
switch (UsrDat->RoleInCurrentCrsDB)
|
||||||
(UsrDat->RoleInCurrentCrsDB == Rol_TCH ? ActNewID_Tch :
|
{
|
||||||
ActNewID_Oth)); // Guest, visitor or admin
|
case Rol_STD:
|
||||||
|
NextAction = ActNewID_Std;
|
||||||
|
break;
|
||||||
|
case Rol_NET:
|
||||||
|
case Rol_TCH:
|
||||||
|
NextAction = ActNewID_Tch;
|
||||||
|
break;
|
||||||
|
default: // Guest, visitor or admin
|
||||||
|
NextAction = ActNewID_Oth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Act_FormStart (NextAction);
|
||||||
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
Usr_PutParamUsrCodEncrypted (UsrDat->EncryptedUsrCod);
|
||||||
}
|
}
|
||||||
fprintf (Gbl.F.Out,"<div class=\"FORM_ACCOUNT\">"
|
fprintf (Gbl.F.Out,"<div class=\"FORM_ACCOUNT\">"
|
||||||
|
|
|
@ -233,13 +233,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.220.9 (2017-05-22)"
|
#define Log_PLATFORM_VERSION "SWAD 16.220.10 (2017-05-22)"
|
||||||
#define CSS_FILE "swad16.209.3.css"
|
#define CSS_FILE "swad16.209.3.css"
|
||||||
#define JS_FILE "swad16.206.3.js"
|
#define JS_FILE "swad16.206.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 16.220.10:May 22, 2017 Changes related with new role. Not finished. (219775 lines)
|
||||||
Version 16.220.9: May 22, 2017 Changes related with new role. Not finished. (219720 lines)
|
Version 16.220.9: May 22, 2017 Changes related with new role. Not finished. (219720 lines)
|
||||||
Version 16.220.8: May 22, 2017 Changes related with new role. Not finished. (219663 lines)
|
Version 16.220.8: May 22, 2017 Changes related with new role. Not finished. (219663 lines)
|
||||||
4 changes necessary in database:
|
4 changes necessary in database:
|
||||||
|
|
|
@ -4709,7 +4709,8 @@ static void Brw_PutCheckboxFullTree (void)
|
||||||
|
|
||||||
Lay_PutContextualCheckbox (Brw_ActSeeAdm[Gbl.FileBrowser.Type],
|
Lay_PutContextualCheckbox (Brw_ActSeeAdm[Gbl.FileBrowser.Type],
|
||||||
Brw_PutParamsFullTree,
|
Brw_PutParamsFullTree,
|
||||||
"FullTree",Gbl.FileBrowser.FullTree,
|
"FullTree",
|
||||||
|
Gbl.FileBrowser.FullTree,false,
|
||||||
Txt_Show_all_files,Txt_Show_all_files);
|
Txt_Show_all_files,Txt_Show_all_files);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1635,14 +1635,14 @@ void Grp_ListGrpsToEditAsgAttOrSvy (struct GroupType *GrpTyp,long Cod,Grp_AsgOrS
|
||||||
void Grp_ReqRegisterInGrps (void)
|
void Grp_ReqRegisterInGrps (void)
|
||||||
{
|
{
|
||||||
/***** Show list of groups to register/remove me *****/
|
/***** Show list of groups to register/remove me *****/
|
||||||
Grp_ShowLstGrpsToChgMyGrps ((Gbl.Usrs.Me.LoggedRole == Rol_STD));
|
Grp_ShowLstGrpsToChgMyGrps ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Show list of groups to register/remove me *****************/
|
/***************** Show list of groups to register/remove me *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
|
void Grp_ShowLstGrpsToChgMyGrps (void)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_USERS_Groups;
|
extern const char *Hlp_USERS_Groups;
|
||||||
extern const char *Txt_My_groups;
|
extern const char *Txt_My_groups;
|
||||||
|
@ -1664,7 +1664,7 @@ void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents)
|
||||||
|
|
||||||
/***** Show warnings to students *****/
|
/***** Show warnings to students *****/
|
||||||
// Students are required to join groups with mandatory enrolment; teachers don't
|
// Students are required to join groups with mandatory enrolment; teachers don't
|
||||||
if (ShowWarningsToStudents)
|
if (Gbl.Usrs.Me.LoggedRole == Rol_STD)
|
||||||
Grp_ShowWarningToStdsToChangeGrps ();
|
Grp_ShowWarningToStdsToChangeGrps ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@ void Grp_RemUsrFromAllGrps (struct UsrData *UsrDat,Cns_QuietOrVerbose_t QuietOrV
|
||||||
void Grp_ListGrpsToEditAsgAttOrSvy (struct GroupType *GrpTyp,long Cod,Grp_AsgOrSvy_t Grp_AsgOrSvy);
|
void Grp_ListGrpsToEditAsgAttOrSvy (struct GroupType *GrpTyp,long Cod,Grp_AsgOrSvy_t Grp_AsgOrSvy);
|
||||||
|
|
||||||
void Grp_ReqRegisterInGrps (void);
|
void Grp_ReqRegisterInGrps (void);
|
||||||
void Grp_ShowLstGrpsToChgMyGrps (bool ShowWarningsToStudents);
|
void Grp_ShowLstGrpsToChgMyGrps (void);
|
||||||
void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod);
|
void Grp_ShowLstGrpsToChgOtherUsrsGrps (long UsrCod);
|
||||||
|
|
||||||
void Grp_GetListGrpTypesInThisCrs (Grp_WhichGroupTypes_t WhichGroupTypes);
|
void Grp_GetListGrpTypesInThisCrs (Grp_WhichGroupTypes_t WhichGroupTypes);
|
||||||
|
|
|
@ -1116,8 +1116,9 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat
|
||||||
break;
|
break;
|
||||||
case Ind_INDICATORS_FULL:
|
case Ind_INDICATORS_FULL:
|
||||||
/* Get number of users */
|
/* Get number of users */
|
||||||
NumStds = Usr_GetNumUsrsInCrs (Rol_STD,CrsCod);
|
NumStds = Usr_GetNumUsrsInCrs (Rol_STD,CrsCod); // Students
|
||||||
NumTchs = Usr_GetNumUsrsInCrs (Rol_TCH,CrsCod);
|
NumTchs = Usr_GetNumUsrsInCrs (Rol_NET,CrsCod) + // Non-editing teachers
|
||||||
|
Usr_GetNumUsrsInCrs (Rol_TCH,CrsCod); // Teachers
|
||||||
|
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
"<td class=\"%s LEFT_MIDDLE COLOR%u\">"
|
||||||
|
|
15
swad_info.c
15
swad_info.c
|
@ -299,7 +299,7 @@ extern const char *Hlp_ASSESSMENT_System_edit;
|
||||||
|
|
||||||
static void Inf_PutButtonToEditInfo (void);
|
static void Inf_PutButtonToEditInfo (void);
|
||||||
static void Inf_PutIconToViewInfo (void);
|
static void Inf_PutIconToViewInfo (void);
|
||||||
static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead);
|
static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead,bool Disabled);
|
||||||
static void Inf_PutCheckboxConfirmIHaveReadInfo (void);
|
static void Inf_PutCheckboxConfirmIHaveReadInfo (void);
|
||||||
static bool Inf_CheckIfIHaveReadInfo (void);
|
static bool Inf_CheckIfIHaveReadInfo (void);
|
||||||
static bool Inf_GetMustBeReadFromForm (void);
|
static bool Inf_GetMustBeReadFromForm (void);
|
||||||
|
@ -340,6 +340,7 @@ void Inf_ShowInfo (void)
|
||||||
extern const char *Txt_No_information;
|
extern const char *Txt_No_information;
|
||||||
Inf_InfoSrc_t InfoSrc;
|
Inf_InfoSrc_t InfoSrc;
|
||||||
bool MustBeRead;
|
bool MustBeRead;
|
||||||
|
bool Disabled;
|
||||||
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_TCH ||
|
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_TCH ||
|
||||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
||||||
bool ShowWarningNoInfo = false;
|
bool ShowWarningNoInfo = false;
|
||||||
|
@ -384,13 +385,15 @@ void Inf_ShowInfo (void)
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Rol_NET:
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
/* Put checkbox to force students to read this couse info */
|
/* Put checkbox to force students to read this couse info */
|
||||||
if (InfoSrc != Inf_INFO_SRC_NONE)
|
if (InfoSrc != Inf_INFO_SRC_NONE)
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
Inf_PutCheckboxForceStdsToReadInfo (MustBeRead);
|
Disabled = (Gbl.Usrs.Me.LoggedRole == Rol_NET); // Non-editing teachers can not change the status of checkbox
|
||||||
|
Inf_PutCheckboxForceStdsToReadInfo (MustBeRead,Disabled);
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -480,13 +483,14 @@ void Inf_PutIconToEditInfo (void)
|
||||||
/********** Put a form (checkbox) to force students to read info *************/
|
/********** Put a form (checkbox) to force students to read info *************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead)
|
static void Inf_PutCheckboxForceStdsToReadInfo (bool MustBeRead,bool Disabled)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Force_students_to_read_this_information;
|
extern const char *Txt_Force_students_to_read_this_information;
|
||||||
|
|
||||||
Lay_PutContextualCheckbox (Inf_ActionsChangeForceReadInfo[Gbl.CurrentCrs.Info.Type],
|
Lay_PutContextualCheckbox (Inf_ActionsChangeForceReadInfo[Gbl.CurrentCrs.Info.Type],
|
||||||
NULL,
|
NULL,
|
||||||
"MustBeRead",MustBeRead,
|
"MustBeRead",
|
||||||
|
MustBeRead,Disabled,
|
||||||
Txt_Force_students_to_read_this_information,
|
Txt_Force_students_to_read_this_information,
|
||||||
Txt_Force_students_to_read_this_information);
|
Txt_Force_students_to_read_this_information);
|
||||||
}
|
}
|
||||||
|
@ -502,7 +506,8 @@ static void Inf_PutCheckboxConfirmIHaveReadInfo (void)
|
||||||
|
|
||||||
Lay_PutContextualCheckbox (Inf_ActionsIHaveReadInfo[Gbl.CurrentCrs.Info.Type],
|
Lay_PutContextualCheckbox (Inf_ActionsIHaveReadInfo[Gbl.CurrentCrs.Info.Type],
|
||||||
NULL,
|
NULL,
|
||||||
"IHaveRead",IHaveRead,
|
"IHaveRead",
|
||||||
|
IHaveRead,false,
|
||||||
Txt_I_have_read_this_information,
|
Txt_I_have_read_this_information,
|
||||||
Txt_I_have_read_this_information);
|
Txt_I_have_read_this_information);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ extern struct Globals Gbl;
|
||||||
|
|
||||||
static void Ins_Configuration (bool PrintView);
|
static void Ins_Configuration (bool PrintView);
|
||||||
static void Ins_PutIconsToPrintAndUpload (void);
|
static void Ins_PutIconsToPrintAndUpload (void);
|
||||||
|
static void Ins_ShowNumUsrsInCrssOfIns (Rol_Role_t Role);
|
||||||
|
|
||||||
static void Ins_ListInstitutions (void);
|
static void Ins_ListInstitutions (void);
|
||||||
static bool Ins_CheckIfICanCreateInstitutions (void);
|
static bool Ins_CheckIfICanCreateInstitutions (void);
|
||||||
|
@ -298,7 +299,6 @@ static void Ins_Configuration (bool PrintView)
|
||||||
extern const char *Txt_Courses;
|
extern const char *Txt_Courses;
|
||||||
extern const char *Txt_Departments;
|
extern const char *Txt_Departments;
|
||||||
extern const char *Txt_Users_of_the_institution;
|
extern const char *Txt_Users_of_the_institution;
|
||||||
extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
|
|
||||||
unsigned NumCty;
|
unsigned NumCty;
|
||||||
bool PutLink = !PrintView && Gbl.CurrentIns.Ins.WWW[0];
|
bool PutLink = !PrintView && Gbl.CurrentIns.Ins.WWW[0];
|
||||||
|
|
||||||
|
@ -573,45 +573,11 @@ static void Ins_Configuration (bool PrintView)
|
||||||
Txt_Departments,
|
Txt_Departments,
|
||||||
Dpt_GetNumDepartmentsInInstitution (Gbl.CurrentIns.Ins.InsCod));
|
Dpt_GetNumDepartmentsInInstitution (Gbl.CurrentIns.Ins.InsCod));
|
||||||
|
|
||||||
/***** Number of teachers in courses of this institution *****/
|
|
||||||
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_GetNumUsrsInCrssOfIns (Rol_TCH,Gbl.CurrentIns.Ins.InsCod));
|
|
||||||
|
|
||||||
/***** Number of students in courses of this institution *****/
|
|
||||||
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_GetNumUsrsInCrssOfIns (Rol_STD,Gbl.CurrentIns.Ins.InsCod));
|
|
||||||
|
|
||||||
/***** Number of users in courses of this institution *****/
|
/***** Number of users in courses of this institution *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
Ins_ShowNumUsrsInCrssOfIns (Rol_TCH);
|
||||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
Ins_ShowNumUsrsInCrssOfIns (Rol_NET);
|
||||||
"%s + %s:"
|
Ins_ShowNumUsrsInCrssOfIns (Rol_STD);
|
||||||
"</td>"
|
Ins_ShowNumUsrsInCrssOfIns (Rol_UNK);
|
||||||
"<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_GetNumUsrsInCrssOfIns (Rol_UNK,Gbl.CurrentIns.Ins.InsCod));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -636,6 +602,30 @@ static void Ins_PutIconsToPrintAndUpload (void)
|
||||||
Log_PutIconToChangeLogo (Sco_SCOPE_INS);
|
Log_PutIconToChangeLogo (Sco_SCOPE_INS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/************** Number of users in courses of this institution ***************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Ins_ShowNumUsrsInCrssOfIns (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_GetNumUsrsInCrssOfIns (Role,Gbl.CurrentIns.Ins.InsCod));
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/**************** List the institutions of the current country ***************/
|
/**************** List the institutions of the current country ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1169,7 +1169,8 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
|
||||||
|
|
||||||
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||||
void (*FuncParams) (),
|
void (*FuncParams) (),
|
||||||
const char *CheckboxName,bool Checked,
|
const char *CheckboxName,
|
||||||
|
bool Checked,bool Disabled,
|
||||||
const char *Title,const char *Text)
|
const char *Title,const char *Text)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
extern const char *The_ClassFormBold[The_NUM_THEMES];
|
||||||
|
@ -1197,8 +1198,12 @@ void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||||
CheckboxName);
|
CheckboxName);
|
||||||
if (Checked)
|
if (Checked)
|
||||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||||
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\" />",
|
if (Disabled)
|
||||||
Gbl.Form.Id);
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
|
else
|
||||||
|
fprintf (Gbl.F.Out," onclick=\"document.getElementById('%s').submit();\"",
|
||||||
|
Gbl.Form.Id);
|
||||||
|
fprintf (Gbl.F.Out," />");
|
||||||
if (Text)
|
if (Text)
|
||||||
if (Text[0])
|
if (Text[0])
|
||||||
fprintf (Gbl.F.Out," %s",
|
fprintf (Gbl.F.Out," %s",
|
||||||
|
|
|
@ -71,7 +71,8 @@ void Lay_PutContextualLink (Act_Action_t NextAction,const char *Anchor,
|
||||||
const char *OnSubmit);
|
const char *OnSubmit);
|
||||||
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
void Lay_PutContextualCheckbox (Act_Action_t NextAction,
|
||||||
void (*FuncParams) (),
|
void (*FuncParams) (),
|
||||||
const char *CheckboxName,bool Checked,
|
const char *CheckboxName,
|
||||||
|
bool Checked,bool Disabled,
|
||||||
const char *Title,const char *Text);
|
const char *Title,const char *Text);
|
||||||
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
|
void Lay_PutIconLink (const char *Icon,const char *Title,const char *Text,
|
||||||
const char *LinkStyle,const char *OnSubmit);
|
const char *LinkStyle,const char *OnSubmit);
|
||||||
|
|
|
@ -669,7 +669,8 @@ static void Ntf_WriteFormAllNotifications (bool AllNotifications)
|
||||||
extern const char *Txt_Show_all_NOTIFICATIONS;
|
extern const char *Txt_Show_all_NOTIFICATIONS;
|
||||||
|
|
||||||
Lay_PutContextualCheckbox (ActSeeNtf,NULL,
|
Lay_PutContextualCheckbox (ActSeeNtf,NULL,
|
||||||
"All",AllNotifications,
|
"All",
|
||||||
|
AllNotifications,false,
|
||||||
Txt_Show_all_notifications,
|
Txt_Show_all_notifications,
|
||||||
Txt_Show_all_NOTIFICATIONS);
|
Txt_Show_all_NOTIFICATIONS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1562,7 +1562,8 @@ static void Rec_WriteFormShowOfficeHoursOneTch (bool ShowOfficeHours)
|
||||||
extern const char *Txt_Show_office_hours;
|
extern const char *Txt_Show_office_hours;
|
||||||
|
|
||||||
Lay_PutContextualCheckbox (ActSeeRecOneTch,Rec_PutParamsShowOfficeHoursOneTch,
|
Lay_PutContextualCheckbox (ActSeeRecOneTch,Rec_PutParamsShowOfficeHoursOneTch,
|
||||||
"ShowOfficeHours",ShowOfficeHours,
|
"ShowOfficeHours",
|
||||||
|
ShowOfficeHours,false,
|
||||||
Txt_Show_office_hours,
|
Txt_Show_office_hours,
|
||||||
Txt_Show_office_hours);
|
Txt_Show_office_hours);
|
||||||
}
|
}
|
||||||
|
@ -1572,7 +1573,8 @@ static void Rec_WriteFormShowOfficeHoursSeveralTchs (bool ShowOfficeHours)
|
||||||
extern const char *Txt_Show_office_hours;
|
extern const char *Txt_Show_office_hours;
|
||||||
|
|
||||||
Lay_PutContextualCheckbox (ActSeeRecSevTch,Rec_PutParamsShowOfficeHoursSeveralTchs,
|
Lay_PutContextualCheckbox (ActSeeRecSevTch,Rec_PutParamsShowOfficeHoursSeveralTchs,
|
||||||
"ShowOfficeHours",ShowOfficeHours,
|
"ShowOfficeHours",
|
||||||
|
ShowOfficeHours,false,
|
||||||
Txt_Show_office_hours,
|
Txt_Show_office_hours,
|
||||||
Txt_Show_office_hours);
|
Txt_Show_office_hours);
|
||||||
}
|
}
|
||||||
|
@ -2453,7 +2455,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
|
||||||
{
|
{
|
||||||
// Don't show groups if I don't belong to course
|
// Don't show groups if I don't belong to course
|
||||||
if (Gbl.Usrs.Me.IBelongToCurrentCrs)
|
if (Gbl.Usrs.Me.IBelongToCurrentCrs)
|
||||||
Grp_ShowLstGrpsToChgMyGrps ((Gbl.Usrs.Me.LoggedRole == Rol_STD));
|
Grp_ShowLstGrpsToChgMyGrps ();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Grp_ShowLstGrpsToChgOtherUsrsGrps (UsrDat->UsrCod);
|
Grp_ShowLstGrpsToChgOtherUsrsGrps (UsrDat->UsrCod);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user