Version 23.37: Oct 14, 2023 Code refactoring in HTML.

This commit is contained in:
acanas 2023-10-14 21:36:39 +02:00
parent d7b04912a9
commit 1162456ac5
27 changed files with 172 additions and 429 deletions

View File

@ -2049,6 +2049,27 @@ void HTM_Percentage (double Percentage)
HTM_TxtF ("%5.2lf%%",Percentage);
}
void HTM_TD_Txt_Left (const char *Txt)
{
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt);
HTM_TD_End ();
}
void HTM_TD_Txt_Right (const char *Txt)
{
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt);
HTM_TD_End ();
}
void HTM_TD_LINE_TOP_Txt (const char *Txt)
{
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s LINE_TOP\"",The_GetSuffix ());
HTM_Txt (Txt);
HTM_TD_End ();
}
void HTM_TD_Unsigned (unsigned Num)
{
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
@ -2056,6 +2077,13 @@ void HTM_TD_Unsigned (unsigned Num)
HTM_TD_End ();
}
void HTM_TD_LINE_TOP_Unsigned (unsigned Num)
{
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",The_GetSuffix ());
HTM_Unsigned (Num);
HTM_TD_End ();
}
void HTM_TD_UnsignedLong (unsigned long Num)
{
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
@ -2063,6 +2091,13 @@ void HTM_TD_UnsignedLong (unsigned long Num)
HTM_TD_End ();
}
void HTM_TD_LINE_TOP_UnsignedLong (unsigned long Num)
{
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",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 ());
@ -2071,6 +2106,14 @@ void HTM_TD_Percentage (unsigned Num,unsigned NumTotal)
HTM_TD_End ();
}
void HTM_TD_LINE_TOP_Percentage (unsigned Num,unsigned NumTotal)
{
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",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 ());
@ -2079,9 +2122,24 @@ void HTM_TD_Ratio (unsigned Num,unsigned NumTotal)
HTM_TD_End ();
}
void HTM_TD_LINE_TOP_Ratio (unsigned Num,unsigned NumTotal)
{
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",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 ();
}
void HTM_TD_LINE_TOP_Double2Decimals (double Num)
{
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",The_GetSuffix ());
HTM_Double2Decimals (Num);
HTM_TD_End ();
}

View File

@ -242,10 +242,18 @@ void HTM_DoubleFewDigits (double Num);
void HTM_Double2Decimals (double Num);
void HTM_Percentage (double Percentage);
void HTM_TD_Txt_Left (const char *Txt);
void HTM_TD_Txt_Right (const char *Txt);
void HTM_TD_LINE_TOP_Txt (const char *Txt);
void HTM_TD_Unsigned (unsigned Num);
void HTM_TD_LINE_TOP_Unsigned (unsigned Num);
void HTM_TD_UnsignedLong (unsigned long Num);
void HTM_TD_LINE_TOP_UnsignedLong (unsigned long Num);
void HTM_TD_Percentage (unsigned Num,unsigned NumTotal);
void HTM_TD_LINE_TOP_Percentage (unsigned Num,unsigned NumTotal);
void HTM_TD_Ratio (unsigned Num,unsigned NumTotal);
void HTM_TD_LINE_TOP_Ratio (unsigned Num,unsigned NumTotal);
void HTM_TD_Double2Decimals (double Num);
void HTM_TD_LINE_TOP_Double2Decimals (double Num);
#endif

View File

@ -546,8 +546,7 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
The_GetSuffix ());
else
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
The_GetSuffix (),
The_GetColorRows ());
The_GetSuffix (),The_GetColorRows ());
if (Assignments->Asg.SendWork == Asg_SEND_WORK)
Asg_WriteAssignmentFolder (&Assignments->Asg,PrintView);
HTM_TD_End ();
@ -561,8 +560,7 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
if (PrintView)
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
else
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",
The_GetColorRows ());
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
Asg_WriteAsgAuthor (&Assignments->Asg);
HTM_TD_End ();

View File

@ -2815,18 +2815,11 @@ static void Att_ListUsrsAttendanceTable (struct Att_Events *Events,
NumAttEvent++)
if (Events->Lst[NumAttEvent].Selected)
{
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (Events->Lst[NumAttEvent].NumStdsFromList);
HTM_TD_End ();
HTM_TD_LINE_TOP_Unsigned (Events->Lst[NumAttEvent].NumStdsFromList);
Total += Events->Lst[NumAttEvent].NumStdsFromList;
}
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (Total);
HTM_TD_End ();
HTM_TD_LINE_TOP_Unsigned (Total);
HTM_TR_End ();
}

View File

@ -10213,14 +10213,9 @@ void Brw_GetAndShowOERsStats (void)
Brw_GetNumberOfOERs (License,NumFiles);
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_LICENSES[License]);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_LICENSES[License]);
HTM_TD_UnsignedLong (NumFiles[0]);
HTM_TD_UnsignedLong (NumFiles[1]);
HTM_TR_End ();
}

View File

@ -1301,13 +1301,11 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
The_GetSuffix ());
HTM_TD_End ();
/***** Number of users who claim to belong to this center *****/
/***** Number of users who claim to belong to this center,
number of degrees and
number of users in courses of this center *****/
HTM_TD_Unsigned (0);
/***** Number of degrees *****/
HTM_TD_Unsigned (0);
/***** Number of users in courses of this center *****/
HTM_TD_Unsigned (0);
/***** Center requester *****/
@ -1317,8 +1315,7 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
HTM_TD_End ();
/***** Center status *****/
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TD_End ();
HTM_TD_Empty (1);
HTM_TR_End ();

View File

@ -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.36 (2023-10-11)"
#define Log_PLATFORM_VERSION "SWAD 23.37 (2023-10-14)"
#define CSS_FILE "swad23.35.1.css"
#define JS_FILE "swad22.49.js"
/*
Version 23.37: Oct 14, 2023 Code refactoring in HTML. (335342 lines)
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)

View File

@ -273,15 +273,8 @@ void Cht_ShowListOfChatRoomsWithUsrs (void)
row = mysql_fetch_row (mysql_res);
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (row[0]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
HTM_Txt (row[1]);
HTM_TD_End ();
HTM_TD_Txt_Left (row[0]);
HTM_TD_Txt_Right (row[1]);
HTM_TR_End ();
}

View File

@ -278,10 +278,7 @@ void Cty_ListCountries2 (void)
HTM_TR_Begin (NULL);
HTM_TD_Empty (1);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_Country_unspecified);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_Country_unspecified);
/* Number of users who do not claim to belong to any country */
HTM_TD_Unsigned (Cty_GetCachedNumUsrsWhoDontClaimToBelongToAnyCty ());

View File

@ -1128,10 +1128,8 @@ static void Crs_PutFormToCreateCourse (void)
Names[Nam_FULL_NAME] = Crs_EditingCrs->FullName;
Nam_NewShortAndFullNames (Names);
/***** Current number of teachers in this course *****/
/***** Current number of teachers and students in this course *****/
HTM_TD_Unsigned (0);
/***** Current number of students in this course *****/
HTM_TD_Unsigned (0);
/***** Course requester *****/
@ -1140,8 +1138,7 @@ static void Crs_PutFormToCreateCourse (void)
HTM_TD_End ();
/***** Course status *****/
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TD_End ();
HTM_TD_Empty (1);
HTM_TR_End ();

View File

@ -1883,17 +1883,8 @@ void Dat_GetAndShowNumUsrsPerDateFormat (void)
Dat_PutScriptDateFormat (Format);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumUsrs[Format]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[Format] * 100.0 /
(double) NumUsrsTotal :
0.0);
HTM_TD_End ();
HTM_TD_Unsigned (NumUsrs[Format]);
HTM_TD_Percentage (NumUsrs[Format],NumUsrsTotal);
HTM_TR_End ();
}

View File

@ -579,14 +579,12 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
HTM_TD_Unsigned (0);
/***** Degree 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 ();
/***** Degree status *****/
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TD_End ();
HTM_TD_Empty (1);
HTM_TR_End ();

View File

@ -131,8 +131,6 @@ void Dpt_SeeAllDepts (void)
[Dpt_ORDER_BY_NUM_TCHS ] = HTM_HEAD_RIGHT
};
unsigned NumDpt;
unsigned NumTchsInsInOtherDpts;
unsigned NumTchsInsWithNoDpt;
/***** Trivial check *****/
if (Gbl.Hierarchy.Node[Hie_INS].HieCod <= 0) // No institution selected
@ -210,29 +208,15 @@ void Dpt_SeeAllDepts (void)
HTM_TR_End ();
/***** Write teachers of this institution with other department *****/
NumTchsInsInOtherDpts = Dpt_DB_GetNumTchsCurrentInsInDepartment (0);
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_Other_departments);
HTM_TD_End ();
HTM_TD_Unsigned (NumTchsInsInOtherDpts);
HTM_TD_Txt_Left (Txt_Other_departments);
HTM_TD_Unsigned (Dpt_DB_GetNumTchsCurrentInsInDepartment (0));
HTM_TR_End ();
/***** Write teachers with no department *****/
NumTchsInsWithNoDpt = Dpt_DB_GetNumTchsCurrentInsInDepartment (-1L);
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_Department_unspecified);
HTM_TD_End ();
HTM_TD_Unsigned (NumTchsInsWithNoDpt);
HTM_TD_Txt_Left (Txt_Department_unspecified);
HTM_TD_Unsigned (Dpt_DB_GetNumTchsCurrentInsInDepartment (-1L));
HTM_TR_End ();
/***** End table and box *****/

View File

@ -1211,15 +1211,10 @@ void Fol_GetAndShowFollowStats (void)
/***** Write number of followed / followers *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Fol == 0 ? Txt_Followed :
Txt_Followers);
HTM_TD_End ();
HTM_TD_Txt_Left (Fol == 0 ? Txt_Followed :
Txt_Followers);
HTM_TD_Unsigned (NumUsrs);
HTM_TD_Percentage (NumUsrs,NumUsrsTotal);
HTM_TR_End ();
}
@ -1232,15 +1227,9 @@ void Fol_GetAndShowFollowStats (void)
/***** Write number of followed per follower *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_FollowPerFollow[Fol]);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_FollowPerFollow[Fol]);
HTM_TD_Double2Decimals (Average);
HTM_TD_Empty (1);
HTM_TR_End ();
}

View File

@ -3466,15 +3466,15 @@ static void For_WriteForumTotalStats (struct For_FiguresForum *FiguresForum)
double NumPostsPerForum;
/***** Compute number of threads per forum, number of posts per forum and number of posts per thread *****/
NumThrsPerForum = (FiguresForum->NumForums ? (double) FiguresForum->NumThreads /
(double) FiguresForum->NumForums :
0.0);
NumThrsPerForum = (FiguresForum->NumForums ? (double) FiguresForum->NumThreads /
(double) FiguresForum->NumForums :
0.0);
NumPostsPerThread = (FiguresForum->NumThreads ? (double) FiguresForum->NumPosts /
(double) FiguresForum->NumThreads :
0.0);
NumPostsPerForum = (FiguresForum->NumForums ? (double) FiguresForum->NumPosts /
(double) FiguresForum->NumForums :
0.0);
NumPostsPerForum = (FiguresForum->NumForums ? (double) FiguresForum->NumPosts /
(double) FiguresForum->NumForums :
0.0);
/***** Write forum name and stats *****/
HTM_TR_Begin (NULL);
@ -3483,45 +3483,14 @@ static void For_WriteForumTotalStats (struct For_FiguresForum *FiguresForum)
The_GetSuffix ());
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Txt (Txt_Total);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (FiguresForum->NumForums);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (FiguresForum->NumThreads);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (FiguresForum->NumPosts);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP RM\"",
The_GetSuffix ());
HTM_Unsigned (FiguresForum->NumUsrsToBeNotifiedByEMail);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (NumThrsPerForum);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (NumPostsPerThread);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (NumPostsPerForum);
HTM_TD_End ();
HTM_TD_LINE_TOP_Txt (Txt_Total);
HTM_TD_LINE_TOP_Unsigned (FiguresForum->NumForums);
HTM_TD_LINE_TOP_Unsigned (FiguresForum->NumThreads);
HTM_TD_LINE_TOP_Unsigned (FiguresForum->NumPosts);
HTM_TD_LINE_TOP_Unsigned (FiguresForum->NumUsrsToBeNotifiedByEMail);
HTM_TD_LINE_TOP_Double2Decimals (NumThrsPerForum);
HTM_TD_LINE_TOP_Double2Decimals (NumPostsPerThread);
HTM_TD_LINE_TOP_Double2Decimals (NumPostsPerForum);
HTM_TR_End ();
}

View File

@ -2221,8 +2221,7 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp,
HTM_TD_End ();
/* Room */
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TD_End ();
HTM_TD_Empty (1);
/* Number of students who don't belong to any group of this type */
for (Role = Rol_TCH;

View File

@ -178,21 +178,17 @@ void Hld_SeeAllHolidays (void)
/* Write data of this holiday */
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (Holidays.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
Holidays.Lst[NumHld].PlaceFullName);
HTM_TD_End ();
HTM_TD_Txt_Left (Holidays.Lst[NumHld].PlcCod <= 0 ? Txt_All_places :
Holidays.Lst[NumHld].PlaceFullName);
Dat_ConvDateToDateStr (&Holidays.Lst[NumHld].StartDate,StrDate);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_TxtF ("&nbsp;%s",StrDate);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_NBSP ();
HTM_Txt (StrDate);
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_NBSP ();
switch (Holidays.Lst[NumHld].HldTyp)
{
@ -205,8 +201,7 @@ void Hld_SeeAllHolidays (void)
}
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TxtF ("&nbsp;%s",Holidays.Lst[NumHld].Name);
HTM_TD_End ();

View File

@ -506,15 +506,8 @@ static void Ind_ShowNumCoursesWithIndicators (const struct Ind_Indicators *Indic
if (PutForm)
HTM_TD_Empty (1);
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Txt (Txt_Total);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (NumCrss);
HTM_TD_End ();
HTM_TD_LINE_TOP_Txt (Txt_Total);
HTM_TD_LINE_TOP_Unsigned (NumCrss);
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());

View File

@ -1384,8 +1384,7 @@ static void Ins_PutFormToCreateInstitution (void)
HTM_TD_End ();
/***** Institution status *****/
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_TD_End ();
HTM_TD_Empty (1);
HTM_TR_End ();
@ -1894,10 +1893,7 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
/***** Number of order *****/
if (NumberThisRow != NumberLastRow)
NumOrder = NumIns;
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumOrder);
HTM_TD_End ();
HTM_TD_Unsigned (NumOrder);
/***** Write link to institution *****/
HTM_TD_Begin ("class=\"LM FORM_IN_%s\"",
@ -1921,10 +1917,7 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
HTM_TD_End ();
/***** Write statistic *****/
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumberThisRow);
HTM_TD_End ();
HTM_TD_Unsigned (NumberThisRow);
HTM_TR_End ();

View File

@ -2843,10 +2843,7 @@ void Msg_ListBannedUsrs (void)
HTM_TD_End ();
/* Write user's full name */
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (UsrDat.FullName);
HTM_TD_End ();
HTM_TD_Txt_Left (UsrDat.FullName);
HTM_TR_End ();
}
@ -2908,61 +2905,19 @@ void Msg_GetAndShowMsgsStats (void)
/***** Write number of messages *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (Txt_MSGS_Sent);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsSentNotDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsSentDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsSentNotDeleted + NumMsgsSentDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Hyphen ();
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_MSGS_Sent);
HTM_TD_Unsigned (NumMsgsSentNotDeleted);
HTM_TD_Unsigned (NumMsgsSentDeleted);
HTM_TD_Unsigned (NumMsgsSentNotDeleted + NumMsgsSentDeleted);
HTM_TD_Txt_Right ("-");
HTM_TR_End ();
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (Txt_MSGS_Received);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsReceivedNotDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsReceivedAndDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsReceivedNotDeleted + NumMsgsReceivedAndDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMsgsReceivedAndNotified);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_MSGS_Received);
HTM_TD_Unsigned (NumMsgsReceivedNotDeleted);
HTM_TD_Unsigned (NumMsgsReceivedAndDeleted);
HTM_TD_Unsigned (NumMsgsReceivedNotDeleted + NumMsgsReceivedAndDeleted);
HTM_TD_Unsigned (NumMsgsReceivedAndNotified);
HTM_TR_End ();
/***** End table and box *****/

View File

@ -384,17 +384,8 @@ void Net_ShowWebAndSocialNetworksStats (void)
HTM_TxtF ("&nbsp;%s",Net_WebsAndSocialNetworksTitle[Web]);
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 ? 100.0 * (double) NumUsrs /
(double) NumUsrsTotal :
0.0);
HTM_TD_End ();
HTM_TD_Unsigned (NumUsrs);
HTM_TD_Percentage (NumUsrs,NumUsrsTotal);
HTM_TR_End ();
}

View File

@ -821,32 +821,11 @@ void Not_GetAndShowNoticesStats (void)
/***** Write number of notices *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumNotices[Not_ACTIVE_NOTICE]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumNotices[Not_OBSOLETE_NOTICE]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumNoticesDeleted);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s\"",
The_GetSuffix ());
HTM_Unsigned ( NumTotalNotices);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumTotalNotifications);
HTM_TD_End ();
HTM_TD_Unsigned (NumNotices[Not_ACTIVE_NOTICE]);
HTM_TD_Unsigned (NumNotices[Not_OBSOLETE_NOTICE]);
HTM_TD_Unsigned (NumNoticesDeleted);
HTM_TD_Unsigned (NumTotalNotices);
HTM_TD_Unsigned (NumTotalNotifications);
HTM_TR_End ();
/***** End table and box *****/

View File

@ -1814,67 +1814,21 @@ void Ntf_GetAndShowNumUsrsPerNotifyEvent (void)
NotifyEvent++) // 0 is reserved for Ntf_EVENT_UNKNOWN
{
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (Txt_NOTIFY_EVENTS_PLURAL[NotifyEvent]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumUsrs[NotifyEvent]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs[NotifyEvent] * 100.0 /
(double) NumUsrsTotal :
0.0);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumEvents[NotifyEvent]);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumMails[NotifyEvent]);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_NOTIFY_EVENTS_PLURAL[NotifyEvent]);
HTM_TD_Unsigned (NumUsrs[NotifyEvent]);
HTM_TD_Percentage (NumUsrs[NotifyEvent],NumUsrsTotal );
HTM_TD_Unsigned (NumEvents[NotifyEvent]);
HTM_TD_Unsigned (NumMails[NotifyEvent]);
HTM_TR_End ();
}
/***** Write total number of users who want to be notified by email on some event *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Txt (Txt_Total);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (NumUsrsTotalWhoWantToBeNotifiedByEMailAboutSomeEvent);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Percentage (NumUsrsTotal ? (double) NumUsrsTotalWhoWantToBeNotifiedByEMailAboutSomeEvent * 100.0 /
(double) NumUsrsTotal :
0.0);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (NumEventsTotal);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (NumMailsTotal);
HTM_TD_End ();
HTM_TD_LINE_TOP_Txt (Txt_Total);
HTM_TD_LINE_TOP_Unsigned (NumUsrsTotalWhoWantToBeNotifiedByEMailAboutSomeEvent);
HTM_TD_LINE_TOP_Percentage (NumUsrsTotalWhoWantToBeNotifiedByEMailAboutSomeEvent,NumUsrsTotal);
HTM_TD_LINE_TOP_Unsigned (NumEventsTotal);
HTM_TD_LINE_TOP_Unsigned (NumMailsTotal);
HTM_TR_End ();
/***** End table and box *****/

View File

@ -166,18 +166,10 @@ void Plc_SeeAllPlaces (void)
{
/* Write data of this place */
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (Places.Lst[NumPlc].FullName);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (Places.Lst[NumPlc].NumCtrs);
HTM_TD_End ();
HTM_TD_Txt_Left (Places.Lst[NumPlc].FullName);
HTM_TD_Unsigned (Places.Lst[NumPlc].NumCtrs);
HTM_TR_End ();
NumCtrsWithPlc += Places.Lst[NumPlc].NumCtrs;
}
@ -191,33 +183,21 @@ void Plc_SeeAllPlaces (void)
/***** Write centers (of the current institution) with other place *****/
NumCtrsInOtherPlcs = Ctr_DB_GetNumCtrsInPlc (0);
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",
The_GetSuffix ());
HTM_Txt (Txt_Other_places);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_%s\"",
The_GetSuffix ());
HTM_Unsigned (NumCtrsInOtherPlcs);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_Other_places);
HTM_TD_Unsigned (NumCtrsInOtherPlcs);
HTM_TR_End ();
NumCtrsWithPlc += NumCtrsInOtherPlcs;
/***** Write centers (of the current institution) with no place *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_Place_unspecified);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_Place_unspecified);
HTM_TD_Unsigned (Hie_GetNumNodesInHieLvl (Hie_CTR, // Number of centers...
Hie_INS, // ...in institution
Gbl.Hierarchy.Node[Hie_INS].HieCod) -
NumCtrsWithPlc);
HTM_TR_End ();
/***** End table *****/

View File

@ -367,14 +367,9 @@ static void Pri_GetAndShowNumUsrsPerPrivacyForAnObject (const char *TxtObject,
if (MaskAllowedVisibility & (1 << Visibility))
{
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_PRIVACY_OPTIONS[Visibility]);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_PRIVACY_OPTIONS[Visibility]);
HTM_TD_Unsigned (NumUsrs[Visibility]);
HTM_TD_Percentage (NumUsrs[Visibility],NumUsrsTotal);
HTM_TR_End ();
}
}

View File

@ -782,10 +782,7 @@ void Tst_GetAndShowTestsStats (void)
/***** Write stats *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_TST_STR_ANSWER_TYPES[AnsType]);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_TST_STR_ANSWER_TYPES[AnsType]);
HTM_TD_Unsigned (Stats.NumCoursesWithQuestions);
HTM_TD_Begin ("class=\"RM DAT_%s\"",The_GetSuffix ());
@ -812,15 +809,8 @@ void Tst_GetAndShowTestsStats (void)
/***** Write stats *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Txt (Txt_Total);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (Stats.NumCoursesWithQuestions);
HTM_TD_End ();
HTM_TD_LINE_TOP_Txt (Txt_Total);
HTM_TD_LINE_TOP_Unsigned (Stats.NumCoursesWithQuestions);
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
@ -831,35 +821,12 @@ void Tst_GetAndShowTestsStats (void)
0.0);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (Stats.NumQsts);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (Stats.AvgQstsPerCourse);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_UnsignedLong (Stats.NumHits);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (Stats.AvgHitsPerCourse);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (Stats.AvgHitsPerQuestion);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (Stats.AvgScorePerQuestion);
HTM_TD_End ();
HTM_TD_LINE_TOP_Unsigned (Stats.NumQsts);
HTM_TD_LINE_TOP_Double2Decimals (Stats.AvgQstsPerCourse);
HTM_TD_LINE_TOP_UnsignedLong (Stats.NumHits);
HTM_TD_LINE_TOP_Double2Decimals (Stats.AvgHitsPerCourse);
HTM_TD_LINE_TOP_Double2Decimals (Stats.AvgHitsPerQuestion);
HTM_TD_LINE_TOP_Double2Decimals (Stats.AvgScorePerQuestion);
HTM_TR_End ();

View File

@ -600,11 +600,7 @@ void Tml_GetAndShowTimelineActivityStats (void)
/***** Write number of timeline notes and number of users *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
HTM_Txt (Txt_TIMELINE_NOTE[NoteType]);
HTM_TD_End ();
HTM_TD_Txt_Left (Txt_TIMELINE_NOTE[NoteType]);
HTM_TD_Unsigned (NumNotes);
HTM_TD_Unsigned (NumUsrs);
HTM_TD_Percentage (NumUsrs,NumUsrsTotal);
@ -624,33 +620,11 @@ void Tml_GetAndShowTimelineActivityStats (void)
/* Write totals */
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"LM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Txt (Txt_Total);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (NumNotes);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Unsigned (NumUsrs);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Percentage (NumUsrsTotal ? (double) NumUsrs * 100.0 /
(double) NumUsrsTotal :
0.0);
HTM_TD_End ();
HTM_TD_Begin ("class=\"RM DAT_STRONG_%s LINE_TOP\"",
The_GetSuffix ());
HTM_Double2Decimals (NumUsrs ? (double) NumNotes / (double) NumUsrs :
0.0);
HTM_TD_End ();
HTM_TD_LINE_TOP_Txt (Txt_Total);
HTM_TD_LINE_TOP_Unsigned (NumNotes);
HTM_TD_LINE_TOP_Unsigned (NumUsrs);
HTM_TD_LINE_TOP_Percentage (NumUsrs,NumUsrsTotal);
HTM_TD_LINE_TOP_Ratio (NumNotes,NumUsrs);
HTM_TR_End ();