mirror of https://github.com/acanas/swad-core.git
Version 23.9.3: Sep 19, 2023 Changes and code refactoring related to class photo.
This commit is contained in:
parent
1735b451dc
commit
e88df0719f
|
@ -388,10 +388,7 @@ void Asg_PrintOneAssignment (void)
|
||||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,false,
|
Lay_WriteHeaderClassPhoto (true,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
|
|
@ -261,10 +261,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
||||||
Hlp_START_Calendar,Box_NOT_CLOSABLE);
|
Hlp_START_Calendar,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (PrintView,false,
|
Lay_WriteHeaderClassPhoto (PrintView,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Preference selector to change first day of week *****/
|
/***** Preference selector to change first day of week *****/
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
|
|
|
@ -632,10 +632,11 @@ TODO: Francisco Javier Fern
|
||||||
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
||||||
"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.9.2 (2023-09-19)"
|
#define Log_PLATFORM_VERSION "SWAD 23.9.3 (2023-09-19)"
|
||||||
#define CSS_FILE "swad22.120.4.css"
|
#define CSS_FILE "swad22.120.4.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.9.3: Sep 19, 2023 Changes and code refactoring related to class photo. (337507 lines)
|
||||||
Version 23.9.2: Sep 19, 2023 Code refactoring in hierarchy. (337600 lines)
|
Version 23.9.2: Sep 19, 2023 Code refactoring in hierarchy. (337600 lines)
|
||||||
Version 23.9.1: Sep 19, 2023 Code refactoring in hierarchy and admins. (337521 lines)
|
Version 23.9.1: Sep 19, 2023 Code refactoring in hierarchy and admins. (337521 lines)
|
||||||
Version 23.9: Sep 19, 2023 Code refactoring in hierarchy. (337589 lines)
|
Version 23.9: Sep 19, 2023 Code refactoring in hierarchy. (337589 lines)
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
#define Cfg_JAVA_NAME "Java Runtime Environment"
|
#define Cfg_JAVA_NAME "Java Runtime Environment"
|
||||||
|
|
||||||
/* Users */
|
/* Users */
|
||||||
#define Cfg_MAX_USRS_IN_LIST 20000 // If the number of users in a list is greater than this, don't show the list
|
#define Cfg_MAX_USRS_IN_LIST 30000 // If the number of users in a list is greater than this, don't show the list
|
||||||
#define Cfg_MIN_NUM_USERS_TO_CONFIRM_SHOW_BIG_LIST 1000 // If the number of users in a list is greater than this, ask me for confirmation before showing the list
|
#define Cfg_MIN_NUM_USERS_TO_CONFIRM_SHOW_BIG_LIST 1000 // If the number of users in a list is greater than this, ask me for confirmation before showing the list
|
||||||
#define Cfg_MIN_PHOTOS_TO_SHOW_AVERAGE 10 // If the number of students with photo in a degree is less than this, don't show average photo of the degree
|
#define Cfg_MIN_PHOTOS_TO_SHOW_AVERAGE 10 // If the number of students with photo in a degree is less than this, don't show average photo of the degree
|
||||||
#define Cfg_MAX_RECIPIENTS 250 // A student can not send a message to more than this number of recipients
|
#define Cfg_MAX_RECIPIENTS 250 // A student can not send a message to more than this number of recipients
|
||||||
|
|
|
@ -581,11 +581,7 @@ static void ExaPrn_ShowExamPrintToFillIt (struct Exa_Exams *Exams,
|
||||||
|
|
||||||
/***** Heading *****/
|
/***** Heading *****/
|
||||||
/* Institution, degree and course */
|
/* Institution, degree and course */
|
||||||
Lay_WriteHeaderClassPhoto (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
|
|
||||||
/***** Show user and time *****/
|
/***** Show user and time *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -1348,10 +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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** 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 */
|
||||||
|
|
20
swad_info.c
20
swad_info.c
|
@ -1437,10 +1437,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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
|
||||||
|
@ -1530,10 +1527,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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
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 ());
|
||||||
|
@ -1666,10 +1660,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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Get info text from database *****/
|
/***** Get info text from database *****/
|
||||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[HieLvl_CRS].Cod,Gbl.Crs.Info.Type,
|
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[HieLvl_CRS].Cod,Gbl.Crs.Info.Type,
|
||||||
|
@ -1737,10 +1728,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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Get info text from database *****/
|
/***** Get info text from database *****/
|
||||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[HieLvl_CRS].Cod,Gbl.Crs.Info.Type,
|
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[HieLvl_CRS].Cod,Gbl.Crs.Info.Type,
|
||||||
|
|
|
@ -1463,21 +1463,32 @@ 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 (bool PrintView,bool DrawingClassPhoto,
|
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto)
|
||||||
long InsCod,long DegCod,long CrsCod)
|
|
||||||
{
|
{
|
||||||
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
|
|
||||||
|
/***** Initialize institution, degree and course to show in header *****/
|
||||||
|
Hie[HieLvl_INS].Cod = (Gbl.Scope.Current == HieLvl_CRS ||
|
||||||
|
Gbl.Scope.Current == HieLvl_DEG ||
|
||||||
|
Gbl.Scope.Current == HieLvl_CTR ||
|
||||||
|
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
||||||
|
-1L;
|
||||||
|
Hie[HieLvl_DEG].Cod = (Gbl.Scope.Current == HieLvl_CRS ||
|
||||||
|
Gbl.Scope.Current == HieLvl_DEG) ? Gbl.Hierarchy.Node[HieLvl_DEG].Cod :
|
||||||
|
-1L;
|
||||||
|
Hie[HieLvl_CRS].Cod = (Gbl.Scope.Current == HieLvl_CRS) ? Gbl.Hierarchy.Node[HieLvl_CRS].Cod :
|
||||||
|
-1L;
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Hie[HieLvl_INS].Cod = InsCod;
|
// Hie[HieLvl_INS].Cod = InsCod;
|
||||||
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
|
|
||||||
/***** Get data of degree *****/
|
/***** Get data of degree *****/
|
||||||
Hie[HieLvl_DEG].Cod = DegCod;
|
// Hie[HieLvl_DEG].Cod = DegCod;
|
||||||
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
|
|
||||||
/***** Get data of course *****/
|
/***** Get data of course *****/
|
||||||
Hie[HieLvl_CRS].Cod = CrsCod;
|
// Hie[HieLvl_CRS].Cod = CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
|
@ -1487,7 +1498,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
|
|
||||||
/***** First column: institution logo *****/
|
/***** First column: institution logo *****/
|
||||||
HTM_TD_Begin ("class=\"LT\" style=\"width:60px;\"");
|
HTM_TD_Begin ("class=\"LT\" style=\"width:60px;\"");
|
||||||
if (InsCod > 0)
|
if (Hie[HieLvl_INS].Cod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Hie[HieLvl_INS].WWW);
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Hie[HieLvl_INS].WWW);
|
||||||
|
@ -1503,7 +1514,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
/***** Second column: class photo title *****/
|
/***** Second column: class photo title *****/
|
||||||
HTM_TD_Begin ("class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s CM\"",
|
HTM_TD_Begin ("class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s CM\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
if (InsCod > 0)
|
if (Hie[HieLvl_INS].Cod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||||
|
@ -1513,7 +1524,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
if (DegCod > 0)
|
if (Hie[HieLvl_DEG].Cod > 0)
|
||||||
{
|
{
|
||||||
if (Hie[HieLvl_INS].Cod > 0)
|
if (Hie[HieLvl_INS].Cod > 0)
|
||||||
HTM_Txt (" - ");
|
HTM_Txt (" - ");
|
||||||
|
@ -1526,7 +1537,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
if (CrsCod > 0)
|
if (Hie[HieLvl_CRS].Cod > 0)
|
||||||
{
|
{
|
||||||
HTM_Txt (Hie[HieLvl_CRS].FullName);
|
HTM_Txt (Hie[HieLvl_CRS].FullName);
|
||||||
if (DrawingClassPhoto && !Gbl.Usrs.ClassPhoto.AllGroups)
|
if (DrawingClassPhoto && !Gbl.Usrs.ClassPhoto.AllGroups)
|
||||||
|
@ -1539,7 +1550,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
|
|
||||||
/***** Third column: degree logo *****/
|
/***** Third column: degree logo *****/
|
||||||
HTM_TD_Begin ("class=\"RT\" style=\"width:60px;\"");
|
HTM_TD_Begin ("class=\"RT\" style=\"width:60px;\"");
|
||||||
if (DegCod > 0)
|
if (Hie[HieLvl_DEG].Cod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||||
|
|
|
@ -67,8 +67,7 @@ void Lay_WriteAboutZone (void);
|
||||||
void Lay_RefreshNotifsAndConnected (void);
|
void Lay_RefreshNotifsAndConnected (void);
|
||||||
void Lay_RefreshLastClicks (void);
|
void Lay_RefreshLastClicks (void);
|
||||||
|
|
||||||
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto);
|
||||||
long InsCod,long DegCod,long CrsCod);
|
|
||||||
|
|
||||||
void Lay_AdvertisementMobile (void);
|
void Lay_AdvertisementMobile (void);
|
||||||
|
|
||||||
|
|
|
@ -1097,10 +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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -1413,10 +1413,7 @@ void Prj_PrintOneProject (void)
|
||||||
Prj_GetProjectDataByCod (&Projects.Prj);
|
Prj_GetProjectDataByCod (&Projects.Prj);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,false,
|
Lay_WriteHeaderClassPhoto (true,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
|
14
swad_scope.c
14
swad_scope.c
|
@ -201,20 +201,8 @@ void Sco_SetScopesForListingGuests (void)
|
||||||
{
|
{
|
||||||
switch (Gbl.Usrs.Me.Role.Logged)
|
switch (Gbl.Usrs.Me.Role.Logged)
|
||||||
{
|
{
|
||||||
case Rol_CTR_ADM:
|
|
||||||
Gbl.Scope.Allowed = 1 << HieLvl_CTR;
|
|
||||||
Gbl.Scope.Default = HieLvl_CTR;
|
|
||||||
break;
|
|
||||||
case Rol_INS_ADM:
|
|
||||||
Gbl.Scope.Allowed = 1 << HieLvl_INS |
|
|
||||||
1 << HieLvl_CTR;
|
|
||||||
Gbl.Scope.Default = HieLvl_INS;
|
|
||||||
break;
|
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
Gbl.Scope.Allowed = 1 << HieLvl_SYS |
|
Gbl.Scope.Allowed = 1 << HieLvl_SYS;
|
||||||
1 << HieLvl_CTY |
|
|
||||||
1 << HieLvl_INS |
|
|
||||||
1 << HieLvl_CTR;
|
|
||||||
Gbl.Scope.Default = HieLvl_SYS;
|
Gbl.Scope.Default = HieLvl_SYS;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -347,10 +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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Header *****/
|
/***** Header *****/
|
||||||
if (Gbl.Usrs.Me.IBelongToCurrentCrs)
|
if (Gbl.Usrs.Me.IBelongToCurrentCrs)
|
||||||
|
|
|
@ -218,10 +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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
if (Print->NumQsts.All)
|
if (Print->NumQsts.All)
|
||||||
{
|
{
|
||||||
|
@ -2239,10 +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 (false,false,
|
Lay_WriteHeaderClassPhoto (false,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -370,10 +370,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 (PrintView,false,
|
Lay_WriteHeaderClassPhoto (PrintView,false);
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod);
|
|
||||||
|
|
||||||
if (PrintView)
|
if (PrintView)
|
||||||
/***** Show whether only my groups or all groups are selected *****/
|
/***** Show whether only my groups or all groups are selected *****/
|
||||||
|
|
61
swad_user.c
61
swad_user.c
|
@ -5083,12 +5083,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 (false,true,
|
Lay_WriteHeaderClassPhoto (false,true);
|
||||||
(Gbl.Scope.Current == HieLvl_CTR ||
|
|
||||||
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
|
||||||
-1L,
|
|
||||||
-1L,
|
|
||||||
-1L);
|
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_GST,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_GST,ICanChooseOption);
|
||||||
|
@ -5238,17 +5233,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 (false,true,
|
Lay_WriteHeaderClassPhoto (false,true);
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG ||
|
|
||||||
Gbl.Scope.Current == HieLvl_CTR ||
|
|
||||||
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
|
||||||
-1L,
|
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG) ? Gbl.Hierarchy.Node[HieLvl_DEG].Cod :
|
|
||||||
-1L,
|
|
||||||
Gbl.Scope.Current == HieLvl_CRS ? Gbl.Hierarchy.Node[HieLvl_CRS].Cod :
|
|
||||||
-1L);
|
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_STD,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_STD,ICanChooseOption);
|
||||||
|
@ -5415,17 +5400,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 (false,true,
|
Lay_WriteHeaderClassPhoto (false,true);
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG ||
|
|
||||||
Gbl.Scope.Current == HieLvl_CTR ||
|
|
||||||
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
|
||||||
-1L,
|
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG) ? Gbl.Hierarchy.Node[HieLvl_DEG].Cod :
|
|
||||||
-1L,
|
|
||||||
Gbl.Scope.Current == HieLvl_CRS ? Gbl.Hierarchy.Node[HieLvl_CRS].Cod :
|
|
||||||
-1L);
|
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_TCH,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_TCH,ICanChooseOption);
|
||||||
|
@ -5955,11 +5930,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 (true,true,
|
Lay_WriteHeaderClassPhoto (true,true);
|
||||||
(Gbl.Scope.Current == HieLvl_CTR ||
|
|
||||||
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
|
||||||
-1L,
|
|
||||||
-1L,-1L);
|
|
||||||
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);
|
||||||
|
@ -5997,17 +5968,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 (true,true,
|
Lay_WriteHeaderClassPhoto (true,true);
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG ||
|
|
||||||
Gbl.Scope.Current == HieLvl_CTR ||
|
|
||||||
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
|
||||||
-1L,
|
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG) ? Gbl.Hierarchy.Node[HieLvl_DEG].Cod :
|
|
||||||
-1L,
|
|
||||||
Gbl.Scope.Current == HieLvl_CRS ? Gbl.Hierarchy.Node[HieLvl_CRS].Cod :
|
|
||||||
-1L);
|
|
||||||
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);
|
||||||
|
@ -6070,17 +6031,7 @@ void Usr_SeeTchClassPhotoPrn (void)
|
||||||
if (NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the teachers' class photo *****/
|
/***** Draw the teachers' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,true,
|
Lay_WriteHeaderClassPhoto (true,true);
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG ||
|
|
||||||
Gbl.Scope.Current == HieLvl_CTR ||
|
|
||||||
Gbl.Scope.Current == HieLvl_INS) ? Gbl.Hierarchy.Node[HieLvl_INS].Cod :
|
|
||||||
-1L,
|
|
||||||
(Gbl.Scope.Current == HieLvl_CRS ||
|
|
||||||
Gbl.Scope.Current == HieLvl_DEG) ? Gbl.Hierarchy.Node[HieLvl_DEG].Cod :
|
|
||||||
-1L,
|
|
||||||
Gbl.Scope.Current == HieLvl_CRS ? Gbl.Hierarchy.Node[HieLvl_CRS].Cod :
|
|
||||||
-1L);
|
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
|
|
||||||
/* List teachers and non-editing teachers */
|
/* List teachers and non-editing teachers */
|
||||||
|
|
Loading…
Reference in New Issue