diff --git a/icon/classroom.svg b/icon/classroom.svg
new file mode 100644
index 000000000..eee531cb7
--- /dev/null
+++ b/icon/classroom.svg
@@ -0,0 +1 @@
+
diff --git a/icon/iconset/awesome/classroom.svg b/icon/iconset/awesome/classroom.svg
new file mode 100644
index 000000000..eee531cb7
--- /dev/null
+++ b/icon/iconset/awesome/classroom.svg
@@ -0,0 +1 @@
+
diff --git a/icon/iconset/nuvola/classroom.svg b/icon/iconset/nuvola/classroom.svg
new file mode 100644
index 000000000..8fa2256de
--- /dev/null
+++ b/icon/iconset/nuvola/classroom.svg
@@ -0,0 +1,138 @@
+
+
+
diff --git a/sql/swad.sql b/sql/swad.sql
index 075309401..bd8a156d2 100644
--- a/sql/swad.sql
+++ b/sql/swad.sql
@@ -178,6 +178,18 @@ CREATE TABLE IF NOT EXISTS chat (
NumUsrs INT NOT NULL,
UNIQUE INDEX(RoomCode));
--
+-- Table classrooms: stores the classrooms associated to each centre
+--
+CREATE TABLE IF NOT EXISTS classrooms (
+ ClaCod INT NOT NULL AUTO_INCREMENT,
+ CtrCod INT NOT NULL,
+ ShortName VARCHAR(511) NOT NULL,
+ FullName VARCHAR(2047) NOT NULL,
+ NumStds INT NOT NULL,
+ UNIQUE INDEX(ClaCod),
+ INDEX(CtrCod),
+ INDEX(NumStds));
+--
-- Table clicks_without_photo: stores the number of clicks that remains to each user before being required to submit his/her photo
--
CREATE TABLE IF NOT EXISTS clicks_without_photo (
diff --git a/swad_changelog.h b/swad_changelog.h
index be3654f07..5795c6817 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -364,11 +364,24 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 18.25.1 (2018-12-29)"
+#define Log_PLATFORM_VERSION "SWAD 18.25.2 (2018-12-30)"
#define CSS_FILE "swad18.22.css"
#define JS_FILE "swad17.17.1.js"
/*
- Version 18.25.1: Dec 29, 2018 Changes in translation related to classrooms. (238498 lines)
+ Version 18.25.2: Dec 30, 2018 New database table for classrooms. (238525 lines)
+ 8 changes necessary in database:
+CREATE TABLE IF NOT EXISTS classrooms (ClaCod INT NOT NULL AUTO_INCREMENT,CtrCod INT NOT NULL,ShortName VARCHAR(511) NOT NULL,FullName VARCHAR(2047) NOT NULL,NumStds INT NOT NULL,UNIQUE INDEX(ClaCod),INDEX(CtrCod),INDEX(NumStds));
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1744','es','N','Ver aulas');
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1745','es','N','Editar aulas');
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1746','es','N','Crear aula');
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1747','es','N','Eliminar aula');
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1748','es','N','Cambiar nombre breve aula');
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1749','es','N','Cambiar nombre completo aula');
+INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1750','es','N','Cambiar nº estudiantes aula');
+ Copy the following icon to icon public directory:
+sudo cp classroom.svg /var/www/html/swad/icon/
+
+ Version 18.25.1: Dec 30, 2018 Changes in translation related to classrooms. (238498 lines)
Version 18.25: Dec 29, 2018 New option and module to view/edit classrooms in a centre. Not finished. (238375 lines)
Version 18.24: Dec 29, 2018 Option for view/edit places is separated from centres. (237242 lines)
Version 18.23: Dec 27, 2018 Changes in directories for icon sets.
diff --git a/swad_database.c b/swad_database.c
index 168eaa66e..ced306752 100644
--- a/swad_database.c
+++ b/swad_database.c
@@ -464,6 +464,30 @@ mysql> DESCRIBE chat;
"NumUsrs INT NOT NULL,"
"UNIQUE INDEX(RoomCode))");
+ /***** Table classrooms *****/
+/*
+mysql> DESCRIBE classrooms;
++-----------+---------------+------+-----+---------+----------------+
+| Field | Type | Null | Key | Default | Extra |
++-----------+---------------+------+-----+---------+----------------+
+| ClaCod | int(11) | NO | PRI | NULL | auto_increment |
+| CtrCod | int(11) | NO | MUL | NULL | |
+| ShortName | varchar(511) | NO | | NULL | |
+| FullName | varchar(2047) | NO | | NULL | |
+| NumStds | int(11) | NO | MUL | NULL | |
++-----------+---------------+------+-----+---------+----------------+
+5 rows in set (0.00 sec)
+*/
+ DB_CreateTable ("CREATE TABLE IF NOT EXISTS classrooms ("
+ "ClaCod INT NOT NULL AUTO_INCREMENT,"
+ "CtrCod INT NOT NULL,"
+ "ShortName VARCHAR(511) NOT NULL," // Cla_MAX_BYTES_CLASSROOM_SHRT_NAME
+ "FullName VARCHAR(2047) NOT NULL," // Cla_MAX_BYTES_CLASSROOM_FULL_NAME
+ "NumStds INT NOT NULL,"
+ "UNIQUE INDEX(ClaCod),"
+ "INDEX(CtrCod),"
+ "INDEX(NumStds))");
+
/***** Table clicks_without_photo *****/
/*
mysql> DESCRIBE clicks_without_photo;
diff --git a/swad_text.c b/swad_text.c
index e3ded1394..1f9d36bdd 100644
--- a/swad_text.c
+++ b/swad_text.c
@@ -3937,7 +3937,7 @@ const char *Txt_CLASSROOMS_HELP_ORDER[Cla_NUM_ORDERS] =
#endif
};
-const char *Txt_CLASSROOMS_ORDER[Plc_NUM_ORDERS] =
+const char *Txt_CLASSROOMS_ORDER[Cla_NUM_ORDERS] =
{
#if L==1 // ca
"Aula"