diff --git a/sql/cambios.sql b/sql/cambios.sql
index e4aecfd2..64e9311d 100644
--- a/sql/cambios.sql
+++ b/sql/cambios.sql
@@ -12862,3 +12862,7 @@ INSERT INTO social_pubs (NotCod,PublisherCod,PubType,TimePublish) VALUES (600,71
INSERT IGNORE INTO social_comments_fav (PubCod,UsrCod,TimeFav) VALUES (1294,7140,NOW());
+SELECT COUNT(*) FROM degrees WHERE CtrCod=2 AND FullName='Máster Universitario en Electrónica Industrial' AND DegCod<>-1;
+
+
+
diff --git a/swad_action.c b/swad_action.c
index f35424f8..a68b897c 100644
--- a/swad_action.c
+++ b/swad_action.c
@@ -2019,7 +2019,8 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActSeeAsg */{ 801, 1,TabAss,ActSeeAsg ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Asg_SeeAssignments ,"edit" },
/* ActSeePrj */{1674, 2,TabAss,ActSeePrj ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Prj_SeeProjects ,"file-alt" },
/* ActReqTst */{ 103, 3,TabAss,ActReqTst ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Tst_ShowFormAskTst ,"check" },
- /* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
+// /* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x238,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
+ /* ActSeeAllGam */{1649, 4,TabAss,ActSeeAllGam ,0x200,0x200, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Gam_SeeAllGames ,"gamepad" },
/* ActSeeAllSvy */{ 966, 5,TabAss,ActSeeAllSvy ,0x3F8,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,0x3C0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Svy_SeeAllSurveys ,"poll" },
/* ActSeeAllExaAnn */{ 85, 6,TabAss,ActSeeAllExaAnn ,0x3F8,0x3C7, 0, 0, 0, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Exa_ListExamAnnouncementsSee ,"bullhorn" },
diff --git a/swad_centre.c b/swad_centre.c
index e3b97562..98a71e26 100644
--- a/swad_centre.c
+++ b/swad_centre.c
@@ -1819,6 +1819,8 @@ void Ctr_RemoveCentre (void)
Ale_CreateAlert (Ale_SUCCESS,NULL,
Txt_Centre_X_removed,
Ctr_EditingCtr->FullName);
+
+ Ctr_EditingCtr->CtrCod = -1L; // To not showing button to go to centre
}
}
@@ -3013,17 +3015,17 @@ static void Ctr_EditingCentreConstructor (void)
Lay_ShowErrorAndExit ("Error allocating memory for centre.");
/***** Reset centre *****/
- Ctr_EditingCtr->CtrCod = -1L;
- Ctr_EditingCtr->InsCod = -1L;
- Ctr_EditingCtr->PlcCod = -1L;
+ Ctr_EditingCtr->CtrCod = -1L;
+ Ctr_EditingCtr->InsCod = -1L;
+ Ctr_EditingCtr->PlcCod = -1L;
Ctr_EditingCtr->RequesterUsrCod = -1L;
- Ctr_EditingCtr->ShrtName[0] = '\0';
- Ctr_EditingCtr->FullName[0] = '\0';
- Ctr_EditingCtr->WWW[0] = '\0';
- Ctr_EditingCtr->Degs.Num = 0;
- Ctr_EditingCtr->Degs.Lst = NULL;
- Ctr_EditingCtr->NumCrss = 0;
- Ctr_EditingCtr->NumUsrs = 0;
+ Ctr_EditingCtr->ShrtName[0] = '\0';
+ Ctr_EditingCtr->FullName[0] = '\0';
+ Ctr_EditingCtr->WWW[0] = '\0';
+ Ctr_EditingCtr->Degs.Num = 0;
+ Ctr_EditingCtr->Degs.Lst = NULL;
+ Ctr_EditingCtr->NumCrss = 0;
+ Ctr_EditingCtr->NumUsrs = 0;
Ctr_EditingCtr->NumUsrsWhoClaimToBelongToCtr = 0;
}
diff --git a/swad_changelog.h b/swad_changelog.h
index a8a90c84..6998f121 100644
--- a/swad_changelog.h
+++ b/swad_changelog.h
@@ -456,10 +456,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
-#define Log_PLATFORM_VERSION "SWAD 18.127.3 (2019-05-31)"
+#define Log_PLATFORM_VERSION "SWAD 18.128 (2019-06-13)"
#define CSS_FILE "swad18.123.css"
#define JS_FILE "swad18.123.js"
/*
+ Version 18.128: Jun 13, 2019 Fixed bug in creation of degrees. (243365 lines)
Version 18.127.3: May 31, 2019 Code refactoring and cleaning in games. (243346 lines)
Version 18.127.2: May 31, 2019 Question index is shown in match status.
New action to show results of a finished match. (243493 lines)
@@ -503,13 +504,13 @@ CREATE TABLE IF NOT EXISTS gam_matches (MchCod INT NOT NULL AUTO_INCREMENT,GamCo
Version 18.124: May 28, 2019 Every game can have several matches (game instances). (243400 lines)
3 changes necessary in database:
-DROP TABLE gam_played,gam_matches,gam_grp;
+DROP TABLE gam_matches,gam_grp;
CREATE TABLE IF NOT EXISTS gam_matches (MchCod INT NOT NULL AUTO_INCREMENT,GamCod INT NOT NULL,StartTime DATETIME NOT NULL,EndTime DATETIME NOT NULL,UsrCod INT NOT NULL,Title VARCHAR(2047) NOT NULL,UNIQUE INDEX(MchCod),INDEX(GamCod));
CREATE TABLE IF NOT EXISTS gam_grp (MchCod INT NOT NULL,GrpCod INT NOT NULL,UNIQUE INDEX(MchCod,GrpCod));
Version 18.123.2: May 23, 2019 New table with games instances already played. (242829 lines)
1 change necessary in database:
-CREATE TABLE IF NOT EXISTS gam_matches (MchCod INT NOT NULL AUTO_INCREMENT,GamCod INT NOT NULL,Start DATETIME NOT NULL,UNIQUE INDEX(GamPlyCod),INDEX(GamCod));
+CREATE TABLE IF NOT EXISTS gam_matches (MchCod INT NOT NULL AUTO_INCREMENT,GamCod INT NOT NULL,Start DATETIME NOT NULL,UNIQUE INDEX(MchCod),INDEX(GamCod));
Version 18.123.1: May 22, 2019 Wait icon while a game has not started. (242788 lines)
Copy the following icon to icon public directory:
diff --git a/swad_config.h b/swad_config.h
index fde4f288..25c0346a 100644
--- a/swad_config.h
+++ b/swad_config.h
@@ -129,7 +129,10 @@
/* Google Analytics without cookies.
* This code comes from http://stackoverflow.com/a/19995629
*/
-#define Cfg_GOOGLE_ANALYTICS ""
+*/
#elif defined SWAD_UGR_ES // swad.ugr.es *************************
@@ -184,7 +188,10 @@
#define Cfg_TIME_TO_SEND_PENDING_NOTIF ((time_t) (60UL * 60UL)) // After these seconds after first pending notification, all the pending notifications are sent by email
-#define Cfg_GOOGLE_ANALYTICS ""
+*/
#elif defined SWADBERRY_UGR_ES // swadberry.ugr.es ******************
diff --git a/swad_country.c b/swad_country.c
index c2614e2e..af5bf8f7 100644
--- a/swad_country.c
+++ b/swad_country.c
@@ -1782,6 +1782,8 @@ void Cty_RemoveCountry (void)
Ale_CreateAlert (Ale_SUCCESS,NULL,
Txt_Country_X_removed,
Cty_EditingCty->Name[Gbl.Prefs.Language]);
+
+ Cty_EditingCty->CtyCod = -1L; // To not showing button to go to country
}
}
@@ -2001,10 +2003,15 @@ void Cty_ContEditAfterChgCty (void)
static void Cty_ShowAlertAndButtonToGoToCty (void)
{
+ extern const char *Txt_Go_to_X;
+
// If the country being edited is different to the current one...
if (Cty_EditingCty->CtyCod != Gbl.Hierarchy.Cty.CtyCod)
{
/***** Alert with button to go to couuntry *****/
+ snprintf (Gbl.Title,sizeof (Gbl.Title),
+ Txt_Go_to_X,
+ Cty_EditingCty->Name[Gbl.Prefs.Language]);
Ale_ShowLastAlertAndButton (ActSeeIns,NULL,NULL,Cty_PutParamGoToCty,
Btn_CONFIRM_BUTTON,Gbl.Title);
}
diff --git a/swad_course.c b/swad_course.c
index 0abeba43..dc3eedb0 100644
--- a/swad_course.c
+++ b/swad_course.c
@@ -2029,6 +2029,8 @@ void Crs_RemoveCourse (void)
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Course_X_removed,
Crs_EditingCrs->FullName);
+
+ Crs_EditingCrs->CrsCod = -1L; // To not showing button to go to course
}
}
else
diff --git a/swad_degree.c b/swad_degree.c
index 14458dee..6b31b40d 100644
--- a/swad_degree.c
+++ b/swad_degree.c
@@ -1558,9 +1558,6 @@ void Deg_RecFormNewDeg (void)
/***** Receive form to create a new degree *****/
Deg_RecFormRequestOrCreateDeg (0);
-
- /***** Degree destructor *****/
- Deg_EditingDegreeDestructor ();
}
/*****************************************************************************/
@@ -1654,6 +1651,8 @@ void Deg_RemoveDegree (void)
Ale_CreateAlert (Ale_SUCCESS,NULL,
Txt_Degree_X_removed,
Deg_EditingDeg->FullName);
+
+ Deg_EditingDeg->DegCod = -1L; // To not showing button to go to degree
}
}
@@ -2670,16 +2669,16 @@ static void Deg_EditingDegreeConstructor (void)
Lay_ShowErrorAndExit ("Error allocating memory for degree.");
/***** Reset degree *****/
- Deg_EditingDeg->DegCod = -1L;
- Deg_EditingDeg->DegTypCod = -1L;
- Deg_EditingDeg->CtrCod = -1L;
- Deg_EditingDeg->Status = 0;
+ Deg_EditingDeg->DegCod = -1L;
+ Deg_EditingDeg->DegTypCod = -1L;
+ Deg_EditingDeg->CtrCod = -1L;
+ Deg_EditingDeg->Status = 0;
Deg_EditingDeg->RequesterUsrCod = -1L;
- Deg_EditingDeg->ShrtName[0] = '\0';
- Deg_EditingDeg->FullName[0] = '\0';
- Deg_EditingDeg->WWW[0] = '\0';
- Deg_EditingDeg->Crss.Num = 0;
- Deg_EditingDeg->Crss.Lst = NULL;
+ Deg_EditingDeg->ShrtName[0] = '\0';
+ Deg_EditingDeg->FullName[0] = '\0';
+ Deg_EditingDeg->WWW[0] = '\0';
+ Deg_EditingDeg->Crss.Num = 0;
+ Deg_EditingDeg->Crss.Lst = NULL;
}
static void Deg_EditingDegreeDestructor (void)
diff --git a/swad_institution.c b/swad_institution.c
index e9e53188..bd910f4b 100644
--- a/swad_institution.c
+++ b/swad_institution.c
@@ -1788,6 +1788,8 @@ void Ins_RemoveInstitution (void)
Ale_CreateAlert (Ale_SUCCESS,NULL,
Txt_Institution_X_removed,
Ins_EditingIns->FullName);
+
+ Ins_EditingIns->InsCod = -1L; // To not showing button to go to institution
}
}
@@ -2163,10 +2165,15 @@ void Ins_ContEditAfterChgIns (void)
static void Ins_ShowAlertAndButtonToGoToIns (void)
{
+ extern const char *Txt_Go_to_X;
+
// If the institution being edited is different to the current one...
if (Ins_EditingIns->InsCod != Gbl.Hierarchy.Ins.InsCod)
{
/***** Alert with button to go to institution *****/
+ snprintf (Gbl.Title,sizeof (Gbl.Title),
+ Txt_Go_to_X,
+ Ins_EditingIns->ShrtName);
Ale_ShowLastAlertAndButton (ActSeeCtr,NULL,NULL,Ins_PutParamGoToIns,
Btn_CONFIRM_BUTTON,Gbl.Title);
}
@@ -2623,17 +2630,17 @@ static void Ins_EditingInstitutionConstructor (void)
Lay_ShowErrorAndExit ("Error allocating memory for institution.");
/***** Reset institution *****/
- Ins_EditingIns->InsCod = -1L;
- Ins_EditingIns->CtyCod = -1L;
- Ins_EditingIns->ShrtName[0] = '\0';
- Ins_EditingIns->FullName[0] = '\0';
- Ins_EditingIns->WWW[0] = '\0';
- Ins_EditingIns->Ctrs.Num = 0;
- Ins_EditingIns->Ctrs.Lst = NULL;
+ Ins_EditingIns->InsCod = -1L;
+ Ins_EditingIns->CtyCod = -1L;
+ Ins_EditingIns->ShrtName[0] = '\0';
+ Ins_EditingIns->FullName[0] = '\0';
+ Ins_EditingIns->WWW[0] = '\0';
+ Ins_EditingIns->Ctrs.Num = 0;
+ Ins_EditingIns->Ctrs.Lst = NULL;
Ins_EditingIns->Ctrs.SelectedOrder = Ctr_ORDER_DEFAULT;
- Ins_EditingIns->NumDpts = 0;
- Ins_EditingIns->NumDegs = 0;
- Ins_EditingIns->NumUsrs = 0;
+ Ins_EditingIns->NumDpts = 0;
+ Ins_EditingIns->NumDegs = 0;
+ Ins_EditingIns->NumUsrs = 0;
Ins_EditingIns->NumUsrsWhoClaimToBelongToIns = 0;
}