Version18.128

This commit is contained in:
Antonio Cañas Vargas 2019-06-13 10:14:05 +02:00
parent 2be8b91498
commit 971d7f19d9
9 changed files with 69 additions and 38 deletions

View File

@ -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;

View File

@ -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" },

View File

@ -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;
}

View File

@ -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:

View File

@ -129,7 +129,10 @@
/* Google Analytics without cookies.
* This code comes from http://stackoverflow.com/a/19995629
*/
#define Cfg_GOOGLE_ANALYTICS "<script type=\"text/javascript\">" \
#define Cfg_GOOGLE_ANALYTICS ""
/*
"<script type=\"text/javascript\">" \
" (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" \
" (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o)," \
" m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)" \
@ -144,6 +147,7 @@
" });" \
" ga('send', 'pageview');" \
"</script>"
*/
#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 "<script type=\"text/javascript\">" \
#define Cfg_GOOGLE_ANALYTICS ""
/*
"<script type=\"text/javascript\">" \
" (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" \
" (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o)," \
" m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)" \
@ -199,6 +206,7 @@
" });" \
" ga('send', 'pageview');" \
"</script>"
*/
#elif defined SWADBERRY_UGR_ES // swadberry.ugr.es ******************

View File

@ -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);
}

View File

@ -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

View File

@ -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)

View File

@ -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;
}