mirror of https://github.com/acanas/swad-core.git
Version 23.60.3: Jan 26, 2024 Responsive design in figures about institutions.
This commit is contained in:
parent
78484d4e6e
commit
d1f1db1067
|
@ -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.60.1 (2024-01-26)"
|
#define Log_PLATFORM_VERSION "SWAD 23.60.3 (2024-01-26)"
|
||||||
#define CSS_FILE "swad23.58.1.css"
|
#define CSS_FILE "swad23.58.1.css"
|
||||||
#define JS_FILE "swad23.53.6.js"
|
#define JS_FILE "swad23.53.6.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.60.3: Jan 26, 2024 Responsive design in figures about institutions. (335720 lines)
|
||||||
|
Version 23.60.2: Jan 26, 2024 Responsive design in search for users. (335714 lines)
|
||||||
Version 23.60.1: Jan 26, 2024 Code refactoring in my groups. (335713 lines)
|
Version 23.60.1: Jan 26, 2024 Code refactoring in my groups. (335713 lines)
|
||||||
Version 23.60: Jan 26, 2024 Code refactoring in my courses. (335725 lines)
|
Version 23.60: Jan 26, 2024 Code refactoring in my courses. (335725 lines)
|
||||||
Version 23.59.5: Jan 26, 2024 Responsive design in forums and messages. (335698 lines)
|
Version 23.59.5: Jan 26, 2024 Responsive design in forums and messages. (335698 lines)
|
||||||
|
|
|
@ -1642,7 +1642,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role)
|
||||||
if (NumCrss)
|
if (NumCrss)
|
||||||
{
|
{
|
||||||
/* Begin box and table */
|
/* Begin box and table */
|
||||||
Box_BoxTableBegin ("100%",NULL,
|
Box_BoxTableBegin (NULL,NULL,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE,2);
|
NULL,Box_NOT_CLOSABLE,2);
|
||||||
|
|
||||||
|
|
|
@ -264,5 +264,6 @@ void Fig_ShowFigures (void)
|
||||||
Fig_ReqShowFigure (SelectedFigureType);
|
Fig_ReqShowFigure (SelectedFigureType);
|
||||||
|
|
||||||
/***** Show the stat of use selected by user *****/
|
/***** Show the stat of use selected by user *****/
|
||||||
|
HTM_BR ();
|
||||||
Fig_Function[SelectedFigureType] ();
|
Fig_Function[SelectedFigureType] ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1660,15 +1660,19 @@ void Ins_GetAndShowInstitutionsStats (void)
|
||||||
Ins_GetAndShowInssOrderedByNumCtrs ();
|
Ins_GetAndShowInssOrderedByNumCtrs ();
|
||||||
|
|
||||||
/***** Institutions ordered by number of degrees *****/
|
/***** Institutions ordered by number of degrees *****/
|
||||||
|
HTM_BR ();
|
||||||
Ins_GetAndShowInssOrderedByNumDegs ();
|
Ins_GetAndShowInssOrderedByNumDegs ();
|
||||||
|
|
||||||
/***** Institutions ordered by number of courses *****/
|
/***** Institutions ordered by number of courses *****/
|
||||||
|
HTM_BR ();
|
||||||
Ins_GetAndShowInssOrderedByNumCrss ();
|
Ins_GetAndShowInssOrderedByNumCrss ();
|
||||||
|
|
||||||
/***** Institutions ordered by number of users in courses *****/
|
/***** Institutions ordered by number of users in courses *****/
|
||||||
|
HTM_BR ();
|
||||||
Ins_GetAndShowInssOrderedByNumUsrsInCrss ();
|
Ins_GetAndShowInssOrderedByNumUsrsInCrss ();
|
||||||
|
|
||||||
/***** Institutions ordered by number of users who claim to belong to them *****/
|
/***** Institutions ordered by number of users who claim to belong to them *****/
|
||||||
|
HTM_BR ();
|
||||||
Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem ();
|
Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem ();
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
|
@ -1686,22 +1690,22 @@ static void Ins_GetAndShowInssOrderedByNumCtrs (void)
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumInss;
|
unsigned NumInss;
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_centers,
|
||||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_centers,
|
NULL,NULL,
|
||||||
NULL,NULL,
|
NULL,Box_NOT_CLOSABLE);
|
||||||
NULL,Box_NOT_CLOSABLE,2);
|
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||||
|
|
||||||
/***** Get institutions ordered by number of centers *****/
|
/***** Get institutions ordered by number of centers *****/
|
||||||
NumInss = Ins_DB_GetInssOrderedByNumCtrs (&mysql_res);
|
NumInss = Ins_DB_GetInssOrderedByNumCtrs (&mysql_res);
|
||||||
|
|
||||||
/***** Show institutions *****/
|
/***** Show institutions *****/
|
||||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CTR]);
|
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CTR]);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
/***** End table and box *****/
|
HTM_TABLE_End ();
|
||||||
Box_BoxTableEnd ();
|
Box_BoxEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1715,22 +1719,22 @@ static void Ins_GetAndShowInssOrderedByNumDegs (void)
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumInss;
|
unsigned NumInss;
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_degrees,
|
||||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_degrees,
|
NULL,NULL,
|
||||||
NULL,NULL,
|
NULL,Box_NOT_CLOSABLE);
|
||||||
NULL,Box_NOT_CLOSABLE,2);
|
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||||
|
|
||||||
/***** Get institutions ordered by number of degrees *****/
|
/***** Get institutions ordered by number of degrees *****/
|
||||||
NumInss = Ins_DB_GetInssOrderedByNumDegs (&mysql_res);
|
NumInss = Ins_DB_GetInssOrderedByNumDegs (&mysql_res);
|
||||||
|
|
||||||
/***** Show institutions *****/
|
/***** Show institutions *****/
|
||||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
|
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
/***** End table and box *****/
|
HTM_TABLE_End ();
|
||||||
Box_BoxTableEnd ();
|
Box_BoxEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1744,22 +1748,22 @@ static void Ins_GetAndShowInssOrderedByNumCrss (void)
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumInss;
|
unsigned NumInss;
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_courses,
|
||||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_courses,
|
NULL,NULL,
|
||||||
NULL,NULL,
|
NULL,Box_NOT_CLOSABLE);
|
||||||
NULL,Box_NOT_CLOSABLE,2);
|
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||||
|
|
||||||
/***** Get institutions ordered by number of courses *****/
|
/***** Get institutions ordered by number of courses *****/
|
||||||
NumInss = Ins_DB_GetInssOrderedByNumCrss (&mysql_res);
|
NumInss = Ins_DB_GetInssOrderedByNumCrss (&mysql_res);
|
||||||
|
|
||||||
/***** Show institutions *****/
|
/***** Show institutions *****/
|
||||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
|
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
/***** End table and box *****/
|
HTM_TABLE_End ();
|
||||||
Box_BoxTableEnd ();
|
Box_BoxEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1773,22 +1777,22 @@ static void Ins_GetAndShowInssOrderedByNumUsrsInCrss (void)
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumInss;
|
unsigned NumInss;
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_in_courses,
|
||||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_users_in_courses,
|
NULL,NULL,
|
||||||
NULL,NULL,
|
NULL,Box_NOT_CLOSABLE);
|
||||||
NULL,Box_NOT_CLOSABLE,2);
|
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||||
|
|
||||||
/***** Get institutions ordered by number of users in courses *****/
|
/***** Get institutions ordered by number of users in courses *****/
|
||||||
NumInss = Ins_DB_GetInssOrderedByNumUsrsInCrss (&mysql_res);
|
NumInss = Ins_DB_GetInssOrderedByNumUsrsInCrss (&mysql_res);
|
||||||
|
|
||||||
/***** Show institutions *****/
|
/***** Show institutions *****/
|
||||||
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
/***** End table and box *****/
|
HTM_TABLE_End ();
|
||||||
Box_BoxTableEnd ();
|
Box_BoxEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1803,22 +1807,22 @@ static void Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem (void)
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumInss;
|
unsigned NumInss;
|
||||||
|
|
||||||
/***** Begin box and table *****/
|
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them,
|
||||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them,
|
NULL,NULL,
|
||||||
NULL,NULL,
|
NULL,Box_NOT_CLOSABLE);
|
||||||
NULL,Box_NOT_CLOSABLE,2);
|
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||||
|
|
||||||
/***** Get institutions ordered by number of users who claim to belong to them *****/
|
/***** Get institutions ordered by number of users who claim to belong to them *****/
|
||||||
NumInss = Ins_DB_GetInssOrderedByNumUsrsWhoClaimToBelongToThem (&mysql_res);
|
NumInss = Ins_DB_GetInssOrderedByNumUsrsWhoClaimToBelongToThem (&mysql_res);
|
||||||
|
|
||||||
/***** Show institutions *****/
|
/***** Show institutions *****/
|
||||||
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
|
|
||||||
/***** End table and box *****/
|
HTM_TABLE_End ();
|
||||||
Box_BoxTableEnd ();
|
Box_BoxEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
99
swad_user.c
99
swad_user.c
|
@ -4756,8 +4756,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
||||||
Usr_SearchListUsrs (Role);
|
Usr_SearchListUsrs (Role);
|
||||||
if ((NumUsrs = Gbl.Usrs.LstUsrs[Role].NumUsrs))
|
if ((NumUsrs = Gbl.Usrs.LstUsrs[Role].NumUsrs))
|
||||||
{
|
{
|
||||||
/***** Begin box and table *****/
|
/***** Begin box with number of users found *****/
|
||||||
/* Number of users found */
|
|
||||||
Sex = Usr_GetSexOfUsrsLst (Role);
|
Sex = Usr_GetSexOfUsrsLst (Role);
|
||||||
if (asprintf (&Title,"%u %s",NumUsrs,
|
if (asprintf (&Title,"%u %s",NumUsrs,
|
||||||
(Role == Rol_UNK) ? (NumUsrs == 1 ? Txt_user[Sex] :
|
(Role == Rol_UNK) ? (NumUsrs == 1 ? Txt_user[Sex] :
|
||||||
|
@ -4765,65 +4764,67 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
||||||
(NumUsrs == 1 ? Txt_ROLES_SINGUL_abc[Role][Sex] :
|
(NumUsrs == 1 ? Txt_ROLES_SINGUL_abc[Role][Sex] :
|
||||||
Txt_ROLES_PLURAL_abc[Role][Sex])) < 0)
|
Txt_ROLES_PLURAL_abc[Role][Sex])) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
Box_BoxTableBegin (NULL,Title,NULL,NULL,NULL,Box_NOT_CLOSABLE,2);
|
Box_BoxBegin (NULL,Title,NULL,NULL,NULL,Box_NOT_CLOSABLE);
|
||||||
free (Title);
|
free (Title);
|
||||||
|
|
||||||
/***** Heading row with column names *****/
|
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||||
Gbl.Usrs.Listing.WithPhotos = true;
|
|
||||||
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
/***** Heading row with column names *****/
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Gbl.Usrs.Listing.WithPhotos = true;
|
||||||
|
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||||
|
|
||||||
/***** List data of users *****/
|
/***** Initialize structure with user's data *****/
|
||||||
for (NumUsr = 0, The_ResetRowColor ();
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
NumUsr < NumUsrs;
|
|
||||||
NumUsr++, The_ChangeRowColor ())
|
|
||||||
{
|
|
||||||
UsrInList = &Gbl.Usrs.LstUsrs[Role].Lst[NumUsr];
|
|
||||||
|
|
||||||
/* Copy user's basic data from list */
|
/***** List data of users *****/
|
||||||
Usr_CopyBasicUsrDataFromList (&UsrDat,UsrInList);
|
for (NumUsr = 0, The_ResetRowColor ();
|
||||||
|
NumUsr < NumUsrs;
|
||||||
/* Get list of user's IDs */
|
NumUsr++, The_ChangeRowColor ())
|
||||||
ID_GetListIDsFromUsrCod (&UsrDat);
|
|
||||||
|
|
||||||
/* Write data of this user */
|
|
||||||
Usr_WriteRowUsrMainData (NumUsr + 1,&UsrDat,false,Role,
|
|
||||||
&Gbl.Usrs.Selected);
|
|
||||||
|
|
||||||
/* Write all courses this user belongs to */
|
|
||||||
if (Role != Rol_GST && // Guests do not belong to any course
|
|
||||||
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only admins can view the courses
|
|
||||||
{
|
{
|
||||||
HTM_TR_Begin (NULL);
|
UsrInList = &Gbl.Usrs.LstUsrs[Role].Lst[NumUsr];
|
||||||
|
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"%s\"",
|
/* Copy user's basic data from list */
|
||||||
The_GetColorRows ());
|
Usr_CopyBasicUsrDataFromList (&UsrDat,UsrInList);
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TD_Begin ("colspan=\"%u\" class=\"%s\"",
|
/* Get list of user's IDs */
|
||||||
Usr_NUM_MAIN_FIELDS_DATA_USR-2,
|
ID_GetListIDsFromUsrCod (&UsrDat);
|
||||||
The_GetColorRows ());
|
|
||||||
if (Role == Rol_UNK)
|
|
||||||
{
|
|
||||||
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TCH);
|
|
||||||
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_NET);
|
|
||||||
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STD);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Role);
|
|
||||||
HTM_TD_End ();
|
|
||||||
|
|
||||||
HTM_TR_End ();
|
/* Write data of this user */
|
||||||
|
Usr_WriteRowUsrMainData (NumUsr + 1,&UsrDat,false,Role,
|
||||||
|
&Gbl.Usrs.Selected);
|
||||||
|
|
||||||
|
/* Write all courses this user belongs to */
|
||||||
|
if (Role != Rol_GST && // Guests do not belong to any course
|
||||||
|
Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM) // Only admins can view the courses
|
||||||
|
{
|
||||||
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
HTM_TD_Begin ("colspan=\"2\" class=\"%s\"",
|
||||||
|
The_GetColorRows ());
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
HTM_TD_Begin ("colspan=\"%u\" class=\"%s\"",
|
||||||
|
Usr_NUM_MAIN_FIELDS_DATA_USR-2,
|
||||||
|
The_GetColorRows ());
|
||||||
|
if (Role == Rol_UNK)
|
||||||
|
{
|
||||||
|
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_TCH);
|
||||||
|
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_NET);
|
||||||
|
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Rol_STD);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Crs_GetAndWriteCrssOfAUsr (&UsrDat,Role);
|
||||||
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
HTM_TR_End ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
/***** Free memory used for user's data *****/
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
|
|
||||||
/***** End table and box *****/
|
HTM_TABLE_End ();
|
||||||
Box_BoxTableEnd ();
|
Box_BoxEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free memory for teachers list *****/
|
/***** Free memory for teachers list *****/
|
||||||
|
|
Loading…
Reference in New Issue