From ef47fd45abf001928d2df5e44d03401d497f6861 Mon Sep 17 00:00:00 2001 From: acanas Date: Sun, 19 Apr 2020 02:39:20 +0200 Subject: [PATCH] Version19.190 --- css/{swad19.187.css => swad19.190.css} | 2 +- icon/code.svg | 1 + icon/photo-video.svg | 1 + sql/swad.sql | 1 + swad_action.c | 2 + swad_action.h | 9 +- swad_changelog.h | 10 +- swad_database.c | 51 ++- swad_room.c | 270 ++++++++++-- swad_room.h | 52 +-- swad_syllabus.c | 2 +- swad_text.c | 570 +++++++++++++++++++++++++ 12 files changed, 886 insertions(+), 85 deletions(-) rename css/{swad19.187.css => swad19.190.css} (99%) create mode 100644 icon/code.svg create mode 100644 icon/photo-video.svg diff --git a/css/swad19.187.css b/css/swad19.190.css similarity index 99% rename from css/swad19.187.css rename to css/swad19.190.css index 32f41b4a1..562c26581 100644 --- a/css/swad19.187.css +++ b/css/swad19.190.css @@ -1402,7 +1402,7 @@ a:hover img.CENTRE_PHOTO_SHOW } /***************************** Buildings and rooms ***************************/ -.BLD_SEL +.BLD_SEL, .ROOM_TYPE_SEL { width:80px; } diff --git a/icon/code.svg b/icon/code.svg new file mode 100644 index 000000000..28dff5bfc --- /dev/null +++ b/icon/code.svg @@ -0,0 +1 @@ + diff --git a/icon/photo-video.svg b/icon/photo-video.svg new file mode 100644 index 000000000..d58c5853f --- /dev/null +++ b/icon/photo-video.svg @@ -0,0 +1 @@ + diff --git a/sql/swad.sql b/sql/swad.sql index c7fc69d91..c0650c5bc 100644 --- a/sql/swad.sql +++ b/sql/swad.sql @@ -1137,6 +1137,7 @@ CREATE TABLE IF NOT EXISTS rooms ( CtrCod INT NOT NULL, BldCod INT NOT NULL DEFAULT -1, Floor INT NOT NULL DEFAULT 0, + Type ENUM('no_type','administration','auditorium','cafeteria','canteen','classroom','concierge','corridor','gym','hall','kindergarten','laboratory','library','office','outdoors','parking','pavilion','room','secretariat','seminar','shop','store','toilets','virtual','yard') NOT NULL DEFAULT 'no_type', ShortName VARCHAR(511) NOT NULL, FullName VARCHAR(2047) NOT NULL, Capacity INT NOT NULL, diff --git a/swad_action.c b/swad_action.c index b58681a88..17b06e25e 100644 --- a/swad_action.c +++ b/swad_action.c @@ -364,6 +364,7 @@ const struct Act_Actions Act_Actions[Act_NUM_ACTIONS] = [ActRemRoo ] = {1747,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_RemoveRoom ,Roo_ContEditAfterChgRoom ,NULL}, [ActChgRooBld ] = {1845,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_ChangeBuilding ,Roo_ContEditAfterChgRoom ,NULL}, [ActChgRooFlo ] = {1846,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_ChangeFloor ,Roo_ContEditAfterChgRoom ,NULL}, + [ActChgRooTyp ] = {1847,-1,TabUnk,ActSeeRoo , 0, 0, 0,0x3C6, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Roo_ChangeType ,Roo_ContEditAfterChgRoom ,NULL}, [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}, @@ -3594,6 +3595,7 @@ Act_Action_t Act_FromActCodToAction[1 + Act_MAX_ACTION_COD] = // Do not reuse un ActRenBldLoc, // #1844 ActChgRooBld, // #1845 ActChgRooFlo, // #1846 + ActChgRooTyp, // #1847 }; /*****************************************************************************/ diff --git a/swad_action.h b/swad_action.h index 7e71a85aa..84a919c7e 100644 --- a/swad_action.h +++ b/swad_action.h @@ -64,7 +64,7 @@ typedef enum typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action -#define Act_MAX_ACTION_COD 1846 +#define Act_MAX_ACTION_COD 1847 #define Act_MAX_OPTIONS_IN_MENU_PER_TAB 13 @@ -341,9 +341,10 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to #define ActRemRoo (ActRenHld + 42) #define ActChgRooBld (ActRenHld + 43) #define ActChgRooFlo (ActRenHld + 44) -#define ActRenRooSho (ActRenHld + 45) -#define ActRenRooFul (ActRenHld + 46) -#define ActChgRooMaxUsr (ActRenHld + 47) +#define ActChgRooTyp (ActRenHld + 45) +#define ActRenRooSho (ActRenHld + 46) +#define ActRenRooFul (ActRenHld + 47) +#define ActChgRooMaxUsr (ActRenHld + 48) /*****************************************************************************/ /********************************* Degree tab ********************************/ diff --git a/swad_changelog.h b/swad_changelog.h index 9d64ceffd..53f55303f 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -497,8 +497,8 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.189 (2020-04-16)" -#define CSS_FILE "swad19.187.css" +#define Log_PLATFORM_VERSION "SWAD 19.190 (2020-04-18)" +#define CSS_FILE "swad19.190.css" #define JS_FILE "swad19.172.1.js" /* * @@ -549,6 +549,12 @@ Funci // TODO: Integrar pull requests con traducciones del alemán del usuario eruedin en GitHub // TODO: Cambiar icono notificaciones nuevas con "bell-on.svg" + Version 19.190.1: Apr 18, 2020 Fixed bug in degree photo, reported by Adrián José Martínez Navarro. (? lines) + Version 19.190: Apr 18, 2020 Changes in rooms. (288488 lines) + 2 changes necessary in database: +ALTER TABLE rooms ADD COLUMN Type ENUM('no_type','administration','auditorium','cafeteria','canteen','classroom','concierge','corridor','gym','hall','kindergarten','laboratory','library','office','outdoors','parking','pavilion','room','secretariat','seminar','shop','store','toilets','virtual','yard') NOT NULL DEFAULT 'no_type' AFTER Floor; +DROP TABLE IF EXISTS log_old; + Version 19.189: Apr 16, 2020 Fixed security issue in test exams. Removed table with test status. (287719 lines) 3/4 changes necessary in database: diff --git a/swad_database.c b/swad_database.c index d2733d801..76ca30b96 100644 --- a/swad_database.c +++ b/swad_database.c @@ -2354,24 +2354,51 @@ mysql> DESCRIBE projects; /***** Table rooms *****/ /* mysql> DESCRIBE rooms; -+-----------+---------------+------+-----+---------+----------------+ -| Field | Type | Null | Key | Default | Extra | -+-----------+---------------+------+-----+---------+----------------+ -| RooCod | int(11) | NO | PRI | NULL | auto_increment | -| CtrCod | int(11) | NO | MUL | NULL | | -| BldCod | int(11) | NO | | -1 | | -| Floor | int(11) | NO | | 0 | | -| ShortName | varchar(511) | NO | | NULL | | -| FullName | varchar(2047) | NO | | NULL | | -| Capacity | int(11) | NO | | NULL | | -+-----------+---------------+------+-----+---------+----------------+ -7 rows in set (0.00 sec) ++-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ +| Field | Type | Null | Key | Default | Extra | ++-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ +| RooCod | int(11) | NO | PRI | NULL | auto_increment | +| CtrCod | int(11) | NO | MUL | NULL | | +| BldCod | int(11) | NO | | -1 | | +| Floor | int(11) | NO | | 0 | | +| Type | enum('no_type','administration','auditorium','cafeteria','canteen','classroom','concierge','corridor','gym','hall','kindergarten','laboratory','library','office','outdoors','parking','pavilion','room','secretariat','seminar','shop','store','toilets','virtual','yard') | NO | | no_type | | +| ShortName | varchar(511) | NO | | NULL | | +| FullName | varchar(2047) | NO | | NULL | | +| Capacity | int(11) | NO | | NULL | | ++-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+-----+---------+----------------+ +8 rows in set (0.00 sec) */ DB_CreateTable ("CREATE TABLE IF NOT EXISTS rooms (" "RooCod INT NOT NULL AUTO_INCREMENT," "CtrCod INT NOT NULL," "BldCod INT NOT NULL DEFAULT -1," "Floor INT NOT NULL DEFAULT 0," + "Type ENUM(" + "'no_type'," + "'administration'," + "'auditorium'," + "'cafeteria'," + "'canteen'," + "'classroom'," + "'concierge'," + "'corridor'," + "'gym'," + "'hall'," + "'kindergarten'," + "'laboratory'," + "'library'," + "'office'," + "'outdoors'," + "'parking'," + "'pavilion'," + "'room'," + "'secretariat'," + "'seminar'," + "'shop'," + "'store'," + "'toilets'," + "'virtual'," + "'yard') NOT NULL DEFAULT 'no_type'," "ShortName VARCHAR(511) NOT NULL," // Roo_MAX_BYTES_SHRT_NAME "FullName VARCHAR(2047) NOT NULL," // Roo_MAX_BYTES_FULL_NAME "Capacity INT NOT NULL," diff --git a/swad_room.c b/swad_room.c index 509b385cf..f5a0d8584 100644 --- a/swad_room.c +++ b/swad_room.c @@ -47,6 +47,64 @@ extern struct Globals Gbl; /***************************** Private constants *****************************/ /*****************************************************************************/ +static const char *Roo_TypesDB[Roo_NUM_TYPES] = + { + [Roo_NO_TYPE ] = "no_type", + [Roo_ADMINISTRATION] = "administration", + [Roo_AUDITORIUM ] = "auditorium", + [Roo_CAFETERIA ] = "cafeteria", + [Roo_CANTEEN ] = "canteen", + [Roo_CLASSROOM ] = "classroom", + [Roo_CONCIERGE ] = "concierge", + [Roo_CORRIDOR ] = "corridor", + [Roo_GYM ] = "gym", + [Roo_HALL ] = "hall", + [Roo_KINDERGARTEN ] = "kindergarten", + [Roo_LABORATORY ] = "laboratory", + [Roo_LIBRARY ] = "library", + [Roo_OFFICE ] = "office", + [Roo_OUTDOORS ] = "outdoors", + [Roo_PARKING ] = "parking", + [Roo_PAVILION ] = "pavilion", + [Roo_ROOM ] = "room", + [Roo_SECRETARIAT ] = "secretariat", + [Roo_SEMINAR ] = "seminar", + [Roo_SHOP ] = "shop", + [Roo_STORE ] = "store", + [Roo_TOILETS ] = "toilets", + [Roo_VIRTUAL ] = "virtual", + [Roo_YARD ] = "yard", + }; + +static const char *Roo_TypesIcons[Roo_NUM_TYPES] = + { + [Roo_NO_TYPE ] = "question.svg", + [Roo_ADMINISTRATION] = "user-tie.svg", + [Roo_AUDITORIUM ] = "landmark.svg", + [Roo_CAFETERIA ] = "coffee.svg", + [Roo_CANTEEN ] = "utensils.svg", + [Roo_CLASSROOM ] = "chalkboard-teacher.svg", + [Roo_CONCIERGE ] = "concierge-bell", + [Roo_CORRIDOR ] = "walking.svg", + [Roo_GYM ] = "dumbbell.svg", + [Roo_HALL ] = "map-signs.svg", + [Roo_KINDERGARTEN ] = "child.svg", + [Roo_LABORATORY ] = "flask.svg", + [Roo_LIBRARY ] = "book.svg", + [Roo_OFFICE ] = "house-user.svg", + [Roo_OUTDOORS ] = "cloud-sun.svg", + [Roo_PARKING ] = "car.svg", + [Roo_PAVILION ] = "volleyball-ball.svg", + [Roo_ROOM ] = "chalkboard.svg", + [Roo_SECRETARIAT ] = "stamp.svg", + [Roo_SEMINAR ] = "chalkboard-teacher.svg", + [Roo_SHOP ] = "shopping-cart.svg", + [Roo_STORE ] = "daily.svg", + [Roo_TOILETS ] = "toilet.svg", + [Roo_VIRTUAL ] = "laptop-house.svg", + [Roo_YARD ] = "canadian-mapple-leaf.svg", + }; + /*****************************************************************************/ /******************************* Private types *******************************/ /*****************************************************************************/ @@ -69,6 +127,7 @@ 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 Roo_RoomType_t Roo_GetTypeFromString (const char *Str); static void Roo_EditRoomsInternal (void); @@ -77,8 +136,11 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, static void Roo_PutSelectorBuilding (long BldCod, const struct Bld_Buildings *Buildings, bool SubmitOnChange); +static void Roo_PutSelectorType (Roo_RoomType_t RoomType, + bool SubmitOnChange); static void Roo_PutParamRooCod (long RooCod); static int Roo_GetParamFloor (void); +static Roo_RoomType_t Roo_GetParamType (void); static void Roo_RenameRoom (Cns_ShrtOrFullName_t ShrtOrFullName); static bool Roo_CheckIfRoomNameExists (const char *FieldName,const char *Name,long RooCod); @@ -88,7 +150,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 (const struct Roo_Room *Room); +static void Roo_CreateRoom (struct Roo_Room *Room); static void Roo_EditingRoomConstructor (void); static void Roo_EditingRoomDestructor (void); @@ -114,6 +176,7 @@ void Roo_SeeRooms (void) extern const char *Txt_Rooms; extern const char *Txt_ROOMS_HELP_ORDER[Roo_NUM_ORDERS]; extern const char *Txt_ROOMS_ORDER[Roo_NUM_ORDERS]; + extern const char *Txt_ROOM_TYPES[Roo_NUM_TYPES]; extern const char *Txt_New_room; struct Roo_Rooms Rooms; Roo_Order_t Order; @@ -178,7 +241,7 @@ void Roo_SeeRooms (void) /* Type */ HTM_TD_Begin ("class=\"DAT LM %s\"",Gbl.ColorRows[RowEvenOdd]); - HTM_Txt (Rooms.Lst[NumRoom].ShrtName); + Ico_PutIconOn (Roo_TypesIcons[Rooms.Lst[NumRoom].Type],Txt_ROOM_TYPES[Rooms.Lst[NumRoom].Type]); HTM_TD_End (); /* Short name */ @@ -346,7 +409,7 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms, { [Roo_ORDER_BY_BUILDING ] = "buildings.ShortName,rooms.Floor,rooms.ShortName", [Roo_ORDER_BY_FLOOR ] = "rooms.Floor,buildings.ShortName,rooms.ShortName", - [Roo_ORDER_BY_TYPE ] = "rooms.Floor,buildings.ShortName,rooms.ShortName", + [Roo_ORDER_BY_TYPE ] = "rooms.Type,buildings.ShortName,rooms.Floor,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,buildings.ShortName,rooms.Floor,rooms.ShortName", @@ -366,9 +429,10 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms, "rooms.BldCod," // row[1] "buildings.ShortName," // row[2] "rooms.Floor," // row[3] - "rooms.ShortName," // row[4] - "rooms.FullName," // row[5] - "rooms.Capacity" // row[6] + "rooms.Type," // row[4] + "rooms.ShortName," // row[5] + "rooms.FullName," // row[6] + "rooms.Capacity" // row[7] " FROM rooms LEFT JOIN buildings" " ON rooms.BldCod=buildings.BldCod" " WHERE rooms.CtrCod=%ld" @@ -427,16 +491,19 @@ void Roo_GetListRooms (struct Roo_Rooms *Rooms, /* Get floor (row[3]) */ Room->Floor = Str_ConvertStrCodToLongCod (row[3]); - /* Get the short name of the room (row[4]) */ - Str_Copy (Room->ShrtName,row[4], + /* Get type (row[4]) */ + Room->Type = Roo_GetTypeFromString (row[4]); + + /* Get the short name of the room (row[5]) */ + Str_Copy (Room->ShrtName,row[5], Roo_MAX_BYTES_SHRT_NAME); - /* Get the full name of the room (row[5]) */ - Str_Copy (Room->FullName,row[5], + /* Get the full name of the room (row[6]) */ + Str_Copy (Room->FullName,row[6], Roo_MAX_BYTES_FULL_NAME); - /* Get seating capacity in this room (row[6]) */ - if (sscanf (row[6],"%u",&Room->Capacity) != 1) + /* Get seating capacity in this room (row[7]) */ + if (sscanf (row[7],"%u",&Room->Capacity) != 1) Room->Capacity = Roo_UNLIMITED_CAPACITY; break; case Roo_ONLY_SHRT_NAME: @@ -474,9 +541,10 @@ static void Roo_GetDataOfRoomByCod (struct Roo_Room *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] + "rooms.Type," // 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.RooCod=%ld", @@ -497,16 +565,19 @@ static void Roo_GetDataOfRoomByCod (struct Roo_Room *Room) /* Get floor (row[2]) */ Room->Floor = Str_ConvertStrCodToLongCod (row[2]); - /* Get the short name of the room (row[3]) */ - Str_Copy (Room->ShrtName,row[3], + /* Get type (row[3]) */ + Room->Type = Roo_GetTypeFromString (row[3]); + + /* Get the short name of the room (row[4]) */ + Str_Copy (Room->ShrtName,row[4], Roo_MAX_BYTES_SHRT_NAME); - /* Get the full name of the room (row[4]) */ - Str_Copy (Room->FullName,row[4], + /* Get the full name of the room (row[5]) */ + Str_Copy (Room->FullName,row[5], Roo_MAX_BYTES_FULL_NAME); - /* Get seating capacity in this room (row[5]) */ - if (sscanf (row[5],"%u",&Room->Capacity) != 1) + /* Get seating capacity in this room (row[6]) */ + if (sscanf (row[6],"%u",&Room->Capacity) != 1) Room->Capacity = Roo_UNLIMITED_CAPACITY; } @@ -538,6 +609,24 @@ static void Roo_GetBldShrtName (struct Roo_Room *Room,const char *BldShrtNameFro } } +/*****************************************************************************/ +/********************** Convert from string to type **************************/ +/*****************************************************************************/ + +static Roo_RoomType_t Roo_GetTypeFromString (const char *Str) + { + Roo_RoomType_t Type; + + /***** Compare string with all string types *****/ + for (Type = (Roo_RoomType_t) 0; + Type <= (Roo_RoomType_t) (Roo_NUM_TYPES - 1); + Type++) + if (!strcmp (Roo_TypesDB[Type],Str)) + return Type; + + return Roo_NO_TYPE; + } + /*****************************************************************************/ /**************************** Free list of rooms *****************************/ /*****************************************************************************/ @@ -609,11 +698,11 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, HTM_TD_End (); /* Room type */ - HTM_TD_Begin ("class=\"LM\""); - Frm_StartForm (ActRenRooSho); + HTM_TD_Begin ("class=\"CM\""); + Frm_StartForm (ActChgRooTyp); Roo_PutParamRooCod (Room->RooCod); - HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Room->ShrtName,true, - "size=\"10\" class=\"INPUT_SHORT_NAME\""); + Roo_PutSelectorType (Room->Type, + true); // Submit on change Frm_EndForm (); HTM_TD_End (); @@ -653,7 +742,7 @@ static void Roo_ListRoomsForEdition (const struct Bld_Buildings *Buildings, } /*****************************************************************************/ -/**************************** Put building selector **************************/ +/********** Put selector of the building to which the room belongs ***********/ /*****************************************************************************/ static void Roo_PutSelectorBuilding (long BldCod, @@ -683,13 +772,39 @@ static void Roo_PutSelectorBuilding (long BldCod, NumBld < Buildings->Num; NumBld++) HTM_OPTION (HTM_Type_LONG,&Buildings->Lst[NumBld].BldCod, - Buildings->Lst[NumBld].BldCod == BldCod,false, + BldCod == Buildings->Lst[NumBld].BldCod,false, "%s",Buildings->Lst[NumBld].ShrtName); /***** End selector *****/ HTM_SELECT_End (); } +/*****************************************************************************/ +/************************ Put selector of room type **************************/ +/*****************************************************************************/ + +static void Roo_PutSelectorType (Roo_RoomType_t RoomType, + bool SubmitOnChange) + { + extern const char *Txt_ROOM_TYPES[Roo_NUM_TYPES]; + Roo_RoomType_t Type; + + /***** Begin selector *****/ + HTM_SELECT_Begin (SubmitOnChange, + "name=\"Type\" class=\"ROOM_TYPE_SEL\""); + + /***** Options for types *****/ + for (Type = (Roo_RoomType_t) 0; + Type <= (Roo_RoomType_t) (Roo_NUM_TYPES - 1); + Type++) + HTM_OPTION (HTM_Type_UNSIGNED,&Type, + Type == RoomType,false, + "%s",Txt_ROOM_TYPES[Type]); + + /***** End selector *****/ + HTM_SELECT_End (); + } + /*****************************************************************************/ /********************* Write parameter with code of room *********************/ /*****************************************************************************/ @@ -715,10 +830,27 @@ long Roo_GetParamRooCod (void) static int Roo_GetParamFloor (void) { - /***** Get code of room *****/ + /***** Get floor *****/ return (int) Par_GetParToLong ("Floor"); } +/*****************************************************************************/ +/************************** Get parameter with type **************************/ +/*****************************************************************************/ + +static Roo_RoomType_t Roo_GetParamType (void) + { + long TypeLong; + + /***** Get type string *****/ + TypeLong = Par_GetParToLong ("Type"); + if (TypeLong >= 0 && TypeLong < Roo_NUM_TYPES) + return (Roo_RoomType_t) TypeLong; // Correc type + + /***** Default type when no type or wrong type *****/ + return Roo_NO_TYPE; + } + /*****************************************************************************/ /******************************** Remove a room ******************************/ /*****************************************************************************/ @@ -791,11 +923,10 @@ void Roo_ChangeBuilding (void) /***** Get data of the room from database *****/ Roo_GetDataOfRoomByCod (Roo_EditingRoom); - /***** Check if the old capacity equals the new one + /***** Check if the old building equals the new one (this happens when return is pressed without changes) *****/ if (NewBldCod < 0) NewBldCod = -1L; - if (NewBldCod == Roo_EditingRoom->BldCod) /***** Message to show no changes made *****/ Ale_CreateAlert (Ale_INFO,NULL, @@ -803,8 +934,8 @@ void Roo_ChangeBuilding (void) Roo_EditingRoom->FullName); else { - /***** Update the table of rooms changing the old building to the new *****/ - DB_QueryUPDATE ("can not update the capacity of a room", + /***** Update the table of rooms changing the old building for the new one *****/ + DB_QueryUPDATE ("can not update the building of a room", "UPDATE rooms SET BldCod=%ld WHERE RooCod=%ld", NewBldCod,Roo_EditingRoom->RooCod); @@ -819,7 +950,7 @@ void Roo_ChangeBuilding (void) } /*****************************************************************************/ -/********************* Change sitting capacity of a room *********************/ +/************************ Change the floor of a room *************************/ /*****************************************************************************/ void Roo_ChangeFloor (void) @@ -842,7 +973,7 @@ void Roo_ChangeFloor (void) /***** Get data of the room from database *****/ Roo_GetDataOfRoomByCod (Roo_EditingRoom); - /***** Check if the old capacity equals the new one + /***** Check if the old floor equals the new one (this happens when return is pressed without changes) *****/ if (NewFloor == Roo_EditingRoom->Floor) /***** Message to show no changes made *****/ @@ -851,7 +982,7 @@ void Roo_ChangeFloor (void) Roo_EditingRoom->FullName); else { - /***** Update the table of rooms changing the old capacity to the new *****/ + /***** Update the table of rooms changing the old floor for the new one *****/ DB_QueryUPDATE ("can not update the capacity of a room", "UPDATE rooms SET Floor=%d WHERE RooCod=%ld", NewFloor,Roo_EditingRoom->RooCod); @@ -866,6 +997,58 @@ void Roo_ChangeFloor (void) } } +/*****************************************************************************/ +/************************* Change the type of a room *************************/ +/*****************************************************************************/ + +void Roo_ChangeType (void) + { + extern const char *Txt_The_type_of_room_X_has_not_changed; + extern const char *Txt_The_type_of_room_X_is_now_Y; + extern const char *Txt_ROOM_TYPES[Roo_NUM_TYPES]; + Roo_RoomType_t NewType; + + /***** 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 type of the room */ + NewType = Roo_GetParamType (); + + /***** Get data of the room from database *****/ + Roo_GetDataOfRoomByCod (Roo_EditingRoom); + + /***** Check if the old type equals the new one + (this happens when return is pressed without changes) *****/ + if ((unsigned) NewType >= Roo_NUM_TYPES) + NewType = Roo_NO_TYPE; + if (NewType == Roo_EditingRoom->Type) + /***** Message to show no changes made *****/ + Ale_CreateAlert (Ale_INFO,NULL, + Txt_The_type_of_room_X_has_not_changed, + Roo_EditingRoom->FullName); + else + { + /***** Update the table of rooms changing the old type for the new one *****/ + DB_QueryUPDATE ("can not update the type of a room", + "UPDATE rooms SET Type='%s' WHERE RooCod=%ld", + Roo_TypesDB[NewType], + Roo_EditingRoom->RooCod); + + /***** 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_type_of_room_X_is_now_Y, + Roo_EditingRoom->FullName,Txt_ROOM_TYPES[Roo_EditingRoom->Type]); + } + } + /*****************************************************************************/ /********************** Change the short name of a room **********************/ /*****************************************************************************/ @@ -1036,7 +1219,7 @@ void Roo_ChangeCapacity (void) Roo_EditingRoom->FullName); else { - /***** Update the table of rooms changing the old capacity to the new *****/ + /***** Update the table of rooms changing the old capacity for the new one *****/ DB_QueryUPDATE ("can not update the capacity of a room", "UPDATE rooms SET Capacity=%u WHERE RooCod=%ld", NewCapacity,Roo_EditingRoom->RooCod); @@ -1129,8 +1312,8 @@ static void Roo_PutFormToCreateRoom (const struct Bld_Buildings *Buildings) /***** Room type *****/ HTM_TD_Begin ("class=\"LM\""); - HTM_INPUT_TEXT ("ShortName",Roo_MAX_CHARS_SHRT_NAME,Roo_EditingRoom->ShrtName,false, - "size=\"10\" class=\"INPUT_SHORT_NAME\" required=\"required\""); + Roo_PutSelectorType (Roo_EditingRoom->Type, + false); // Don't submit on change HTM_TD_End (); /***** Room short name *****/ @@ -1251,17 +1434,22 @@ void Roo_RecFormNewRoom (void) /**************************** Create a new room ******************************/ /*****************************************************************************/ -static void Roo_CreateRoom (const struct Roo_Room *Room) +static void Roo_CreateRoom (struct Roo_Room *Room) { + /***** Correct wrong room type *****/ + if ((unsigned) Room->Type >= Roo_NUM_TYPES) + Room->Type = Roo_NO_TYPE; + /***** Create a new room *****/ DB_QueryINSERT ("can not create room", "INSERT INTO rooms" - " (CtrCod,BldCod,Floor,ShortName,FullName,Capacity)" + " (CtrCod,BldCod,Floor,Type,ShortName,FullName,Capacity)" " VALUES" - " (%ld,%ld,%d,'%s','%s',%u)", + " (%ld,%ld,%d,'%s','%s','%s',%u)", Gbl.Hierarchy.Ctr.CtrCod, Room->BldCod, Room->Floor, + Roo_TypesDB[Room->Type], Room->ShrtName, Room->FullName, Room->Capacity); diff --git a/swad_room.h b/swad_room.h index 19e9b8cdf..e605142d3 100644 --- a/swad_room.h +++ b/swad_room.h @@ -44,32 +44,34 @@ #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_NUM_TYPES 25 typedef enum { - Roo_ADMINISTRATION = 0, // "user-tie.svg" // "Administración" - Roo_AUDITORIUM = 1, // "landmark.svg" "university.svg" "theater-masks.svg" // "Auditorio" - Roo_CAFETERIA = 2, // "coffee.svg" "mug-hot.svg" // "Cafetería" - Roo_CANTEEN = 3, // "utensils.svg" // "Comedor" - Roo_CLASSROOM = 4, // "chalkboard-teacher.svg" "chalkboard.svg" // "Aula" - Roo_CONCIERGE = 5, // "concierge-bell" "user-cog.svg" "house-user.svg" // "Conserjería/Portería" - Roo_CORRIDOR = 6, // "walking.svg" "map-signs.svg" "door-open.svg" // "Pasillo" - Roo_GYM = 7, // "dumbbell.svg" // "Gimnasio" - Roo_HALL = 8, // "map-signs.svg" "archway.svg" "hotel.svg" "concierge-bell.svg" "door-open.svg" "street-view.svg" // "Vestíbulo" - Roo_KINDERGARTEN = 9, // "child.svg" "baby.svg" "baby-carriage.svg" // "Guardería" - Roo_LABORATORY = 10, // "flask.svg" "microscope.svg" // "Laboratorio" - Roo_LIBRARY = 11, // "book.svg" "book-reader.svg" // "Biblioteca" - Roo_OFFICE = 12, // "house-user.svg" "door-open.svg" // "Oficina/Despacho" - Roo_OUTDOORS = 13, // "cloud-sun.svg" // "Exteriores" - Roo_PARKING = 14, // "car.svg" // "Parking" - Roo_PAVILION = 15, // "volleyball-ball.svg" "running.svg" // "Pabellón" - Roo_ROOM = 16, // // "Sala" - Roo_SECRETARIAT = 17, // "stamp.svg" "pen-alt.svg" "file-alt.svg" "user-tie.svg" // "Secretaría" - Roo_SEMINAR = 18, // "chalkboard-teacher.svg" "chalkboard.svg" // "Seminario" - Roo_SHOP = 19, // "shopping-cart.svg" "shopping-basket.svg" "store-alt.svg" shopping-bag // "Tienda" - Roo_STORE = 20, // "daily.svg" "boxes.svg" "box-open.svg" "box.svg" // "Almacén" - Roo_TOILETS = 21, // "toilet.svg" // "Aseos" - Roo_VIRTUAL = 22, // "laptop-house.svg" "cloud.svg" // "Virtual" - Roo_YARD = 23, // "canadian-mapple-leaf.svg" // "Patio/Jardín" + Roo_NO_TYPE = 0, // // "Sin tipo" + Roo_ADMINISTRATION = 1, // "user-tie.svg" // "Administración" + Roo_AUDITORIUM = 2, // "landmark.svg" "university.svg" "theater-masks.svg" // "Auditorio" + Roo_CAFETERIA = 3, // "coffee.svg" "mug-hot.svg" // "Cafetería" + Roo_CANTEEN = 4, // "utensils.svg" // "Comedor" + Roo_CLASSROOM = 5, // "chalkboard-teacher.svg" "chalkboard.svg" // "Aula" + Roo_CONCIERGE = 6, // "concierge-bell" "user-cog.svg" "house-user.svg" // "Conserjería/Portería" + Roo_CORRIDOR = 7, // "walking.svg" "map-signs.svg" "door-open.svg" // "Pasillo" + Roo_GYM = 8, // "dumbbell.svg" // "Gimnasio" + Roo_HALL = 9, // "map-signs.svg" "archway.svg" "hotel.svg" "concierge-bell.svg" "door-open.svg" "street-view.svg" // "Vestíbulo" + Roo_KINDERGARTEN = 10, // "child.svg" "baby.svg" "baby-carriage.svg" // "Guardería" + Roo_LABORATORY = 11, // "flask.svg" "microscope.svg" // "Laboratorio" + Roo_LIBRARY = 12, // "book.svg" "book-reader.svg" // "Biblioteca" + Roo_OFFICE = 13, // "house-user.svg" "door-open.svg" // "Despacho/Oficina" + Roo_OUTDOORS = 14, // "cloud-sun.svg" // "Exteriores" + Roo_PARKING = 15, // "car.svg" // "Aparcamiento" + Roo_PAVILION = 16, // "volleyball-ball.svg" "running.svg" // "Pabellón" + Roo_ROOM = 17, // "chalkboard.svg" // "Sala" + Roo_SECRETARIAT = 18, // "stamp.svg" "pen-alt.svg" "file-alt.svg" "user-tie.svg" // "Secretaría" + Roo_SEMINAR = 19, // "chalkboard-teacher.svg" "chalkboard.svg" // "Seminario" + Roo_SHOP = 20, // "shopping-cart.svg" "shopping-basket.svg" "store-alt.svg" "shopping-bag.svg" // "Tienda" + Roo_STORE = 21, // "daily.svg" "boxes.svg" "box-open.svg" "box.svg" // "Almacén" + Roo_TOILETS = 22, // "toilet.svg" // "Aseos" + Roo_VIRTUAL = 23, // "laptop-house.svg" "cloud.svg" // "Virtual" + Roo_YARD = 24, // "canadian-mapple-leaf.svg" // "Patio/Jardín" } Roo_RoomType_t; struct Roo_Room @@ -79,6 +81,7 @@ struct Roo_Room long BldCod; // Building code char BldShrtName[Bld_MAX_BYTES_SHRT_NAME + 1]; // Building short name int Floor; // Room floor + Roo_RoomType_t Type; // Room type 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 @@ -132,6 +135,7 @@ void Roo_RemoveRoom (void); void Roo_RemoveAllRoomsInCtr (long CtrCod); void Roo_ChangeBuilding (void); void Roo_ChangeFloor (void); +void Roo_ChangeType (void); void Roo_RenameRoomShort (void); void Roo_RenameRoomFull (void); void Roo_ChangeCapacity (void); diff --git a/swad_syllabus.c b/swad_syllabus.c index 5aa1020b4..8d4dc1d47 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -287,7 +287,7 @@ void Syl_EditSyllabus (void) Syl_ResetSyllabus (&Syllabus); /***** Edit syllabus *****/ - (void) Syl_CheckAndEditSyllabus (&Syllabus); + Syl_CheckAndEditSyllabus (&Syllabus); } /*****************************************************************************/ diff --git a/swad_text.c b/swad_text.c index eabd89b54..9aeff5da5 100644 --- a/swad_text.c +++ b/swad_text.c @@ -38417,6 +38417,534 @@ const char *Txt_ROOMS_ORDER[Roo_NUM_ORDERS] = #endif }; +const char *Txt_ROOM_TYPES[Roo_NUM_TYPES] = + { + [Roo_NO_TYPE] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "No type" +#elif L==4 // es + "Sin tipo" +#elif L==5 // fr + "" +#elif L==6 // gn + "Sin tipo" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_ADMINISTRATION] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Administration" +#elif L==4 // es + "Administración" +#elif L==5 // fr + "" +#elif L==6 // gn + "Administración" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_AUDITORIUM] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Auditorium" +#elif L==4 // es + "Auditorio" +#elif L==5 // fr + "" +#elif L==6 // gn + "Auditorio" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_CAFETERIA] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Cafeteria" +#elif L==4 // es + "Cafetería" +#elif L==5 // fr + "" +#elif L==6 // gn + "Cafetería" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_CANTEEN] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Canteen" +#elif L==4 // es + "Comedor" +#elif L==5 // fr + "" +#elif L==6 // gn + "Comedor" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_CLASSROOM] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Classroom" +#elif L==4 // es + "Aula" +#elif L==5 // fr + "" +#elif L==6 // gn + "Aula" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_CONCIERGE] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Concierge" +#elif L==4 // es + "Conserjería/Portería" +#elif L==5 // fr + "" +#elif L==6 // gn + "Conserjería/Portería" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_CORRIDOR] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Corridor" +#elif L==4 // es + "Pasillo" +#elif L==5 // fr + "" +#elif L==6 // gn + "Pasillo" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_GYM] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Gym" +#elif L==4 // es + "Gimnasio" +#elif L==5 // fr + "" +#elif L==6 // gn + "Gimnasio" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_HALL] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Hall" +#elif L==4 // es + "Vestíbulo" +#elif L==5 // fr + "" +#elif L==6 // gn + "Vestíbulo" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_KINDERGARTEN] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Kindergarten" +#elif L==4 // es + "Guardería" +#elif L==5 // fr + "" +#elif L==6 // gn + "Guardería" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_LABORATORY] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Laboratory" +#elif L==4 // es + "Laboratorio" +#elif L==5 // fr + "" +#elif L==6 // gn + "Laboratorio" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_LIBRARY] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Library" +#elif L==4 // es + "Biblioteca" +#elif L==5 // fr + "" +#elif L==6 // gn + "Biblioteca" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_OFFICE] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Office" +#elif L==4 // es + "Despacho/Oficina" +#elif L==5 // fr + "" +#elif L==6 // gn + "Despacho/Oficina" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_OUTDOORS] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Outdoors" +#elif L==4 // es + "Exteriores" +#elif L==5 // fr + "" +#elif L==6 // gn + "Exteriores" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_PARKING] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Parking" +#elif L==4 // es + "Aparcamiento" +#elif L==5 // fr + "" +#elif L==6 // gn + "Aparcamiento" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_PAVILION] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Pavilion" +#elif L==4 // es + "Pabellón" +#elif L==5 // fr + "" +#elif L==6 // gn + "Pabellón" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_ROOM] = +#if L==1 // ca + "Sala" +#elif L==2 // de + "Raum" +#elif L==3 // en + "Room" +#elif L==4 // es + "Sala" +#elif L==5 // fr + "Salle" +#elif L==6 // gn + "Mbo'ehakoty" +#elif L==7 // it + "Aula" +#elif L==8 // pl + "Klasa" +#elif L==9 // pt + "Sala" +#endif + , + [Roo_SECRETARIAT] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Secretariat" +#elif L==4 // es + "Secretaría" +#elif L==5 // fr + "" +#elif L==6 // gn + "Secretaría" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_SEMINAR] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Seminar" +#elif L==4 // es + "Seminario" +#elif L==5 // fr + "" +#elif L==6 // gn + "Seminario" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_SHOP] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Shop" +#elif L==4 // es + "Tienda" +#elif L==5 // fr + "" +#elif L==6 // gn + "Tienda" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_STORE] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Store" +#elif L==4 // es + "Almacén" +#elif L==5 // fr + "" +#elif L==6 // gn + "Almacén" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_TOILETS] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Toilets" +#elif L==4 // es + "Aseos" +#elif L==5 // fr + "" +#elif L==6 // gn + "Aseos" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_VIRTUAL] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Virtual" +#elif L==4 // es + "Virtual" +#elif L==5 // fr + "" +#elif L==6 // gn + "Virtual" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + , + [Roo_YARD] = +#if L==1 // ca + "" +#elif L==2 // de + "" +#elif L==3 // en + "Yard" +#elif L==4 // es + "Patio/Jardín" +#elif L==5 // fr + "" +#elif L==6 // gn + "Patio/Jardín" // Okoteve traducción +#elif L==7 // it + "" +#elif L==8 // pl + "" +#elif L==9 // pt + "" +#endif + }; + const char *Txt_Rooms = #if L==1 // ca "Sales"; @@ -48974,6 +49502,48 @@ const char *Txt_The_type_of_enrolment_of_the_type_of_group_X_has_not_changed = / "O tipo de inscrição do tipo de grupo %s não foi alterado."; #endif +const char *Txt_The_type_of_room_X_has_not_changed = // Warning: it is very important to include %s in the following sentences +#if L==1 // ca + "El tipus de la sala %s no ha canviat."; +#elif L==2 // de + "Der Art des Raum %s hat sich nicht geändert."; +#elif L==3 // en + "The type of room %s has not changed."; +#elif L==4 // es + "El tipo de la sala %s no ha cambiado."; +#elif L==5 // fr + "Le type de la salle %s n'a pas changé."; +#elif L==6 // gn + "El tipo de la sala %s no ha cambiado."; // Okoteve traducción +#elif L==7 // it + "Il tipo della aula %s non è cambiata."; +#elif L==8 // pl + "Typ klasy %s nie uległa zmianie."; +#elif L==9 // pt + "O tipo da sala %s não mudou."; +#endif + +const char *Txt_The_type_of_room_X_is_now_Y = // Warning: it is very important to include two %s in the following sentences +#if L==1 // ca + "El tipus de la sala %s ara és %s."; +#elif L==2 // de + "Der Art des Raum %s beträgt jetzt %s."; +#elif L==3 // en + "The type of room %s is now %s."; +#elif L==4 // es + "El tipo de la sala %s ahora es %s."; +#elif L==5 // fr + "Le type de la salle %s est maintenant de %s."; +#elif L==6 // gn + "El tipo de la sala %s ahora es %s."; // Okoteve traducción +#elif L==7 // it + "Il tipo della aula %s è ora %s."; +#elif L==8 // pl + "Typ klasy %s wynosi teraz %s."; +#elif L==9 // pt + "O tipo da sala %s é agora %s."; +#endif + const char *Txt_The_type_of_the_holiday_X_has_changed = // Warning: it is very important to include %s in the following sentences #if L==1 // ca "El tipo de la festividad %s ha cambiado."; // Necessita traduccio