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
HTM_TxtF ("<input type=\"number\" name=\"%s\""
" min=\"%lg\" max=\"%lg\"",
" min=\"%.15lg\" max=\"%.15lg\"",
Name,
Min,Max);
if (Step == 0.0)
HTM_Txt (" step=\"any\"");
else
HTM_TxtF (" step=\"%lg\"",Step);
HTM_TxtF (" value=\"%lg\"",Value);
HTM_TxtF (" step=\"%.15lg\"",Step);
HTM_TxtF (" value=\"%.15lg\"",Value);
Str_SetDecimalPointToLocal (); // Return to local system
if (Disabled)
HTM_Txt (" disabled=\"disabled\"");
@ -1719,7 +1719,6 @@ void HTM_TxtF (const char *fmt,...)
}
}
static void HTM_SPTxt (const char *Txt)
{
HTM_Txt (" ");
@ -1731,6 +1730,13 @@ void HTM_Txt (const char *Txt)
fputs (Txt,Gbl.F.Out);
}
void HTM_TxtColonNBSP (const char *Txt)
{
HTM_Txt (Txt);
HTM_Colon ();
HTM_NBSP ();
}
void HTM_NBSP (void)
{
HTM_Txt ("&nbsp;");
@ -1780,8 +1786,7 @@ void HTM_Double (double Num)
{
char *Str;
/***** Write from floating point number to string
with the correct accuracy *****/
/***** Write from floating point number to string ****/
Str_DoubleNumToStr (&Str,Num);
/***** Write number from string to file *****/
@ -1791,6 +1796,20 @@ void HTM_Double (double Num)
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)
{
HTM_TxtF ("%.2lf",Num);

View File

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

View File

@ -375,12 +375,12 @@ void MFU_UpdateMFUActions (void)
"REPLACE INTO actions_MFU"
" (UsrCod,ActCod,Score,LastClick)"
" VALUES"
" (%ld,%ld,'%f',NOW())",
" (%ld,%ld,'%15lg',NOW())",
Gbl.Usrs.Me.UsrDat.UsrCod,ActCod,Score);
/***** Update score for other 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",
MFU_DECREASE_FACTOR,MFU_MIN_SCORE,
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 *****/
Frm_StartForm (ActChkUsrAcc);
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,
"size=\"18\" required=\"required\"");
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_TxtF ("%s:&nbsp;%s",Txt_ID,ID);
HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Name);
HTM_TxtColonNBSP (Txt_Name);
if (UsrDat->FullName[0])
{
HTM_STRONG_Begin ();

View File

@ -415,7 +415,7 @@ void Ann_ShowFormAnnouncement (void)
HTM_TR_Begin (NULL);
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_Begin ("class=\"DAT LT\"");

View File

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

View File

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

View File

@ -883,7 +883,7 @@ void CtrCfg_RequestPhoto (void)
/***** Upload photo *****/
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_LABEL_End ();
@ -1145,7 +1145,6 @@ void CtrCfg_RenameCentreFull (void)
void CtrCfg_ChangeCtrLatitude (void)
{
extern const char *Txt_The_new_latitude_is_X;
char LatitudeStr[64];
double NewLatitude;
@ -1157,9 +1156,6 @@ void CtrCfg_ChangeCtrLatitude (void)
CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"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 *****/
CtrCfg_ShowConfiguration ();
}
@ -1170,7 +1166,6 @@ void CtrCfg_ChangeCtrLatitude (void)
void CtrCfg_ChangeCtrLongitude (void)
{
extern const char *Txt_The_new_longitude_is_X;
char LongitudeStr[64];
double NewLongitude;
@ -1182,9 +1177,6 @@ void CtrCfg_ChangeCtrLongitude (void)
CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"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 *****/
CtrCfg_ShowConfiguration ();
}
@ -1195,7 +1187,6 @@ void CtrCfg_ChangeCtrLongitude (void)
void CtrCfg_ChangeCtrAltitude (void)
{
extern const char *Txt_The_new_altitude_is_X;
char AltitudeStr[64];
double NewAltitude;
@ -1207,9 +1198,6 @@ void CtrCfg_ChangeCtrAltitude (void)
CtrCfg_UpdateCtrCoordinateDB (Gbl.Hierarchy.Ctr.CtrCod,"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 *****/
CtrCfg_ShowConfiguration ();
}
@ -1224,7 +1212,7 @@ static void CtrCfg_UpdateCtrCoordinateDB (long CtrCod,
/***** Update database changing old coordinate by new coordinate *****/
Str_SetDecimalPointToUS (); // To write the decimal point as a dot
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);
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:
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 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: 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: Jan 09, 2020 Map column in listing of institutions.
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.");
if (NumInformants > 1)
{
HTM_TxtF ("%s:&nbsp;",Txt_Informants);
HTM_TxtColonNBSP (Txt_Informants);
HTM_Unsigned (NumInformants);
HTM_BR ();
}

View File

@ -380,7 +380,7 @@ void Enr_WriteFormToReqAnotherUsrID (Act_Action_t NextAction,void (*FuncParams)
FuncParams ();
HTM_LABEL_Begin ("for=\"OtherUsrIDNickOrEMail\" class=\"%s RM\"",
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_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? *****/
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 |
1 << Hie_CTY |
1 << Hie_INS |
@ -222,7 +222,7 @@ void Fig_ReqShowFigures (void)
/***** Type of statistic *****/
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Statistic);
HTM_TxtColonNBSP (Txt_Statistic);
HTM_SELECT_Begin (false,
"name=\"FigureType\"");
for (FigureType = (Fig_FigureType_t) 0;

View File

@ -8374,7 +8374,7 @@ static void Brw_PutFormToCreateAFolder (const char FileNameToShow[NAME_MAX + 1])
/***** Folder *****/
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,
"size=\"30\" required=\"required\"");
HTM_LABEL_End ();

View File

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

View File

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

View File

@ -1243,7 +1243,7 @@ void Inf_FormToSendPage (Inf_InfoSrc_t InfoSrc)
/***** File *****/
HTM_DIV_Begin ("class=\"CM\"");
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_LABEL_End ();
HTM_DIV_End ();
@ -1286,7 +1286,7 @@ void Inf_FormToSendURL (Inf_InfoSrc_t InfoSrc)
HTM_DIV_Begin ("class=\"CM\"");
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,
"size=\"50\"");
HTM_LABEL_End ();

View File

@ -1421,7 +1421,7 @@ static void Lay_WriteAboutZone (void)
/***** Questions and problems *****/
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\"",
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 *****/
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_LABEL_End ();

View File

@ -94,7 +94,7 @@ void Map_CreateMap (const char *ContainerId,
/* Let's create a map with pretty Mapbox Streets tiles */
Str_SetDecimalPointToUS (); // To write the decimal point as a dot
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);
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
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);
Str_SetDecimalPointToLocal (); // Return to local system
}

View File

@ -659,8 +659,8 @@ static void Mch_GetAndWriteNamesOfGrpsAssociatedToMatch (const struct Match *Mat
/***** Write heading *****/
HTM_DIV_Begin ("class=\"ASG_GRP\"");
HTM_TxtF ("%s:&nbsp;",NumRows == 1 ? Txt_Group :
Txt_Groups);
HTM_TxtColonNBSP (NumRows == 1 ? Txt_Group :
Txt_Groups);
/***** Write groups *****/
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\"");
if (NumRow == 0)
{
HTM_Double (MaxScore);
HTM_DoubleFewDigits (MaxScore);
HTM_NBSP ();
}
else if (NumRow == Mch_NUM_ROWS_SCORE - 1)
{
HTM_Double (MinScore);
HTM_DoubleFewDigits (MinScore);
HTM_NBSP ();
}
HTM_TD_End ();
@ -3207,7 +3207,7 @@ static void Mch_DrawScoreRow (double Score,double MinScore,double MaxScore,
/* Write score */
HTM_TD_Begin ("class=\"MCH_SCO_SCO\"");
HTM_Double (Score);
HTM_DoubleFewDigits (Score);
HTM_NBSP ();
HTM_TD_End ();
@ -3724,7 +3724,7 @@ void Mch_ReceiveQuestionAnswer (void)
" SET EndTime=NOW(),"
"NumQsts=%u,"
"NumQstsNotBlank=%u,"
"Score='%lf'"
"Score='%.15lg'"
" WHERE MchCod=%ld AND UsrCod=%ld",
NumQsts,NumQstsNotBlank,TotalScore,
Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod);
@ -3740,7 +3740,7 @@ void Mch_ReceiveQuestionAnswer (void)
"NOW()," // EndTime
"%u," // NumQsts
"%u," // NumQstsNotBlank
"'%lf')", // Score
"'%.15lg')", // Score
Match.MchCod,Gbl.Usrs.Me.UsrDat.UsrCod,
NumQsts,NumQstsNotBlank,TotalScore);
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
/* Get score (row[5]) */
if (sscanf (row[5],"%lg",&ScoreInThisResult) != 1)
if (sscanf (row[5],"%lf",&ScoreInThisResult) != 1)
ScoreInThisResult = 0.0;
TotalScoreOfAllResults += ScoreInThisResult;
/* Get maximum grade (row[6]) */
if (sscanf (row[6],"%lg",&MaxGrade) != 1)
if (sscanf (row[6],"%lf",&MaxGrade) != 1)
MaxGrade = 0.0;
Str_SetDecimalPointToLocal (); // Return to local system
@ -936,7 +936,7 @@ static void McR_ShowMchResultsSummaryRow (unsigned NumResults,
/***** Row title *****/
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_TD_End ();
@ -1229,10 +1229,10 @@ void McR_ShowOneMchResult (void)
if (ICanViewScore)
{
HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\"");
HTM_TxtF ("%s:&nbsp;",Txt_Score);
HTM_TxtColonNBSP (Txt_Score);
HTM_Double2Decimals (TotalScore);
HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Grade);
HTM_TxtColonNBSP (Txt_Grade);
Tst_ComputeAndShowGrade (NumQsts,TotalScore,Game.MaxGrade);
HTM_DIV_End ();
}
@ -1361,7 +1361,7 @@ static void McR_GetMatchResultDataByMchCod (long MchCod,long UsrCod,
/* Get score (row[4]) */
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;
Str_SetDecimalPointToLocal (); // Return to local system
}

View File

@ -2671,7 +2671,7 @@ void Msg_ShowFormToFilterMsgs (void)
/***** Filter authors/recipients *****/
HTM_TD_Begin ("class=\"LM\"");
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,
Gbl.Msg.FilterFromTo,
"size=\"20\"");
@ -2681,7 +2681,7 @@ void Msg_ShowFormToFilterMsgs (void)
/***** Filter message content *****/
HTM_TD_Begin ("class=\"LM\"");
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,
Gbl.Msg.FilterContent,
"size=\"20\"");
@ -3035,7 +3035,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write "From:" *****/
HTM_TD_Begin ("class=\"RT MSG_TIT\"");
HTM_TxtF ("%s:&nbsp;",Txt_MSG_From);
HTM_TxtColonNBSP (Txt_MSG_From);
HTM_TD_End ();
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
@ -3048,7 +3048,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"RT MSG_TIT\"");
HTM_TxtF ("%s:&nbsp;",Txt_MSG_To);
HTM_TxtColonNBSP (Txt_MSG_To);
HTM_TD_End ();
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
@ -3061,7 +3061,7 @@ static void Msg_ShowASentOrReceivedMessage (long MsgNum,long MsgCod)
/***** Write "Content:" *****/
HTM_TD_Begin ("class=\"RT MSG_TIT\"");
HTM_TxtF ("%s:&nbsp;",Txt_MSG_Content);
HTM_TxtColonNBSP (Txt_MSG_Content);
HTM_TD_End ();
/***** Initialize image *****/

View File

@ -283,7 +283,7 @@ void Pwd_ShowFormSendNewPwd (void)
/***** User's ID/nickname *****/
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,
"size=\"8\" required=\"required\"");
HTM_LABEL_End ();
@ -861,7 +861,7 @@ void Pwd_AskForConfirmationOnDangerousAction (void)
/***** Password *****/
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,
NULL);
HTM_LABEL_End ();

View File

@ -336,7 +336,7 @@ static void Pho_ReqPhoto (const struct UsrData *UsrDat)
/***** Form to upload photo *****/
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_LABEL_End ();

View File

@ -208,7 +208,7 @@ void Prf_RequestUserProfile (void)
/* By default, the nickname is filled with my nickname
If no user logged ==> the nickname is empty */
HTM_LABEL_Begin ("class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
HTM_TxtF ("%s:&nbsp;",Txt_Nickname);
HTM_TxtColonNBSP (Txt_Nickname);
snprintf (NicknameWithArroba,sizeof (NicknameWithArroba),
"@%s",
@ -603,7 +603,7 @@ static void Prf_ShowNumClicks (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0)
{
HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumClicks /
HTM_DoubleFewDigits ((double) UsrFigures->NumClicks /
(double) UsrFigures->NumDays);
HTM_TxtF ("/%s&nbsp;",Txt_day);
Prf_ShowRanking (Prf_GetRankingNumClicksPerDay (UsrDat->UsrCod),
@ -643,7 +643,7 @@ static void Prf_ShowNumFileViews (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0)
{
HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumFileViews /
HTM_DoubleFewDigits ((double) UsrFigures->NumFileViews /
(double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day);
}
@ -680,7 +680,7 @@ static void Prf_ShowNumSocialPublications (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0)
{
HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumSocPub /
HTM_DoubleFewDigits ((double) UsrFigures->NumSocPub /
(double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day);
}
@ -717,7 +717,7 @@ static void Prf_ShowNumForumPosts (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0)
{
HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumForPst /
HTM_DoubleFewDigits ((double) UsrFigures->NumForPst /
(double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day);
}
@ -754,7 +754,7 @@ static void Prf_ShowNumMessagesSent (const struct UsrData *UsrDat,
if (UsrFigures->NumDays > 0)
{
HTM_TxtF ("&nbsp;%s","(");
HTM_Double ((double) UsrFigures->NumMsgSnt /
HTM_DoubleFewDigits ((double) UsrFigures->NumMsgSnt /
(double) UsrFigures->NumDays);
HTM_TxtF ("/%s)",Txt_day);
}
@ -1726,7 +1726,7 @@ void Prf_GetAndShowRankingClicksPerDay (void)
ItsMe ? "DAT_SMALL_N" :
"DAT_SMALL",
Gbl.RowEvenOdd);
HTM_Double (NumClicksPerDay);
HTM_DoubleFewDigits (NumClicksPerDay);
HTM_TD_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\"");
/***** 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_Txt (Gbl.Usrs.Me.UsrDat.FullName);
HTM_SPAN_End ();
@ -313,7 +313,7 @@ static void Rep_TitleReport (struct Rep_CurrentTimeUTC *CurrentTimeUTC)
if (CurrentTimeUTC)
{
HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Date);
HTM_TxtColonNBSP (Txt_Date);
HTM_SPAN_Begin ("class=\"DAT_N\"");
HTM_TxtF ("%s %s UTC",CurrentTimeUTC->StrDate,
CurrentTimeUTC->StrTime);
@ -1383,7 +1383,7 @@ static void Rep_WriteDouble (double Num)
/***** Write from floating point number to string
with the correct accuracy *****/
Str_DoubleNumToStr (&Str,Num);
Str_DoubleNumToStrFewDigits (&Str,Num);
/***** Write number from string to file *****/
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) *****/
HTM_DIV_Begin ("class=\"CM\"");
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 |
1 << Hie_CTY |
1 << Hie_INS |

View File

@ -1761,7 +1761,7 @@ static void Sta_ShowNumHitsPerUsr (unsigned long NumRows,MYSQL_RES *mysql_res)
BarWidth);
HTM_NBSP ();
}
HTM_Double (Hits.Num);
HTM_DoubleFewDigits (Hits.Num);
HTM_TD_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_TxtF ("%s:&nbsp;",Txt_Color_of_the_graphic);
HTM_TxtColonNBSP (Txt_Color_of_the_graphic);
HTM_SELECT_Begin (true,
"name=\"ColorType\"");
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;\"",
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_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);
HTM_Double (HitsMax);
HTM_DoubleFewDigits (HitsMax);
HTM_TD_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);
/***** Write from floating point number to string *****/
Str_DoubleNumToStr (&Str,HitsNum[Hour]);
Str_DoubleNumToStrFewDigits (&Str,HitsNum[Hour]);
/***** Write cell *****/
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) /
Hits->Total) + 0.5));
HTM_BR ();
HTM_Double (Hits->Num);
HTM_DoubleFewDigits (Hits->Num);
HTM_BR ();
BarHeight = (unsigned) (((Hits->Num * 500.0) / Hits->Max) + 0.5);
if (BarHeight == 0)
@ -3730,7 +3730,7 @@ static void Sta_DrawBarNumHits (char Color,
/***** Write the number of hits *****/
HTM_NBSP ();
HTM_Double (HitsNum);
HTM_DoubleFewDigits (HitsNum);
HTM_TxtF ("&nbsp;(%u",(unsigned) (((HitsNum * 100.0) /
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
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 FractionaryPart;
@ -927,7 +939,7 @@ double Str_GetDoubleFromStr (char *Str)
(it must have a point, not a comma as decimal separator) *****/
Str_ConvertStrFloatCommaToStrFloatPoint (Str);
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...
DoubleNum = 0.0; // ...the number is reset to 0
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);
void Str_DoubleNumToStr (char **Str,double Number);
void Str_DoubleNumToStrFewDigits (char **Str,double Number);
void Str_ConvertStrFloatCommaToStrFloatPoint (char *Str);
double Str_GetDoubleFromStr (char *Str);
void Str_SetDecimalPointToUS (void);

View File

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

View File

@ -533,10 +533,10 @@ void Tst_AssessTest (void)
if (Gbl.Test.Config.Feedback != Tst_FEEDBACK_NOTHING)
{
HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\"");
HTM_TxtF ("%s:&nbsp;",Txt_Score);
HTM_TxtColonNBSP (Txt_Score);
HTM_Double2Decimals (TotalScore);
HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Grade);
HTM_TxtColonNBSP (Txt_Grade);
Tst_ComputeAndShowGrade (Gbl.Test.NumQsts,TotalScore,Tst_SCORE_MAX);
HTM_DIV_End ();
}
@ -1155,7 +1155,7 @@ static void Tst_PutFormToEditQstMedia (struct Media *Media,int NumMediaInForm,
UniqueId,
(unsigned) Med_ACTION_NEW_MEDIA,
OptionsDisabled ? " disabled=\"disabled\"" : "");
HTM_TxtF ("%s:&nbsp;",Txt_Change_image_video);
HTM_TxtColonNBSP (Txt_Change_image_video);
HTM_LABEL_End ();
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",
"UPDATE tst_questions"
" SET NumHits=NumHits+1,NumHitsNotBlank=NumHitsNotBlank+1,"
"Score=Score+(%lf)"
"Score=Score+(%.15lg)"
" WHERE QstCod=%ld",
ScoreThisQst,QstCod);
else // The answer is blank
@ -3317,7 +3317,11 @@ void Tst_WriteAnswersEdit (long QstCod)
FloatNum[i] = Str_GetDoubleFromStr (row[1]);
}
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 ();
break;
case Tst_ANS_TRUE_FALSE:
@ -4638,7 +4642,7 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
FloatAnsUsr <= FloatAnsCorr[1]) ? "ANS_OK" :
"ANS_BAD") :
"ANS_0");
HTM_TxtF ("%lg",FloatAnsUsr);
HTM_Double (FloatAnsUsr);
}
else // Not a floating point number
{
@ -4654,7 +4658,13 @@ static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
HTM_TD_Begin ("class=\"ANS_0 CM\"");
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
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
HTM_Txt ("?");
HTM_TD_End ();
@ -4735,7 +4745,7 @@ static void Tst_WriteScoreStart (unsigned ColSpan)
HTM_TR_Begin (NULL);
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)
@ -5260,7 +5270,7 @@ static void Tst_PutFormEditOneQst (char Stem[Cns_MAX_BYTES_TEXT + 1],
HTM_TD_Begin ("class=\"LT\"");
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),
"%ld",
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_TxtF ("%s&nbsp;",Label);
snprintf (StrDouble,sizeof (StrDouble),
"%lg",
"%.15lg",
Value);
HTM_INPUT_TEXT (Field,Tst_MAX_BYTES_FLOAT_ANSWER,StrDouble,false,
"size=\"11\" required=\"required\"%s",
@ -6813,7 +6823,7 @@ static void Tst_InsertAnswersIntoDB (void)
"INSERT INTO tst_answers"
" (QstCod,AnsInd,Answer,Feedback,MedCod,Correct)"
" VALUES"
" (%ld,%u,'%lg','',-1,'Y')",
" (%ld,%u,'%.15lg','',-1,'Y')",
Gbl.Test.QstCod,i,
Gbl.Test.Answer.FloatingPoint[i]);
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
DB_QueryUPDATE ("can not update result of test result",
"UPDATE tst_exams"
" SET NumQstsNotBlank=%u,Score='%lf'"
" SET NumQstsNotBlank=%u,Score='%.15lg'"
" WHERE TstCod=%ld",
NumQstsNotBlank,Score,
TstCod);
@ -7950,7 +7960,7 @@ static void Tst_ShowTestResultsSummaryRow (bool ItsMe,
/***** Row title *****/
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_TD_End ();
@ -8202,10 +8212,10 @@ void Tst_ShowOneTstResult (void)
if (ICanViewScore)
{
HTM_DIV_Begin ("class=\"DAT_N_BOLD CM\"");
HTM_TxtF ("%s:&nbsp;",Txt_Score);
HTM_TxtColonNBSP (Txt_Score);
HTM_Double2Decimals (TotalScore);
HTM_BR ();
HTM_TxtF ("%s:&nbsp;",Txt_Grade);
HTM_TxtColonNBSP (Txt_Grade);
Tst_ComputeAndShowGrade (Gbl.Test.NumQsts,TotalScore,Tst_SCORE_MAX);
HTM_DIV_End ();
}
@ -8389,7 +8399,7 @@ static void Tst_StoreOneTestResultQstInDB (long TstCod,long QstCod,unsigned NumQ
"INSERT INTO tst_exam_questions"
" (TstCod,QstCod,QstInd,Score,Indexes,Answers)"
" VALUES"
" (%ld,%ld,%u,'%lf','%s','%s')",
" (%ld,%ld,%u,'%.15lg','%s','%s')",
TstCod,QstCod,
NumQst, // 0, 1, 2, 3...
Score,

View File

@ -141,7 +141,7 @@ void TsI_ShowFormImportQstsFromXML (void)
/***** Write a form to import questions *****/
Frm_StartForm (ActImpTstQst);
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_LABEL_End ();
Frm_EndForm ();
@ -330,8 +330,8 @@ static void TsI_WriteAnswersOfAQstXML (long QstCod)
FloatNum[i] = Str_GetDoubleFromStr (row[1]);
}
fprintf (Gbl.Test.XML.FileXML,"%s"
"<lower>%lg</lower>%s"
"<upper>%lg</upper>%s",
"<lower>%.15lg</lower>%s"
"<upper>%.15lg</upper>%s",
Txt_NEW_LINE,
FloatNum[0],Txt_NEW_LINE,
FloatNum[1],Txt_NEW_LINE);
@ -970,9 +970,11 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
break;
case Tst_ANS_FLOAT:
HTM_SPAN_Begin ("class=\"%s\"",ClassStem);
HTM_TxtF ("([%lg; %lg])",
Gbl.Test.Answer.FloatingPoint[0],
Gbl.Test.Answer.FloatingPoint[1]);
HTM_Txt ("([");
HTM_Double (Gbl.Test.Answer.FloatingPoint[0]);
HTM_Txt ("; ");
HTM_Double (Gbl.Test.Answer.FloatingPoint[1]);
HTM_Txt ("])");
HTM_SPAN_End ();
break;
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.";
#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
#if L==1 // ca
"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>.";
#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
#if L==1 // ca
"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>.";
#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
#if L==1 // ca
"El apodo <strong>@%s</strong>"

View File

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