Version19.116

This commit is contained in:
Antonio Cañas Vargas 2020-01-11 15:22:02 +01:00
parent 75dfe814fc
commit 5174215ac6
35 changed files with 161 additions and 186 deletions

View File

@ -1228,14 +1228,14 @@ void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,
Str_SetDecimalPointToUS (); // To print the floating point as a dot Str_SetDecimalPointToUS (); // To print the floating point as a dot
HTM_TxtF ("<input type=\"number\" name=\"%s\"" HTM_TxtF ("<input type=\"number\" name=\"%s\""
" min=\"%lg\" max=\"%lg\"", " min=\"%.15lg\" max=\"%.15lg\"",
Name, Name,
Min,Max); Min,Max);
if (Step == 0.0) if (Step == 0.0)
HTM_Txt (" step=\"any\""); HTM_Txt (" step=\"any\"");
else else
HTM_TxtF (" step=\"%lg\"",Step); HTM_TxtF (" step=\"%.15lg\"",Step);
HTM_TxtF (" value=\"%lg\"",Value); HTM_TxtF (" value=\"%.15lg\"",Value);
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
if (Disabled) if (Disabled)
HTM_Txt (" disabled=\"disabled\""); HTM_Txt (" disabled=\"disabled\"");
@ -1719,7 +1719,6 @@ void HTM_TxtF (const char *fmt,...)
} }
} }
static void HTM_SPTxt (const char *Txt) static void HTM_SPTxt (const char *Txt)
{ {
HTM_Txt (" "); HTM_Txt (" ");
@ -1731,6 +1730,13 @@ void HTM_Txt (const char *Txt)
fputs (Txt,Gbl.F.Out); fputs (Txt,Gbl.F.Out);
} }
void HTM_TxtColonNBSP (const char *Txt)
{
HTM_Txt (Txt);
HTM_Colon ();
HTM_NBSP ();
}
void HTM_NBSP (void) void HTM_NBSP (void)
{ {
HTM_Txt ("&nbsp;"); HTM_Txt ("&nbsp;");
@ -1780,8 +1786,7 @@ void HTM_Double (double Num)
{ {
char *Str; char *Str;
/***** Write from floating point number to string /***** Write from floating point number to string ****/
with the correct accuracy *****/
Str_DoubleNumToStr (&Str,Num); Str_DoubleNumToStr (&Str,Num);
/***** Write number from string to file *****/ /***** Write number from string to file *****/
@ -1791,6 +1796,20 @@ void HTM_Double (double Num)
free (Str); free (Str);
} }
void HTM_DoubleFewDigits (double Num)
{
char *Str;
/***** Write from floating point number to string with few digits ****/
Str_DoubleNumToStrFewDigits (&Str,Num);
/***** Write number from string to file *****/
HTM_Txt (Str);
/***** Free memory allocated for string *****/
free (Str);
}
void HTM_Double2Decimals (double Num) void HTM_Double2Decimals (double Num)
{ {
HTM_TxtF ("%.2lf",Num); HTM_TxtF ("%.2lf",Num);

View File

@ -171,6 +171,7 @@ void HTM_BR (void);
void HTM_TxtF (const char *fmt,...); void HTM_TxtF (const char *fmt,...);
void HTM_Txt (const char *Txt); void HTM_Txt (const char *Txt);
void HTM_TxtColonNBSP (const char *Txt);
void HTM_NBSP (void); void HTM_NBSP (void);
void HTM_Colon (void); void HTM_Colon (void);
void HTM_Comma (void); void HTM_Comma (void);
@ -181,6 +182,7 @@ void HTM_Int (int Num);
void HTM_UnsignedLong (unsigned long Num); void HTM_UnsignedLong (unsigned long Num);
void HTM_Long (long Num); void HTM_Long (long Num);
void HTM_Double (double Num); void HTM_Double (double Num);
void HTM_DoubleFewDigits (double Num);
void HTM_Double2Decimals (double Num); void HTM_Double2Decimals (double Num);
void HTM_Percentage (double Percentage); void HTM_Percentage (double Percentage);

View File

@ -375,12 +375,12 @@ void MFU_UpdateMFUActions (void)
"REPLACE INTO actions_MFU" "REPLACE INTO actions_MFU"
" (UsrCod,ActCod,Score,LastClick)" " (UsrCod,ActCod,Score,LastClick)"
" VALUES" " VALUES"
" (%ld,%ld,'%f',NOW())", " (%ld,%ld,'%15lg',NOW())",
Gbl.Usrs.Me.UsrDat.UsrCod,ActCod,Score); Gbl.Usrs.Me.UsrDat.UsrCod,ActCod,Score);
/***** Update score for other actions *****/ /***** Update score for other actions *****/
DB_QueryUPDATE ("can not update most frequently used actions", DB_QueryUPDATE ("can not update most frequently used actions",
"UPDATE actions_MFU SET Score=GREATEST(Score*'%f','%f')" "UPDATE actions_MFU SET Score=GREATEST(Score*'%.15lg','%.15lg')"
" WHERE UsrCod=%ld AND ActCod<>%ld", " WHERE UsrCod=%ld AND ActCod<>%ld",
MFU_DECREASE_FACTOR,MFU_MIN_SCORE, MFU_DECREASE_FACTOR,MFU_MIN_SCORE,
Gbl.Usrs.Me.UsrDat.UsrCod,ActCod); Gbl.Usrs.Me.UsrDat.UsrCod,ActCod);

View File

@ -150,7 +150,7 @@ static void Acc_ShowFormCheckIfIHaveAccount (const char *Title)
/***** Form to request user's ID for possible account already created *****/ /***** Form to request user's ID for possible account already created *****/
Frm_StartForm (ActChkUsrAcc); Frm_StartForm (ActChkUsrAcc);
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_ID); HTM_TxtColonNBSP (Txt_ID);
HTM_INPUT_TEXT ("ID",ID_MAX_CHARS_USR_ID,"",false, HTM_INPUT_TEXT ("ID",ID_MAX_CHARS_USR_ID,"",false,
"size=\"18\" required=\"required\""); "size=\"18\" required=\"required\"");
HTM_LABEL_End (); HTM_LABEL_End ();
@ -285,7 +285,7 @@ static void Acc_WriteRowEmptyAccount (unsigned NumUsr,const char *ID,struct UsrD
HTM_TD_Begin ("class=\"DAT_N LT COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"DAT_N LT COLOR%u\"",Gbl.RowEvenOdd);
HTM_TxtF ("%s:&nbsp;%s",Txt_ID,ID); HTM_TxtF ("%s:&nbsp;%s",Txt_ID,ID);
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Name); HTM_TxtColonNBSP (Txt_Name);
if (UsrDat->FullName[0]) if (UsrDat->FullName[0])
{ {
HTM_STRONG_Begin (); HTM_STRONG_Begin ();

View File

@ -415,7 +415,7 @@ void Ann_ShowFormAnnouncement (void)
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_TD_Begin ("class=\"%s RT\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Users); HTM_TxtColonNBSP (Txt_Users);
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("class=\"DAT LT\""); HTM_TD_Begin ("class=\"DAT LT\"");

View File

@ -1629,8 +1629,8 @@ static void Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (struct Assignment *Asg)
/***** Write heading *****/ /***** Write heading *****/
HTM_DIV_Begin ("class=\"%s\"",Asg->Hidden ? "ASG_GRP_LIGHT" : HTM_DIV_Begin ("class=\"%s\"",Asg->Hidden ? "ASG_GRP_LIGHT" :
"ASG_GRP"); "ASG_GRP");
HTM_TxtF ("%s:&nbsp;",NumRows == 1 ? Txt_Group : HTM_TxtColonNBSP (NumRows == 1 ? Txt_Group :
Txt_Groups); Txt_Groups);
/***** Write groups *****/ /***** Write groups *****/
if (NumRows) // Groups found... if (NumRows) // Groups found...

View File

@ -1482,8 +1482,8 @@ static void Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (struct AttendanceEve
/***** Write heading *****/ /***** Write heading *****/
HTM_DIV_Begin ("class=\"%s\"",Att->Hidden ? "ASG_GRP_LIGHT" : HTM_DIV_Begin ("class=\"%s\"",Att->Hidden ? "ASG_GRP_LIGHT" :
"ASG_GRP"); "ASG_GRP");
HTM_TxtF ("%s:&nbsp;",NumGrps == 1 ? Txt_Group : HTM_TxtColonNBSP (NumGrps == 1 ? Txt_Group :
Txt_Groups); Txt_Groups);
/***** Write groups *****/ /***** Write groups *****/
if (NumGrps) // Groups found... if (NumGrps) // Groups found...

View File

@ -883,7 +883,7 @@ void CtrCfg_RequestPhoto (void)
/***** Upload photo *****/ /***** Upload photo *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_File_with_the_photo); HTM_TxtColonNBSP (Txt_File_with_the_photo);
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/*",true,NULL); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/*",true,NULL);
HTM_LABEL_End (); HTM_LABEL_End ();
@ -1145,7 +1145,6 @@ void CtrCfg_RenameCentreFull (void)
void CtrCfg_ChangeCtrLatitude (void) void CtrCfg_ChangeCtrLatitude (void)
{ {
extern const char *Txt_The_new_latitude_is_X;
char LatitudeStr[64]; char LatitudeStr[64];
double NewLatitude; double NewLatitude;
@ -1157,9 +1156,6 @@ void CtrCfg_ChangeCtrLatitude (void)
CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"Latitude",NewLatitude); CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"Latitude",NewLatitude);
Gbl.Hierarchy.Ctr.Coord.Latitude = NewLatitude; Gbl.Hierarchy.Ctr.Coord.Latitude = NewLatitude;
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_new_latitude_is_X,NewLatitude);
/***** Show the form again *****/ /***** Show the form again *****/
CtrCfg_ShowConfiguration (); CtrCfg_ShowConfiguration ();
} }
@ -1170,7 +1166,6 @@ void CtrCfg_ChangeCtrLatitude (void)
void CtrCfg_ChangeCtrLongitude (void) void CtrCfg_ChangeCtrLongitude (void)
{ {
extern const char *Txt_The_new_longitude_is_X;
char LongitudeStr[64]; char LongitudeStr[64];
double NewLongitude; double NewLongitude;
@ -1182,9 +1177,6 @@ void CtrCfg_ChangeCtrLongitude (void)
CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"Longitude",NewLongitude); CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"Longitude",NewLongitude);
Gbl.Hierarchy.Ctr.Coord.Longitude = NewLongitude; Gbl.Hierarchy.Ctr.Coord.Longitude = NewLongitude;
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_new_longitude_is_X,NewLongitude);
/***** Show the form again *****/ /***** Show the form again *****/
CtrCfg_ShowConfiguration (); CtrCfg_ShowConfiguration ();
} }
@ -1195,7 +1187,6 @@ void CtrCfg_ChangeCtrLongitude (void)
void CtrCfg_ChangeCtrAltitude (void) void CtrCfg_ChangeCtrAltitude (void)
{ {
extern const char *Txt_The_new_altitude_is_X;
char AltitudeStr[64]; char AltitudeStr[64];
double NewAltitude; double NewAltitude;
@ -1207,9 +1198,6 @@ void CtrCfg_ChangeCtrAltitude (void)
CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"Altitude",NewAltitude); CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"Altitude",NewAltitude);
Gbl.Hierarchy.Ctr.Coord.Altitude = NewAltitude; Gbl.Hierarchy.Ctr.Coord.Altitude = NewAltitude;
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_new_altitude_is_X,NewAltitude);
/***** Show the form again *****/ /***** Show the form again *****/
CtrCfg_ShowConfiguration (); CtrCfg_ShowConfiguration ();
} }
@ -1224,7 +1212,7 @@ static void CtrCfg_UpdateCtrCoordinateDB (long CtrCod,
/***** Update database changing old coordinate by new coordinate *****/ /***** Update database changing old coordinate by new coordinate *****/
Str_SetDecimalPointToUS (); // To write the decimal point as a dot Str_SetDecimalPointToUS (); // To write the decimal point as a dot
DB_QueryUPDATE ("can not update a coordinate of a centre", DB_QueryUPDATE ("can not update a coordinate of a centre",
"UPDATE centres SET %s='%lg' WHERE CtrCod=%ld", "UPDATE centres SET %s='%.15lg' WHERE CtrCod=%ld",
CoordField,NewCoord,CtrCod); CoordField,NewCoord,CtrCod);
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
} }

View File

@ -492,7 +492,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD: En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 19.115.1 (2020-01-11)" #define Log_PLATFORM_VERSION "SWAD 19.116 (2020-01-11)"
#define CSS_FILE "swad19.115.css" #define CSS_FILE "swad19.115.css"
#define JS_FILE "swad19.91.1.js" #define JS_FILE "swad19.91.1.js"
/* /*
@ -501,6 +501,8 @@ ps2pdf source.ps destination.pdf
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué? // TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
// TODO: Mapas más estrechos en móvil // TODO: Mapas más estrechos en móvil
Version 19.116: Jan 11, 2020 Changes in number of digits printed in doubles.
Code refactoring related to printing some strings. (278506 lines)
Version 19.115.1: Jan 11, 2020 Fixed bug in edition of degrees. (278531 lines) Version 19.115.1: Jan 11, 2020 Fixed bug in edition of degrees. (278531 lines)
Version 19.115: Jan 09, 2020 Map column in listing of institutions. Version 19.115: Jan 09, 2020 Map column in listing of institutions.
Fixed bug in edition of timetable, reported by Miguel Damas Hermoso. Fixed bug in edition of timetable, reported by Miguel Damas Hermoso.

View File

@ -200,7 +200,7 @@ void Dup_ListDuplicateUsrs (void)
Lay_ShowErrorAndExit ("Wrong number of informants."); Lay_ShowErrorAndExit ("Wrong number of informants.");
if (NumInformants > 1) if (NumInformants > 1)
{ {
HTM_TxtF ("%s:&nbsp;",Txt_Informants); HTM_TxtColonNBSP (Txt_Informants);
HTM_Unsigned (NumInformants); HTM_Unsigned (NumInformants);
HTM_BR (); HTM_BR ();
} }

View File

@ -380,7 +380,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams)
FuncParams (); FuncParams ();
HTM_LABEL_Begin ("for=\"OtherUsrIDNickOrEMail\" class=\"%s RM\"", HTM_LABEL_Begin ("for=\"OtherUsrIDNickOrEMail\" class=\"%s RM\"",
The_ClassFormInBox[Gbl.Prefs.Theme]); The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_nick_email_or_ID); HTM_TxtColonNBSP (Txt_nick_email_or_ID);
HTM_LABEL_End (); HTM_LABEL_End ();
HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"",false, HTM_INPUT_TEXT ("OtherUsrIDNickOrEMail",Cns_MAX_CHARS_EMAIL_ADDRESS,"",false,

View File

@ -207,7 +207,7 @@ void Fig_ReqShowFigures (void)
/***** Compute stats for anywhere, degree or course? *****/ /***** Compute stats for anywhere, degree or course? *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
Gbl.Scope.Allowed = 1 << Hie_SYS | Gbl.Scope.Allowed = 1 << Hie_SYS |
1 << Hie_CTY | 1 << Hie_CTY |
1 << Hie_INS | 1 << Hie_INS |
@ -222,7 +222,7 @@ void Fig_ReqShowFigures (void)
/***** Type of statistic *****/ /***** Type of statistic *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Statistic); HTM_TxtColonNBSP (Txt_Statistic);
HTM_SELECT_Begin (false, HTM_SELECT_Begin (false,
"name=\"FigureType\""); "name=\"FigureType\"");
for (FigureType = (Fig_FigureType_t) 0; for (FigureType = (Fig_FigureType_t) 0;

View File

@ -8374,7 +8374,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
/***** Folder *****/ /***** Folder *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Folder); HTM_TxtColonNBSP (Txt_Folder);
HTM_INPUT_TEXT ("NewFolderName",Brw_MAX_CHARS_FOLDER,"",false, HTM_INPUT_TEXT ("NewFolderName",Brw_MAX_CHARS_FOLDER,"",false,
"size=\"30\" required=\"required\""); "size=\"30\" required=\"required\"");
HTM_LABEL_End (); HTM_LABEL_End ();

View File

@ -516,9 +516,11 @@ static void Gam_ShowOneGame (struct Game *Game,bool ShowOnlyThisGame)
/* Number of questions and maximum grade */ /* Number of questions and maximum grade */
HTM_DIV_Begin ("class=\"%s\"",Game->Hidden ? "ASG_GRP_LIGHT" : HTM_DIV_Begin ("class=\"%s\"",Game->Hidden ? "ASG_GRP_LIGHT" :
"ASG_GRP"); "ASG_GRP");
HTM_TxtF ("%s:&nbsp;%u",Txt_No_of_questions,Game->NumQsts); HTM_TxtColonNBSP (Txt_No_of_questions);
HTM_Unsigned (Game->NumQsts);
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;%lg",Txt_Maximum_grade,Game->MaxGrade); HTM_TxtColonNBSP (Txt_Maximum_grade);
HTM_Double (Game->MaxGrade);
HTM_DIV_End (); HTM_DIV_End ();
HTM_TD_End (); HTM_TD_End ();
@ -537,7 +539,7 @@ static void Gam_ShowOneGame (struct Game *Game,bool ShowOnlyThisGame)
"BT_LINK LT ASG_TITLE", "BT_LINK LT ASG_TITLE",
NULL); NULL);
if (ShowOnlyThisGame) if (ShowOnlyThisGame)
HTM_TxtF ("%s:&nbsp;",Txt_Matches); HTM_TxtColonNBSP (Txt_Matches);
HTM_Unsigned (Game->NumMchs); HTM_Unsigned (Game->NumMchs);
HTM_BUTTON_End (); HTM_BUTTON_End ();
Frm_EndForm (); Frm_EndForm ();
@ -1432,7 +1434,7 @@ static void Gam_CreateGame (struct Game *Game,const char *Txt)
"INSERT INTO gam_games" "INSERT INTO gam_games"
" (CrsCod,Hidden,UsrCod,MaxGrade,Title,Txt)" " (CrsCod,Hidden,UsrCod,MaxGrade,Title,Txt)"
" VALUES" " VALUES"
" (%ld,'N',%ld,%lg,'%s','%s')", " (%ld,'N',%ld,%.15lg,'%s','%s')",
Gbl.Hierarchy.Crs.CrsCod, Gbl.Hierarchy.Crs.CrsCod,
Gbl.Usrs.Me.UsrDat.UsrCod, Gbl.Usrs.Me.UsrDat.UsrCod,
Game->MaxGrade, Game->MaxGrade,
@ -1458,7 +1460,7 @@ static void Gam_UpdateGame (struct Game *Game,const char *Txt)
DB_QueryUPDATE ("can not update game", DB_QueryUPDATE ("can not update game",
"UPDATE gam_games" "UPDATE gam_games"
" SET CrsCod=%ld," " SET CrsCod=%ld,"
"MaxGrade=%lg," "MaxGrade=%.15lg,"
"Title='%s'," "Title='%s',"
"Txt='%s'" "Txt='%s'"
" WHERE GamCod=%ld", " WHERE GamCod=%ld",

View File

@ -171,8 +171,8 @@ void Grp_WriteNamesOfSelectedGrps (void)
struct GroupData GrpDat; struct GroupData GrpDat;
/***** Show the selected groups *****/ /***** Show the selected groups *****/
HTM_TxtF ("%s:&nbsp;",Gbl.Crs.Grps.LstGrpsSel.NumGrps == 1 ? Txt_Group : HTM_TxtColonNBSP (Gbl.Crs.Grps.LstGrpsSel.NumGrps == 1 ? Txt_Group :
Txt_Groups); Txt_Groups);
for (NumGrpSel = 0; for (NumGrpSel = 0;
NumGrpSel < Gbl.Crs.Grps.LstGrpsSel.NumGrps; NumGrpSel < Gbl.Crs.Grps.LstGrpsSel.NumGrps;
NumGrpSel++) NumGrpSel++)
@ -2335,7 +2335,7 @@ static void Grp_WriteGrpHead (struct GroupType *GrpTyp)
if (asprintf (&Id,"open_time_%u",UniqueId) < 0) if (asprintf (&Id,"open_time_%u",UniqueId) < 0)
Lay_NotEnoughMemoryExit (); Lay_NotEnoughMemoryExit ();
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Opening_of_groups); HTM_TxtColonNBSP (Txt_Opening_of_groups);
HTM_SPAN_Begin ("id=\"%s\"",Id); HTM_SPAN_Begin ("id=\"%s\"",Id);
HTM_SPAN_End (); HTM_SPAN_End ();
Dat_WriteLocalDateHMSFromUTC (Id,GrpTyp->OpenTimeUTC, Dat_WriteLocalDateHMSFromUTC (Id,GrpTyp->OpenTimeUTC,

View File

@ -1243,7 +1243,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc)
/***** File *****/ /***** File *****/
HTM_DIV_Begin ("class=\"CM\""); HTM_DIV_Begin ("class=\"CM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_File); HTM_TxtColonNBSP (Txt_File);
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,".htm,.html,.pdf",false,NULL); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,".htm,.html,.pdf",false,NULL);
HTM_LABEL_End (); HTM_LABEL_End ();
HTM_DIV_End (); HTM_DIV_End ();
@ -1286,7 +1286,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc)
HTM_DIV_Begin ("class=\"CM\""); HTM_DIV_Begin ("class=\"CM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_URL); HTM_TxtColonNBSP (Txt_URL);
HTM_INPUT_URL ("InfoSrcURL",Gbl.Crs.Info.URL,false, HTM_INPUT_URL ("InfoSrcURL",Gbl.Crs.Info.URL,false,
"size=\"50\""); "size=\"50\"");
HTM_LABEL_End (); HTM_LABEL_End ();

View File

@ -1421,7 +1421,7 @@ static void Lay_WriteAboutZone (void)
/***** Questions and problems *****/ /***** Questions and problems *****/
HTM_DIV_Begin (NULL); HTM_DIV_Begin (NULL);
HTM_TxtF ("%s:&nbsp;",Txt_Questions_and_problems); HTM_TxtColonNBSP (Txt_Questions_and_problems);
HTM_A_Begin ("href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\"", HTM_A_Begin ("href=\"mailto:%s\" class=\"ABOUT\" target=\"_blank\"",
Cfg_PLATFORM_RESPONSIBLE_EMAIL); Cfg_PLATFORM_RESPONSIBLE_EMAIL);
HTM_Txt (Cfg_PLATFORM_RESPONSIBLE_EMAIL); HTM_Txt (Cfg_PLATFORM_RESPONSIBLE_EMAIL);

View File

@ -312,7 +312,7 @@ void Lgo_RequestLogo (Hie_Level_t Scope)
/***** Upload logo *****/ /***** Upload logo *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_File_with_the_logo); HTM_TxtColonNBSP (Txt_File_with_the_logo);
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/png",true,NULL); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/png",true,NULL);
HTM_LABEL_End (); HTM_LABEL_End ();

View File

@ -94,7 +94,7 @@ void Map_CreateMap (const char *ContainerId,
/* Let's create a map with pretty Mapbox Streets tiles */ /* Let's create a map with pretty Mapbox Streets tiles */
Str_SetDecimalPointToUS (); // To write the decimal point as a dot Str_SetDecimalPointToUS (); // To write the decimal point as a dot
HTM_TxtF ("\t" HTM_TxtF ("\t"
"var mymap = L.map('%s').setView([%lg, %lg], %u);\n", "var mymap = L.map('%s').setView([%.15lg, %.15lg], %u);\n",
ContainerId,Coord->Latitude,Coord->Longitude,Zoom); ContainerId,Coord->Latitude,Coord->Longitude,Zoom);
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
} }
@ -140,7 +140,7 @@ void Map_AddMarker (const struct Coordinates *Coord)
{ {
Str_SetDecimalPointToUS (); // To write the decimal point as a dot Str_SetDecimalPointToUS (); // To write the decimal point as a dot
HTM_TxtF ("\t" HTM_TxtF ("\t"
"var marker = L.marker([%lg, %lg]).addTo(mymap);\n", "var marker = L.marker([%.15lg, %.15lg]).addTo(mymap);\n",
Coord->Latitude,Coord->Longitude); Coord->Latitude,Coord->Longitude);
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
} }

View File

@ -659,8 +659,8 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Mat
/***** Write heading *****/ /***** Write heading *****/
HTM_DIV_Begin ("class=\"ASG_GRP\""); HTM_DIV_Begin ("class=\"ASG_GRP\"");
HTM_TxtF ("%s:&nbsp;",NumRows == 1 ? Txt_Group : HTM_TxtColonNBSP (NumRows == 1 ? Txt_Group :
Txt_Groups); Txt_Groups);
/***** Write groups *****/ /***** Write groups *****/
if (NumRows) // Groups found... if (NumRows) // Groups found...
@ -3134,12 +3134,12 @@ static void Mch_DrawEmptyScoreRow (unsigned NumRow,double MinScore,double MaxSco
HTM_TD_Begin ("class=\"MCH_SCO_SCO\""); HTM_TD_Begin ("class=\"MCH_SCO_SCO\"");
if (NumRow == 0) if (NumRow == 0)
{ {
HTM_Double (MaxScore); HTM_DoubleFewDigits (MaxScore);
HTM_NBSP (); HTM_NBSP ();
} }
else if (NumRow == Mch_NUM_ROWS_SCORE - 1) else if (NumRow == Mch_NUM_ROWS_SCORE - 1)
{ {
HTM_Double (MinScore); HTM_DoubleFewDigits (MinScore);
HTM_NBSP (); HTM_NBSP ();
} }
HTM_TD_End (); HTM_TD_End ();
@ -3207,7 +3207,7 @@ static void Mch_DrawScoreRow (double Score,double MinScore,double MaxScore,
/* Write score */ /* Write score */
HTM_TD_Begin ("class=\"MCH_SCO_SCO\""); HTM_TD_Begin ("class=\"MCH_SCO_SCO\"");
HTM_Double (Score); HTM_DoubleFewDigits (Score);
HTM_NBSP (); HTM_NBSP ();
HTM_TD_End (); HTM_TD_End ();
@ -3724,7 +3724,7 @@ void Mch_ReceiveQuestionAnswer (void)
" SET EndTime=NOW()," " SET EndTime=NOW(),"
"NumQsts=%u," "NumQsts=%u,"
"NumQstsNotBlank=%u," "NumQstsNotBlank=%u,"
"Score='%lf'" "Score='%.15lg'"
" WHERE MchCod=%ld AND UsrCod=%ld", " WHERE MchCod=%ld AND UsrCod=%ld",
NumQsts,NumQstsNotBlank,TotalScore, NumQsts,NumQstsNotBlank,TotalScore,
Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod); Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod);
@ -3740,7 +3740,7 @@ void Mch_ReceiveQuestionAnswer (void)
"NOW()," // EndTime "NOW()," // EndTime
"%u," // NumQsts "%u," // NumQsts
"%u," // NumQstsNotBlank "%u," // NumQstsNotBlank
"'%lf')", // Score "'%.15lg')", // Score
Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod, Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod,
NumQsts,NumQstsNotBlank,TotalScore); NumQsts,NumQstsNotBlank,TotalScore);
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system

View File

@ -816,12 +816,12 @@ static void McR_ShowMchResults (Usr_MeOrOther_t MeOrOther,
Str_SetDecimalPointToUS (); // To get the decimal point as a dot Str_SetDecimalPointToUS (); // To get the decimal point as a dot
/* Get score (row[5]) */ /* Get score (row[5]) */
if (sscanf (row[5],"%lg",&ScoreInThisResult) != 1) if (sscanf (row[5],"%lf",&ScoreInThisResult) != 1)
ScoreInThisResult = 0.0; ScoreInThisResult = 0.0;
TotalScoreOfAllResults += ScoreInThisResult; TotalScoreOfAllResults += ScoreInThisResult;
/* Get maximum grade (row[6]) */ /* Get maximum grade (row[6]) */
if (sscanf (row[6],"%lg",&MaxGrade) != 1) if (sscanf (row[6],"%lf",&MaxGrade) != 1)
MaxGrade = 0.0; MaxGrade = 0.0;
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
@ -936,7 +936,7 @@ static void McR_ShowMchResultsSummaryRow (unsigned NumResults,
/***** Row title *****/ /***** Row title *****/
HTM_TD_Begin ("colspan=\"3\" class=\"DAT_N_LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("colspan=\"3\" class=\"DAT_N_LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TxtF ("%s:&nbsp;",Txt_Matches); HTM_TxtColonNBSP (Txt_Matches);
HTM_Unsigned (NumResults); HTM_Unsigned (NumResults);
HTM_TD_End (); HTM_TD_End ();
@ -1229,10 +1229,10 @@ void McR_ShowOneMchResult (void)
if (ICanViewScore) if (ICanViewScore)
{ {
HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\""); HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\"");
HTM_TxtF ("%s:&nbsp;",Txt_Score); HTM_TxtColonNBSP (Txt_Score);
HTM_Double2Decimals (TotalScore); HTM_Double2Decimals (TotalScore);
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Grade); HTM_TxtColonNBSP (Txt_Grade);
Tst_ComputeAndShowGrade (NumQsts,TotalScore,Game.MaxGrade); Tst_ComputeAndShowGrade (NumQsts,TotalScore,Game.MaxGrade);
HTM_DIV_End (); HTM_DIV_End ();
} }
@ -1361,7 +1361,7 @@ static void McR_GetMatchResultDataByMchCod (long MchCod,long UsrCod,
/* Get score (row[4]) */ /* Get score (row[4]) */
Str_SetDecimalPointToUS (); // To get the decimal point as a dot Str_SetDecimalPointToUS (); // To get the decimal point as a dot
if (sscanf (row[4],"%lg",Score) != 1) if (sscanf (row[4],"%lf",Score) != 1)
*Score = 0.0; *Score = 0.0;
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
} }

View File

@ -2671,7 +2671,7 @@ void Msg_ShowFormToFilterMsgs (void)
/***** Filter authors/recipients *****/ /***** Filter authors/recipients *****/
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",TxtFromTo[Gbl.Msg.TypeOfMessages]); HTM_TxtColonNBSP (TxtFromTo[Gbl.Msg.TypeOfMessages]);
HTM_INPUT_SEARCH ("FilterFromTo",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME * 3, HTM_INPUT_SEARCH ("FilterFromTo",Usr_MAX_CHARS_FIRSTNAME_OR_SURNAME * 3,
Gbl.Msg.FilterFromTo, Gbl.Msg.FilterFromTo,
"size=\"20\""); "size=\"20\"");
@ -2681,7 +2681,7 @@ void Msg_ShowFormToFilterMsgs (void)
/***** Filter message content *****/ /***** Filter message content *****/
HTM_TD_Begin ("class=\"LM\""); HTM_TD_Begin ("class=\"LM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_MSG_Content); HTM_TxtColonNBSP (Txt_MSG_Content);
HTM_INPUT_SEARCH ("FilterContent",Msg_MAX_CHARS_FILTER_CONTENT, HTM_INPUT_SEARCH ("FilterContent",Msg_MAX_CHARS_FILTER_CONTENT,
Gbl.Msg.FilterContent, Gbl.Msg.FilterContent,
"size=\"20\""); "size=\"20\"");
@ -3035,7 +3035,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write "From:" *****/ /***** Write "From:" *****/
HTM_TD_Begin ("class=\"RT MSG_TIT\""); HTM_TD_Begin ("class=\"RT MSG_TIT\"");
HTM_TxtF ("%s:&nbsp;",Txt_MSG_From); HTM_TxtColonNBSP (Txt_MSG_From);
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("colspan=\"2\" class=\"LT\""); HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
@ -3048,7 +3048,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"RT MSG_TIT\""); HTM_TD_Begin ("class=\"RT MSG_TIT\"");
HTM_TxtF ("%s:&nbsp;",Txt_MSG_To); HTM_TxtColonNBSP (Txt_MSG_To);
HTM_TD_End (); HTM_TD_End ();
HTM_TD_Begin ("colspan=\"2\" class=\"LT\""); HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
@ -3061,7 +3061,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write "Content:" *****/ /***** Write "Content:" *****/
HTM_TD_Begin ("class=\"RT MSG_TIT\""); HTM_TD_Begin ("class=\"RT MSG_TIT\"");
HTM_TxtF ("%s:&nbsp;",Txt_MSG_Content); HTM_TxtColonNBSP (Txt_MSG_Content);
HTM_TD_End (); HTM_TD_End ();
/***** Initialize image *****/ /***** Initialize image *****/

View File

@ -283,7 +283,7 @@ void Pwd_ShowFormSendNewPwd (void)
/***** User's ID/nickname *****/ /***** User's ID/nickname *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_nick_email_or_ID); HTM_TxtColonNBSP (Txt_nick_email_or_ID);
HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,false, HTM_INPUT_TEXT ("UsrId",Cns_MAX_CHARS_EMAIL_ADDRESS,Gbl.Usrs.Me.UsrIdLogin,false,
"size=\"8\" required=\"required\""); "size=\"8\" required=\"required\"");
HTM_LABEL_End (); HTM_LABEL_End ();
@ -861,7 +861,7 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
/***** Password *****/ /***** Password *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_For_security_enter_your_password); HTM_TxtColonNBSP (Txt_For_security_enter_your_password);
HTM_INPUT_PASSWORD ("OthUsrPwd",NULL,"off",true, HTM_INPUT_PASSWORD ("OthUsrPwd",NULL,"off",true,
NULL); NULL);
HTM_LABEL_End (); HTM_LABEL_End ();

View File

@ -336,7 +336,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
/***** Form to upload photo *****/ /***** Form to upload photo *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_File_with_the_photo); HTM_TxtColonNBSP (Txt_File_with_the_photo);
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/*",true,NULL); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,"image/*",true,NULL);
HTM_LABEL_End (); HTM_LABEL_End ();

View File

@ -208,7 +208,7 @@ void Prf_RequestUserProfile (void)
/* By default, the nickname is filled with my nickname /* By default, the nickname is filled with my nickname
If no user logged ==> the nickname is empty */ If no user logged ==> the nickname is empty */
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Nickname); HTM_TxtColonNBSP (Txt_Nickname);
snprintf (NicknameWithArroba,sizeof (NicknameWithArroba), snprintf (NicknameWithArroba,sizeof (NicknameWithArroba),
"@%s", "@%s",
@ -603,7 +603,7 @@ static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0) if (UsrFigures->NumDays > 0)
{ {
HTM_TxtF ("&nbsp;%s","("); HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumClicks / HTM_DoubleFewDigits ((double) UsrFigures->NumClicks /
(double) UsrFigures->NumDays); (double) UsrFigures->NumDays);
HTM_TxtF ("/%s&nbsp;",Txt_day); HTM_TxtF ("/%s&nbsp;",Txt_day);
Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod), Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod),
@ -643,7 +643,7 @@ static void Prf_ShowNumFileViews (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0) if (UsrFigures->NumDays > 0)
{ {
HTM_TxtF ("&nbsp;%s","("); HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumFileViews / HTM_DoubleFewDigits ((double) UsrFigures->NumFileViews /
(double) UsrFigures->NumDays); (double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day); HTM_TxtF ("/%s)",Txt_day);
} }
@ -680,7 +680,7 @@ static void Prf_ShowNumSocialPublications (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0) if (UsrFigures->NumDays > 0)
{ {
HTM_TxtF ("&nbsp;%s","("); HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumSocPub / HTM_DoubleFewDigits ((double) UsrFigures->NumSocPub /
(double) UsrFigures->NumDays); (double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day); HTM_TxtF ("/%s)",Txt_day);
} }
@ -717,7 +717,7 @@ static void Prf_ShowNumForumPosts (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0) if (UsrFigures->NumDays > 0)
{ {
HTM_TxtF ("&nbsp;%s","("); HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumForPst / HTM_DoubleFewDigits ((double) UsrFigures->NumForPst /
(double) UsrFigures->NumDays); (double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day); HTM_TxtF ("/%s)",Txt_day);
} }
@ -754,7 +754,7 @@ static void Prf_ShowNumMessagesSent (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0) if (UsrFigures->NumDays > 0)
{ {
HTM_TxtF ("&nbsp;%s","("); HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumMsgSnt / HTM_DoubleFewDigits ((double) UsrFigures->NumMsgSnt /
(double) UsrFigures->NumDays); (double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day); HTM_TxtF ("/%s)",Txt_day);
} }
@ -1726,7 +1726,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
ItsMe ? "DAT_SMALL_N" : ItsMe ? "DAT_SMALL_N" :
"DAT_SMALL", "DAT_SMALL",
Gbl.RowEvenOdd); Gbl.RowEvenOdd);
HTM_Double (NumClicksPerDay); HTM_DoubleFewDigits (NumClicksPerDay);
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
} }

View File

@ -304,7 +304,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC)
HTM_DIV_Begin ("class=\"TITLE_REPORT DAT\""); HTM_DIV_Begin ("class=\"TITLE_REPORT DAT\"");
/***** User *****/ /***** User *****/
HTM_TxtF ("%s:&nbsp;",Txt_User[Gbl.Usrs.Me.UsrDat.Sex]); HTM_TxtColonNBSP (Txt_User[Gbl.Usrs.Me.UsrDat.Sex]);
HTM_SPAN_Begin ("class=\"DAT_N_BOLD\""); HTM_SPAN_Begin ("class=\"DAT_N_BOLD\"");
HTM_Txt (Gbl.Usrs.Me.UsrDat.FullName); HTM_Txt (Gbl.Usrs.Me.UsrDat.FullName);
HTM_SPAN_End (); HTM_SPAN_End ();
@ -313,7 +313,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC)
if (CurrentTimeUTC) if (CurrentTimeUTC)
{ {
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Date); HTM_TxtColonNBSP (Txt_Date);
HTM_SPAN_Begin ("class=\"DAT_N\""); HTM_SPAN_Begin ("class=\"DAT_N\"");
HTM_TxtF ("%s %s UTC",CurrentTimeUTC->StrDate, HTM_TxtF ("%s %s UTC",CurrentTimeUTC->StrDate,
CurrentTimeUTC->StrTime); CurrentTimeUTC->StrTime);
@ -1383,7 +1383,7 @@ static void Rep_WriteDouble (double Num)
/***** Write from floating point number to string /***** Write from floating point number to string
with the correct accuracy *****/ with the correct accuracy *****/
Str_DoubleNumToStr (&Str,Num); Str_DoubleNumToStrFewDigits (&Str,Num);
/***** Write number from string to file *****/ /***** Write number from string to file *****/
fputs (Str,Gbl.F.Rep); fputs (Str,Gbl.F.Rep);

View File

@ -145,7 +145,7 @@ static void Sch_PutFormToSearchWithWhatToSearchAndScope (Act_Action_t Action,Hie
current centre, current degree or current course) *****/ current centre, current degree or current course) *****/
HTM_DIV_Begin ("class=\"CM\""); HTM_DIV_Begin ("class=\"CM\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
Gbl.Scope.Allowed = 1 << Hie_SYS | Gbl.Scope.Allowed = 1 << Hie_SYS |
1 << Hie_CTY | 1 << Hie_CTY |
1 << Hie_INS | 1 << Hie_INS |

View File

@ -1761,7 +1761,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
BarWidth); BarWidth);
HTM_NBSP (); HTM_NBSP ();
} }
HTM_Double (Hits.Num); HTM_DoubleFewDigits (Hits.Num);
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -1955,7 +1955,7 @@ static void Sta_ShowDistrAccessesPerDayAndHour (unsigned long NumRows,MYSQL_RES
} }
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Color_of_the_graphic); HTM_TxtColonNBSP (Txt_Color_of_the_graphic);
HTM_SELECT_Begin (true, HTM_SELECT_Begin (true,
"name=\"ColorType\""); "name=\"ColorType\"");
for (ColorType = (Sta_ColorType_t) 0; for (ColorType = (Sta_ColorType_t) 0;
@ -2211,14 +2211,14 @@ static void Sta_DrawBarColors (Sta_ColorType_t ColorType,double HitsMax)
HTM_TD_Begin ("colspan=\"%u\" class=\"LOG CB\" style=\"width:%upx;\"", HTM_TD_Begin ("colspan=\"%u\" class=\"LOG CB\" style=\"width:%upx;\"",
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5, GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5,
GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5); GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5);
HTM_Double ((double) Interval * HitsMax / 5.0); HTM_DoubleFewDigits ((double) Interval * HitsMax / 5.0);
HTM_TD_End (); HTM_TD_End ();
} }
HTM_TD_Begin ("colspan=\"%u\" class=\"LOG RB\" style=\"width:%upx;\"", HTM_TD_Begin ("colspan=\"%u\" class=\"LOG RB\" style=\"width:%upx;\"",
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2, (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2,
(GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2); (GRAPH_DISTRIBUTION_PER_HOUR_TOTAL_WIDTH/5)/2);
HTM_Double (HitsMax); HTM_DoubleFewDigits (HitsMax);
HTM_TD_End (); HTM_TD_End ();
HTM_TR_End (); HTM_TR_End ();
@ -2260,7 +2260,7 @@ static void Sta_DrawAccessesPerHourForADay (Sta_ColorType_t ColorType,double Hit
Sta_SetColor (ColorType,HitsNum[Hour],HitsMax,&R,&G,&B); Sta_SetColor (ColorType,HitsNum[Hour],HitsMax,&R,&G,&B);
/***** Write from floating point number to string *****/ /***** Write from floating point number to string *****/
Str_DoubleNumToStr (&Str,HitsNum[Hour]); Str_DoubleNumToStrFewDigits (&Str,HitsNum[Hour]);
/***** Write cell *****/ /***** Write cell *****/
HTM_TD_Begin ("class=\"LOG LM\" title=\"%s\"" HTM_TD_Begin ("class=\"LOG LM\" title=\"%s\""
@ -2730,7 +2730,7 @@ static void Sta_WriteAccessHour (unsigned Hour,struct Sta_Hits *Hits,unsigned Co
HTM_TxtF ("%u%%",(unsigned) (((Hits->Num * 100.0) / HTM_TxtF ("%u%%",(unsigned) (((Hits->Num * 100.0) /
Hits->Total) + 0.5)); Hits->Total) + 0.5));
HTM_BR (); HTM_BR ();
HTM_Double (Hits->Num); HTM_DoubleFewDigits (Hits->Num);
HTM_BR (); HTM_BR ();
BarHeight = (unsigned) (((Hits->Num * 500.0) / Hits->Max) + 0.5); BarHeight = (unsigned) (((Hits->Num * 500.0) / Hits->Max) + 0.5);
if (BarHeight == 0) if (BarHeight == 0)
@ -3730,7 +3730,7 @@ static void Sta_DrawBarNumHits (char Color,
/***** Write the number of hits *****/ /***** Write the number of hits *****/
HTM_NBSP (); HTM_NBSP ();
HTM_Double (HitsNum); HTM_DoubleFewDigits (HitsNum);
HTM_TxtF ("&nbsp;(%u",(unsigned) (((HitsNum * 100.0) / HTM_TxtF ("&nbsp;(%u",(unsigned) (((HitsNum * 100.0) /
HitsTotal) + 0.5)); HitsTotal) + 0.5));
} }

View File

@ -858,11 +858,23 @@ char Str_ConvertToLowerLetter (char Ch)
} }
/*****************************************************************************/ /*****************************************************************************/
/** Write a number in floating point with the correct accuracy to a string ***/ /****************** Write a number in floating point *************************/
/*****************************************************************************/ /*****************************************************************************/
// Str should be freed after calling this function // Str should be freed after calling this function
void Str_DoubleNumToStr (char **Str,double Number) void Str_DoubleNumToStr (char **Str,double Number)
{
if (asprintf (Str,"%.15lg",
Number) < 0)
Lay_NotEnoughMemoryExit ();
}
/*****************************************************************************/
/******* Write a number in floating point with few digits to a string ********/
/*****************************************************************************/
// Str should be freed after calling this function
void Str_DoubleNumToStrFewDigits (char **Str,double Number)
{ {
double IntegerPart; double IntegerPart;
double FractionaryPart; double FractionaryPart;
@ -927,7 +939,7 @@ double Str_GetDoubleFromStr (char *Str)
(it must have a point, not a comma as decimal separator) *****/ (it must have a point, not a comma as decimal separator) *****/
Str_ConvertStrFloatCommaToStrFloatPoint (Str); Str_ConvertStrFloatCommaToStrFloatPoint (Str);
Str_SetDecimalPointToUS (); // To get the decimal point as a dot Str_SetDecimalPointToUS (); // To get the decimal point as a dot
if (sscanf (Str,"%lg",&DoubleNum) != 1) if (sscanf (Str,"%lf",&DoubleNum) != 1)
{ // If the string does not hold a valid number... { // If the string does not hold a valid number...
DoubleNum = 0.0; // ...the number is reset to 0 DoubleNum = 0.0; // ...the number is reset to 0
Str[0] = '\0'; // ...and the string is reset to "" Str[0] = '\0'; // ...and the string is reset to ""

View File

@ -92,6 +92,7 @@ char Str_ConvertToUpperLetter (char Ch);
char Str_ConvertToLowerLetter (char Ch); char Str_ConvertToLowerLetter (char Ch);
void Str_DoubleNumToStr (char **Str,double Number); void Str_DoubleNumToStr (char **Str,double Number);
void Str_DoubleNumToStrFewDigits (char **Str,double Number);
void Str_ConvertStrFloatCommaToStrFloatPoint (char *Str); void Str_ConvertStrFloatCommaToStrFloatPoint (char *Str);
double Str_GetDoubleFromStr (char *Str); double Str_GetDoubleFromStr (char *Str);
void Str_SetDecimalPointToUS (void); void Str_SetDecimalPointToUS (void);

View File

@ -528,10 +528,10 @@ static void Svy_ShowOneSurvey (long SvyCod,bool ShowOnlyThisSvyComplete)
HTM_DIV_Begin ("class=\"%s\"", HTM_DIV_Begin ("class=\"%s\"",
Svy.Status.Visible ? "ASG_GRP" : Svy.Status.Visible ? "ASG_GRP" :
"ASG_GRP_LIGHT"); "ASG_GRP_LIGHT");
HTM_TxtF ("%s:&nbsp;",Txt_No_of_questions); HTM_TxtColonNBSP (Txt_No_of_questions);
HTM_Unsigned (Svy.NumQsts); HTM_Unsigned (Svy.NumQsts);
HTM_Txt ("; "); HTM_Txt ("; ");
HTM_TxtF ("%s:&nbsp;",Txt_No_of_users); HTM_TxtColonNBSP (Txt_No_of_users);
HTM_Unsigned (Svy.NumUsrs); HTM_Unsigned (Svy.NumUsrs);
HTM_DIV_End (); HTM_DIV_End ();
@ -601,7 +601,7 @@ static void Svy_ShowOneSurvey (long SvyCod,bool ShowOnlyThisSvyComplete)
/* Scope of the survey */ /* Scope of the survey */
HTM_DIV_Begin ("class=\"%s\"",Svy.Status.Visible ? "ASG_GRP" : HTM_DIV_Begin ("class=\"%s\"",Svy.Status.Visible ? "ASG_GRP" :
"ASG_GRP_LIGHT"); "ASG_GRP_LIGHT");
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
switch (Svy.Scope) switch (Svy.Scope)
{ {
case Hie_UNK: // Unknown case Hie_UNK: // Unknown
@ -2432,8 +2432,8 @@ static void Svy_GetAndWriteNamesOfGrpsAssociatedToSvy (struct Survey *Svy)
/***** Write heading *****/ /***** Write heading *****/
HTM_DIV_Begin ("class=\"%s\"",Svy->Status.Visible ? "ASG_GRP" : HTM_DIV_Begin ("class=\"%s\"",Svy->Status.Visible ? "ASG_GRP" :
"ASG_GRP_LIGHT"); "ASG_GRP_LIGHT");
HTM_TxtF ("%s:&nbsp;",NumRows == 1 ? Txt_Group : HTM_TxtColonNBSP (NumRows == 1 ? Txt_Group :
Txt_Groups); Txt_Groups);
/***** Write groups *****/ /***** Write groups *****/
if (NumRows) // Groups found... if (NumRows) // Groups found...

View File

@ -533,10 +533,10 @@ void Tst_AssessTest (void)
if (Gbl.Test.Config.Feedback != Tst_FEEDBACK_NOTHING) if (Gbl.Test.Config.Feedback != Tst_FEEDBACK_NOTHING)
{ {
HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\""); HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\"");
HTM_TxtF ("%s:&nbsp;",Txt_Score); HTM_TxtColonNBSP (Txt_Score);
HTM_Double2Decimals (TotalScore); HTM_Double2Decimals (TotalScore);
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Grade); HTM_TxtColonNBSP (Txt_Grade);
Tst_ComputeAndShowGrade (Gbl.Test.NumQsts,TotalScore,Tst_SCORE_MAX); Tst_ComputeAndShowGrade (Gbl.Test.NumQsts,TotalScore,Tst_SCORE_MAX);
HTM_DIV_End (); HTM_DIV_End ();
} }
@ -1155,7 +1155,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
UniqueId, UniqueId,
(unsigned) Med_ACTION_NEW_MEDIA, (unsigned) Med_ACTION_NEW_MEDIA,
OptionsDisabled ? " disabled=\"disabled\"" : ""); OptionsDisabled ? " disabled=\"disabled\"" : "");
HTM_TxtF ("%s:&nbsp;",Txt_Change_image_video); HTM_TxtColonNBSP (Txt_Change_image_video);
HTM_LABEL_End (); HTM_LABEL_End ();
Med_PutMediaUploader (NumMediaInForm,"TEST_MED_INPUT"); Med_PutMediaUploader (NumMediaInForm,"TEST_MED_INPUT");
@ -1210,7 +1210,7 @@ static void Tst_UpdateScoreQst (long QstCod,double ScoreThisQst,bool AnswerIsNot
DB_QueryUPDATE ("can not update the score of a question", DB_QueryUPDATE ("can not update the score of a question",
"UPDATE tst_questions" "UPDATE tst_questions"
" SET NumHits=NumHits+1,NumHitsNotBlank=NumHitsNotBlank+1," " SET NumHits=NumHits+1,NumHitsNotBlank=NumHitsNotBlank+1,"
"Score=Score+(%lf)" "Score=Score+(%.15lg)"
" WHERE QstCod=%ld", " WHERE QstCod=%ld",
ScoreThisQst,QstCod); ScoreThisQst,QstCod);
else // The answer is blank else // The answer is blank
@ -3317,7 +3317,11 @@ void Tst_WriteAnswersEdit (long QstCod)
FloatNum[i] = Str_GetDoubleFromStr (row[1]); FloatNum[i] = Str_GetDoubleFromStr (row[1]);
} }
HTM_SPAN_Begin ("class=\"TEST_EDI\""); HTM_SPAN_Begin ("class=\"TEST_EDI\"");
HTM_TxtF ("([%lg; %lg])",FloatNum[0],FloatNum[1]); HTM_Txt ("([");
HTM_Double (FloatNum[0]);
HTM_Txt ("; ");
HTM_Double (FloatNum[1]);
HTM_Txt ("])");
HTM_SPAN_End (); HTM_SPAN_End ();
break; break;
case Tst_ANS_TRUE_FALSE: case Tst_ANS_TRUE_FALSE:
@ -4638,7 +4642,7 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
FloatAnsUsr <= FloatAnsCorr[1]) ? "ANS_OK" : FloatAnsUsr <= FloatAnsCorr[1]) ? "ANS_OK" :
"ANS_BAD") : "ANS_BAD") :
"ANS_0"); "ANS_0");
HTM_TxtF ("%lg",FloatAnsUsr); HTM_Double (FloatAnsUsr);
} }
else // Not a floating point number else // Not a floating point number
{ {
@ -4654,7 +4658,13 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
HTM_TD_Begin ("class=\"ANS_0 CM\""); HTM_TD_Begin ("class=\"ANS_0 CM\"");
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
HTM_TxtF ("[%lg; %lg]",FloatAnsCorr[0],FloatAnsCorr[1]); {
HTM_Txt ("[");
HTM_Double (FloatAnsCorr[0]);
HTM_Txt ("; ");
HTM_Double (FloatAnsCorr[1]);
HTM_Txt ("]");
}
else else
HTM_Txt ("?"); HTM_Txt ("?");
HTM_TD_End (); HTM_TD_End ();
@ -4735,7 +4745,7 @@ static void Tst_WriteScoreStart (unsigned ColSpan)
HTM_TR_Begin (NULL); HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"%u\" class=\"DAT_SMALL LM\"",ColSpan); HTM_TD_Begin ("colspan=\"%u\" class=\"DAT_SMALL LM\"",ColSpan);
HTM_TxtF ("%s:&nbsp;",Txt_Score); HTM_TxtColonNBSP (Txt_Score);
} }
static void Tst_WriteScoreEnd (void) static void Tst_WriteScoreEnd (void)
@ -5260,7 +5270,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
HTM_TD_Begin ("class=\"LT\""); HTM_TD_Begin ("class=\"LT\"");
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Integer_number); HTM_TxtColonNBSP (Txt_Integer_number);
snprintf (StrInteger,sizeof (StrInteger), snprintf (StrInteger,sizeof (StrInteger),
"%ld", "%ld",
Gbl.Test.Answer.Integer); Gbl.Test.Answer.Integer);
@ -5461,7 +5471,7 @@ static void Tst_PutFloatInputField (const char *Label,const char *Field,
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s&nbsp;",Label); HTM_TxtF ("%s&nbsp;",Label);
snprintf (StrDouble,sizeof (StrDouble), snprintf (StrDouble,sizeof (StrDouble),
"%lg", "%.15lg",
Value); Value);
HTM_INPUT_TEXT (Field,Tst_MAX_BYTES_FLOAT_ANSWER,StrDouble,false, HTM_INPUT_TEXT (Field,Tst_MAX_BYTES_FLOAT_ANSWER,StrDouble,false,
"size=\"11\" required=\"required\"%s", "size=\"11\" required=\"required\"%s",
@ -6813,7 +6823,7 @@ static void Tst_InsertAnswersIntoDB (void)
"INSERT INTO tst_answers" "INSERT INTO tst_answers"
" (QstCod,AnsInd,Answer,Feedback,MedCod,Correct)" " (QstCod,AnsInd,Answer,Feedback,MedCod,Correct)"
" VALUES" " VALUES"
" (%ld,%u,'%lg','',-1,'Y')", " (%ld,%u,'%.15lg','',-1,'Y')",
Gbl.Test.QstCod,i, Gbl.Test.QstCod,i,
Gbl.Test.Answer.FloatingPoint[i]); Gbl.Test.Answer.FloatingPoint[i]);
Str_SetDecimalPointToLocal (); // Return to local system Str_SetDecimalPointToLocal (); // Return to local system
@ -7609,7 +7619,7 @@ static void Tst_StoreScoreOfTestResultInDB (long TstCod,
Str_SetDecimalPointToUS (); // To print the floating point as a dot Str_SetDecimalPointToUS (); // To print the floating point as a dot
DB_QueryUPDATE ("can not update result of test result", DB_QueryUPDATE ("can not update result of test result",
"UPDATE tst_exams" "UPDATE tst_exams"
" SET NumQstsNotBlank=%u,Score='%lf'" " SET NumQstsNotBlank=%u,Score='%.15lg'"
" WHERE TstCod=%ld", " WHERE TstCod=%ld",
NumQstsNotBlank,Score, NumQstsNotBlank,Score,
TstCod); TstCod);
@ -7950,7 +7960,7 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe,
/***** Row title *****/ /***** Row title *****/
HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd); HTM_TD_Begin ("class=\"DAT_N_LINE_TOP RM COLOR%u\"",Gbl.RowEvenOdd);
HTM_TxtF ("%s:&nbsp;",Txt_Visible_tests); HTM_TxtColonNBSP (Txt_Visible_tests);
HTM_Unsigned (NumExams); HTM_Unsigned (NumExams);
HTM_TD_End (); HTM_TD_End ();
@ -8202,10 +8212,10 @@ void Tst_ShowOneTstResult (void)
if (ICanViewScore) if (ICanViewScore)
{ {
HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\""); HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\"");
HTM_TxtF ("%s:&nbsp;",Txt_Score); HTM_TxtColonNBSP (Txt_Score);
HTM_Double2Decimals (TotalScore); HTM_Double2Decimals (TotalScore);
HTM_BR (); HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Grade); HTM_TxtColonNBSP (Txt_Grade);
Tst_ComputeAndShowGrade (Gbl.Test.NumQsts,TotalScore,Tst_SCORE_MAX); Tst_ComputeAndShowGrade (Gbl.Test.NumQsts,TotalScore,Tst_SCORE_MAX);
HTM_DIV_End (); HTM_DIV_End ();
} }
@ -8389,7 +8399,7 @@ static void Tst_StoreOneTestResultQstInDB (long TstCod,long QstCod,unsigned NumQ
"INSERT INTO tst_exam_questions" "INSERT INTO tst_exam_questions"
" (TstCod,QstCod,QstInd,Score,Indexes,Answers)" " (TstCod,QstCod,QstInd,Score,Indexes,Answers)"
" VALUES" " VALUES"
" (%ld,%ld,%u,'%lf','%s','%s')", " (%ld,%ld,%u,'%.15lg','%s','%s')",
TstCod,QstCod, TstCod,QstCod,
NumQst, // 0, 1, 2, 3... NumQst, // 0, 1, 2, 3...
Score, Score,

View File

@ -141,7 +141,7 @@ void TsI_ShowFormImportQstsFromXML (void)
/***** Write a form to import questions *****/ /***** Write a form to import questions *****/
Frm_StartForm (ActImpTstQst); Frm_StartForm (ActImpTstQst);
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_XML_file); HTM_TxtColonNBSP (Txt_XML_file);
HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,".xml",true,NULL); HTM_INPUT_FILE (Fil_NAME_OF_PARAM_FILENAME_ORG,".xml",true,NULL);
HTM_LABEL_End (); HTM_LABEL_End ();
Frm_EndForm (); Frm_EndForm ();
@ -330,8 +330,8 @@ static void TsI_WriteAnswersOfAQstXML (long QstCod)
FloatNum[i] = Str_GetDoubleFromStr (row[1]); FloatNum[i] = Str_GetDoubleFromStr (row[1]);
} }
fprintf (Gbl.Test.XML.FileXML,"%s" fprintf (Gbl.Test.XML.FileXML,"%s"
"<lower>%lg</lower>%s" "<lower>%.15lg</lower>%s"
"<upper>%lg</upper>%s", "<upper>%.15lg</upper>%s",
Txt_NEW_LINE, Txt_NEW_LINE,
FloatNum[0],Txt_NEW_LINE, FloatNum[0],Txt_NEW_LINE,
FloatNum[1],Txt_NEW_LINE); FloatNum[1],Txt_NEW_LINE);
@ -970,9 +970,11 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
break; break;
case Tst_ANS_FLOAT: case Tst_ANS_FLOAT:
HTM_SPAN_Begin ("class=\"%s\"",ClassStem); HTM_SPAN_Begin ("class=\"%s\"",ClassStem);
HTM_TxtF ("([%lg; %lg])", HTM_Txt ("([");
Gbl.Test.Answer.FloatingPoint[0], HTM_Double (Gbl.Test.Answer.FloatingPoint[0]);
Gbl.Test.Answer.FloatingPoint[1]); HTM_Txt ("; ");
HTM_Double (Gbl.Test.Answer.FloatingPoint[1]);
HTM_Txt ("])");
HTM_SPAN_End (); HTM_SPAN_End ();
break; break;
case Tst_ANS_TRUE_FALSE: case Tst_ANS_TRUE_FALSE:

View File

@ -46588,27 +46588,6 @@ const char *Txt_The_name_of_the_type_of_group_X_has_not_changed = // Warning: it
"O nome do tipo de grupo <strong>%s</strong> n&atilde;o foi alterado."; "O nome do tipo de grupo <strong>%s</strong> n&atilde;o foi alterado.";
#endif #endif
const char *Txt_The_new_altitude_is_X = // Warning: it is very important to include %lg in the following sentences
#if L==1 // ca
"La nova altitud &eacute;s <strong>%lg</strong>.";
#elif L==2 // de
"Die neue H&ouml;he ist <strong>%lg</strong>.";
#elif L==3 // en
"The new altitude is <strong>%lg</strong>.";
#elif L==4 // es
"La nueva altitud es <strong>%lg</strong>.";
#elif L==5 // fr
"La nouvelle altitude est <strong>%lg</strong>.";
#elif L==6 // gn
"La nueva altitud es <strong>%lg</strong>."; // Okoteve traducción
#elif L==7 // it
"La nuova altitudine &egrave; <strong>%lg</strong>.";
#elif L==8 // pl
"Nowa wysoko&sacute;&cacute; wynosi <strong>%lg</strong>.";
#elif L==9 // pt
"O nova altitude &eacute; <strong>%lg</strong>.";
#endif
const char *Txt_The_new_IP_address_is_X = // Warning: it is very important to include %s in the following sentences const char *Txt_The_new_IP_address_is_X = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca #if L==1 // ca
"La nueva direcci&oacute;n IP es <strong>%s</strong>."; // Necessita traduccio "La nueva direcci&oacute;n IP es <strong>%s</strong>."; // Necessita traduccio
@ -46630,27 +46609,6 @@ const char *Txt_The_new_IP_address_is_X = // Warning: it is very important to in
"O novo endere&ccedil;o IP &eacute; <strong>%s</strong>."; "O novo endere&ccedil;o IP &eacute; <strong>%s</strong>.";
#endif #endif
const char *Txt_The_new_latitude_is_X = // Warning: it is very important to include %lg in the following sentences
#if L==1 // ca
"La nova latitud &eacute;s <strong>%lg</strong>.";
#elif L==2 // de
"Der neue Breitengrad ist <strong>%lg</strong>.";
#elif L==3 // en
"The new latitude is <strong>%lg</strong>.";
#elif L==4 // es
"La nueva latitud es <strong>%lg</strong>.";
#elif L==5 // fr
"La nouvelle latitude est <strong>%lg</strong>.";
#elif L==6 // gn
"La nueva latitud es <strong>%lg</strong>."; // Okoteve traducción
#elif L==7 // it
"La nuova latitudine &egrave; <strong>%lg</strong>.";
#elif L==8 // pl
"Nowa szeroko&sacute;&cacute; geograficzna wynosi <strong>%lg</strong>.";
#elif L==9 // pt
"O nova latitude &eacute; <strong>%lg</strong>.";
#endif
const char *Txt_The_new_logo_is_X = // Warning: it is very important to include %s in the following sentences const char *Txt_The_new_logo_is_X = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca #if L==1 // ca
"El nuevo logo es <strong>%s</strong>."; // Necessita traduccio "El nuevo logo es <strong>%s</strong>."; // Necessita traduccio
@ -46672,27 +46630,6 @@ const char *Txt_The_new_logo_is_X = // Warning: it is very important to include
"O novo logotipo &eacute; <strong>%s</strong>."; "O novo logotipo &eacute; <strong>%s</strong>.";
#endif #endif
const char *Txt_The_new_longitude_is_X = // Warning: it is very important to include %lg in the following sentences
#if L==1 // ca
"La nova longitud &eacute;s <strong>%lg</strong>.";
#elif L==2 // de
"Der neue L&auml;ngengrad ist <strong>%lg</strong>.";
#elif L==3 // en
"The new longitude is <strong>%lg</strong>.";
#elif L==4 // es
"La nueva longitud es <strong>%lg</strong>.";
#elif L==5 // fr
"La nouvelle longitude est <strong>%lg</strong>.";
#elif L==6 // gn
"La nueva longitud es <strong>%lg</strong>."; // Okoteve traducción
#elif L==7 // it
"La nuova longitudine &egrave; <strong>%lg</strong>.";
#elif L==8 // pl
"Nowa d&lstrok;ugo&sacute;&cacute; geograficzna wynosi <strong>%lg</strong>.";
#elif L==9 // pt
"O nova longitude &eacute; <strong>%lg</strong>.";
#endif
const char *Txt_The_nickname_X_has_been_registered_successfully = // Warning: it is very important to include %s in the following sentences const char *Txt_The_nickname_X_has_been_registered_successfully = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca #if L==1 // ca
"El apodo <strong>@%s</strong>" "El apodo <strong>@%s</strong>"

View File

@ -3527,7 +3527,7 @@ void Usr_ShowFormsLogoutAndRole (void)
if (Rol_GetNumAvailableRoles () == 1) if (Rol_GetNumAvailableRoles () == 1)
{ {
HTM_SPAN_Begin ("class=\"DAT\""); HTM_SPAN_Begin ("class=\"DAT\"");
HTM_TxtF ("%s:&nbsp;",Txt_Role); HTM_TxtColonNBSP (Txt_Role);
HTM_SPAN_End (); HTM_SPAN_End ();
HTM_SPAN_Begin ("class=\"DAT_N_BOLD\""); HTM_SPAN_Begin ("class=\"DAT_N_BOLD\"");
@ -3537,7 +3537,7 @@ void Usr_ShowFormsLogoutAndRole (void)
else else
{ {
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Role); HTM_TxtColonNBSP (Txt_Role);
Rol_PutFormToChangeMyRole (NULL); Rol_PutFormToChangeMyRole (NULL);
HTM_LABEL_End (); HTM_LABEL_End ();
} }
@ -7518,7 +7518,7 @@ void Usr_ListDataAdms (void)
Frm_StartForm (ActLstOth); Frm_StartForm (ActLstOth);
Usr_PutParamListWithPhotos (); Usr_PutParamListWithPhotos ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
HTM_LABEL_End (); HTM_LABEL_End ();
Frm_EndForm (); Frm_EndForm ();
@ -7985,7 +7985,7 @@ void Usr_SeeGuests (void)
Frm_StartForm (ActLstGst); Frm_StartForm (ActLstGst);
Usr_PutParamsPrefsAboutUsrList (); Usr_PutParamsPrefsAboutUsrList ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
HTM_LABEL_End (); HTM_LABEL_End ();
Frm_EndForm (); Frm_EndForm ();
@ -8130,7 +8130,7 @@ void Usr_SeeStudents (void)
Frm_StartForm (ActLstStd); Frm_StartForm (ActLstStd);
Usr_PutParamsPrefsAboutUsrList (); Usr_PutParamsPrefsAboutUsrList ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
HTM_LABEL_End (); HTM_LABEL_End ();
Frm_EndForm (); Frm_EndForm ();
@ -8308,7 +8308,7 @@ void Usr_SeeTeachers (void)
Frm_StartForm (ActLstTch); Frm_StartForm (ActLstTch);
Usr_PutParamsPrefsAboutUsrList (); Usr_PutParamsPrefsAboutUsrList ();
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]); HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Scope); HTM_TxtColonNBSP (Txt_Scope);
Sco_PutSelectorScope ("ScopeUsr",true); Sco_PutSelectorScope ("ScopeUsr",true);
HTM_LABEL_End (); HTM_LABEL_End ();
Frm_EndForm (); Frm_EndForm ();