mirror of https://github.com/acanas/swad-core.git
Version 23.36: Oct 11, 2023 Code refactoring in HTML.
This commit is contained in:
parent
357bf48299
commit
d7b04912a9
37
swad_HTML.c
37
swad_HTML.c
|
@ -2048,3 +2048,40 @@ void HTM_Percentage (double Percentage)
|
|||
{
|
||||
HTM_TxtF ("%5.2lf%%",Percentage);
|
||||
}
|
||||
|
||||
void HTM_TD_Unsigned (unsigned Num)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Num);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
void HTM_TD_UnsignedLong (unsigned long Num)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_UnsignedLong (Num);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
void HTM_TD_Percentage (unsigned Num,unsigned NumTotal)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumTotal ? (double) Num * 100.0 / (double) NumTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
void HTM_TD_Ratio (unsigned Num,unsigned NumTotal)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumTotal ? (double) Num / (double) NumTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
void HTM_TD_Double2Decimals (double Num)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (Num);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
|
|
@ -242,4 +242,10 @@ void HTM_DoubleFewDigits (double Num);
|
|||
void HTM_Double2Decimals (double Num);
|
||||
void HTM_Percentage (double Percentage);
|
||||
|
||||
void HTM_TD_Unsigned (unsigned Num);
|
||||
void HTM_TD_UnsignedLong (unsigned long Num);
|
||||
void HTM_TD_Percentage (unsigned Num,unsigned NumTotal);
|
||||
void HTM_TD_Ratio (unsigned Num,unsigned NumTotal);
|
||||
void HTM_TD_Double2Decimals (double Num);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -328,13 +328,13 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct Usr_
|
|||
/***** Begin 2nd table row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Courses of this user *****/
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
||||
UsrDat->Sex = Usr_SEX_UNKNOWN;
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
|
||||
HTM_TD_End ();
|
||||
/***** Courses of this user *****/
|
||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
||||
UsrDat->Sex = Usr_SEX_UNKNOWN;
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_TCH);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_NET);
|
||||
Crs_GetAndWriteCrssOfAUsr (UsrDat,Rol_STD);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End 2nd table row *****/
|
||||
HTM_TR_End ();
|
||||
|
|
|
@ -1601,27 +1601,10 @@ void Agd_GetAndShowAgendasStats (void)
|
|||
|
||||
/***** Write number of users who have chosen each language *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumEvents);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumUsrs ? (double) NumEvents /
|
||||
(double) NumUsrs :
|
||||
0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumEvents);
|
||||
HTM_TD_Unsigned (NumUsrs);
|
||||
HTM_TD_Percentage (NumUsrs,NumUsrsTotal);
|
||||
HTM_TD_Ratio (NumEvents,NumUsrs);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -1778,14 +1778,13 @@ void Asg_GetAndShowAssignmentsStats (void)
|
|||
extern const char *Txt_Number_of_BR_notifications;
|
||||
unsigned NumAssignments;
|
||||
unsigned NumNotif;
|
||||
unsigned NumCoursesWithAssignments = 0;
|
||||
double NumAssignmentsPerCourse = 0.0;
|
||||
unsigned NumCoursesWithAssignments;
|
||||
|
||||
/***** Get the number of assignments from this location *****/
|
||||
if ((NumAssignments = Asg_GetNumAssignments (Gbl.Scope.Current,&NumNotif)))
|
||||
if ((NumCoursesWithAssignments = Asg_DB_GetNumCoursesWithAssignments (Gbl.Scope.Current)) != 0)
|
||||
NumAssignmentsPerCourse = (double) NumAssignments /
|
||||
(double) NumCoursesWithAssignments;
|
||||
NumCoursesWithAssignments = Asg_DB_GetNumCoursesWithAssignments (Gbl.Scope.Current);
|
||||
else
|
||||
NumCoursesWithAssignments = 0;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_ASSIGNMENTS],
|
||||
|
@ -1802,23 +1801,10 @@ void Asg_GetAndShowAssignmentsStats (void)
|
|||
|
||||
/***** Write number of assignments *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumAssignments);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithAssignments);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumAssignmentsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumNotif);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumAssignments);
|
||||
HTM_TD_Unsigned (NumCoursesWithAssignments);
|
||||
HTM_TD_Ratio (NumAssignments,NumCoursesWithAssignments);
|
||||
HTM_TD_Unsigned (NumNotif);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -10218,13 +10218,8 @@ void Brw_GetAndShowOERsStats (void)
|
|||
HTM_Txt (Txt_LICENSES[License]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_UnsignedLong (NumFiles[0]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_UnsignedLong (NumFiles[1]);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_UnsignedLong (NumFiles[0]);
|
||||
HTM_TD_UnsignedLong (NumFiles[1]);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -394,15 +394,8 @@ void Cal_GetAndShowNumUsrsPerFirstDayOfWeek (void)
|
|||
free (Icon);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[FirstDayOfWeek]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[FirstDayOfWeek] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[FirstDayOfWeek]);
|
||||
HTM_TD_Percentage (NumUsrs[FirstDayOfWeek],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -875,19 +875,13 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of users who claim to belong to this center */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrsCtr);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrsCtr);
|
||||
|
||||
/* Number of degrees */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumDegs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumDegs);
|
||||
|
||||
/* Number of users in courses of this center */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrsInCrssOfCtr);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrsInCrssOfCtr);
|
||||
|
||||
/* Center requester */
|
||||
UsrDat.UsrCod = Ctr->RequesterUsrCod;
|
||||
|
@ -992,8 +986,7 @@ void Ctr_RemoveCenter (void)
|
|||
Hie_FlushCacheNumUsrsWhoClaimToBelongTo (Hie_CTR);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||
Txt_Center_X_removed,
|
||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_Center_X_removed,
|
||||
Ctr_EditingCtr->FullName);
|
||||
|
||||
Ctr_EditingCtr->HieCod = -1L; // To not showing button to go to center
|
||||
|
@ -1027,8 +1020,7 @@ void Ctr_ChangeCtrPlc (void)
|
|||
|
||||
/***** Create alert to show the change made
|
||||
and put button to go to center changed *****/
|
||||
Ale_CreateAlert (Ale_SUCCESS,NULL,
|
||||
Txt_The_place_of_the_center_has_changed);
|
||||
Ale_CreateAlert (Ale_SUCCESS,NULL,Txt_The_place_of_the_center_has_changed);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1310,19 +1302,13 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users who claim to belong to this center *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Number of degrees *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Number of users in courses of this center *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Center requester *****/
|
||||
HTM_TD_Begin ("class=\"DAT_%s INPUT_REQUESTER LT\"",
|
||||
|
|
|
@ -633,10 +633,11 @@ 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.35.2 (2023-10-11)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.36 (2023-10-11)"
|
||||
#define CSS_FILE "swad23.35.1.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 23.36: Oct 11, 2023 Code refactoring in HTML. (335342 lines)
|
||||
Version 23.35.2: Oct 11, 2023 Fixed bugs in short/full names. (335550 lines)
|
||||
Version 23.35.1: Oct 11, 2023 Changes in CSS related to short/full names. (335550 lines)
|
||||
Version 23.35: Oct 10, 2023 Fixed bugs in short/full names. (335549 lines)
|
||||
|
|
|
@ -222,15 +222,8 @@ void Coo_GetAndShowNumUsrsPerCookies (void)
|
|||
*Accepted[RefAcc].Title,"ICOx16");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[RefAcc]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[RefAcc] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[RefAcc]);
|
||||
HTM_TD_Percentage (NumUsrs[RefAcc],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -241,94 +241,68 @@ void Cty_ListCountries2 (void)
|
|||
/***** Write users and institutions in other countries *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_Other_countries);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of users who claim to belong to another country */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Cty_GetCachedNumUsrsWhoClaimToBelongToAnotherCty ());
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Cty_GetCachedNumUsrsWhoClaimToBelongToAnotherCty ());
|
||||
|
||||
/* Number of institutions in other countries */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_INS, // Number of institutions...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_INS, // Number of institutions...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
|
||||
/* Number of centers in other countries */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
|
||||
/* Number of degrees in other countries */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
|
||||
/* Number of courses in other countries */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
|
||||
Hie_CTY,0)); // ...in other countries
|
||||
|
||||
/* Number of users in courses of other countries */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Enr_GetCachedNumUsrsInCrss (Hie_CTY,0,
|
||||
1 << Rol_STD |
|
||||
1 << Rol_NET |
|
||||
1 << Rol_TCH)); // Any user
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Enr_GetCachedNumUsrsInCrss (Hie_CTY,0,
|
||||
1 << Rol_STD |
|
||||
1 << Rol_NET |
|
||||
1 << Rol_TCH)); // Any user
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Write users and institutions with unknown country *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Txt (Txt_Country_unspecified);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of users who do not claim to belong to any country */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Cty_GetCachedNumUsrsWhoDontClaimToBelongToAnyCty ());
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Cty_GetCachedNumUsrsWhoDontClaimToBelongToAnyCty ());
|
||||
|
||||
/* Number of institutions with unknown country */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_INS, // Number of institutions...
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_INS, // Number of institutions...
|
||||
Hie_CTY,-1L)); // ...with unknown country
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of centers with unknown country */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
Hie_CTY,-1L)); // ...with unknown country
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of degrees with unknown country */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
|
||||
Hie_CTY,-1L)); // ...with unknown country
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Number of courses with unknown country */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
|
||||
HTM_TD_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
|
||||
Hie_CTY,-1L)); // ...with unknown country
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
|
|
@ -1022,15 +1022,11 @@ static void Crs_ListCoursesOfAYearForEdition (unsigned Year)
|
|||
ICanEdit); // Put form?
|
||||
|
||||
/* Current number of teachers in this course */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Rol_TCH] +
|
||||
HTM_TD_Unsigned (NumUsrs[Rol_TCH] +
|
||||
NumUsrs[Rol_NET]);
|
||||
HTM_TD_End ();
|
||||
|
||||
/* Current number of students in this course */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Rol_STD]);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[Rol_STD]);
|
||||
|
||||
/* Course requester */
|
||||
UsrDat.UsrCod = Crs->RequesterUsrCod;
|
||||
|
@ -1133,14 +1129,10 @@ static void Crs_PutFormToCreateCourse (void)
|
|||
Nam_NewShortAndFullNames (Names);
|
||||
|
||||
/***** Current number of teachers in this course *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Current number of students in this course *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Course requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",The_GetSuffix ());
|
||||
|
|
|
@ -455,14 +455,10 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of courses in this degree */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCrss);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumCrss);
|
||||
|
||||
/* Number of users in courses of this degree */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrsInCrssOfDeg);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrsInCrssOfDeg);
|
||||
|
||||
/* Degree requester */
|
||||
UsrDat.UsrCod = Deg->RequesterUsrCod;
|
||||
|
@ -577,14 +573,10 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Number of courses in this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Number of users in courses of this degree *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Degree requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
|
|
|
@ -432,9 +432,7 @@ static void DegTyp_ListDegreeTypesForEdition (const struct DegTyp_DegTypes *DegT
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of degrees of this type */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (DegTypes->Lst[NumDegTyp].NumDegs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (DegTypes->Lst[NumDegTyp].NumDegs);
|
||||
|
||||
/* End table row */
|
||||
HTM_TR_End ();
|
||||
|
@ -486,9 +484,7 @@ static void DegTyp_PutFormToCreateDegreeType (void)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Number of degrees of this degree type ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** End table row *****/
|
||||
HTM_TR_End ();
|
||||
|
|
|
@ -196,9 +196,7 @@ void Dpt_SeeAllDepts (void)
|
|||
HTM_A_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Departments.Lst[NumDpt].NumTchs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Departments.Lst[NumDpt].NumTchs);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
@ -220,9 +218,7 @@ void Dpt_SeeAllDepts (void)
|
|||
HTM_Txt (Txt_Other_departments);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumTchsInsInOtherDpts);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumTchsInsInOtherDpts);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
@ -235,9 +231,7 @@ void Dpt_SeeAllDepts (void)
|
|||
HTM_Txt (Txt_Department_unspecified);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumTchsInsWithNoDpt);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumTchsInsWithNoDpt);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
@ -553,9 +547,7 @@ static void Dpt_ListDepartmentsForEdition (const struct Dpt_Departments *Departm
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of teachers */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Dpt->NumTchs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Dpt->NumTchs);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
@ -852,9 +844,7 @@ static void Dpt_PutFormToCreateDepartment (void)
|
|||
HTM_TD_End ();
|
||||
|
||||
/***** Number of teachers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
|
24
swad_exam.c
24
swad_exam.c
|
@ -1583,13 +1583,13 @@ void Exa_GetAndShowExamsStats (void)
|
|||
extern const char *Txt_Number_of_BR_courses_with_BR_exams;
|
||||
extern const char *Txt_Average_number_BR_of_exams_BR_per_course;
|
||||
unsigned NumExams;
|
||||
unsigned NumCoursesWithExams = 0;
|
||||
double NumExamsPerCourse = 0.0;
|
||||
unsigned NumCoursesWithExams;
|
||||
|
||||
/***** Get the number of exams from this location *****/
|
||||
if ((NumExams = Exa_DB_GetNumExams (Gbl.Scope.Current)))
|
||||
if ((NumCoursesWithExams = Exa_DB_GetNumCoursesWithExams (Gbl.Scope.Current)) != 0)
|
||||
NumExamsPerCourse = (double) NumExams / (double) NumCoursesWithExams;
|
||||
NumCoursesWithExams = Exa_DB_GetNumCoursesWithExams (Gbl.Scope.Current);
|
||||
else
|
||||
NumCoursesWithExams = 0;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_EXAMS],
|
||||
|
@ -1605,19 +1605,9 @@ void Exa_GetAndShowExamsStats (void)
|
|||
|
||||
/***** Write number of exams *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumExams);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithExams);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumExamsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumExams);
|
||||
HTM_TD_Unsigned (NumCoursesWithExams);
|
||||
HTM_TD_Ratio (NumExams,NumCoursesWithExams);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -1217,15 +1217,8 @@ void Fol_GetAndShowFollowStats (void)
|
|||
Txt_Followers);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs);
|
||||
HTM_TD_Percentage (NumUsrs,NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
@ -1244,9 +1237,7 @@ void Fol_GetAndShowFollowStats (void)
|
|||
HTM_Txt (Txt_FollowPerFollow[Fol]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (Average);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Double2Decimals (Average);
|
||||
|
||||
HTM_TD_Empty (1);
|
||||
|
||||
|
|
24
swad_game.c
24
swad_game.c
|
@ -2243,13 +2243,13 @@ void Gam_GetAndShowGamesStats (void)
|
|||
extern const char *Txt_Number_of_BR_courses_with_BR_games;
|
||||
extern const char *Txt_Average_number_BR_of_games_BR_per_course;
|
||||
unsigned NumGames;
|
||||
unsigned NumCoursesWithGames = 0;
|
||||
double NumGamesPerCourse = 0.0;
|
||||
unsigned NumCoursesWithGames;
|
||||
|
||||
/***** Get the number of games from this location *****/
|
||||
if ((NumGames = Gam_DB_GetNumGames (Gbl.Scope.Current)))
|
||||
if ((NumCoursesWithGames = Gam_DB_GetNumCoursesWithGames (Gbl.Scope.Current)) != 0)
|
||||
NumGamesPerCourse = (double) NumGames / (double) NumCoursesWithGames;
|
||||
NumCoursesWithGames = Gam_DB_GetNumCoursesWithGames (Gbl.Scope.Current);
|
||||
else
|
||||
NumCoursesWithGames = 0;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_GAMES],
|
||||
|
@ -2265,19 +2265,9 @@ void Gam_GetAndShowGamesStats (void)
|
|||
|
||||
/***** Write number of games *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumGames);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithGames);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumGamesPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumGames);
|
||||
HTM_TD_Unsigned (NumCoursesWithGames);
|
||||
HTM_TD_Ratio (NumGames,NumCoursesWithGames);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
11
swad_icon.c
11
swad_icon.c
|
@ -618,15 +618,8 @@ void Ico_GetAndShowNumUsrsPerIconSet (void)
|
|||
free (URL);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[IconSet]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[IconSet] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[IconSet]);
|
||||
HTM_TD_Percentage (NumUsrs[IconSet],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -982,19 +982,13 @@ static void Ins_ListInstitutionsForEdition (void)
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of users who claim to belong to this institution */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrsIns);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrsIns);
|
||||
|
||||
/* Number of centers */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCtrs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumCtrs);
|
||||
|
||||
/* Number of users in courses of this institution */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrsInCrssOfIns);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrsInCrssOfIns);
|
||||
|
||||
/* Institution requester */
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
|
@ -1372,28 +1366,20 @@ static void Ins_PutFormToCreateInstitution (void)
|
|||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"class=\"INPUT_WWW_NARROW INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
" required=\"required\"",The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Number of users who claim to belong to this institution ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Number of users in courses of this institution ****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
/***** Institution requester *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s INPUT_REQUESTER\"",The_GetSuffix ());
|
||||
Usr_WriteAuthor (&Gbl.Usrs.Me.UsrDat,Cns_ENABLED);
|
||||
HTM_TD_End ();
|
||||
|
||||
|
|
|
@ -305,15 +305,8 @@ void Lan_GetAndShowNumUsrsPerLanguage (void)
|
|||
HTM_Txt (Txt_STR_LANG_NAME[Lan]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Lan]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[Lan] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[Lan]);
|
||||
HTM_TD_Percentage (NumUsrs[Lan],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -1782,15 +1782,8 @@ void Lay_GetAndShowNumUsrsPerSideColumns (void)
|
|||
free (Icon);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[SideCols]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[SideCols] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[SideCols]);
|
||||
HTM_TD_Percentage (NumUsrs[SideCols],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -504,9 +504,7 @@ static void Mai_ListMailDomainsForEdition (const struct Mai_Mails *Mails)
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of users */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Mai->NumUsrs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Mai->NumUsrs);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
@ -716,9 +714,7 @@ static void Mai_PutFormToCreateMailDomain (void)
|
|||
HTM_TD_End ();
|
||||
|
||||
/* Number of users */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
|
11
swad_menu.c
11
swad_menu.c
|
@ -458,15 +458,8 @@ void Mnu_GetAndShowNumUsrsPerMenu (void)
|
|||
Txt_MENU_NAMES[Menu],"ICOx20");
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Menu]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[Menu] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[Menu]);
|
||||
HTM_TD_Percentage (NumUsrs[Menu],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -819,7 +819,7 @@ void Msg_RecMsgFromUsr (void)
|
|||
while (*Ptr)
|
||||
{
|
||||
Par_GetNextStrUntilSeparParMult (&Ptr,UsrDstData.EnUsrCod,
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Cry_BYTES_ENCRYPTED_STR_SHA256_BASE64);
|
||||
Usr_GetUsrCodFromEncryptedUsrCod (&UsrDstData);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&UsrDstData, // Get recipient's data from database
|
||||
Usr_DONT_GET_PREFS,
|
||||
|
|
|
@ -218,15 +218,8 @@ void PhoSha_GetAndShowNumUsrsPerPhotoShape (void)
|
|||
Ico_GetPreffix (Ico_BLACK),The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Shape]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[Shape] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[Shape]);
|
||||
HTM_TD_Percentage (NumUsrs[Shape],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
15
swad_place.c
15
swad_place.c
|
@ -213,12 +213,10 @@ void Plc_SeeAllPlaces (void)
|
|||
HTM_Txt (Txt_Place_unspecified);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Hie_GetNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
HTM_TD_Unsigned (Hie_GetNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||
Hie_INS, // ...in institution
|
||||
Gbl.Hierarchy.Node[Hie_INS].HieCod) -
|
||||
NumCtrsWithPlc);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
@ -492,9 +490,7 @@ static void Plc_ListPlacesForEdition (const struct Plc_Places *Places)
|
|||
true); // Put form
|
||||
|
||||
/* Number of centers */
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Plc->NumCtrs);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Plc->NumCtrs);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
@ -635,8 +631,7 @@ static void Plc_RenamePlace (Nam_ShrtOrFullName_t ShrtOrFull)
|
|||
Ale_CreateAlertYouCanNotLeaveFieldEmpty ();
|
||||
|
||||
/***** Update place name *****/
|
||||
Str_Copy (CurrentName[ShrtOrFull],NewName,
|
||||
Nam_MaxBytes[ShrtOrFull]);
|
||||
Str_Copy (CurrentName[ShrtOrFull],NewName,Nam_MaxBytes[ShrtOrFull]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -685,9 +680,7 @@ static void Plc_PutFormToCreatePlace (void)
|
|||
Nam_NewShortAndFullNames (Names);
|
||||
|
||||
/***** Number of centers *****/
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (0);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
|
|
@ -372,15 +372,8 @@ static void Pri_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,
|
|||
HTM_Txt (Txt_PRIVACY_OPTIONS[Visibility]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Visibility]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[Visibility] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[Visibility]);
|
||||
HTM_TD_Percentage (NumUsrs[Visibility],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -2224,14 +2224,13 @@ void Prg_GetAndShowCourseProgramStats (void)
|
|||
extern const char *Txt_Number_of_BR_courses_with_BR_program_items;
|
||||
extern const char *Txt_Average_number_BR_of_items_BR_per_course;
|
||||
unsigned NumItems;
|
||||
unsigned NumCoursesWithItems = 0;
|
||||
double NumItemsPerCourse = 0.0;
|
||||
unsigned NumCoursesWithItems;
|
||||
|
||||
/***** Get the number of program items from this location *****/
|
||||
if ((NumItems = Prg_DB_GetNumItems (Gbl.Scope.Current)))
|
||||
if ((NumCoursesWithItems = Prg_DB_GetNumCoursesWithItems (Gbl.Scope.Current)) != 0)
|
||||
NumItemsPerCourse = (double) NumItems /
|
||||
(double) NumCoursesWithItems;
|
||||
NumCoursesWithItems = Prg_DB_GetNumCoursesWithItems (Gbl.Scope.Current);
|
||||
else
|
||||
NumCoursesWithItems = 0;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_COURSE_PROGRAMS],
|
||||
|
@ -2247,19 +2246,9 @@ void Prg_GetAndShowCourseProgramStats (void)
|
|||
|
||||
/***** Write number of assignments *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumItems);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithItems);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumItemsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumItems);
|
||||
HTM_TD_Unsigned (NumCoursesWithItems);
|
||||
HTM_TD_Ratio (NumItems,NumCoursesWithItems);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -4720,14 +4720,13 @@ void Prj_GetAndShowProjectsStats (void)
|
|||
extern const char *Txt_Number_of_BR_courses_with_BR_projects;
|
||||
extern const char *Txt_Average_number_BR_of_projects_BR_per_course;
|
||||
unsigned NumProjects;
|
||||
unsigned NumCoursesWithProjects = 0;
|
||||
double NumProjectsPerCourse = 0.0;
|
||||
unsigned NumCoursesWithProjects;
|
||||
|
||||
/***** Get the number of projects from this location *****/
|
||||
if ((NumProjects = Prj_DB_GetNumProjects (Gbl.Scope.Current)))
|
||||
if ((NumCoursesWithProjects = Prj_DB_GetNumCoursesWithProjects (Gbl.Scope.Current)) != 0)
|
||||
NumProjectsPerCourse = (double) NumProjects /
|
||||
(double) NumCoursesWithProjects;
|
||||
NumCoursesWithProjects = Prj_DB_GetNumCoursesWithProjects (Gbl.Scope.Current);
|
||||
else
|
||||
NumCoursesWithProjects = 0;
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_PROJECTS],
|
||||
|
@ -4743,19 +4742,9 @@ void Prj_GetAndShowProjectsStats (void)
|
|||
|
||||
/***** Write number of projects *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumProjects);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithProjects);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumProjectsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumProjects);
|
||||
HTM_TD_Unsigned (NumCoursesWithProjects);
|
||||
HTM_TD_Ratio (NumProjects,NumCoursesWithProjects);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -1121,18 +1121,20 @@ void Rub_GetAndShowRubricsStats (void)
|
|||
extern const char *Txt_Average_number_BR_of_rubrics_BR_per_course;
|
||||
extern const char *Txt_Average_number_BR_of_criteria_BR_per_rubric;
|
||||
unsigned NumRubrics;
|
||||
unsigned NumCoursesWithRubrics = 0;
|
||||
double NumRubricsPerCourse = 0.0;
|
||||
double NumCriteriaPerRubric = 0.0;
|
||||
unsigned NumCoursesWithRubrics;
|
||||
double NumCriteriaPerRubric;
|
||||
|
||||
/***** Get the number of rubrics from this location *****/
|
||||
if ((NumRubrics = Rub_DB_GetNumRubrics (Gbl.Scope.Current)))
|
||||
{
|
||||
if ((NumCoursesWithRubrics = Rub_DB_GetNumCoursesWithRubrics (Gbl.Scope.Current)) != 0)
|
||||
NumRubricsPerCourse = (double) NumRubrics /
|
||||
(double) NumCoursesWithRubrics;
|
||||
NumCoursesWithRubrics = Rub_DB_GetNumCoursesWithRubrics (Gbl.Scope.Current);
|
||||
NumCriteriaPerRubric = Rub_DB_GetNumCriteriaPerRubric (Gbl.Scope.Current);
|
||||
}
|
||||
else
|
||||
{
|
||||
NumCoursesWithRubrics = 0;
|
||||
NumCriteriaPerRubric = 0.0;
|
||||
}
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_RUBRICS],
|
||||
|
@ -1149,23 +1151,10 @@ void Rub_GetAndShowRubricsStats (void)
|
|||
|
||||
/***** Write number of rubrics *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumRubrics);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithRubrics);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumRubricsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumCriteriaPerRubric);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumRubrics);
|
||||
HTM_TD_Unsigned (NumCoursesWithRubrics);
|
||||
HTM_TD_Ratio (NumRubrics,NumCoursesWithRubrics);
|
||||
HTM_TD_Double2Decimals (NumCriteriaPerRubric);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
|
@ -3297,18 +3297,20 @@ void Svy_GetAndShowSurveysStats (void)
|
|||
extern const char *Txt_Number_of_BR_notifications;
|
||||
unsigned NumSurveys;
|
||||
unsigned NumNotif;
|
||||
unsigned NumCoursesWithSurveys = 0;
|
||||
double NumSurveysPerCourse = 0.0;
|
||||
double NumQstsPerSurvey = 0.0;
|
||||
unsigned NumCoursesWithSurveys;
|
||||
double NumQstsPerSurvey;
|
||||
|
||||
/***** Get the number of surveys and the average number of questions per survey from this location *****/
|
||||
if ((NumSurveys = Svy_GetNumCrsSurveys (Gbl.Scope.Current,&NumNotif)))
|
||||
{
|
||||
if ((NumCoursesWithSurveys = Svy_DB_GetNumCrssWithCrsSurveys (Gbl.Scope.Current)) != 0)
|
||||
NumSurveysPerCourse = (double) NumSurveys /
|
||||
(double) NumCoursesWithSurveys;
|
||||
NumCoursesWithSurveys = Svy_DB_GetNumCrssWithCrsSurveys (Gbl.Scope.Current);
|
||||
NumQstsPerSurvey = Svy_DB_GetNumQstsPerCrsSurvey (Gbl.Scope.Current);
|
||||
}
|
||||
else
|
||||
{
|
||||
NumCoursesWithSurveys = 0;
|
||||
NumQstsPerSurvey = 0.0;
|
||||
}
|
||||
|
||||
/***** Begin box and table *****/
|
||||
Box_BoxTableBegin (NULL,Txt_FIGURE_TYPES[Fig_SURVEYS],
|
||||
|
@ -3326,27 +3328,11 @@ void Svy_GetAndShowSurveysStats (void)
|
|||
|
||||
/***** Write number of surveys *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumSurveys);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumCoursesWithSurveys);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumSurveysPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumQstsPerSurvey);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumNotif);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumSurveys);
|
||||
HTM_TD_Unsigned (NumCoursesWithSurveys);
|
||||
HTM_TD_Ratio (NumSurveys,NumCoursesWithSurveys);
|
||||
HTM_TD_Double2Decimals (NumQstsPerSurvey);
|
||||
HTM_TD_Unsigned (NumNotif);
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
33
swad_test.c
33
swad_test.c
|
@ -786,9 +786,7 @@ void Tst_GetAndShowTestsStats (void)
|
|||
HTM_Txt (Txt_TST_STR_ANSWER_TYPES[AnsType]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Stats.NumCoursesWithQuestions);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Stats.NumCoursesWithQuestions);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_TxtF ("%u (%.1lf%%)",
|
||||
|
@ -798,29 +796,12 @@ void Tst_GetAndShowTestsStats (void)
|
|||
0.0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (Stats.NumQsts);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (Stats.AvgQstsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_UnsignedLong (Stats.NumHits);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (Stats.AvgHitsPerCourse);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (Stats.AvgHitsPerQuestion);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (Stats.AvgScorePerQuestion);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (Stats.NumQsts);
|
||||
HTM_TD_Double2Decimals (Stats.AvgQstsPerCourse);
|
||||
HTM_TD_UnsignedLong (Stats.NumHits);
|
||||
HTM_TD_Double2Decimals (Stats.AvgHitsPerCourse);
|
||||
HTM_TD_Double2Decimals (Stats.AvgHitsPerQuestion);
|
||||
HTM_TD_Double2Decimals (Stats.AvgScorePerQuestion);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
11
swad_theme.c
11
swad_theme.c
|
@ -326,15 +326,8 @@ void The_GetAndShowNumUsrsPerTheme (void)
|
|||
free (URL);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs[Theme]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[Theme] * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Unsigned (NumUsrs[Theme]);
|
||||
HTM_TD_Percentage (NumUsrs[Theme],NumUsrsTotal);
|
||||
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
|
|
@ -605,26 +605,10 @@ void Tml_GetAndShowTimelineActivityStats (void)
|
|||
HTM_Txt (Txt_TIMELINE_NOTE[NoteType]);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumNotes);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Unsigned (NumUsrs);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs * 100.0 /
|
||||
(double) NumUsrsTotal :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
|
||||
HTM_Double2Decimals (NumUsrs ? (double) NumNotes /
|
||||
(double) NumUsrs :
|
||||
0.0);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Unsigned (NumNotes);
|
||||
HTM_TD_Unsigned (NumUsrs);
|
||||
HTM_TD_Percentage (NumUsrs,NumUsrsTotal);
|
||||
HTM_TD_Ratio (NumNotes,NumUsrs);
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
|
|
|
@ -3118,7 +3118,7 @@ void Usr_GetListsSelectedEncryptedUsrsCods (struct Usr_SelectedUsrs *SelectedUsr
|
|||
if (Gbl.Session.IsOpen) // If the session is open, get parameter from DB
|
||||
{
|
||||
Ses_DB_GetPar (ParName,SelectedUsrs->List[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS);
|
||||
Str_ChangeFormat (Str_FROM_FORM,Str_TO_TEXT,SelectedUsrs->List[Rol_UNK],
|
||||
Usr_MAX_BYTES_LIST_ENCRYPTED_USR_CODS,
|
||||
Str_REMOVE_SPACES);
|
||||
|
|
Loading…
Reference in New Issue