mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-16 21:45:43 +02:00
Version 16.225.2
This commit is contained in:
parent
2dd7a99823
commit
d05a2ac8f5
|
@ -231,19 +231,21 @@
|
||||||
|
|
||||||
// TODO: Statistics of hits in course accessible by non-editing teachers.
|
// TODO: Statistics of hits in course accessible by non-editing teachers.
|
||||||
|
|
||||||
// TODO: Include non-editing teachers in Usr_ListAllDataTchs () and Usr_SeeTchClassPhotoPrn ()
|
// TODO: Fix order of teachers when listing record cards of teachers
|
||||||
|
// TODO: Include non-editing teachers in Usr_SeeTchClassPhotoPrn ()
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.225.1 (2017-05-26)"
|
#define Log_PLATFORM_VERSION "SWAD 16.225.2 (2017-05-26)"
|
||||||
#define CSS_FILE "swad16.222.css"
|
#define CSS_FILE "swad16.222.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.225.2: May 26, 2017 Fixed bug in lists of teachers. (220601 lines)
|
||||||
Version 16.225.1: May 26, 2017 Fixed bug related with new role. (220580 lines)
|
Version 16.225.1: May 26, 2017 Fixed bug related with new role. (220580 lines)
|
||||||
Version 16.225: May 25, 2017 Changes and bug fixing related with new role. (220580 lines)
|
Version 16.225: May 25, 2017 Changes and bug fixing related with new role. (220580 lines)
|
||||||
Version 16.224.2: May 25, 2017 Button to show big list of users/courses integrated in alert. (220465 lines)
|
Version 16.224.2: May 25, 2017 Button to show big list of users/courses integrated in alert. (220465 lines)
|
||||||
|
|
101
swad_user.c
101
swad_user.c
|
@ -172,6 +172,9 @@ static void Usr_PutCheckboxListWithPhotos (void);
|
||||||
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr);
|
static void Usr_ListMainDataGsts (bool PutCheckBoxToSelectUsr);
|
||||||
static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr);
|
static void Usr_ListMainDataStds (bool PutCheckBoxToSelectUsr);
|
||||||
static void Usr_ListMainDataTchs (Rol_Role_t Role,bool PutCheckBoxToSelectUsr);
|
static void Usr_ListMainDataTchs (Rol_Role_t Role,bool PutCheckBoxToSelectUsr);
|
||||||
|
static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
||||||
|
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_TCH],
|
||||||
|
unsigned NumColumns);
|
||||||
static void Usr_GetAndUpdateUsrListType (void);
|
static void Usr_GetAndUpdateUsrListType (void);
|
||||||
static void Usr_GetUsrListTypeFromForm (void);
|
static void Usr_GetUsrListTypeFromForm (void);
|
||||||
static void Usr_GetMyUsrListTypeFromDB (void);
|
static void Usr_GetMyUsrListTypeFromDB (void);
|
||||||
|
@ -6519,10 +6522,8 @@ void Usr_ListAllDataTchs (void)
|
||||||
extern const char *Txt_Department;
|
extern const char *Txt_Department;
|
||||||
extern const char *Txt_Office;
|
extern const char *Txt_Office;
|
||||||
extern const char *Txt_Phone;
|
extern const char *Txt_Phone;
|
||||||
|
unsigned NumUsrs;
|
||||||
unsigned NumColumns;
|
unsigned NumColumns;
|
||||||
unsigned NumCol;
|
|
||||||
unsigned NumUsr;
|
|
||||||
struct UsrData UsrDat;
|
|
||||||
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_TCH];
|
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_TCH];
|
||||||
|
|
||||||
/***** Initialize field names *****/
|
/***** Initialize field names *****/
|
||||||
|
@ -6554,50 +6555,24 @@ void Usr_ListAllDataTchs (void)
|
||||||
Sco_GetScope ("ScopeUsr");
|
Sco_GetScope ("ScopeUsr");
|
||||||
|
|
||||||
/***** Get list of teachers *****/
|
/***** Get list of teachers *****/
|
||||||
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH);
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_NET); // Non-editing teachers
|
||||||
|
Usr_GetListUsrs (Gbl.Scope.Current,Rol_TCH); // Teachers
|
||||||
|
NumUsrs = Usr_GetTotalNumberOfUsersInCourses (Gbl.Scope.Current,
|
||||||
|
1 << Rol_NET |
|
||||||
|
1 << Rol_TCH);
|
||||||
|
|
||||||
if (Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Initialize number of columns *****/
|
/***** Initialize number of columns *****/
|
||||||
NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH;
|
NumColumns = Usr_NUM_ALL_FIELDS_DATA_TCH;
|
||||||
|
|
||||||
/***** Start table with list of teachers *****/
|
/***** Start table with lists of teachers *****/
|
||||||
Lay_StartTableWide (0);
|
Lay_StartTableWide (0);
|
||||||
|
|
||||||
/* Start row */
|
/***** List teachers and non-editing teachers *****/
|
||||||
fprintf (Gbl.F.Out,"<tr>");
|
Gbl.RowEvenOdd = 0;
|
||||||
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
Usr_ListRowsAllDataTchs (Rol_TCH,FieldNames,NumColumns);
|
||||||
1);
|
Usr_ListRowsAllDataTchs (Rol_NET,FieldNames,NumColumns);
|
||||||
NumCol < NumColumns;
|
|
||||||
NumCol++)
|
|
||||||
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
|
||||||
"%s "
|
|
||||||
"</th>",
|
|
||||||
FieldNames[NumCol]);
|
|
||||||
|
|
||||||
/* End row */
|
|
||||||
fprintf (Gbl.F.Out,"</tr>");
|
|
||||||
|
|
||||||
/***** Initialize structure with user's data *****/
|
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
|
||||||
|
|
||||||
/***** List data of teachers *****/
|
|
||||||
for (NumUsr = 0, Gbl.RowEvenOdd = 0;
|
|
||||||
NumUsr < Gbl.Usrs.LstUsrs[Rol_TCH].NumUsrs; )
|
|
||||||
{
|
|
||||||
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Rol_TCH].Lst[NumUsr].UsrCod;
|
|
||||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat)) // If user's data exist...
|
|
||||||
{
|
|
||||||
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Rol_TCH].Lst[NumUsr].Accepted;
|
|
||||||
NumUsr++;
|
|
||||||
Usr_WriteRowTchAllData (&UsrDat);
|
|
||||||
|
|
||||||
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Free memory used for user's data *****/
|
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
|
||||||
|
|
||||||
/***** End of table *****/
|
/***** End of table *****/
|
||||||
Lay_EndTable ();
|
Lay_EndTable ();
|
||||||
|
@ -6610,6 +6585,52 @@ void Usr_ListAllDataTchs (void)
|
||||||
Usr_FreeUsrsList (Rol_TCH);
|
Usr_FreeUsrsList (Rol_TCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*********************** List all teachers' data rows ************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Usr_ListRowsAllDataTchs (Rol_Role_t Role,
|
||||||
|
const char *FieldNames[Usr_NUM_ALL_FIELDS_DATA_TCH],
|
||||||
|
unsigned NumColumns)
|
||||||
|
{
|
||||||
|
unsigned NumCol;
|
||||||
|
struct UsrData UsrDat;
|
||||||
|
unsigned NumUsr;
|
||||||
|
|
||||||
|
/***** Heading row *****/
|
||||||
|
fprintf (Gbl.F.Out,"<tr>");
|
||||||
|
for (NumCol = (Gbl.Usrs.Listing.WithPhotos ? 0 :
|
||||||
|
1);
|
||||||
|
NumCol < NumColumns;
|
||||||
|
NumCol++)
|
||||||
|
fprintf (Gbl.F.Out,"<th class=\"LEFT_MIDDLE LIGHT_BLUE\">"
|
||||||
|
"%s "
|
||||||
|
"</th>",
|
||||||
|
FieldNames[NumCol]);
|
||||||
|
fprintf (Gbl.F.Out,"</tr>");
|
||||||
|
|
||||||
|
/***** Initialize structure with user's data *****/
|
||||||
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
|
|
||||||
|
/***** List data of teachers *****/
|
||||||
|
for (NumUsr = 0;
|
||||||
|
NumUsr < Gbl.Usrs.LstUsrs[Role].NumUsrs; )
|
||||||
|
{
|
||||||
|
UsrDat.UsrCod = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].UsrCod;
|
||||||
|
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDat)) // If user's data exist...
|
||||||
|
{
|
||||||
|
UsrDat.Accepted = Gbl.Usrs.LstUsrs[Role].Lst[NumUsr].Accepted;
|
||||||
|
NumUsr++;
|
||||||
|
Usr_WriteRowTchAllData (&UsrDat);
|
||||||
|
|
||||||
|
Gbl.RowEvenOdd = 1 - Gbl.RowEvenOdd;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***** Free memory used for user's data *****/
|
||||||
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** List users found *****************************/
|
/****************************** List users found *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user