diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index e6e036f1..e976af97 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -11,7 +11,7 @@
-
+
diff --git a/css/swad19.95.css b/css/swad19.97.css
similarity index 99%
rename from css/swad19.95.css
rename to css/swad19.97.css
index 5665b36a..59f49fa3 100644
--- a/css/swad19.95.css
+++ b/css/swad19.97.css
@@ -3976,11 +3976,18 @@ a.PAG:hover, .PAG_CUR
{
width:180px;
}
-.INPUT_WWW
+.INPUT_WWW_NARROW
{
width:90px;
}
-
+.INPUT_WWW_WIDE
+ {
+ width:180px;
+ }
+.INPUT_COORD
+ {
+ width:180px;
+ }
.INPUT_STATUS
{
width:80px;
diff --git a/sql/swad.sql b/sql/swad.sql
index 43ebfd01..8d676082 100644
--- a/sql/swad.sql
+++ b/sql/swad.sql
@@ -162,6 +162,9 @@ CREATE TABLE IF NOT EXISTS centres (
PlcCod INT NOT NULL DEFAULT -1,
Status TINYINT NOT NULL DEFAULT 0,
RequesterUsrCod INT NOT NULL DEFAULT -1,
+ Latitude DOUBLE PRECISION NOT NULL DEFAULT 0,
+ Longitude DOUBLE PRECISION NOT NULL DEFAULT 0,
+ Altitude DOUBLE PRECISION NOT NULL DEFAULT 0,
ShortName VARCHAR(511) COLLATE latin1_spanish_ci NOT NULL,
FullName VARCHAR(2047) COLLATE latin1_spanish_ci NOT NULL,
WWW VARCHAR(255) NOT NULL,
diff --git a/swad_HTML.c b/swad_HTML.c
index 3e83f001..c14d673f 100644
--- a/swad_HTML.c
+++ b/swad_HTML.c
@@ -1217,7 +1217,9 @@ void HTM_INPUT_LONG (const char *Name,long Min,long Max,long Value,bool Disabled
HTM_Txt (" />");
}
-void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,double Step,double Value,bool Disabled,
+void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,
+ double Step, // Use 0 for "any"
+ double Value,bool Disabled,
const char *fmt,...)
{
va_list ap;
@@ -1226,9 +1228,14 @@ void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,double Step,double
Str_SetDecimalPointToUS (); // To print the floating point as a dot
HTM_TxtF ("WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -883,7 +883,7 @@ static void Ban_PutFormToCreateBanner (void)
/***** Banner WWW *****/
HTM_TD_Begin ("class=\"CM\"");
HTM_INPUT_URL ("WWW",Ban_EditingBan->WWW,false,
- "class=\"INPUT_WWW\" required=\"required\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_centre.c b/swad_centre.c
index 4e6b7721..cca0c75d 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -89,7 +89,9 @@ static void Ctr_PutIconsCtrConfig (void);
static void Ctr_PutIconToChangePhoto (void);
static void Ctr_ConfigTitle (bool PutLink);
static void Ctr_ConfigMap (void);
-static void Ctr_ConfigCoordinates (void);
+static void Ctr_ConfigLatitude (void);
+static void Ctr_ConfigLongitude (void);
+static void Ctr_ConfigAltitude (void);
static void Ctr_ConfigPhoto (bool PrintView,bool PutLink);
static void Ctr_ConfigInstitution (bool PrintView);
static void Ctr_ConfigFullName (bool PrintView);
@@ -113,6 +115,8 @@ static void Ctr_GetParamCtrOrder (void);
static void Ctr_EditCentresInternal (void);
static void Ctr_PutIconsEditingCentres (void);
+static void Ctr_GetDataOfCentreFromRow (struct Centre *Ctr,MYSQL_ROW row);
+
static void Ctr_GetPhotoAttribution (long CtrCod,char **PhotoAttribution);
static void Ctr_FreePhotoAttribution (char **PhotoAttribution);
static void Ctr_ListCentresForEdition (void);
@@ -129,6 +133,8 @@ static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShrtOrFullName_t ShrtOrFull
static bool Ctr_CheckIfCtrNameExistsInIns (const char *FieldName,const char *Name,long CtrCod,long InsCod);
static void Ctr_UpdateInsNameDB (long CtrCod,const char *FieldName,const char *NewCtrName);
+static void Ctr_UpdateCtrCoordinateDB (long CtrCod,const char *CoordField,double NewCoord);
+
static void Ctr_UpdateCtrWWWDB (long CtrCod,
const char NewWWW[Cns_MAX_BYTES_WWW + 1]);
static void Ctr_ShowAlertAndButtonToGoToCtr (void);
@@ -344,7 +350,11 @@ static void Ctr_Configuration (bool PrintView)
/***** Coordinates *****/
if (!PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM)
- Ctr_ConfigCoordinates ();
+ {
+ Ctr_ConfigLatitude ();
+ Ctr_ConfigLongitude ();
+ Ctr_ConfigAltitude ();
+ }
/***** Centre WWW *****/
Ctr_ConfigWWW (PrintView);
@@ -474,9 +484,12 @@ static void Ctr_ConfigMap (void)
/***** Script to draw the map *****/
HTM_SCRIPT_Begin (NULL,NULL);
+ Str_SetDecimalPointToUS (); // To write the decimal point as a dot
/* Let's create a map of the center of London with pretty Mapbox Streets tiles */
- HTM_Txt ("\tvar mymap = L.map('centre_mapid').setView([37.19704, -3.62451], 16);\n");
+ HTM_TxtF ("\tvar mymap = L.map('centre_mapid').setView([%lg, %lg], 16);\n",
+ Gbl.Hierarchy.Ctr.Coord.Latitude,
+ Gbl.Hierarchy.Ctr.Coord.Longitude);
/* Next we'll add a tile layer to add to our map,
in this case it's a Mapbox Streets tile layer.
@@ -495,12 +508,15 @@ static void Ctr_ConfigMap (void)
"}).addTo(mymap);\n");
/* Marker */
- HTM_Txt ("\tvar marker = L.marker([37.19684, -3.62436]).addTo(mymap);");
+ HTM_TxtF ("\tvar marker = L.marker([%lg, %lg]).addTo(mymap);",
+ Gbl.Hierarchy.Ctr.Coord.Latitude,
+ Gbl.Hierarchy.Ctr.Coord.Longitude);
HTM_TxtF ("\tmarker.bindPopup(\"%s
%s\").openPopup();",
Gbl.Hierarchy.Ctr.ShrtName,
Gbl.Hierarchy.Ins.ShrtName);
+ Str_SetDecimalPointToLocal (); // Return to local system
HTM_SCRIPT_End ();
}
@@ -508,23 +524,84 @@ static void Ctr_ConfigMap (void)
/************************** Edit centre coordinates **************************/
/*****************************************************************************/
-static void Ctr_ConfigCoordinates (void)
+static void Ctr_ConfigLatitude (void)
{
extern const char *The_ClassFormInBox[The_NUM_THEMES];
+ extern const char *Txt_Latitude;
HTM_TR_Begin (NULL);
HTM_TD_Begin ("class=\"RM\"");
- HTM_LABEL_Begin ("for=\"WWW\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
- HTM_TxtF ("%s:","Latitud"); // TODO: Need translation!!!!
+ HTM_LABEL_Begin ("for=\"Latitude\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ HTM_TxtF ("%s:",Txt_Latitude);
+ HTM_LABEL_End ();
+ HTM_TD_End ();
+
+ HTM_TD_Begin ("class=\"LM\"");
+ /* Form to change centre latitude */
+ Frm_StartForm (ActChgCtrLatCfg);
+ HTM_INPUT_FLOAT ("Latitude",
+ -90.0, // South Pole
+ 90.0, // North Pole
+ 0.0, // step="any"
+ Gbl.Hierarchy.Ctr.Coord.Latitude,false,
+ "class=\"INPUT_COORD\" required=\"required\"");
+ Frm_EndForm ();
+ HTM_TD_End ();
+
+ HTM_TR_End ();
+ }
+
+static void Ctr_ConfigLongitude (void)
+ {
+ extern const char *The_ClassFormInBox[The_NUM_THEMES];
+ extern const char *Txt_Longitude;
+
+ HTM_TR_Begin (NULL);
+
+ HTM_TD_Begin ("class=\"RM\"");
+ HTM_LABEL_Begin ("for=\"Longitude\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ HTM_TxtF ("%s:",Txt_Longitude);
+ HTM_LABEL_End ();
+ HTM_TD_End ();
+
+ HTM_TD_Begin ("class=\"LM\"");
+ /* Form to change centre longitude */
+ Frm_StartForm (ActChgCtrLgtCfg);
+ HTM_INPUT_FLOAT ("Longitude",
+ -180.0, // West
+ 180.0, // East
+ 0.0, // step="any"
+ Gbl.Hierarchy.Ctr.Coord.Longitude,false,
+ "class=\"INPUT_COORD\" required=\"required\"");
+ Frm_EndForm ();
+ HTM_TD_End ();
+
+ HTM_TR_End ();
+ }
+
+static void Ctr_ConfigAltitude (void)
+ {
+ extern const char *The_ClassFormInBox[The_NUM_THEMES];
+ extern const char *Txt_Altitude;
+
+ HTM_TR_Begin (NULL);
+
+ HTM_TD_Begin ("class=\"RM\"");
+ HTM_LABEL_Begin ("for=\"Altitude\" class=\"%s\"",The_ClassFormInBox[Gbl.Prefs.Theme]);
+ HTM_TxtF ("%s:",Txt_Altitude);
HTM_LABEL_End ();
HTM_TD_End ();
HTM_TD_Begin ("class=\"LM\"");
/* Form to change centre WWW */
- Frm_StartForm (ActChgCtrWWWCfg);
- HTM_INPUT_URL ("WWW",Gbl.Hierarchy.Ctr.WWW,true,
- "class=\"INPUT_WWW\"");
+ Frm_StartForm (ActChgCtrAltCfg);
+ HTM_INPUT_FLOAT ("Altitude",
+ -413.0, // Dead Sea shore
+ 8848.0, // Mount Everest
+ 0.0, // step="any"
+ Gbl.Hierarchy.Ctr.Coord.Altitude,false,
+ "class=\"INPUT_COORD\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -811,7 +888,7 @@ static void Ctr_ConfigWWW (bool PrintView)
/* Form to change centre WWW */
Frm_StartForm (ActChgCtrWWWCfg);
HTM_INPUT_URL ("WWW",Gbl.Hierarchy.Ctr.WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_WIDE\" required=\"required\"");
Frm_EndForm ();
}
else // I can not change centre WWW
@@ -1290,17 +1367,36 @@ void Ctr_GetListCentres (long InsCod)
/***** Get centres from database *****/
NumRows = DB_QuerySELECT (&mysql_res,"can not get centres",
- "(SELECT centres.CtrCod,centres.InsCod,centres.PlcCod,"
- "centres.Status,centres.RequesterUsrCod,"
- "centres.ShortName,centres.FullName,centres.WWW,"
- "COUNT(DISTINCT usr_data.UsrCod) AS NumUsrs"
+ "(SELECT centres.CtrCod," // row[ 0]
+ "centres.InsCod," // row[ 1]
+ "centres.PlcCod," // row[ 2]
+ "centres.Status," // row[ 3]
+ "centres.RequesterUsrCod," // row[ 4]
+ "centres.Latitude," // row[ 5]
+ "centres.Longitude," // row[ 6]
+ "centres.Altitude," // row[ 7]
+ "centres.ShortName," // row[ 8]
+ "centres.FullName," // row[ 9]
+ "centres.WWW," // row[10]
+ "COUNT(DISTINCT usr_data.UsrCod)"
+ " AS NumUsrs" // row[11]
" FROM centres,usr_data"
" WHERE centres.InsCod=%ld"
" AND centres.CtrCod=usr_data.CtrCod"
" GROUP BY centres.CtrCod)"
" UNION "
- "(SELECT CtrCod,InsCod,PlcCod,Status,RequesterUsrCod,"
- "ShortName,FullName,WWW,0 AS NumUsrs"
+ "(SELECT CtrCod," // row[ 0]
+ "InsCod," // row[ 1]
+ "PlcCod," // row[ 2]
+ "Status," // row[ 3]
+ "RequesterUsrCod," // row[ 4]
+ "Latitude," // row[ 5]
+ "Longitude," // row[ 6]
+ "Altitude," // row[ 7]
+ "ShortName," // row[ 8]
+ "FullName," // row[ 9]
+ "WWW," // row[10]
+ "0 AS NumUsrs" // row[11]
" FROM centres"
" WHERE centres.InsCod=%ld"
" AND CtrCod NOT IN"
@@ -1316,7 +1412,8 @@ void Ctr_GetListCentres (long InsCod)
Gbl.Hierarchy.Ins.Ctrs.Num = (unsigned) NumRows;
/***** Create list with courses in degree *****/
- if ((Gbl.Hierarchy.Ins.Ctrs.Lst = (struct Centre *) calloc (NumRows,sizeof (struct Centre))) == NULL)
+ if ((Gbl.Hierarchy.Ins.Ctrs.Lst = (struct Centre *) calloc (NumRows,
+ sizeof (struct Centre))) == NULL)
Lay_NotEnoughMemoryExit ();
/***** Get the centres *****/
@@ -1328,39 +1425,7 @@ void Ctr_GetListCentres (long InsCod)
/* Get next centre */
row = mysql_fetch_row (mysql_res);
-
- /* Get centre code (row[0]) */
- if ((Ctr->CtrCod = Str_ConvertStrCodToLongCod (row[0])) <= 0)
- Lay_ShowErrorAndExit ("Wrong code of centre.");
-
- /* Get institution code (row[1]) */
- Ctr->InsCod = Str_ConvertStrCodToLongCod (row[1]);
-
- /* Get place code (row[2]) */
- Ctr->PlcCod = Str_ConvertStrCodToLongCod (row[2]);
-
- /* Get centre status (row[3]) */
- if (sscanf (row[3],"%u",&(Ctr->Status)) != 1)
- Lay_ShowErrorAndExit ("Wrong centre status.");
-
- /* Get requester user's code (row[4]) */
- Ctr->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[4]);
-
- /* Get the short name of the centre (row[5]) */
- Str_Copy (Ctr->ShrtName,row[5],
- Hie_MAX_BYTES_SHRT_NAME);
-
- /* Get the full name of the centre (row[6]) */
- Str_Copy (Ctr->FullName,row[6],
- Hie_MAX_BYTES_FULL_NAME);
-
- /* Get the URL of the centre (row[7]) */
- Str_Copy (Ctr->WWW,row[7],
- Cns_MAX_BYTES_WWW);
-
- /* Get number of users who claim to belong to this centre (row[8]) */
- if (sscanf (row[8],"%u",&Ctr->NumUsrsWhoClaimToBelongToCtr) != 1)
- Ctr->NumUsrsWhoClaimToBelongToCtr = 0;
+ Ctr_GetDataOfCentreFromRow (Ctr,row);
/* Get number of degrees in this centre */
Ctr->Degs.Num = Deg_GetNumDegsInCtr (Ctr->CtrCod);
@@ -1409,19 +1474,36 @@ bool Ctr_GetDataOfCentreByCod (struct Centre *Ctr,
{
/***** Get data of a centre from database *****/
NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a centre",
- "(SELECT centres.InsCod,centres.PlcCod,"
- "centres.Status,centres.RequesterUsrCod,"
- "centres.ShortName,centres.FullName,centres.WWW,"
- "COUNT(DISTINCT usr_data.UsrCod) AS NumUsrs"
+ "(SELECT centres.CtrCod," // row[ 0]
+ "centres.InsCod," // row[ 1]
+ "centres.PlcCod," // row[ 2]
+ "centres.Status," // row[ 3]
+ "centres.RequesterUsrCod," // row[ 4]
+ "centres.Latitude," // row[ 5]
+ "centres.Longitude," // row[ 6]
+ "centres.Altitude," // row[ 7]
+ "centres.ShortName," // row[ 8]
+ "centres.FullName," // row[ 9]
+ "centres.WWW," // row[10]
+ "COUNT(DISTINCT usr_data.UsrCod)"
+ " AS NumUsrs" // row[11]
" FROM centres,usr_data"
" WHERE centres.CtrCod=%ld"
" AND centres.CtrCod=usr_data.CtrCod"
" GROUP BY centres.CtrCod)"
" UNION "
- "(SELECT InsCod,PlcCod,"
- "Status,RequesterUsrCod,"
- "ShortName,FullName,WWW,"
- "0 AS NumUsrs"
+ "(SELECT CtrCod," // row[ 0]
+ "InsCod," // row[ 1]
+ "PlcCod," // row[ 2]
+ "Status," // row[ 3]
+ "RequesterUsrCod," // row[ 4]
+ "Latitude," // row[ 5]
+ "Longitude," // row[ 6]
+ "Altitude," // row[ 7]
+ "ShortName," // row[ 8]
+ "FullName," // row[ 9]
+ "WWW," // row[10]
+ "0 AS NumUsrs" // row[11]
" FROM centres"
" WHERE CtrCod=%ld"
" AND CtrCod NOT IN"
@@ -1432,35 +1514,7 @@ bool Ctr_GetDataOfCentreByCod (struct Centre *Ctr,
{
/* Get row */
row = mysql_fetch_row (mysql_res);
-
- /* Get the code of the institution (row[0]) */
- Ctr->InsCod = Str_ConvertStrCodToLongCod (row[0]);
-
- /* Get the code of the place (row[1]) */
- Ctr->PlcCod = Str_ConvertStrCodToLongCod (row[1]);
-
- /* Get centre status (row[2]) */
- if (sscanf (row[2],"%u",&(Ctr->Status)) != 1)
- Lay_ShowErrorAndExit ("Wrong centre status.");
-
- /* Get requester user's code (row[3]) */
- Ctr->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[3]);
-
- /* Get the short name of the centre (row[4]) */
- Str_Copy (Ctr->ShrtName,row[4],
- Hie_MAX_BYTES_SHRT_NAME);
-
- /* Get the full name of the centre (row[5]) */
- Str_Copy (Ctr->FullName,row[5],
- Hie_MAX_BYTES_FULL_NAME);
-
- /* Get the URL of the centre (row[6]) */
- Str_Copy (Ctr->WWW,row[6],
- Cns_MAX_BYTES_WWW);
-
- /* Get number of users who claim to belong to this centre (row[7]) */
- if (sscanf (row[7],"%u",&Ctr->NumUsrsWhoClaimToBelongToCtr) != 1)
- Ctr->NumUsrsWhoClaimToBelongToCtr = 0;
+ Ctr_GetDataOfCentreFromRow (Ctr,row);
/* Get extra data */
if (GetExtraData == Ctr_GET_EXTRA_DATA)
@@ -1486,6 +1540,67 @@ bool Ctr_GetDataOfCentreByCod (struct Centre *Ctr,
return CtrFound;
}
+/*****************************************************************************/
+/********** Get data of a centre from a row resulting of a query *************/
+/*****************************************************************************/
+
+static void Ctr_GetDataOfCentreFromRow (struct Centre *Ctr,MYSQL_ROW row)
+ {
+ /***** Get centre code (row[0]) *****/
+ if ((Ctr->CtrCod = Str_ConvertStrCodToLongCod (row[0])) <= 0)
+ Lay_ShowErrorAndExit ("Wrong code of centre.");
+
+ /***** Get institution code (row[1]) *****/
+ Ctr->InsCod = Str_ConvertStrCodToLongCod (row[1]);
+
+ /***** Get place code (row[2]) *****/
+ Ctr->PlcCod = Str_ConvertStrCodToLongCod (row[2]);
+
+ /***** Get centre status (row[3]) *****/
+ if (sscanf (row[3],"%u",&(Ctr->Status)) != 1)
+ Lay_ShowErrorAndExit ("Wrong centre status.");
+
+ /***** Get requester user's code (row[4]) *****/
+ Ctr->RequesterUsrCod = Str_ConvertStrCodToLongCod (row[4]);
+
+ /***** Get latitude (row[5]) *****/
+ Ctr->Coord.Latitude = Str_GetDoubleFromStr (row[5]);
+ if (Ctr->Coord.Latitude < -90.0)
+ Ctr->Coord.Latitude = -90.0; // South Pole
+ else if (Ctr->Coord.Latitude > 90.0)
+ Ctr->Coord.Latitude = 90.0; // North Pole
+
+ /***** Get longitude (row[6]) *****/
+ Ctr->Coord.Longitude = Str_GetDoubleFromStr (row[6]);
+ if (Ctr->Coord.Longitude < -180.0)
+ Ctr->Coord.Longitude = -180.0; // West
+ else if (Ctr->Coord.Longitude > 180.0)
+ Ctr->Coord.Longitude = 180.0; // East
+
+ /***** Get altitude (row[7]) *****/
+ Ctr->Coord.Altitude = Str_GetDoubleFromStr (row[7]);
+ if (Ctr->Coord.Altitude < -413.0)
+ Ctr->Coord.Altitude = -413.0; // Dead Sea shore
+ else if (Ctr->Coord.Altitude > 8848.0)
+ Ctr->Coord.Altitude = 8848.0; // Mount Everest
+
+ /***** Get the short name of the centre (row[8]) *****/
+ Str_Copy (Ctr->ShrtName,row[8],
+ Hie_MAX_BYTES_SHRT_NAME);
+
+ /***** Get the full name of the centre (row[9]) *****/
+ Str_Copy (Ctr->FullName,row[9],
+ Hie_MAX_BYTES_FULL_NAME);
+
+ /***** Get the URL of the centre (row[10]) *****/
+ Str_Copy (Ctr->WWW,row[10],
+ Cns_MAX_BYTES_WWW);
+
+ /***** Get number of users who claim to belong to this centre (row[11]) *****/
+ if (sscanf (row[11],"%u",&Ctr->NumUsrsWhoClaimToBelongToCtr) != 1)
+ Ctr->NumUsrsWhoClaimToBelongToCtr = 0;
+ }
+
/*****************************************************************************/
/*********** Get the institution code of a centre from its code **************/
/*****************************************************************************/
@@ -1799,7 +1914,7 @@ static void Ctr_ListCentresForEdition (void)
Frm_StartForm (ActChgCtrWWW);
Ctr_PutParamOtherCtrCod (Ctr->CtrCod);
HTM_INPUT_URL ("WWW",Ctr->WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
}
else
@@ -2299,6 +2414,107 @@ static void Ctr_UpdateInsNameDB (long CtrCod,const char *FieldName,const char *N
FieldName,NewCtrName,CtrCod);
}
+/*****************************************************************************/
+/********************** Change the latitude of a centre **********************/
+/*****************************************************************************/
+
+void Ctr_ChangeCtrLatitudeInConfig (void)
+ {
+ extern const char *Txt_The_new_latitude_is_X;
+ char LatitudeStr[64];
+ double NewLatitude;
+
+ /***** Get latitude *****/
+ Par_GetParToText ("Latitude",LatitudeStr,sizeof (LatitudeStr) - 1);
+ NewLatitude = Str_GetDoubleFromStr (LatitudeStr);
+ if (NewLatitude < -90.0)
+ NewLatitude = -90.0; // South Pole
+ else if (NewLatitude > 90.0)
+ NewLatitude = 90.0; // North Pole
+
+ /***** Update database changing old latitude by new latitude *****/
+ Ctr_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 *****/
+ Ctr_ShowConfiguration ();
+ }
+
+/*****************************************************************************/
+/********************** Change the longitude of a centre **********************/
+/*****************************************************************************/
+
+void Ctr_ChangeCtrLongitudeInConfig (void)
+ {
+ extern const char *Txt_The_new_longitude_is_X;
+ char LongitudeStr[64];
+ double NewLongitude;
+
+ /***** Get longitude *****/
+ Par_GetParToText ("Longitude",LongitudeStr,sizeof (LongitudeStr) - 1);
+ NewLongitude = Str_GetDoubleFromStr (LongitudeStr);
+ if (NewLongitude < -180.0)
+ NewLongitude = -180.0; // West
+ else if (NewLongitude > 180.0)
+ NewLongitude = 180.0; // East
+
+ /***** Update database changing old longitude by new longitude *****/
+ Ctr_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 *****/
+ Ctr_ShowConfiguration ();
+ }
+
+/*****************************************************************************/
+/********************** Change the latitude of a centre **********************/
+/*****************************************************************************/
+
+void Ctr_ChangeCtrAltitudeInConfig (void)
+ {
+ extern const char *Txt_The_new_altitude_is_X;
+ char AltitudeStr[64];
+ double NewAltitude;
+
+ /***** Get altitude *****/
+ Par_GetParToText ("Altitude",AltitudeStr,sizeof (AltitudeStr) - 1);
+ NewAltitude = Str_GetDoubleFromStr (AltitudeStr);
+ if (NewAltitude < -413.0)
+ NewAltitude = -413.0; // Dead Sea shore
+ else if (NewAltitude > 8848.0)
+ NewAltitude = 8848.0; // Mount Everest
+
+ /***** Update database changing old altitude by new altitude *****/
+ Ctr_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 *****/
+ Ctr_ShowConfiguration ();
+ }
+
+/*****************************************************************************/
+/******** Update database changing old coordinate by new coordinate **********/
+/*****************************************************************************/
+
+static void Ctr_UpdateCtrCoordinateDB (long CtrCod,const char *CoordField,double NewCoord)
+ {
+ /***** 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",
+ CoordField,NewCoord,CtrCod);
+ Str_SetDecimalPointToLocal (); // Return to local system
+ }
+
/*****************************************************************************/
/************************* Change the URL of a centre ************************/
/*****************************************************************************/
@@ -2755,7 +2971,7 @@ static void Ctr_PutFormToCreateCentre (void)
/***** Centre WWW *****/
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_URL ("WWW",Ctr_EditingCtr->WWW,false,
- "class=\"INPUT_WWW\" required=\"required\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
/***** Number of users who claim to belong to this centre *****/
diff --git a/swad_centre.h b/swad_centre.h
index fb039ba0..9ad6d8c7 100644
--- a/swad_centre.h
+++ b/swad_centre.h
@@ -65,9 +65,9 @@ struct Centre
long CtrCod; // Centre code
long InsCod; // Institution code
long PlcCod; // Place code
- struct Coordinates Coordinates; // Latitude and longitude
Ctr_Status_t Status; // Centre status
long RequesterUsrCod; // User code of the person who requested the creation of this centre
+ struct Coordinates Coord; // Geographical coordinates
char ShrtName[Hie_MAX_BYTES_SHRT_NAME + 1];
char FullName[Hie_MAX_BYTES_FULL_NAME + 1];
char WWW[Cns_MAX_BYTES_WWW + 1];
@@ -126,6 +126,9 @@ void Ctr_RenameCentreShort (void);
void Ctr_RenameCentreFull (void);
void Ctr_RenameCentreShortInConfig (void);
void Ctr_RenameCentreFullInConfig (void);
+void Ctr_ChangeCtrLatitudeInConfig (void);
+void Ctr_ChangeCtrLongitudeInConfig (void);
+void Ctr_ChangeCtrAltitudeInConfig (void);
void Ctr_ChangeCtrWWW (void);
void Ctr_ChangeCtrWWWInConfig (void);
void Ctr_ChangeCtrStatus (void);
diff --git a/swad_changelog.h b/swad_changelog.h
index d9ad1319..c7b3ad13 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -492,14 +492,20 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 19.96 (2019-12-19)"
-#define CSS_FILE "swad19.95.css"
+#define Log_PLATFORM_VERSION "SWAD 19.97 (2019-12-19)"
+#define CSS_FILE "swad19.97.css"
#define JS_FILE "swad19.91.1.js"
/*
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
// TODO: Impedir la creación y edición de proyectos si no son editables.
// TODO: No se puede entrar con DNI '1' suponiendo que no tenga password ¿por qué?
+ Version 19.97: Dec 19, 2019 Forms to edit centro latitude, longitude and altitude. (249807 lines)
+ 3 changes necessary in database:
+ALTER TABLE centres ADD COLUMN Latitude DOUBLE PRECISION NOT NULL DEFAULT 0 AFTER RequesterUsrCod;
+ALTER TABLE centres ADD COLUMN Longitude DOUBLE PRECISION NOT NULL DEFAULT 0 AFTER Latitude;
+ALTER TABLE centres ADD COLUMN Altitude DOUBLE PRECISION NOT NULL DEFAULT 0 AFTER Longitude;
+
Version 19.96: Dec 19, 2019 Bug fixes and code refactoring. (249423 lines)
Version 19.95.2: Dec 18, 2019 Bug fixes. (? lines)
1 change necessary in database:
diff --git a/swad_country.c b/swad_country.c
index 6f65d8d7..d29e7377 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -1676,7 +1676,7 @@ static void Cty_ListCountriesForEdition (void)
Cty_PutParamOtherCtyCod (Cty->CtyCod);
Par_PutHiddenParamUnsigned (NULL,"Lan",(unsigned) Lan);
HTM_INPUT_URL ("WWW",Cty->WWW[Lan],true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -2101,7 +2101,7 @@ static void Cty_PutFormToCreateCountry (void)
"WWW_%s",
Lan_STR_LANG_ID[Lan]);
HTM_INPUT_URL (StrName,Cty_EditingCty->WWW[Lan],false,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_course.c b/swad_course.c
index d8dcbdf0..3fb80c75 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -1971,7 +1971,14 @@ bool Crs_GetDataOfCourseByCod (struct Course *Crs,
{
/***** Get data of a course from database *****/
if (DB_QuerySELECT (&mysql_res,"can not get data of a course",
- "SELECT CrsCod,DegCod,Year,InsCrsCod,Status,RequesterUsrCod,ShortName,FullName"
+ "SELECT CrsCod," // row[0]
+ "DegCod," // row[1]
+ "Year," // row[2]
+ "InsCrsCod," // row[3]
+ "Status," // row[4]
+ "RequesterUsrCod," // row[5]
+ "ShortName," // row[6]
+ "FullName" // row[7]
" FROM courses WHERE CrsCod=%ld",
Crs->CrsCod)) // Course found...
{
diff --git a/swad_database.c b/swad_database.c
index 9b5d43fb..216268b7 100644
--- a/swad_database.c
+++ b/swad_database.c
@@ -427,12 +427,15 @@ mysql> DESCRIBE centres;
| PlcCod | int(11) | NO | MUL | -1 | |
| Status | tinyint(4) | NO | MUL | 0 | |
| RequesterUsrCod | int(11) | NO | | -1 | |
+| Latitude | double | NO | | 0 | |
+| Longitude | double | NO | | 0 | |
+| Altitude | double | NO | | 0 | |
| ShortName | varchar(511) | NO | | NULL | |
| FullName | varchar(2047) | NO | | NULL | |
| WWW | varchar(255) | NO | | NULL | |
| PhotoAttribution | text | NO | | NULL | |
+------------------+---------------+------+-----+---------+----------------+
-9 rows in set (0,00 sec)
+12 rows in set (0.00 sec)
*/
DB_CreateTable ("CREATE TABLE IF NOT EXISTS centres ("
"CtrCod INT NOT NULL AUTO_INCREMENT,"
@@ -440,6 +443,9 @@ mysql> DESCRIBE centres;
"PlcCod INT NOT NULL,"
"Status TINYINT NOT NULL DEFAULT 0,"
"RequesterUsrCod INT NOT NULL DEFAULT -1,"
+ "Latitude DOUBLE PRECISION NOT NULL DEFAULT 0,"
+ "Longitude DOUBLE PRECISION NOT NULL DEFAULT 0,"
+ "Altitude DOUBLE PRECISION NOT NULL DEFAULT 0,"
"ShortName VARCHAR(511) COLLATE latin1_spanish_ci NOT NULL," // Hie_MAX_BYTES_SHRT_NAME
"FullName VARCHAR(2047) COLLATE latin1_spanish_ci NOT NULL," // Hie_MAX_BYTES_FULL_NAME
"WWW VARCHAR(255) NOT NULL," // Cns_MAX_BYTES_WWW
@@ -3347,7 +3353,7 @@ static unsigned long DB_QuerySELECTusingQueryStr (char *Query,
unsigned long DB_GetNumRowsTable (const char *Table)
{
- /***** Get total number of centres from database *****/
+ /***** Get total number of rows from database *****/
return DB_QueryCOUNT ("can not get number of rows in table",
"SELECT COUNT(*) FROM %s",
Table);
diff --git a/swad_degree.c b/swad_degree.c
index 6e96f7d7..a26b9faf 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -447,7 +447,7 @@ static void Deg_Configuration (bool PrintView)
/* Form to change degree WWW */
Frm_StartForm (ActChgDegWWWCfg);
HTM_INPUT_URL ("WWW",Gbl.Hierarchy.Deg.WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_WIDE\" required=\"required\"");
Frm_EndForm ();
}
else // I can not change degree WWW
@@ -792,7 +792,7 @@ static void Deg_ListDegreesForEdition (void)
Frm_StartForm (ActChgDegWWW);
Deg_PutParamOtherDegCod (Deg->DegCod);
HTM_INPUT_URL ("WWW",Deg->WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
}
else
@@ -977,7 +977,7 @@ static void Deg_PutFormToCreateDegree (void)
/***** Degree WWW *****/
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_URL ("WWW",Deg_EditingDeg->WWW,false,
- "class=\"INPUT_WWW\" required=\"required\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
/***** Current number of courses in this degree *****/
diff --git a/swad_department.c b/swad_department.c
index 3e7275da..9409d1a9 100644
--- a/swad_department.c
+++ b/swad_department.c
@@ -575,7 +575,7 @@ static void Dpt_ListDepartmentsForEdition (void)
Frm_StartForm (ActChgDptWWW);
Dpt_PutParamDptCod (Dpt->DptCod);
HTM_INPUT_URL ("WWW",Dpt->WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -940,7 +940,7 @@ static void Dpt_PutFormToCreateDepartment (void)
/***** Department WWW *****/
HTM_TD_Begin ("class=\"CM\"");
HTM_INPUT_URL ("WWW",Dpt_EditingDpt->WWW,false,
- "class=\"INPUT_WWW\" required=\"required\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_institution.c b/swad_institution.c
index 520fa015..d661a112 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -461,7 +461,7 @@ static void Ins_Configuration (bool PrintView)
/* Form to change institution WWW */
Frm_StartForm (ActChgInsWWWCfg);
HTM_INPUT_URL ("WWW",Gbl.Hierarchy.Ins.WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_WIDE\" required=\"required\"");
Frm_EndForm ();
}
else // I can not change institution WWW
@@ -1513,7 +1513,7 @@ static void Ins_ListInstitutionsForEdition (void)
Frm_StartForm (ActChgInsWWW);
Ins_PutParamOtherInsCod (Ins->InsCod);
HTM_INPUT_URL ("WWW",Ins->WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
}
@@ -2216,7 +2216,7 @@ static void Ins_PutFormToCreateInstitution (void)
/***** Institution WWW *****/
HTM_TD_Begin ("class=\"LM\"");
HTM_INPUT_URL ("WWW",Ins_EditingIns->WWW,false,
- "class=\"INPUT_WWW\" required=\"required\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
/***** Number of users who claim to belong to this institution ****/
diff --git a/swad_link.c b/swad_link.c
index 65c596b4..4773e650 100644
--- a/swad_link.c
+++ b/swad_link.c
@@ -441,7 +441,7 @@ static void Lnk_ListLinksForEdition (void)
Frm_StartForm (ActRenLnkSho);
Lnk_PutParamLnkCod (Lnk->LnkCod);
HTM_INPUT_TEXT ("ShortName",Lnk_MAX_CHARS_LINK_SHRT_NAME,Lnk->ShrtName,true,
- "class=\"INPUT_SHORT_NAME\"");
+ "class=\"INPUT_SHORT_NAME\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -450,7 +450,7 @@ static void Lnk_ListLinksForEdition (void)
Frm_StartForm (ActRenLnkFul);
Lnk_PutParamLnkCod (Lnk->LnkCod);
HTM_INPUT_TEXT ("FullName",Lnk_MAX_CHARS_LINK_FULL_NAME,Lnk->FullName,true,
- "class=\"INPUT_FULL_NAME\"");
+ "class=\"INPUT_FULL_NAME\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -459,7 +459,7 @@ static void Lnk_ListLinksForEdition (void)
Frm_StartForm (ActChgLnkWWW);
Lnk_PutParamLnkCod (Lnk->LnkCod);
HTM_INPUT_URL ("WWW",Lnk->WWW,true,
- "class=\"INPUT_WWW\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
Frm_EndForm ();
HTM_TD_End ();
@@ -756,7 +756,7 @@ static void Lnk_PutFormToCreateLink (void)
/***** Link WWW *****/
HTM_TD_Begin ("class=\"CM\"");
HTM_INPUT_URL ("WWW",Lnk_EditingLnk->WWW,false,
- "class=\"INPUT_WWW\" required=\"required\"");
+ "class=\"INPUT_WWW_NARROW\" required=\"required\"");
HTM_TD_End ();
HTM_TR_End ();
diff --git a/swad_text.c b/swad_text.c
index 151ca370..4bbd579a 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -1505,6 +1505,27 @@ const char *Txt_Already_existed_an_event_with_the_title_X = // Warning: it is ve
"Já existe um evento com o título %s.";
#endif
+const char *Txt_Altitude =
+#if L==1 // ca
+ "Altitud";
+#elif L==2 // de
+ "Höhe";
+#elif L==3 // en
+ "Altitude";
+#elif L==4 // es
+ "Altitud";
+#elif L==5 // fr
+ "Altitude";
+#elif L==6 // gn
+ "Altitud"; // Okoteve traducción
+#elif L==7 // it
+ "Altitudine";
+#elif L==8 // pl
+ "Wysokość bezwzględna";
+#elif L==9 // pt
+ "Altitude";
+#endif
+
const char *Txt_and =
#if L==1 // ca
"i";
@@ -9328,6 +9349,27 @@ const char *Txt_Do_you_want_to_follow_the_X_selected_users_whom_you_do_not_follo
"Você quer seguir os %u usuários selecionados que você não segue ainda?";
#endif
+const char *Txt_Do_you_want_to_lock_the_editing_of_the_X_selected_projects = // Warning: it is very important to include %u in the following sentences
+#if L==1 // ca
+ "Voleu bloquejar l'edición dels %u projectes seleccionats?";
+#elif L==2 // de
+ "Möchten Sie die Bearbeitung der ausgewählten %u-Projekte sperren?";
+#elif L==3 // en
+ "Do you want to lock the editing of the %u selected projects?";
+#elif L==4 // es
+ "¿Desea bloquear la edición de los %u proyectos seleccionados?";
+#elif L==5 // fr
+ "Voulez-vous verrouiller l'édition des %u projets sélectionnés?";
+#elif L==6 // gn
+ "¿Desea bloquear la edición de los %u proyectos seleccionados?"; // Okoteve traducción
+#elif L==7 // it
+ "Vuoi bloccare la modifica dei %u progetti selezionati?";
+#elif L==8 // pl
+ "Czy chcesz zablokować edycję %u wybranych projektów?";
+#elif L==9 // pt
+ "Você quer bloquear a edição dos %u projetos selecionados?";
+#endif
+
const char *Txt_Do_you_want_to_stop_following_the_selected_user_whom_you_follow =
#if L==1 // ca
"Voleu deixar de seguir a l'usuari seleccionat a qui segueix?";
@@ -9370,6 +9412,27 @@ const char *Txt_Do_you_want_to_stop_following_the_X_selected_users_whom_you_foll
"Você quer parar de seguir os %u usuários selecionados que você segue?";
#endif
+const char *Txt_Do_you_want_to_unlock_the_editing_of_the_X_selected_projects = // Warning: it is very important to include %u in the following sentences
+#if L==1 // ca
+ "Voleu desbloquejar l'edició dels %u projectes seleccionats?";
+#elif L==2 // de
+ "Möchten Sie die Bearbeitung der ausgewählten %u-Projekte freischalten?";
+#elif L==3 // en
+ "Do you want to unlock the editing of the %u selected projects?";
+#elif L==4 // es
+ "¿Desea desbloquear la edición de los %u proyectos seleccionados?";
+#elif L==5 // fr
+ "Voulez-vous déverrouiller l'édition des %u projets sélectionnés?";
+#elif L==6 // gn
+ "¿Desea desbloquear la edición de los %u proyectos seleccionados?"; // Okoteve traducción
+#elif L==7 // it
+ "Vuoi sbloccare la modifica dei %u progetti selezionati?";
+#elif L==8 // pl
+ "Czy chcesz odblokować edycję %u wybranych projektów?";
+#elif L==9 // pt
+ "Você quer desbloquear a edição dos %u projetos selecionados?";
+#endif
+
const char *Txt_Document =
#if L==1 // ca
"Document";
@@ -17103,6 +17166,27 @@ const char *Txt_Last_clicks_in_real_time =
"Últimos cliques em tempo real";
#endif
+const char *Txt_Latitude =
+#if L==1 // ca
+ "Latitud";
+#elif L==2 // de
+ "Geographische Breite";
+#elif L==3 // en
+ "Latitude";
+#elif L==4 // es
+ "Latitud";
+#elif L==5 // fr
+ "Latitude";
+#elif L==6 // gn
+ "Latitud"; // Okoteve traducción
+#elif L==7 // it
+ "Latitudine";
+#elif L==8 // pl
+ "Szerokość geograficzna";
+#elif L==9 // pt
+ "Latitude";
+#endif
+
const char *Txt_LAYOUT_SIDE_COLUMNS[4] =
{
#if L==1 // ca
@@ -17780,69 +17864,6 @@ const char *Txt_Lock_editing =
"Bloquear edição";
#endif
-const char *Txt_Unlock_editing =
-#if L==1 // ca
- "Desbloquejar edició";
-#elif L==2 // de
- "Bearbeitung freischalten";
-#elif L==3 // en
- "Unlock editing";
-#elif L==4 // es
- "Desbloquear edición";
-#elif L==5 // fr
- "Déverrouiller l'édition";
-#elif L==6 // gn
- "Desbloquear edición"; // Okoteve traducción
-#elif L==7 // it
- "Sblocca la modifica";
-#elif L==8 // pl
- "Odblokuj edycję";
-#elif L==9 // pt
- "Desbloquear edição";
-#endif
-
-const char *Txt_Do_you_want_to_lock_the_editing_of_the_X_selected_projects = // Warning: it is very important to include %u in the following sentences
-#if L==1 // ca
- "Voleu bloquejar l'edición dels %u projectes seleccionats?";
-#elif L==2 // de
- "Möchten Sie die Bearbeitung der ausgewählten %u-Projekte sperren?";
-#elif L==3 // en
- "Do you want to lock the editing of the %u selected projects?";
-#elif L==4 // es
- "¿Desea bloquear la edición de los %u proyectos seleccionados?";
-#elif L==5 // fr
- "Voulez-vous verrouiller l'édition des %u projets sélectionnés?";
-#elif L==6 // gn
- "¿Desea bloquear la edición de los %u proyectos seleccionados?"; // Okoteve traducción
-#elif L==7 // it
- "Vuoi bloccare la modifica dei %u progetti selezionati?";
-#elif L==8 // pl
- "Czy chcesz zablokować edycję %u wybranych projektów?";
-#elif L==9 // pt
- "Você quer bloquear a edição dos %u projetos selecionados?";
-#endif
-
-const char *Txt_Do_you_want_to_unlock_the_editing_of_the_X_selected_projects = // Warning: it is very important to include %u in the following sentences
-#if L==1 // ca
- "Voleu desbloquejar l'edició dels %u projectes seleccionats?";
-#elif L==2 // de
- "Möchten Sie die Bearbeitung der ausgewählten %u-Projekte freischalten?";
-#elif L==3 // en
- "Do you want to unlock the editing of the %u selected projects?";
-#elif L==4 // es
- "¿Desea desbloquear la edición de los %u proyectos seleccionados?";
-#elif L==5 // fr
- "Voulez-vous déverrouiller l'édition des %u projets sélectionnés?";
-#elif L==6 // gn
- "¿Desea desbloquear la edición de los %u proyectos seleccionados?"; // Okoteve traducción
-#elif L==7 // it
- "Vuoi sbloccare la modifica dei %u progetti selezionati?";
-#elif L==8 // pl
- "Czy chcesz odblokować edycję %u wybranych projektów?";
-#elif L==9 // pt
- "Você quer desbloquear a edição dos %u projetos selecionados?";
-#endif
-
const char *Txt_LOG_More_info =
#if L==1 // ca
"Observaciones"; // Necessita traduccio
@@ -18014,6 +18035,27 @@ const char *Txt_Logo =
"Logotipo";
#endif
+const char *Txt_Longitude =
+#if L==1 // ca
+ "Longitud";
+#elif L==2 // de
+ "Geographische Länge";
+#elif L==3 // en
+ "Longitude";
+#elif L==4 // es
+ "Longitud";
+#elif L==5 // fr
+ "Longitude";
+#elif L==6 // gn
+ "Longitud"; // Okoteve traducción
+#elif L==7 // it
+ "Longitudine";
+#elif L==8 // pl
+ "Długość geograficzna";
+#elif L==9 // pt
+ "Longitude";
+#endif
+
const char *Txt_Mandatory_enrolment = // (to a type of group)
#if L==1 // ca
"¿Adscripción obligatoria?"; // Necessita traduccio
@@ -46464,6 +46506,27 @@ const char *Txt_The_name_of_the_type_of_group_X_has_not_changed = // Warning: it
"O nome do tipo de grupo %s nã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 és %lg.";
+#elif L==2 // de
+ "Die neue Höhe ist %lg.";
+#elif L==3 // en
+ "The new altitude is %lg.";
+#elif L==4 // es
+ "La nueva altitud es %lg.";
+#elif L==5 // fr
+ "La nouvelle altitude est %lg.";
+#elif L==6 // gn
+ "La nueva altitud es %lg."; // Okoteve traducción
+#elif L==7 // it
+ "La nuova altitudine è %lg.";
+#elif L==8 // pl
+ "Nowa wysokość wynosi %lg.";
+#elif L==9 // pt
+ "O nova altitude é %lg.";
+#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ón IP es %s."; // Necessita traduccio
@@ -46485,6 +46548,27 @@ const char *Txt_The_new_IP_address_is_X = // Warning: it is very important to in
"O novo endereço IP é %s.";
#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 és %lg.";
+#elif L==2 // de
+ "Der neue Breitengrad ist %lg.";
+#elif L==3 // en
+ "The new latitude is %lg.";
+#elif L==4 // es
+ "La nueva latitud es %lg.";
+#elif L==5 // fr
+ "La nouvelle latitude est %lg.";
+#elif L==6 // gn
+ "La nueva latitud es %lg."; // Okoteve traducción
+#elif L==7 // it
+ "La nuova latitudine è %lg.";
+#elif L==8 // pl
+ "Nowa szerokość geograficzna wynosi %lg.";
+#elif L==9 // pt
+ "O nova latitude é %lg.";
+#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 %s."; // Necessita traduccio
@@ -46506,6 +46590,27 @@ const char *Txt_The_new_logo_is_X = // Warning: it is very important to include
"O novo logotipo é %s.";
#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 és %lg.";
+#elif L==2 // de
+ "Der neue Längengrad ist %lg.";
+#elif L==3 // en
+ "The new longitude is %lg.";
+#elif L==4 // es
+ "La nueva longitud es %lg.";
+#elif L==5 // fr
+ "La nouvelle longitude est %lg.";
+#elif L==6 // gn
+ "La nueva longitud es %lg."; // Okoteve traducción
+#elif L==7 // it
+ "La nuova longitudine è %lg.";
+#elif L==8 // pl
+ "Nowa długość geograficzna wynosi %lg.";
+#elif L==9 // pt
+ "O nova longitude é %lg.";
+#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 @%s"
@@ -51962,6 +52067,27 @@ const char *Txt_unknown_TIME =
"desconhecido";
#endif
+const char *Txt_Unlock_editing =
+#if L==1 // ca
+ "Desbloquejar edició";
+#elif L==2 // de
+ "Bearbeitung freischalten";
+#elif L==3 // en
+ "Unlock editing";
+#elif L==4 // es
+ "Desbloquear edición";
+#elif L==5 // fr
+ "Déverrouiller l'édition";
+#elif L==6 // gn
+ "Desbloquear edición"; // Okoteve traducción
+#elif L==7 // it
+ "Sblocca la modifica";
+#elif L==8 // pl
+ "Odblokuj edycję";
+#elif L==9 // pt
+ "Desbloquear edição";
+#endif
+
const char *Txt_unread_MESSAGE =
#if L==1 // ca
"no leído"; // Necessita traduccio
@@ -54948,7 +55074,28 @@ const char *Txt_You_can_not_leave_the_description_empty =
#elif L==9 // pt
"Você não pode deixar a descrição vazia.";
#endif
-
+/*
+const char *Txt_You_can_not_leave_the_field_empty =
+#if L==1 // ca
+ "No podeu deixar el camp buit.";
+#elif L==2 // de
+ "Sie können das Feld nicht leer lassen.";
+#elif L==3 // en
+ "You can not leave the field empty.";
+#elif L==4 // es
+ "No puede dejar el campo vacío.";
+#elif L==5 // fr
+ "Vous ne pouvez pas laisser le champ vide.";
+#elif L==6 // gn
+ "No puede dejar el campo vacío."; // Okoteve traducción
+#elif L==7 // it
+ "Non puoi lasciare il campo vuoto.";
+#elif L==8 // pl
+ "Nie możesz zostawić pola pustego.";
+#elif L==9 // pt
+ "Você não pode deixar o campo vazio.";
+#endif
+*/
const char *Txt_You_can_not_leave_the_image_empty =
#if L==1 // ca
"No puede dejar la imagen vacía."; // Necessita traduccio
diff --git a/swad_user.c b/swad_user.c
index 585129e4..1950f753 100644
--- a/swad_user.c
+++ b/swad_user.c
@@ -2700,6 +2700,8 @@ void Usr_WelcomeUsr (void)
Ale_WARNING,Txt_Please_check_your_email_address);
}
+ /***** Games tool *****/
+ /*
Ale_ShowAlert (Ale_INFO,
"Herramienta "
"Evaluación > Juegos
"
@@ -2709,6 +2711,7 @@ void Usr_WelcomeUsr (void)
"
"
"
"
"");
+ */
/***** Institutional video *****/
/*