diff --git a/sql/swad.sql b/sql/swad.sql
index d09dfed13..054ef93f1 100644
--- a/sql/swad.sql
+++ b/sql/swad.sql
@@ -1140,7 +1140,6 @@ CREATE TABLE IF NOT EXISTS rooms (
ShortName VARCHAR(511) NOT NULL,
FullName VARCHAR(2047) NOT NULL,
Capacity INT NOT NULL,
- Location VARCHAR(2047) NOT NULL,
UNIQUE INDEX(RooCod),
INDEX(CtrCod,BldCod,Floor));
--
diff --git a/swad_action.c b/swad_action.c
index e0ae4b5bb..2f7ab1eb3 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -367,7 +367,6 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
[ActRenRooSho ] = {1748,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_RenameRoomShort ,Roo_ContEditAfterChgRoom ,NULL},
[ActRenRooFul ] = {1749,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_RenameRoomFull ,Roo_ContEditAfterChgRoom ,NULL},
[ActChgRooMaxUsr ] = {1750,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_ChangeCapacity ,Roo_ContEditAfterChgRoom ,NULL},
- [ActRenRooLoc ] = {1751,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_ChangeRoomLocation ,Roo_ContEditAfterChgRoom ,NULL},
// TabDeg ******************************************************************
// Actions in menu:
@@ -3499,7 +3498,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un
ActRenRooSho, // #1748
ActRenRooFul, // #1749
ActChgRooMaxUsr, // #1750
- ActRenRooLoc, // #1751
+ -1, // #1751 (obsolete action)
ActChgGrpRoo, // #1752
ActDoActOnSevGst, // #1753
ActDoActOnSevStd, // #1754
diff --git a/swad_action.h b/swad_action.h
index 87ca333fa..7e71a85aa 100644
--- a/swad_action.h
+++ b/swad_action.h
@@ -344,34 +344,33 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActRenRooSho (ActRenHld + 45)
#define ActRenRooFul (ActRenHld + 46)
#define ActChgRooMaxUsr (ActRenHld + 47)
-#define ActRenRooLoc (ActRenHld + 48)
/*****************************************************************************/
/********************************* Degree tab ********************************/
/*****************************************************************************/
// Actions in menu
-#define ActSeeDegInf (ActRenRooLoc + 1)
-#define ActSeeCrs (ActRenRooLoc + 2)
+#define ActSeeDegInf (ActChgRooMaxUsr + 1)
+#define ActSeeCrs (ActChgRooMaxUsr + 2)
// Secondary actions
-#define ActPrnDegInf (ActRenRooLoc + 3)
-#define ActChgDegCtrCfg (ActRenRooLoc + 4)
-#define ActRenDegShoCfg (ActRenRooLoc + 5)
-#define ActRenDegFulCfg (ActRenRooLoc + 6)
-#define ActChgDegWWWCfg (ActRenRooLoc + 7)
-#define ActReqDegLog (ActRenRooLoc + 8)
-#define ActRecDegLog (ActRenRooLoc + 9)
-#define ActRemDegLog (ActRenRooLoc + 10)
+#define ActPrnDegInf (ActChgRooMaxUsr + 3)
+#define ActChgDegCtrCfg (ActChgRooMaxUsr + 4)
+#define ActRenDegShoCfg (ActChgRooMaxUsr + 5)
+#define ActRenDegFulCfg (ActChgRooMaxUsr + 6)
+#define ActChgDegWWWCfg (ActChgRooMaxUsr + 7)
+#define ActReqDegLog (ActChgRooMaxUsr + 8)
+#define ActRecDegLog (ActChgRooMaxUsr + 9)
+#define ActRemDegLog (ActChgRooMaxUsr + 10)
-#define ActEdiCrs (ActRenRooLoc + 11)
-#define ActReqCrs (ActRenRooLoc + 12)
-#define ActNewCrs (ActRenRooLoc + 13)
-#define ActRemCrs (ActRenRooLoc + 14)
-#define ActChgInsCrsCod (ActRenRooLoc + 15)
-#define ActChgCrsYea (ActRenRooLoc + 16)
-#define ActRenCrsSho (ActRenRooLoc + 17)
-#define ActRenCrsFul (ActRenRooLoc + 18)
-#define ActChgCrsSta (ActRenRooLoc + 19)
+#define ActEdiCrs (ActChgRooMaxUsr + 11)
+#define ActReqCrs (ActChgRooMaxUsr + 12)
+#define ActNewCrs (ActChgRooMaxUsr + 13)
+#define ActRemCrs (ActChgRooMaxUsr + 14)
+#define ActChgInsCrsCod (ActChgRooMaxUsr + 15)
+#define ActChgCrsYea (ActChgRooMaxUsr + 16)
+#define ActRenCrsSho (ActChgRooMaxUsr + 17)
+#define ActRenCrsFul (ActChgRooMaxUsr + 18)
+#define ActChgCrsSta (ActChgRooMaxUsr + 19)
/*****************************************************************************/
/******************************** Course tab *********************************/
diff --git a/swad_changelog.h b/swad_changelog.h
index 14ce8e5ea..2e8d0854a 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -497,7 +497,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.187 (2020-04-15)"
+#define Log_PLATFORM_VERSION "SWAD 19.188 (2020-04-15)"
#define CSS_FILE "swad19.187.css"
#define JS_FILE "swad19.172.1.js"
/*
@@ -548,6 +548,10 @@ Funci
// TODO: Oresti Baños: cambiar ojos por candados en descriptores para prohibir/permitir y dejar los ojos para poder elegir descriptores
// TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub
+ Version 19.188: Apr 15, 2020 Changes in listing and edition of rooms. (287713 lines)
+ 1 change necessary in database:
+ALTER TABLE rooms DROP COLUMN Location;
+
Version 19.187: Apr 15, 2020 New columns in rooms for building and floor. Not finished. (287671 lines)
3 changes necessary in database:
ALTER TABLE rooms ADD COLUMN BldCod INT NOT NULL DEFAULT -1 AFTER CtrCod;
diff --git a/swad_database.c b/swad_database.c
index f8a7fde60..5aa5fb082 100644
--- a/swad_database.c
+++ b/swad_database.c
@@ -2364,9 +2364,8 @@ mysql> DESCRIBE rooms;
| ShortName | varchar(511) | NO | | NULL | |
| FullName | varchar(2047) | NO | | NULL | |
| Capacity | int(11) | NO | | NULL | |
-| Location | varchar(2047) | NO | | NULL | |
+-----------+---------------+------+-----+---------+----------------+
-8 rows in set (0.00 sec)
+7 rows in set (0.00 sec)
*/
DB_CreateTable ("CREATE TABLE IF NOT EXISTS rooms ("
"RooCod INT NOT NULL AUTO_INCREMENT,"
@@ -2376,7 +2375,6 @@ mysql> DESCRIBE rooms;
"ShortName VARCHAR(511) NOT NULL," // Roo_MAX_BYTES_SHRT_NAME
"FullName VARCHAR(2047) NOT NULL," // Roo_MAX_BYTES_FULL_NAME
"Capacity INT NOT NULL,"
- "Location VARCHAR(2047) NOT NULL," // Roo_MAX_BYTES_LOCATION
"UNIQUE INDEX(RooCod),"
"INDEX(CtrCod,BldCod,Floor))");
diff --git a/swad_room.c b/swad_room.c
index a88c9e2e1..4421ac7e5 100644
--- a/swad_room.c
+++ b/swad_room.c
@@ -67,13 +67,18 @@ static void Roo_PutIconsListingRooms (__attribute__((unused)) void *Args);
static void Roo_PutIconToEditRooms (void);
static void Roo_PutIconsEditingRooms (__attribute__((unused)) void *Args);
+static void Roo_GetDataOfRoomByCod (struct Roo_Room *Room);
+static void Roo_GetBldShrtName (struct Roo_Room *Room,const char *BldShrtNameFromDB);
+
static void Roo_EditRoomsInternal (void);
static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
const struct Roo_Rooms *Rooms);
static void Roo_PutSelectorBuilding (long BldCod,
- const struct Bld_Buildings *Buildings);
+ const struct Bld_Buildings *Buildings,
+ bool SubmitOnChange);
static void Roo_PutParamRooCod (long RooCod);
+static int Roo_GetParamFloor (void);
static void Roo_RenameRoom (Cns_ShrtOrFullName_t ShrtOrFullName);
static bool Roo_CheckIfRoomNameExists (const char *FieldName,const char *Name,long RooCod);
@@ -83,7 +88,7 @@ static void Roo_WriteCapacity (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigne
static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings);
static void Roo_PutHeadRooms (void);
-static void Roo_CreateRoom (struct Roo_Room *Room);
+static void Roo_CreateRoom (const struct Roo_Room *Room);
static void Roo_EditingRoomConstructor (void);
static void Roo_EditingRoomDestructor (void);
@@ -161,6 +166,16 @@ void Roo_SeeRooms (void)
{
HTM_TR_Begin (NULL);
+ /* Building short name */
+ HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]);
+ HTM_Txt (Rooms.Lst[NumRoom].BldShrtName);
+ HTM_TD_End ();
+
+ /* Floor */
+ HTM_TD_Begin ("class=\"DAT RM %s\"",Gbl.ColorRows[RowEvenOdd]);
+ HTM_Int (Rooms.Lst[NumRoom].Floor);
+ HTM_TD_End ();
+
/* Short name */
HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]);
HTM_Txt (Rooms.Lst[NumRoom].ShrtName);
@@ -177,11 +192,6 @@ void Roo_SeeRooms (void)
HTM_Txt (StrCapacity);
HTM_TD_End ();
- /* Location */
- HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]);
- HTM_Txt (Rooms.Lst[NumRoom].Location);
- HTM_TD_End ();
-
HTM_TR_End ();
}
@@ -329,10 +339,11 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms,
{
static const char *OrderBySubQuery[Roo_NUM_ORDERS] =
{
- [Roo_ORDER_BY_SHRT_NAME] = "ShortName",
- [Roo_ORDER_BY_FULL_NAME] = "FullName",
- [Roo_ORDER_BY_CAPACITY ] = "Capacity DESC,ShortName",
- [Roo_ORDER_BY_LOCATION ] = "Location,ShortName",
+ [Roo_ORDER_BY_BUILDING ] = "buildings.ShortName,rooms.Floor,rooms.ShortName",
+ [Roo_ORDER_BY_FLOOR ] = "rooms.Floor,buildings.ShortName,rooms.ShortName",
+ [Roo_ORDER_BY_SHRT_NAME] = "rooms.ShortName,rooms.FullName",
+ [Roo_ORDER_BY_FULL_NAME] = "rooms.FullName,rooms.ShortName",
+ [Roo_ORDER_BY_CAPACITY ] = "rooms.Capacity DESC,rooms.ShortName",
};
MYSQL_RES *mysql_res;
MYSQL_ROW row;
@@ -345,15 +356,16 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms,
{
case Roo_ALL_DATA:
NumRows = DB_QuerySELECT (&mysql_res,"can not get rooms",
- "SELECT RooCod," // row[0]
- "ShortName," // row[1]
- "BldCod," // row[2]
- "Floor," // row[3]
- "FullName," // row[4]
- "Capacity," // row[5]
- "Location" // row[6]
- " FROM rooms"
- " WHERE CtrCod=%ld"
+ "SELECT rooms.RooCod," // row[0]
+ "rooms.BldCod," // row[1]
+ "buildings.ShortName," // row[2]
+ "rooms.Floor," // row[3]
+ "rooms.ShortName," // row[4]
+ "rooms.FullName," // row[5]
+ "rooms.Capacity" // row[6]
+ " FROM rooms LEFT JOIN buildings"
+ " ON rooms.BldCod=buildings.BldCod"
+ " WHERE rooms.CtrCod=%ld"
" ORDER BY %s",
Gbl.Hierarchy.Ctr.CtrCod,
OrderBySubQuery[Rooms->SelectedOrder]);
@@ -361,12 +373,14 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms,
case Roo_ONLY_SHRT_NAME:
default:
NumRows = DB_QuerySELECT (&mysql_res,"can not get rooms",
- "SELECT RooCod," // row[0]
- "ShortName" // row[1]
- " FROM rooms"
- " WHERE CtrCod=%ld"
- " ORDER BY ShortName",
- Gbl.Hierarchy.Ctr.CtrCod);
+ "SELECT rooms.RooCod," // row[0]
+ "rooms.ShortName" // row[1]
+ " FROM rooms LEFT JOIN buildings"
+ " ON rooms.BldCod=buildings.BldCod"
+ " WHERE rooms.CtrCod=%ld"
+ " ORDER BY %s",
+ Gbl.Hierarchy.Ctr.CtrCod,
+ OrderBySubQuery[Roo_ORDER_DEFAULT]);
break;
}
@@ -395,29 +409,36 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms,
if ((Room->RooCod = Str_ConvertStrCodToLongCod (row[0])) < 0)
Lay_ShowErrorAndExit ("Wrong code of room.");
- /* Get the short name of the room (row[1]) */
- Str_Copy (Room->ShrtName,row[1],
- Roo_MAX_BYTES_SHRT_NAME);
+ switch (WhichData)
+ {
+ case Roo_ALL_DATA:
+ /* Get building code (row[1]) */
+ Room->BldCod = Str_ConvertStrCodToLongCod (row[1]);
- if (WhichData == Roo_ALL_DATA)
- {
- /* Get building code (row[2]) */
- Room->BldCod = Str_ConvertStrCodToLongCod (row[2]);
+ /* Get the short name of the building (row[2]) */
+ Roo_GetBldShrtName (Room,row[2]);
- /* Get floor (row[3]) */
- Room->Floor = Str_ConvertStrCodToLongCod (row[3]);
+ /* Get floor (row[3]) */
+ Room->Floor = Str_ConvertStrCodToLongCod (row[3]);
- /* Get the full name of the room (row[4]) */
- Str_Copy (Room->FullName,row[4],
- Roo_MAX_BYTES_FULL_NAME);
+ /* Get the short name of the room (row[4]) */
+ Str_Copy (Room->ShrtName,row[4],
+ Roo_MAX_BYTES_SHRT_NAME);
- /* Get seating capacity in this room (row[5]) */
- if (sscanf (row[5],"%u",&Room->Capacity) != 1)
- Room->Capacity = Roo_UNLIMITED_CAPACITY;
+ /* Get the full name of the room (row[5]) */
+ Str_Copy (Room->FullName,row[5],
+ Roo_MAX_BYTES_FULL_NAME);
- /* Get the full name of the room (row[6]) */
- Str_Copy (Room->Location,row[6],
- Roo_MAX_BYTES_LOCATION);
+ /* Get seating capacity in this room (row[6]) */
+ if (sscanf (row[6],"%u",&Room->Capacity) != 1)
+ Room->Capacity = Roo_UNLIMITED_CAPACITY;
+ break;
+ case Roo_ONLY_SHRT_NAME:
+ default:
+ /* Get the short name of the room (row[1]) */
+ Str_Copy (Room->ShrtName,row[1],
+ Roo_MAX_BYTES_SHRT_NAME);
+ break;
}
}
}
@@ -429,67 +450,85 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms,
}
/*****************************************************************************/
-/***************************** Get room full name ****************************/
+/************* Get room data from database using the room code ***************/
/*****************************************************************************/
-void Roo_GetDataOfRoomByCod (struct Roo_Room *Room)
+static void Roo_GetDataOfRoomByCod (struct Roo_Room *Room)
{
MYSQL_RES *mysql_res;
MYSQL_ROW row;
unsigned long NumRows;
- /***** Clear data *****/
- Room->ShrtName[0] = '\0';
- Room->FullName[0] = '\0';
- Room->Capacity = Roo_UNLIMITED_CAPACITY;
- Room->Location[0] = '\0';
+ /***** Trivial check *****/
+ if (Room->RooCod <= 0)
+ return;
- /***** Check if room code is correct *****/
- if (Room->RooCod > 0)
+ /***** Get data of a room from database *****/
+ NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a room",
+ "SELECT rooms.BldCod," // row[0]
+ "buildings.ShortName," // row[1]
+ "rooms.Floor," // row[2]
+ "rooms.ShortName," // row[3]
+ "rooms.FullName," // row[4]
+ "rooms.Capacity" // row[5]
+ " FROM rooms LEFT JOIN buildings"
+ " ON rooms.BldCod=buildings.BldCod"
+ " WHERE rooms.RooCod=%ld",
+ Room->RooCod);
+
+ /***** Count number of rows in result *****/
+ if (NumRows) // Room found...
{
- /***** Get data of a room from database *****/
- NumRows = DB_QuerySELECT (&mysql_res,"can not get data of a room",
- "SELECT BldCod," // row[0]
- "Floor," // row[1]
- "ShortName," // row[2]
- "FullName," // row[3]
- "Capacity," // row[4]
- "Location" // row[5]
- " FROM rooms"
- " WHERE RooCod=%ld",
- Room->RooCod);
+ /* Get row */
+ row = mysql_fetch_row (mysql_res);
- /***** Count number of rows in result *****/
- if (NumRows) // Room found...
- {
- /* Get row */
- row = mysql_fetch_row (mysql_res);
+ /* Get building code (row[0]) */
+ Room->BldCod = Str_ConvertStrCodToLongCod (row[0]);
- /* Get building code (row[0]) */
- Room->BldCod = Str_ConvertStrCodToLongCod (row[0]);
+ /* Get the short name of the building (row[1]) */
+ Roo_GetBldShrtName (Room,row[1]);
- /* Get floor (row[1]) */
- Room->Floor = Str_ConvertStrCodToLongCod (row[1]);
+ /* Get floor (row[2]) */
+ Room->Floor = Str_ConvertStrCodToLongCod (row[2]);
- /* Get the short name of the room (row[2]) */
- Str_Copy (Room->ShrtName,row[2],
- Roo_MAX_BYTES_SHRT_NAME);
+ /* Get the short name of the room (row[3]) */
+ Str_Copy (Room->ShrtName,row[3],
+ Roo_MAX_BYTES_SHRT_NAME);
- /* Get the full name of the room (row[3]) */
- Str_Copy (Room->FullName,row[3],
- Roo_MAX_BYTES_FULL_NAME);
+ /* Get the full name of the room (row[4]) */
+ Str_Copy (Room->FullName,row[4],
+ Roo_MAX_BYTES_FULL_NAME);
- /* Get seating capacity in this room (row[4]) */
- if (sscanf (row[4],"%u",&Room->Capacity) != 1)
- Room->Capacity = Roo_UNLIMITED_CAPACITY;
+ /* Get seating capacity in this room (row[5]) */
+ if (sscanf (row[5],"%u",&Room->Capacity) != 1)
+ Room->Capacity = Roo_UNLIMITED_CAPACITY;
+ }
- /* Get the location of the room (row[5]) */
- Str_Copy (Room->Location,row[5],
- Roo_MAX_BYTES_LOCATION);
- }
+ /***** Free structure that stores the query result *****/
+ DB_FreeMySQLResult (&mysql_res);
+ }
- /***** Free structure that stores the query result *****/
- DB_FreeMySQLResult (&mysql_res);
+/*****************************************************************************/
+/****************** Get building short name from database ********************/
+/*****************************************************************************/
+
+static void Roo_GetBldShrtName (struct Roo_Room *Room,const char *BldShrtNameFromDB)
+ {
+ extern const char *Txt_No_assigned_building;
+ extern const char *Txt_Another_building;
+
+ if (Room->BldCod < 0)
+ Str_Copy (Room->BldShrtName,Txt_No_assigned_building,
+ Bld_MAX_BYTES_SHRT_NAME);
+ else if (Room->BldCod == 0)
+ Str_Copy (Room->BldShrtName,Txt_Another_building,
+ Bld_MAX_BYTES_SHRT_NAME);
+ else // Room->BldCod > 0
+ {
+ Room->BldShrtName[0] = '\0';
+ if (BldShrtNameFromDB)
+ Str_Copy (Room->BldShrtName,BldShrtNameFromDB,
+ Bld_MAX_BYTES_SHRT_NAME);
}
}
@@ -549,7 +588,8 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
HTM_TD_Begin ("class=\"CM\"");
Frm_StartForm (ActChgRooBld);
Roo_PutParamRooCod (Room->RooCod);
- Roo_PutSelectorBuilding (Room->BldCod,Buildings);
+ Roo_PutSelectorBuilding (Room->BldCod,Buildings,
+ true); // Submit on change
Frm_EndForm ();
HTM_TD_End ();
@@ -590,15 +630,6 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
Frm_EndForm ();
HTM_TD_End ();
- /* Room location */
- HTM_TD_Begin ("class=\"LM\"");
- Frm_StartForm (ActRenRooLoc);
- Roo_PutParamRooCod (Room->RooCod);
- HTM_INPUT_TEXT ("Location",Roo_MAX_CHARS_LOCATION,Room->Location,true,
- "size=\"15\" class=\"INPUT_FULL_NAME\"");
- Frm_EndForm ();
- HTM_TD_End ();
-
HTM_TR_End ();
}
@@ -611,14 +642,15 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings,
/*****************************************************************************/
static void Roo_PutSelectorBuilding (long BldCod,
- const struct Bld_Buildings *Buildings)
+ const struct Bld_Buildings *Buildings,
+ bool SubmitOnChange)
{
extern const char *Txt_No_assigned_building;
extern const char *Txt_Another_building;
unsigned NumBld;
/***** Begin selector *****/
- HTM_SELECT_Begin (true,
+ HTM_SELECT_Begin (SubmitOnChange,
"name=\"BldCod\" class=\"BLD_SEL\"");
/***** Option for no assigned building *****/
@@ -662,6 +694,16 @@ long Roo_GetParamRooCod (void)
return Par_GetParToLong ("RooCod");
}
+/*****************************************************************************/
+/************************** Get parameter with floor *************************/
+/*****************************************************************************/
+
+static int Roo_GetParamFloor (void)
+ {
+ /***** Get code of room *****/
+ return (int) Par_GetParToLong ("Floor");
+ }
+
/*****************************************************************************/
/******************************** Remove a room ******************************/
/*****************************************************************************/
@@ -716,8 +758,8 @@ void Roo_RemoveAllRoomsInCtr (long CtrCod)
void Roo_ChangeBuilding (void)
{
- extern const char *Txt_The_capacity_of_room_X_has_not_changed;
- extern const char *Txt_The_capacity_of_room_X_is_now_Y;
+ extern const char *Txt_The_building_of_room_X_has_not_changed;
+ extern const char *Txt_The_building_of_room_X_is_now_Y;
long NewBldCod;
/***** Room constructor *****/
@@ -729,7 +771,7 @@ void Roo_ChangeBuilding (void)
Lay_ShowErrorAndExit ("Code of room is missing.");
/* Get the building of the room */
- NewBldCod = Par_GetParToLong ("BldCod");
+ NewBldCod = Bld_GetParamBldCod ();
/***** Get data of the room from database *****/
Roo_GetDataOfRoomByCod (Roo_EditingRoom);
@@ -742,7 +784,7 @@ void Roo_ChangeBuilding (void)
if (NewBldCod == Roo_EditingRoom->BldCod)
/***** Message to show no changes made *****/
Ale_CreateAlert (Ale_INFO,NULL,
- Txt_The_capacity_of_room_X_has_not_changed, // TODO: Change
+ Txt_The_building_of_room_X_has_not_changed,
Roo_EditingRoom->FullName);
else
{
@@ -750,12 +792,14 @@ void Roo_ChangeBuilding (void)
DB_QueryUPDATE ("can not update the capacity of a room",
"UPDATE rooms SET BldCod=%ld WHERE RooCod=%ld",
NewBldCod,Roo_EditingRoom->RooCod);
- Roo_EditingRoom->BldCod = NewBldCod;
+
+ /***** Get updated data of the room from database *****/
+ Roo_GetDataOfRoomByCod (Roo_EditingRoom);
/***** Message to show the change made *****/
Ale_CreateAlert (Ale_SUCCESS,NULL,
- Txt_The_capacity_of_room_X_is_now_Y, // TODO: Change
- Roo_EditingRoom->FullName,0);
+ Txt_The_building_of_room_X_is_now_Y,
+ Roo_EditingRoom->FullName,Roo_EditingRoom->BldShrtName);
}
}
@@ -765,8 +809,8 @@ void Roo_ChangeBuilding (void)
void Roo_ChangeFloor (void)
{
- extern const char *Txt_The_capacity_of_room_X_has_not_changed;
- extern const char *Txt_The_capacity_of_room_X_is_now_Y;
+ extern const char *Txt_The_floor_of_room_X_has_not_changed;
+ extern const char *Txt_The_floor_of_room_X_is_now_Y;
int NewFloor;
/***** Room constructor *****/
@@ -778,7 +822,7 @@ void Roo_ChangeFloor (void)
Lay_ShowErrorAndExit ("Code of room is missing.");
/* Get the floor of the room */
- NewFloor = Par_GetParToLong ("Floor");
+ NewFloor = Roo_GetParamFloor ();
/***** Get data of the room from database *****/
Roo_GetDataOfRoomByCod (Roo_EditingRoom);
@@ -788,7 +832,7 @@ void Roo_ChangeFloor (void)
if (NewFloor == Roo_EditingRoom->Floor)
/***** Message to show no changes made *****/
Ale_CreateAlert (Ale_INFO,NULL,
- Txt_The_capacity_of_room_X_has_not_changed, // TODO: Change
+ Txt_The_floor_of_room_X_has_not_changed,
Roo_EditingRoom->FullName);
else
{
@@ -796,12 +840,14 @@ void Roo_ChangeFloor (void)
DB_QueryUPDATE ("can not update the capacity of a room",
"UPDATE rooms SET Floor=%d WHERE RooCod=%ld",
NewFloor,Roo_EditingRoom->RooCod);
- Roo_EditingRoom->Floor = NewFloor;
+
+ /***** Get updated data of the room from database *****/
+ Roo_GetDataOfRoomByCod (Roo_EditingRoom);
/***** Message to show the change made *****/
Ale_CreateAlert (Ale_SUCCESS,NULL,
- Txt_The_capacity_of_room_X_is_now_Y, // TODO: Change
- Roo_EditingRoom->FullName,0);
+ Txt_The_floor_of_room_X_is_now_Y,
+ Roo_EditingRoom->FullName,Roo_EditingRoom->Floor);
}
}
@@ -1007,50 +1053,6 @@ static void Roo_WriteCapacity (char Str[Cns_MAX_DECIMAL_DIGITS_UINT + 1],unsigne
Str[0] = '\0';
}
-/*****************************************************************************/
-/********************** Change the location of a room ************************/
-/*****************************************************************************/
-
-void Roo_ChangeRoomLocation (void)
- {
- extern const char *Txt_The_location_of_the_room_X_has_changed_to_Y;
- extern const char *Txt_The_location_of_the_room_X_has_not_changed;
- char NewLocation[Roo_MAX_BYTES_FULL_NAME + 1];
-
- /***** Room constructor *****/
- Roo_EditingRoomConstructor ();
-
- /***** Get parameters from form *****/
- /* Get the code of the room */
- if ((Roo_EditingRoom->RooCod = Roo_GetParamRooCod ()) == -1L)
- Lay_ShowErrorAndExit ("Code of room is missing.");
-
- /* Get the new location for the room */
- Par_GetParToText ("Location",NewLocation,Roo_MAX_BYTES_LOCATION);
-
- /***** Get from the database the old location of the room *****/
- Roo_GetDataOfRoomByCod (Roo_EditingRoom);
-
- /***** Check if old and new locations are the same
- (this happens when return is pressed without changes) *****/
- if (strcmp (NewLocation,Roo_EditingRoom->Location)) // Different locations
- {
- /* Update the table changing old name by new name */
- Roo_UpdateRoomNameDB (Roo_EditingRoom->RooCod,"Location",NewLocation);
- Str_Copy (Roo_EditingRoom->Location,NewLocation,
- Roo_MAX_BYTES_LOCATION);
-
- /* Write message to show the change made */
- Ale_CreateAlert (Ale_SUCCESS,NULL,
- Txt_The_location_of_the_room_X_has_changed_to_Y,
- Roo_EditingRoom->FullName,NewLocation);
- }
- else // The same location
- Ale_CreateAlert (Ale_INFO,NULL,
- Txt_The_location_of_the_room_X_has_not_changed,
- Roo_EditingRoom->FullName);
- }
-
/*****************************************************************************/
/********* Show alerts after changing a room and continue editing ************/
/*****************************************************************************/
@@ -1100,7 +1102,8 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
/***** Building *****/
HTM_TD_Begin ("class=\"LM\"");
- Roo_PutSelectorBuilding (Roo_EditingRoom->BldCod,Buildings);
+ Roo_PutSelectorBuilding (Roo_EditingRoom->BldCod,Buildings,
+ false); // Don't submit on change
HTM_TD_End ();
/***** Floor *****/
@@ -1128,12 +1131,6 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings)
"size=\"3\"");
HTM_TD_End ();
- /***** Room location *****/
- HTM_TD_Begin ("class=\"LM\"");
- HTM_INPUT_TEXT ("Location",Roo_MAX_CHARS_LOCATION,Roo_EditingRoom->Location,false,
- "size=\"15\" class=\"INPUT_FULL_NAME\"");
- HTM_TD_End ();
-
HTM_TR_End ();
/***** End table, send button and end box *****/
@@ -1155,7 +1152,6 @@ static void Roo_PutHeadRooms (void)
extern const char *Txt_Short_name;
extern const char *Txt_Full_name;
extern const char *Txt_Capacity_OF_A_ROOM;
- extern const char *Txt_Location;
HTM_TR_Begin (NULL);
@@ -1166,7 +1162,6 @@ static void Roo_PutHeadRooms (void)
HTM_TH (1,1,"LM",Txt_Short_name);
HTM_TH (1,1,"LM",Txt_Full_name);
HTM_TH (1,1,"LM",Txt_Capacity_OF_A_ROOM);
- HTM_TH (1,1,"LM",Txt_Location);
HTM_TR_End ();
}
@@ -1185,6 +1180,12 @@ void Roo_RecFormNewRoom (void)
Roo_EditingRoomConstructor ();
/***** Get parameters from form *****/
+ /* Get room building */
+ Roo_EditingRoom->BldCod = Bld_GetParamBldCod ();
+
+ /* Get room floor */
+ Roo_EditingRoom->Floor = Roo_GetParamFloor ();
+
/* Get room short name */
Par_GetParToText ("ShortName",Roo_EditingRoom->ShrtName,Roo_MAX_BYTES_SHRT_NAME);
@@ -1193,13 +1194,10 @@ void Roo_RecFormNewRoom (void)
/* Get seating capacity */
Roo_EditingRoom->Capacity = (unsigned)
- Par_GetParToUnsignedLong ("Capacity",
- 0,
- Roo_MAX_CAPACITY,
- Roo_UNLIMITED_CAPACITY);
-
- /* Get room location */
- Par_GetParToText ("Location",Roo_EditingRoom->Location,Roo_MAX_BYTES_LOCATION);
+ Par_GetParToUnsignedLong ("Capacity",
+ 0,
+ Roo_MAX_CAPACITY,
+ Roo_UNLIMITED_CAPACITY);
if (Roo_EditingRoom->ShrtName[0] &&
Roo_EditingRoom->FullName[0]) // If there's a room name
@@ -1230,16 +1228,20 @@ void Roo_RecFormNewRoom (void)
/**************************** Create a new room ******************************/
/*****************************************************************************/
-static void Roo_CreateRoom (struct Roo_Room *Room)
+static void Roo_CreateRoom (const struct Roo_Room *Room)
{
/***** Create a new room *****/
DB_QueryINSERT ("can not create room",
"INSERT INTO rooms"
- " (CtrCod,ShortName,FullName,Capacity,Location)"
+ " (CtrCod,BldCod,Floor,ShortName,FullName,Capacity)"
" VALUES"
- " (%ld,'%s','%s',%u,'%s')",
+ " (%ld,%ld,%d,'%s','%s',%u)",
Gbl.Hierarchy.Ctr.CtrCod,
- Room->ShrtName,Room->FullName,Room->Capacity,Room->Location);
+ Room->BldCod,
+ Room->Floor,
+ Room->ShrtName,
+ Room->FullName,
+ Room->Capacity);
}
/*****************************************************************************/
@@ -1257,14 +1259,14 @@ static void Roo_EditingRoomConstructor (void)
Lay_ShowErrorAndExit ("Error allocating memory for room.");
/***** Reset room *****/
- Roo_EditingRoom->RooCod = -1L;
- Roo_EditingRoom->CtrCod = -1L;
- Roo_EditingRoom->BldCod = -1L;
- Roo_EditingRoom->Floor = 0;
- Roo_EditingRoom->ShrtName[0] = '\0';
- Roo_EditingRoom->FullName[0] = '\0';
- Roo_EditingRoom->Capacity = Roo_UNLIMITED_CAPACITY;
- Roo_EditingRoom->Location[0] = '\0';
+ Roo_EditingRoom->RooCod = -1L;
+ Roo_EditingRoom->CtrCod = -1L;
+ Roo_EditingRoom->BldCod = -1L;
+ Roo_EditingRoom->BldShrtName[0] = '\0';
+ Roo_EditingRoom->Floor = 0;
+ Roo_EditingRoom->ShrtName[0] = '\0';
+ Roo_EditingRoom->FullName[0] = '\0';
+ Roo_EditingRoom->Capacity = Roo_UNLIMITED_CAPACITY;
}
static void Roo_EditingRoomDestructor (void)
diff --git a/swad_room.h b/swad_room.h
index cc3a46dd5..8346c548a 100644
--- a/swad_room.h
+++ b/swad_room.h
@@ -27,6 +27,7 @@
/********************************** Headers **********************************/
/*****************************************************************************/
+#include "swad_building.h"
#include "swad_string.h"
/*****************************************************************************/
@@ -43,30 +44,29 @@
#define Roo_UNLIMITED_CAPACITY INT_MAX // This number can be stored in database as an integer...
// ...and means that a room has no limited capacity
-#define Roo_MAX_CHARS_LOCATION (128 - 1) // 127
-#define Roo_MAX_BYTES_LOCATION ((Roo_MAX_CHARS_LOCATION + 1) * Str_MAX_BYTES_PER_CHAR - 1) // 2047
-
struct Roo_Room
{
- long RooCod;
- long CtrCod;
- long BldCod;
- int Floor;
- char ShrtName[Roo_MAX_BYTES_SHRT_NAME + 1];
- char FullName[Roo_MAX_BYTES_FULL_NAME + 1];
- unsigned Capacity; // Seating capacity (maximum number of people that fit in the room)
- char Location[Roo_MAX_BYTES_LOCATION + 1]; // Examples: Ground floor, first floor, basement
+ long RooCod; // Room code
+ long CtrCod; // Centre code
+ long BldCod; // Building code
+ char BldShrtName[Bld_MAX_BYTES_SHRT_NAME + 1]; // Building short name
+ int Floor; // Room floor
+ char ShrtName[Roo_MAX_BYTES_SHRT_NAME + 1]; // Room short name
+ char FullName[Roo_MAX_BYTES_FULL_NAME + 1]; // Room full name
+ unsigned Capacity; // Room seating capacity
+ // (maximum people who fit in the room)
};
-#define Roo_NUM_ORDERS 4
+#define Roo_NUM_ORDERS 5
typedef enum
{
- Roo_ORDER_BY_SHRT_NAME = 0,
- Roo_ORDER_BY_FULL_NAME = 1,
- Roo_ORDER_BY_CAPACITY = 2,
- Roo_ORDER_BY_LOCATION = 3,
+ Roo_ORDER_BY_BUILDING = 0,
+ Roo_ORDER_BY_FLOOR = 1,
+ Roo_ORDER_BY_SHRT_NAME = 2,
+ Roo_ORDER_BY_FULL_NAME = 3,
+ Roo_ORDER_BY_CAPACITY = 4,
} Roo_Order_t;
-#define Roo_ORDER_DEFAULT Roo_ORDER_BY_LOCATION
+#define Roo_ORDER_DEFAULT Roo_ORDER_BY_BUILDING
/***** Get all data or only short name *****/
typedef enum
@@ -97,7 +97,6 @@ void Roo_FreeListRooms (struct Roo_Rooms *Rooms);
void Roo_GetListRoomsInThisCtr (void);
-void Roo_GetDataOfRoomByCod (struct Roo_Room *Roo);
long Roo_GetParamRooCod (void);
void Roo_RemoveRoom (void);
@@ -107,7 +106,6 @@ void Roo_ChangeFloor (void);
void Roo_RenameRoomShort (void);
void Roo_RenameRoomFull (void);
void Roo_ChangeCapacity (void);
-void Roo_ChangeRoomLocation (void);
void Roo_ContEditAfterChgRoom (void);
void Roo_RecFormNewRoom (void);
diff --git a/swad_text.c b/swad_text.c
index dde06d985..84e4a6d25 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -1633,25 +1633,25 @@ const char *Txt_Announcements_of_exams =
"Chamadas para exames";
#endif
-const char *Txt_Another_building = // TODO: Translate
+const char *Txt_Another_building =
#if L==1 // ca
- "Una altra sala";
+ "Un altre edifici";
#elif L==2 // de
- "Eine weitere Raum";
+ "Eine weitere Gebäude";
#elif L==3 // en
- "Another room";
+ "Another building";
#elif L==4 // es
- "Otra sala";
+ "Otro edificio";
#elif L==5 // fr
- "Un autre salle";
+ "Un autre bâtiment";
#elif L==6 // gn
- "Otra sala"; // Okoteve traducción
+ "Otro edificio"; // Okoteve traducción
#elif L==7 // it
- "Un'altra aula";
+ "Un altro edificio";
#elif L==8 // pl
- "Kolejna klasa";
+ "Kolejna budynek";
#elif L==9 // pt
- "Outra sala";
+ "Outro edifício";
#endif
const char *Txt_Another_centre =
@@ -1685,7 +1685,7 @@ const char *Txt_Another_room =
#elif L==4 // es
"Otra sala";
#elif L==5 // fr
- "Un autre salle";
+ "Une autre salle";
#elif L==6 // gn
"Otra sala"; // Okoteve traducción
#elif L==7 // it
@@ -25344,25 +25344,25 @@ const char *Txt_No_announcements_of_exams_of_X = // Warning: it is very importan
"Não chamadas para exame de %s.";
#endif
-const char *Txt_No_assigned_building = // TODO: Translate
+const char *Txt_No_assigned_building =
#if L==1 // ca
- "Sense sala assignada";
+ "Sense edifici assignat";
#elif L==2 // de
- "Kein zugewiesenes Raum";
+ "Kein zugewiesenes Gebäude";
#elif L==3 // en
- "No assigned room";
+ "No assigned building";
#elif L==4 // es
- "Sin sala asignada";
+ "Sin edificio asignado";
#elif L==5 // fr
- "Aucune salle assignée";
+ "Aucun bâtiment assigné";
#elif L==6 // gn
- "Sin sala asignada"; // Okoteve traducción
+ "Sin edificio asignado"; // Okoteve traducción
#elif L==7 // it
- "Nessuna aula assegnata";
+ "Nessun edificio assegnato";
#elif L==8 // pl
- "Brak przydzielonej sali lekcyjnej";
+ "Brak przydzielonej budynek lekcyjnej";
#elif L==9 // pt
- "Nenhuma sala atribuída";
+ "Nenhum edifício atribuído";
#endif
const char *Txt_No_assigned_room =
@@ -38161,6 +38161,48 @@ const char *Txt_Room_X_removed = // Warning: it is very important to include %s
const char *Txt_ROOMS_HELP_ORDER[Roo_NUM_ORDERS] =
{
+ [Roo_ORDER_BY_BUILDING] =
+#if L==1 // ca
+ "Ordenar per edifici"
+#elif L==2 // de
+ "Nach Gebäude sortieren"
+#elif L==3 // en
+ "Sort by building"
+#elif L==4 // es
+ "Ordenar por edificio"
+#elif L==5 // fr
+ "Trier par bâtiment"
+#elif L==6 // gn
+ "Ordenar por edificio" // Okoteve traducción
+#elif L==7 // it
+ "Ordina per edificio"
+#elif L==8 // pl
+ "Sortuj według budynek"
+#elif L==9 // pt
+ "Classificar por edifício"
+#endif
+ ,
+ [Roo_ORDER_BY_FLOOR] =
+#if L==1 // ca
+ "Ordenar per planta"
+#elif L==2 // de
+ "Nach Stock sortieren"
+#elif L==3 // en
+ "Sort by floor"
+#elif L==4 // es
+ "Ordenar por planta"
+#elif L==5 // fr
+ "Trier par étage"
+#elif L==6 // gn
+ "Ordenar por planta" // Okoteve traducción
+#elif L==7 // it
+ "Ordina per piano"
+#elif L==8 // pl
+ "Sortuj według piętrze"
+#elif L==9 // pt
+ "Classificar por andar"
+#endif
+ ,
[Roo_ORDER_BY_SHRT_NAME] =
#if L==1 // ca
"Ordenar per nom breu"
@@ -38222,32 +38264,53 @@ const char *Txt_ROOMS_HELP_ORDER[Roo_NUM_ORDERS] =
"Sortuj wed&lsgtrok;ug pojemności miejsc"
#elif L==9 // pt
"Ordenar por capacidade"
-#endif
- ,
- [Roo_ORDER_BY_LOCATION] =
-#if L==1 // ca
- "Ordenar per ubicació"
-#elif L==2 // de
- "Nach Standort sortieren"
-#elif L==3 // en
- "Sort by location"
-#elif L==4 // es
- "Ordenar por ubicación"
-#elif L==5 // fr
- "Trier par emplacement"
-#elif L==6 // gn
- "Ordenar por ubicación" // Okoteve traducción
-#elif L==7 // it
- "Ordina per posizione"
-#elif L==8 // pl
- "Sortuj według lokacja"
-#elif L==9 // pt
- "Classificar por localização"
#endif
};
const char *Txt_ROOMS_ORDER[Roo_NUM_ORDERS] =
{
+ [Roo_ORDER_BY_BUILDING] =
+#if L==1 // ca
+ "Edifici"
+#elif L==2 // de
+ "Gebäude"
+#elif L==3 // en
+ "Building"
+#elif L==4 // es
+ "Edificio"
+#elif L==5 // fr
+ "Bâtiment"
+#elif L==6 // gn
+ "Edificio" // Okoteve traducción
+#elif L==7 // it
+ "Edificio"
+#elif L==8 // pl
+ "Budynek"
+#elif L==9 // pt
+ "Edifício"
+#endif
+ ,
+ [Roo_ORDER_BY_FLOOR] =
+#if L==1 // ca
+ "Planta"
+#elif L==2 // de
+ "Stock"
+#elif L==3 // en
+ "Floor"
+#elif L==4 // es
+ "Planta"
+#elif L==5 // fr
+ "Étage"
+#elif L==6 // gn
+ "Planta" // Okoteve traducción
+#elif L==7 // it
+ "Piano"
+#elif L==8 // pl
+ "Piętrze"
+#elif L==9 // pt
+ "Andar"
+#endif
+ ,
[Roo_ORDER_BY_SHRT_NAME] =
#if L==1 // ca
"Nom breu"
@@ -38309,27 +38372,6 @@ const char *Txt_ROOMS_ORDER[Roo_NUM_ORDERS] =
"Pojemność"
#elif L==9 // pt
"Capacidade"
-#endif
- ,
- [Roo_ORDER_BY_LOCATION] =
-#if L==1 // ca
- "Ubicació"
-#elif L==2 // de
- "Standort"
-#elif L==3 // en
- "Location"
-#elif L==4 // es
- "Ubicación"
-#elif L==5 // fr
- "Emplacement"
-#elif L==6 // gn
- "Ñemohenda"
-#elif L==7 // it
- "Posizione"
-#elif L==8 // pl
- "Lokacja"
-#elif L==9 // pt
- "Localização"
#endif
};
@@ -44648,6 +44690,48 @@ const char *Txt_The_building_X_has_been_renamed_as_Y = // Warning: it is very im
"O edifício %s foi renomeado como %s.";
#endif
+const char *Txt_The_building_of_room_X_has_not_changed = // Warning: it is very important to include %s in the following sentences
+#if L==1 // ca
+ "L'edifici de la sala %s no ha canviat.";
+#elif L==2 // de
+ "Das Gebäude des Raum %s hat sich nicht geändert.";
+#elif L==3 // en
+ "The building of room %s has not changed.";
+#elif L==4 // es
+ "El edificio de la sala %s no ha cambiado.";
+#elif L==5 // fr
+ "Le bâtiment de la salle %s n'a pas changé.";
+#elif L==6 // gn
+ "El edificio de la sala %s no ha cambiado."; // Okoteve traducción
+#elif L==7 // it
+ "L'edificio della aula %s non è cambiata.";
+#elif L==8 // pl
+ "Budynek klasy %s nie uległa zmianie.";
+#elif L==9 // pt
+ "O edifício da sala %s não mudou.";
+#endif
+
+const char *Txt_The_building_of_room_X_is_now_Y = // Warning: it is very important to include two %s in the following sentences
+#if L==1 // ca
+ "L'edifici de la sala %s ara és %s.";
+#elif L==2 // de
+ "Das Gebäude des Raum %s beträgt jetzt %s.";
+#elif L==3 // en
+ "The building of room %s is now %s.";
+#elif L==4 // es
+ "El edificio de la sala %s ahora es %s.";
+#elif L==5 // fr
+ "Le bâtiment de la salle %s est maintenant de %s.";
+#elif L==6 // gn
+ "El edificio de la sala %s ahora es %s."; // Okoteve traducción
+#elif L==7 // it
+ "L'edificio della aula %s è ora %s.";
+#elif L==8 // pl
+ "Budynek klasy %s wynosi teraz %s.";
+#elif L==9 // pt
+ "O edifício da sala %s é agora %s.";
+#endif
+
const char *Txt_The_capacity_of_room_X_has_not_changed = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca
"L'aforament de la sala %s no ha canviat.";
@@ -45842,6 +45926,48 @@ const char *Txt_The_file_type_should_be_HTML_or_ZIP =
"O tipo de arquivo deve ser HTML ou ZIP.";
#endif
+const char *Txt_The_floor_of_room_X_has_not_changed = // Warning: it is very important to include %s in the following sentences
+#if L==1 // ca
+ "La planta de la sala %s no ha canviat.";
+#elif L==2 // de
+ "Der Stock des Raum %s hat sich nicht geändert.";
+#elif L==3 // en
+ "The floor of room %s has not changed.";
+#elif L==4 // es
+ "La planta de la sala %s no ha cambiado.";
+#elif L==5 // fr
+ "L'étage de la salle %s n'a pas changé.";
+#elif L==6 // gn
+ "La planta de la sala %s no ha cambiado."; // Okoteve traducción
+#elif L==7 // it
+ "Il piano della aula %s non è cambiata.";
+#elif L==8 // pl
+ "Piętrze klasy %s nie uległa zmianie.";
+#elif L==9 // pt
+ "O andar da sala %s não mudou.";
+#endif
+
+const char *Txt_The_floor_of_room_X_is_now_Y = // Warning: it is very important to include %s and %d in the following sentences
+#if L==1 // ca
+ "La planta de la sala %s ara és %d.";
+#elif L==2 // de
+ "Der Stock des Raum %s beträgt jetzt %d.";
+#elif L==3 // en
+ "The floor of room %s is now %d.";
+#elif L==4 // es
+ "La planta de la sala %s ahora es %d.";
+#elif L==5 // fr
+ "L'étage de la salle %s est maintenant de %d.";
+#elif L==6 // gn
+ "La planta de la sala %s ahora es %d."; // Okoteve traducción
+#elif L==7 // it
+ "Il piano della aula %s è ora %d.";
+#elif L==8 // pl
+ "Piętrze klasy %s wynosi teraz %d.";
+#elif L==9 // pt
+ "O andar da sala %s é agora %d.";
+#endif
+
const char *Txt_The_folder_X_has_been_created_inside_the_folder_Y = // Warning: it is very important to include two %s in the following sentences
#if L==1 // ca
"Se ha creado la carpeta %s dentro de la carpeta %s."; // Necessita traduccio
@@ -46682,66 +46808,6 @@ const char *Txt_The_location_of_the_building_X_has_not_changed = // Warning: it
" não foi alterada.";
#endif
-const char *Txt_The_location_of_the_room_X_has_changed_to_Y = // Warning: it is very important to include two %s in the following sentences
-#if L==1 // ca
- "La ubicació de la sala %s"
- " ha canviat a %s.";
-#elif L==2 // de
- "Der Standort des Raum %s"
- " wurde in %s geändert.";
-#elif L==3 // en
- "The location of the room %s"
- " has changed to %s.";
-#elif L==4 // es
- "La ubicación de la sala %s"
- " ha cambiado a %s.";
-#elif L==5 // fr
- "L'emplacement de la salle %s"
- " a été remplacé par %s.";
-#elif L==6 // gn
- "La ubicación de la sala %s"
- " ha cambiado a %s."; // Okoteve traducción
-#elif L==7 // it
- "La posizione della aula %s"
- " è cambiata in %s.";
-#elif L==8 // pl
- "Lokalizacja klasy %s"
- " zmieniła się na %s.";
-#elif L==9 // pt
- "A localização da sala %s"
- " mudou para %s.";
-#endif
-
-const char *Txt_The_location_of_the_room_X_has_not_changed = // Warning: it is very important to include %s in the following sentences
-#if L==1 // ca
- "La ubicació de la sala %s"
- " no ha canviat.";
-#elif L==2 // de
- "Der Standort des Raum %s"
- " hat sich nicht geändert.";
-#elif L==3 // en
- "The location of the room %s"
- " has not changed.";
-#elif L==4 // es
- "La ubicación de la sala %s"
- " no ha cambiado.";
-#elif L==5 // fr
- "L'emplacement de la salle %s"
- " n'a pas changé.";
-#elif L==6 // gn
- "La ubicación de la sala %s"
- " no ha cambiado."; // Okoteve traducción
-#elif L==7 // it
- "La posizione della aula %s"
- " non è cambiata.";
-#elif L==8 // pl
- "Lokalizacja klasy %s"
- " nie uległa zmianie.";
-#elif L==9 // pt
- "A localização da sala %s"
- " não foi alterada.";
-#endif
-
const char *Txt_The_lower_limit_of_correct_answers_must_be_less_than_or_equal_to_the_upper_limit =
#if L==1 // ca
"El límite inferior del intervalo de respuestas correctas"
diff --git a/swad_text_action.c b/swad_text_action.c
index 7633250e7..d0b5894e1 100644
--- a/swad_text_action.c
+++ b/swad_text_action.c
@@ -4512,27 +4512,6 @@ const char *Txt_Actions[Act_NUM_ACTIONS] =
"" // Potrzebujesz tlumaczenie
#elif L==9 // pt
"" // Precisa de tradução
-#endif
- ,
- [ActRenRooLoc] =
-#if L==1 // ca
- "" // Necessita traducció
-#elif L==2 // de
- "" // Need Übersetzung
-#elif L==3 // en
- "Change location of a room"
-#elif L==4 // es
- "Cambiar ubicación de una sala"
-#elif L==5 // fr
- "" // Besoin de traduction
-#elif L==6 // gn
- "" // Okoteve traducción
-#elif L==7 // it
- "" // Bisogno di traduzione
-#elif L==8 // pl
- "" // Potrzebujesz tlumaczenie
-#elif L==9 // pt
- "" // Precisa de tradução
#endif
,
[ActSeeDegInf] =