mirror of https://github.com/acanas/swad-core.git
Version 23.41.2: Oct 29, 2023 Code refactoring in class photo.
This commit is contained in:
parent
362c522791
commit
c9f70dcafb
|
@ -387,7 +387,7 @@ void Asg_PrintOneAssignment (void)
|
||||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (Vie_PRINT,false);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
|
|
@ -2469,7 +2469,7 @@ static void Att_GetListSelectedAttCods (struct Att_Events *Events)
|
||||||
{
|
{
|
||||||
/***** Set which events will be marked as selected by default *****/
|
/***** Set which events will be marked as selected by default *****/
|
||||||
if (!Gbl.Crs.Grps.NumGrps || // Course has no groups
|
if (!Gbl.Crs.Grps.NumGrps || // Course has no groups
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups) // All groups selected
|
Gbl.Crs.Grps.AllGrps) // All groups selected
|
||||||
/* Set all events as selected */
|
/* Set all events as selected */
|
||||||
for (NumAttEvent = 0;
|
for (NumAttEvent = 0;
|
||||||
NumAttEvent < Events->Num;
|
NumAttEvent < Events->Num;
|
||||||
|
|
|
@ -267,7 +267,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
||||||
Box_NOT_CLOSABLE);
|
Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (ViewType,false);
|
Lay_WriteHeaderClassPhoto (ViewType);
|
||||||
|
|
||||||
/***** Preference selector to change first day of week *****/
|
/***** Preference selector to change first day of week *****/
|
||||||
if (ViewType == Vie_VIEW)
|
if (ViewType == Vie_VIEW)
|
||||||
|
|
|
@ -633,10 +633,12 @@ Me sale este error, no s
|
||||||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 23.41 (2023-10-29)"
|
#define Log_PLATFORM_VERSION "SWAD 23.41.2 (2023-10-29)"
|
||||||
#define CSS_FILE "swad23.35.1.css"
|
#define CSS_FILE "swad23.35.1.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.41.2: Oct 29, 2023 Code refactoring in class photo. (335361 lines)
|
||||||
|
Version 23.41.1: Oct 29, 2023 Code refactoring in view/edit/print. (335361 lines)
|
||||||
Version 23.41: Oct 29, 2023 Code refactoring in view/edit/print. (335359 lines)
|
Version 23.41: Oct 29, 2023 Code refactoring in view/edit/print. (335359 lines)
|
||||||
Version 23.40: Oct 28, 2023 Code refactoring in view/edit. (335273 lines)
|
Version 23.40: Oct 28, 2023 Code refactoring in view/edit. (335273 lines)
|
||||||
Version 23.39: Oct 27, 2023 Code refactoring in contracted/expanded and rubrics. (335209 lines)
|
Version 23.39: Oct 27, 2023 Code refactoring in contracted/expanded and rubrics. (335209 lines)
|
||||||
|
|
|
@ -1778,7 +1778,7 @@ unsigned Enr_RemAllStdsInCrs (struct Hie_Node *Crs)
|
||||||
unsigned NumUsr;
|
unsigned NumUsr;
|
||||||
|
|
||||||
/***** Get list of students in current course *****/
|
/***** Get list of students in current course *****/
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups = true; // Get all students of the current course
|
Gbl.Crs.Grps.AllGrps = true; // Get all students of the current course
|
||||||
Usr_GetListUsrs (Hie_CRS,Rol_STD);
|
Usr_GetListUsrs (Hie_CRS,Rol_STD);
|
||||||
NumStdsInCrs = Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs;
|
NumStdsInCrs = Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs;
|
||||||
|
|
||||||
|
|
|
@ -581,7 +581,7 @@ static void ExaPrn_ShowExamPrintToFillIt (struct Exa_Exams *Exams,
|
||||||
|
|
||||||
/***** Heading *****/
|
/***** Heading *****/
|
||||||
/* Institution, degree and course */
|
/* Institution, degree and course */
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Show user and time *****/
|
/***** Show user and time *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam,
|
||||||
Hlp_ASSESSMENT_Exams_results,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Exams_results,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Header *****/
|
/***** Header *****/
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Check user data *****/
|
/***** Check user data *****/
|
||||||
/* Get data of the user who answered the exam print */
|
/* Get data of the user who answered the exam print */
|
||||||
|
|
|
@ -190,7 +190,7 @@ void Gbl_InitializeGlobals (void)
|
||||||
Gbl.Usrs.Listing.RecsPerPag = Rec_DEF_RECORDS_PER_PAGE;
|
Gbl.Usrs.Listing.RecsPerPag = Rec_DEF_RECORDS_PER_PAGE;
|
||||||
Gbl.Usrs.Listing.WithPhotos = Usr_LIST_WITH_PHOTOS_DEF;
|
Gbl.Usrs.Listing.WithPhotos = Usr_LIST_WITH_PHOTOS_DEF;
|
||||||
|
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups = true;
|
Gbl.Crs.Grps.AllGrps = true;
|
||||||
Gbl.Usrs.ClassPhoto.Cols = Usr_CLASS_PHOTO_COLS_DEF;
|
Gbl.Usrs.ClassPhoto.Cols = Usr_CLASS_PHOTO_COLS_DEF;
|
||||||
|
|
||||||
Gbl.Scope.Current = Hie_CRS;
|
Gbl.Scope.Current = Hie_CRS;
|
||||||
|
|
|
@ -157,7 +157,6 @@ struct Globals
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
unsigned Cols;
|
unsigned Cols;
|
||||||
bool AllGroups;
|
|
||||||
} ClassPhoto;
|
} ClassPhoto;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
|
20
swad_group.c
20
swad_group.c
|
@ -433,9 +433,9 @@ static void Grp_PutCheckboxAllGrps (Grp_WhichGroups_t GroupsSelectableByStdsOrNE
|
||||||
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
HTM_LABEL_Begin ("class=\"FORM_IN_%s\"",The_GetSuffix ());
|
||||||
HTM_INPUT_CHECKBOX ("AllGroups",HTM_DONT_SUBMIT_ON_CHANGE,
|
HTM_INPUT_CHECKBOX ("AllGroups",HTM_DONT_SUBMIT_ON_CHANGE,
|
||||||
"value=\"Y\"%s",
|
"value=\"Y\"%s",
|
||||||
ICanSelUnselGroup ? (Gbl.Usrs.ClassPhoto.AllGroups ? " checked=\"checked\""
|
ICanSelUnselGroup ? (Gbl.Crs.Grps.AllGrps ? " checked=\"checked\""
|
||||||
" onclick=\"togglecheckChildren(this,'GrpCods')\"" :
|
" onclick=\"togglecheckChildren(this,'GrpCods')\"" :
|
||||||
" onclick=\"togglecheckChildren(this,'GrpCods')\"") :
|
" onclick=\"togglecheckChildren(this,'GrpCods')\"") :
|
||||||
" disabled=\"disabled\"");
|
" disabled=\"disabled\"");
|
||||||
HTM_TxtF (" %s",Txt_All_groups);
|
HTM_TxtF (" %s",Txt_All_groups);
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
|
@ -456,11 +456,11 @@ void Grp_PutParsCodGrps (void)
|
||||||
|
|
||||||
/***** Write the boolean parameter that indicates if all groups must be listed *****/
|
/***** Write the boolean parameter that indicates if all groups must be listed *****/
|
||||||
Par_PutParChar ("AllGroups",
|
Par_PutParChar ("AllGroups",
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups ? 'Y' :
|
Gbl.Crs.Grps.AllGrps ? 'Y' :
|
||||||
'N');
|
'N');
|
||||||
|
|
||||||
/***** Write the parameter with the list of group codes to show *****/
|
/***** Write the parameter with the list of group codes to show *****/
|
||||||
if (!Gbl.Usrs.ClassPhoto.AllGroups &&
|
if (!Gbl.Crs.Grps.AllGrps &&
|
||||||
Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
||||||
{
|
{
|
||||||
MaxLengthGrpCods = Gbl.Crs.Grps.LstGrpsSel.NumGrps * (Cns_MAX_DECIMAL_DIGITS_LONG + 1) - 1;
|
MaxLengthGrpCods = Gbl.Crs.Grps.LstGrpsSel.NumGrps * (Cns_MAX_DECIMAL_DIGITS_LONG + 1) - 1;
|
||||||
|
@ -498,7 +498,7 @@ void Grp_GetParCodsSeveralGrpsToShowUsrs (void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Get boolean parameter that indicates if all groups must be listed *****/
|
/***** Get boolean parameter that indicates if all groups must be listed *****/
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups = Par_GetParBool ("AllGroups");
|
Gbl.Crs.Grps.AllGrps = Par_GetParBool ("AllGroups");
|
||||||
|
|
||||||
/***** Get parameter with list of groups selected *****/
|
/***** Get parameter with list of groups selected *****/
|
||||||
Grp_GetParCodsSeveralGrps ();
|
Grp_GetParCodsSeveralGrps ();
|
||||||
|
@ -532,7 +532,7 @@ void Grp_GetParCodsSeveralGrpsToShowUsrs (void)
|
||||||
|
|
||||||
/***** If no groups selected ==> show all groups *****/
|
/***** If no groups selected ==> show all groups *****/
|
||||||
if (!Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
if (!Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
||||||
Gbl.Usrs.ClassPhoto.AllGroups = true;
|
Gbl.Crs.Grps.AllGrps = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2146,7 +2146,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This group should be checked? */
|
/* This group should be checked? */
|
||||||
if (Gbl.Usrs.ClassPhoto.AllGroups)
|
if (Gbl.Crs.Grps.AllGrps)
|
||||||
Checked = true;
|
Checked = true;
|
||||||
else
|
else
|
||||||
for (NumGrpSel = 0, Checked = false;
|
for (NumGrpSel = 0, Checked = false;
|
||||||
|
@ -2186,7 +2186,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
|
||||||
ICanSelUnselGroup = (Gbl.Usrs.Me.Role.Logged >= Rol_STD);
|
ICanSelUnselGroup = (Gbl.Usrs.Me.Role.Logged >= Rol_STD);
|
||||||
if (ICanSelUnselGroup)
|
if (ICanSelUnselGroup)
|
||||||
{
|
{
|
||||||
if (Gbl.Usrs.ClassPhoto.AllGroups)
|
if (Gbl.Crs.Grps.AllGrps)
|
||||||
Checked = true;
|
Checked = true;
|
||||||
else
|
else
|
||||||
for (NumGrpSel = 0, Checked = false;
|
for (NumGrpSel = 0, Checked = false;
|
||||||
|
|
|
@ -154,6 +154,7 @@ struct Grp_Groups
|
||||||
unsigned MaxStudents;
|
unsigned MaxStudents;
|
||||||
bool Open;
|
bool Open;
|
||||||
bool FileZones;
|
bool FileZones;
|
||||||
|
bool AllGrps; // All groups selected?
|
||||||
struct ListCodGrps LstGrpsSel;
|
struct ListCodGrps LstGrpsSel;
|
||||||
Grp_WhichGroups_t WhichGrps; // Show my groups or all groups
|
Grp_WhichGroups_t WhichGrps; // Show my groups or all groups
|
||||||
};
|
};
|
||||||
|
|
|
@ -1441,7 +1441,7 @@ static bool Inf_CheckAndShowPlainTxt (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
|
||||||
|
@ -1531,7 +1531,7 @@ static bool Inf_CheckAndShowRichTxt (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
|
@ -1664,7 +1664,7 @@ void Inf_EditPlainTxtInfo (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Get info text from database *****/
|
/***** Get info text from database *****/
|
||||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||||
|
@ -1732,7 +1732,7 @@ void Inf_EditRichTxtInfo (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Get info text from database *****/
|
/***** Get info text from database *****/
|
||||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ static void Lay_WriteFootFromHTMLFile (void)
|
||||||
/****** Write header and footer of the class photo or academic calendar ******/
|
/****** Write header and footer of the class photo or academic calendar ******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType,bool DrawingClassPhoto)
|
void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
struct Hie_Node Hie[Hie_NUM_LEVELS];
|
struct Hie_Node Hie[Hie_NUM_LEVELS];
|
||||||
|
|
||||||
|
@ -1532,7 +1532,7 @@ void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType,bool DrawingClassPhoto)
|
||||||
if (Hie[Hie_CRS].HieCod > 0)
|
if (Hie[Hie_CRS].HieCod > 0)
|
||||||
{
|
{
|
||||||
HTM_Txt (Hie[Hie_CRS].FullName);
|
HTM_Txt (Hie[Hie_CRS].FullName);
|
||||||
if (DrawingClassPhoto && !Gbl.Usrs.ClassPhoto.AllGroups)
|
if (!Gbl.Crs.Grps.AllGrps)
|
||||||
{
|
{
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
Grp_WriteNamesOfSelectedGrps ();
|
Grp_WriteNamesOfSelectedGrps ();
|
||||||
|
|
|
@ -68,7 +68,7 @@ void Lay_WriteAboutZone (void);
|
||||||
void Lay_RefreshNotifsAndConnected (void);
|
void Lay_RefreshNotifsAndConnected (void);
|
||||||
void Lay_RefreshLastClicks (void);
|
void Lay_RefreshLastClicks (void);
|
||||||
|
|
||||||
void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType,bool DrawingClassPhoto);
|
void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType);
|
||||||
|
|
||||||
void Lay_AdvertisementMobile (void);
|
void Lay_AdvertisementMobile (void);
|
||||||
|
|
||||||
|
|
|
@ -1097,7 +1097,7 @@ void MchRes_ShowOneMchResult (void)
|
||||||
Box_BoxBegin (NULL,Match.Title,
|
Box_BoxBegin (NULL,Match.Title,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Games_results,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Games_results,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ void Prj_PrintOneProject (void)
|
||||||
Prj_GetProjectDataByCod (&Projects.Prj);
|
Prj_GetProjectDataByCod (&Projects.Prj);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (Vie_PRINT,false);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
|
|
@ -347,7 +347,7 @@ void Tst_AssessTest (void)
|
||||||
Box_BoxBegin (NULL,Txt_Result,
|
Box_BoxBegin (NULL,Txt_Result,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Header *****/
|
/***** Header *****/
|
||||||
if (Gbl.Usrs.Me.IBelongToCurrent[Hie_CRS])
|
if (Gbl.Usrs.Me.IBelongToCurrent[Hie_CRS])
|
||||||
|
|
|
@ -218,7 +218,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print,
|
||||||
Box_BoxBegin (NULL,Txt_Test,
|
Box_BoxBegin (NULL,Txt_Test,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
if (Print->NumQsts.All)
|
if (Print->NumQsts.All)
|
||||||
{
|
{
|
||||||
|
@ -2236,7 +2236,7 @@ void TstPrn_ShowOnePrint (void)
|
||||||
Box_BoxBegin (NULL,Txt_Result,
|
Box_BoxBegin (NULL,Txt_Result,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -371,7 +371,7 @@ void Tmt_ShowClassTimeTable (void)
|
||||||
|
|
||||||
/***** Begin time table drawing *****/
|
/***** Begin time table drawing *****/
|
||||||
if (Timetable.Type == Tmt_COURSE_TIMETABLE)
|
if (Timetable.Type == Tmt_COURSE_TIMETABLE)
|
||||||
Lay_WriteHeaderClassPhoto (ViewType,false);
|
Lay_WriteHeaderClassPhoto (ViewType);
|
||||||
|
|
||||||
switch (ViewType)
|
switch (ViewType)
|
||||||
{
|
{
|
||||||
|
|
22
swad_user.c
22
swad_user.c
|
@ -4103,7 +4103,7 @@ static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
|
|
||||||
/***** Begin table with list of students *****/
|
/***** Begin table with list of students *****/
|
||||||
if (!Gbl.Usrs.ClassPhoto.AllGroups)
|
if (!Gbl.Crs.Grps.AllGrps)
|
||||||
{
|
{
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TD_Begin ("colspan=\"%u\" class=\"TIT CM\"",
|
HTM_TD_Begin ("colspan=\"%u\" class=\"TIT CM\"",
|
||||||
|
@ -4422,7 +4422,7 @@ void Usr_ListAllDataStds (void)
|
||||||
/***** Begin table with list of students *****/
|
/***** Begin table with list of students *****/
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
|
|
||||||
if (!Gbl.Usrs.ClassPhoto.AllGroups)
|
if (!Gbl.Crs.Grps.AllGrps)
|
||||||
{
|
{
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
HTM_TD_Begin ("colspan=\"%u\" class=\"TIT CM\"",NumColsTotal);
|
HTM_TD_Begin ("colspan=\"%u\" class=\"TIT CM\"",NumColsTotal);
|
||||||
|
@ -5082,7 +5082,7 @@ void Usr_SeeGuests (void)
|
||||||
|
|
||||||
/***** Draw a class photo with guests *****/
|
/***** Draw a class photo with guests *****/
|
||||||
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,true);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_GST,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_GST,ICanChooseOption);
|
||||||
|
@ -5232,7 +5232,7 @@ void Usr_SeeStudents (void)
|
||||||
|
|
||||||
/***** Draw a class photo with students of the course *****/
|
/***** Draw a class photo with students of the course *****/
|
||||||
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,true);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_STD,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_STD,ICanChooseOption);
|
||||||
|
@ -5398,7 +5398,7 @@ void Usr_SeeTeachers (void)
|
||||||
|
|
||||||
/***** Draw a class photo with teachers of the course *****/
|
/***** Draw a class photo with teachers of the course *****/
|
||||||
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
||||||
Lay_WriteHeaderClassPhoto (Vie_VIEW,true);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW);
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_TCH,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_TCH,ICanChooseOption);
|
||||||
|
@ -5928,7 +5928,7 @@ void Usr_SeeGstClassPhotoPrn (void)
|
||||||
if (Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs)
|
if (Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the guests' class photo *****/
|
/***** Draw the guests' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (Vie_PRINT,true);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT);
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
||||||
Rol_GST,&Gbl.Usrs.Selected,false);
|
Rol_GST,&Gbl.Usrs.Selected,false);
|
||||||
|
@ -5966,7 +5966,7 @@ void Usr_SeeStdClassPhotoPrn (void)
|
||||||
if (Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs)
|
if (Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the students' class photo *****/
|
/***** Draw the students' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (Vie_PRINT,true);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT);
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
||||||
Rol_STD,&Gbl.Usrs.Selected,false);
|
Rol_STD,&Gbl.Usrs.Selected,false);
|
||||||
|
@ -6028,7 +6028,7 @@ void Usr_SeeTchClassPhotoPrn (void)
|
||||||
if (NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the teachers' class photo *****/
|
/***** Draw the teachers' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (Vie_PRINT,true);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT);
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
|
|
||||||
/* List teachers and non-editing teachers */
|
/* List teachers and non-editing teachers */
|
||||||
|
@ -6240,7 +6240,7 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
||||||
extern const char *Txt_Register_students;
|
extern const char *Txt_Register_students;
|
||||||
extern const char *Txt_Register_teacher;
|
extern const char *Txt_Register_teacher;
|
||||||
|
|
||||||
if (Gbl.Usrs.ClassPhoto.AllGroups && // All groups selected
|
if (Gbl.Crs.Grps.AllGrps && // All groups selected
|
||||||
Role == Rol_STD && // No students found
|
Role == Rol_STD && // No students found
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_TCH) // Course selected and I am logged as teacher
|
Gbl.Usrs.Me.Role.Logged == Rol_TCH) // Course selected and I am logged as teacher
|
||||||
/***** Show alert and button to enrol students *****/
|
/***** Show alert and button to enrol students *****/
|
||||||
|
@ -6249,8 +6249,8 @@ void Usr_ShowWarningNoUsersFound (Rol_Role_t Role)
|
||||||
Btn_CREATE_BUTTON,Txt_Register_students,
|
Btn_CREATE_BUTTON,Txt_Register_students,
|
||||||
Ale_WARNING,Txt_No_users_found[Rol_STD]);
|
Ale_WARNING,Txt_No_users_found[Rol_STD]);
|
||||||
|
|
||||||
else if (Gbl.Usrs.ClassPhoto.AllGroups && // All groups selected
|
else if (Gbl.Crs.Grps.AllGrps && // All groups selected
|
||||||
Role == Rol_TCH && // No teachers found
|
Role == Rol_TCH && // No teachers found
|
||||||
Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
Gbl.Hierarchy.Level == Hie_CRS && // Course selected
|
||||||
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // I am an administrator
|
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // I am an administrator
|
||||||
/***** Show alert and button to enrol students *****/
|
/***** Show alert and button to enrol students *****/
|
||||||
|
|
|
@ -512,7 +512,7 @@ void Usr_DB_BuildQueryToGetUsrsLstCrs (char **Query,Rol_Role_t Role)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/***** If there are no groups selected, don't do anything *****/
|
/***** If there are no groups selected, don't do anything *****/
|
||||||
if (!Gbl.Usrs.ClassPhoto.AllGroups &&
|
if (!Gbl.Crs.Grps.AllGrps &&
|
||||||
!Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
!Gbl.Crs.Grps.LstGrpsSel.NumGrps)
|
||||||
{
|
{
|
||||||
*Query = NULL;
|
*Query = NULL;
|
||||||
|
@ -553,7 +553,7 @@ void Usr_DB_BuildQueryToGetUsrsLstCrs (char **Query,Rol_Role_t Role)
|
||||||
(unsigned) Role);
|
(unsigned) Role);
|
||||||
|
|
||||||
/***** Select users in selected groups *****/
|
/***** Select users in selected groups *****/
|
||||||
if (!Gbl.Usrs.ClassPhoto.AllGroups)
|
if (!Gbl.Crs.Grps.AllGrps)
|
||||||
{
|
{
|
||||||
/***** Get list of groups types in current course *****/
|
/***** Get list of groups types in current course *****/
|
||||||
Grp_GetListGrpTypesInCurrentCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
Grp_GetListGrpTypesInCurrentCrs (Grp_ONLY_GROUP_TYPES_WITH_GROUPS);
|
||||||
|
|
Loading…
Reference in New Issue