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')
|
||||
*/
|
||||
|
||||
#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 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: 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)
|
||||
|
|
|
@ -1642,7 +1642,7 @@ void Crs_GetAndWriteCrssOfAUsr (const struct Usr_Data *UsrDat,Rol_Role_t Role)
|
|||
if (NumCrss)
|
||||
{
|
||||
/* Begin box and table */
|
||||
Box_BoxTableBegin ("100%",NULL,
|
||||
Box_BoxTableBegin (NULL,NULL,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
|
||||
|
|
|
@ -264,5 +264,6 @@ void Fig_ShowFigures (void)
|
|||
Fig_ReqShowFigure (SelectedFigureType);
|
||||
|
||||
/***** Show the stat of use selected by user *****/
|
||||
HTM_BR ();
|
||||
Fig_Function[SelectedFigureType] ();
|
||||
}
|
||||
|
|
|
@ -1660,15 +1660,19 @@ void Ins_GetAndShowInstitutionsStats (void)
|
|||
Ins_GetAndShowInssOrderedByNumCtrs ();
|
||||
|
||||
/***** Institutions ordered by number of degrees *****/
|
||||
HTM_BR ();
|
||||
Ins_GetAndShowInssOrderedByNumDegs ();
|
||||
|
||||
/***** Institutions ordered by number of courses *****/
|
||||
HTM_BR ();
|
||||
Ins_GetAndShowInssOrderedByNumCrss ();
|
||||
|
||||
/***** Institutions ordered by number of users in courses *****/
|
||||
HTM_BR ();
|
||||
Ins_GetAndShowInssOrderedByNumUsrsInCrss ();
|
||||
|
||||
/***** Institutions ordered by number of users who claim to belong to them *****/
|
||||
HTM_BR ();
|
||||
Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem ();
|
||||
|
||||
/***** End box *****/
|
||||
|
@ -1686,22 +1690,22 @@ static void Ins_GetAndShowInssOrderedByNumCtrs (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumInss;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_centers,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_centers,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Get institutions ordered by number of centers *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumCtrs (&mysql_res);
|
||||
/***** Get institutions ordered by number of centers *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumCtrs (&mysql_res);
|
||||
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CTR]);
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CTR]);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
HTM_TABLE_End ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1715,22 +1719,22 @@ static void Ins_GetAndShowInssOrderedByNumDegs (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumInss;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_degrees,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_degrees,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Get institutions ordered by number of degrees *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumDegs (&mysql_res);
|
||||
/***** Get institutions ordered by number of degrees *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumDegs (&mysql_res);
|
||||
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
HTM_TABLE_End ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1744,22 +1748,22 @@ static void Ins_GetAndShowInssOrderedByNumCrss (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumInss;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_courses,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_courses,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Get institutions ordered by number of courses *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumCrss (&mysql_res);
|
||||
/***** Get institutions ordered by number of courses *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumCrss (&mysql_res);
|
||||
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
HTM_TABLE_End ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1773,22 +1777,22 @@ static void Ins_GetAndShowInssOrderedByNumUsrsInCrss (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumInss;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_users_in_courses,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_in_courses,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Get institutions ordered by number of users in courses *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumUsrsInCrss (&mysql_res);
|
||||
/***** Get institutions ordered by number of users in courses *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumUsrsInCrss (&mysql_res);
|
||||
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
HTM_TABLE_End ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1803,22 +1807,22 @@ static void Ins_GetAndShowInssOrderedByNumUsrsWhoClaimToBelongToThem (void)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned NumInss;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin ("100%",Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE,2);
|
||||
Box_BoxBegin (NULL,Txt_Institutions_by_number_of_users_who_claim_to_belong_to_them,
|
||||
NULL,NULL,
|
||||
NULL,Box_NOT_CLOSABLE);
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Get institutions ordered by number of users who claim to belong to them *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumUsrsWhoClaimToBelongToThem (&mysql_res);
|
||||
/***** Get institutions ordered by number of users who claim to belong to them *****/
|
||||
NumInss = Ins_DB_GetInssOrderedByNumUsrsWhoClaimToBelongToThem (&mysql_res);
|
||||
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
||||
/***** Show institutions *****/
|
||||
Ins_ShowInss (&mysql_res,NumInss,Txt_Users);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
HTM_TABLE_End ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
99
swad_user.c
99
swad_user.c
|
@ -4756,8 +4756,7 @@ unsigned Usr_ListUsrsFound (Rol_Role_t Role,
|
|||
Usr_SearchListUsrs (Role);
|
||||
if ((NumUsrs = Gbl.Usrs.LstUsrs[Role].NumUsrs))
|
||||
{
|
||||
/***** Begin box and table *****/
|
||||
/* Number of users found */
|
||||
/***** Begin box with number of users found *****/
|
||||
Sex = Usr_GetSexOfUsrsLst (Role);
|
||||
if (asprintf (&Title,"%u %s",NumUsrs,
|
||||
(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] :
|
||||
Txt_ROLES_PLURAL_abc[Role][Sex])) < 0)
|
||||
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);
|
||||
|
||||
/***** Heading row with column names *****/
|
||||
Gbl.Usrs.Listing.WithPhotos = true;
|
||||
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
/***** Heading row with column names *****/
|
||||
Gbl.Usrs.Listing.WithPhotos = true;
|
||||
Usr_WriteHeaderFieldsUsrDat (false); // Columns for the data
|
||||
|
||||
/***** List data of users *****/
|
||||
for (NumUsr = 0, The_ResetRowColor ();
|
||||
NumUsr < NumUsrs;
|
||||
NumUsr++, The_ChangeRowColor ())
|
||||
{
|
||||
UsrInList = &Gbl.Usrs.LstUsrs[Role].Lst[NumUsr];
|
||||
/***** Initialize structure with user's data *****/
|
||||
Usr_UsrDataConstructor (&UsrDat);
|
||||
|
||||
/* Copy user's basic data from list */
|
||||
Usr_CopyBasicUsrDataFromList (&UsrDat,UsrInList);
|
||||
|
||||
/* Get list of user's IDs */
|
||||
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
|
||||
/***** List data of users *****/
|
||||
for (NumUsr = 0, The_ResetRowColor ();
|
||||
NumUsr < NumUsrs;
|
||||
NumUsr++, The_ChangeRowColor ())
|
||||
{
|
||||
HTM_TR_Begin (NULL);
|
||||
UsrInList = &Gbl.Usrs.LstUsrs[Role].Lst[NumUsr];
|
||||
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"%s\"",
|
||||
The_GetColorRows ());
|
||||
HTM_TD_End ();
|
||||
/* Copy user's basic data from list */
|
||||
Usr_CopyBasicUsrDataFromList (&UsrDat,UsrInList);
|
||||
|
||||
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 ();
|
||||
/* Get list of user's IDs */
|
||||
ID_GetListIDsFromUsrCod (&UsrDat);
|
||||
|
||||
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 *****/
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
/***** Free memory used for user's data *****/
|
||||
Usr_UsrDataDestructor (&UsrDat);
|
||||
|
||||
/***** End table and box *****/
|
||||
Box_BoxTableEnd ();
|
||||
HTM_TABLE_End ();
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/***** Free memory for teachers list *****/
|
||||
|
|
Loading…
Reference in New Issue