Version 17.0.2

This commit is contained in:
Antonio Cañas Vargas 2017-09-14 01:10:20 +02:00
parent 34a0e4b8b5
commit 69afbde17f
13 changed files with 1337 additions and 1326 deletions

View File

@ -2390,35 +2390,36 @@ a:hover img.CENTRE_PHOTO_SHOW
{
box-sizing:border-box;
margin:5%;
text-align:left;
vertical-align:middle;
}
.GAM_PLAY_CONTAINER a
{
text-decoration:none;
}
.GAM_PLAY_NUM_QST
{
display:inline-block;
width:15%;
float:left;
position:relative;
/* position:relative; */
padding-bottom:24pt;
color:#808080;
font-size:48pt;
font-weight:bold;
}
.GAM_PLAY_QST_STEM
{
display:inline-block;
width:85%;
float:left;
position:relative;
/* position:relative; */
padding-bottom:24pt;
color:#404040;
font-size:24pt;
}
.GAM_PLAY_CONTINUE_CONTAINER
{
text-align:center;
}
.GAM_PLAY_CONTINUE_CONTAINER a
{
text-decoration:none;
}
.GAM_PLAY_CONTINUE
{
color:#404040;
font-size:24pt;
}

View File

@ -372,7 +372,7 @@ void ID_WriteUsrIDs (struct UsrData *UsrDat,const char *Anchor)
ICanConfirmUsrID = ICanSeeUsrID &&
(UsrDat->UsrCod != Gbl.Usrs.Me.UsrDat.UsrCod) && // Not me
!Gbl.Form.Inside && // Not inside another form
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB; // Only in main browser tab
for (NumID = 0;
NumID < UsrDat->IDs.Num;

File diff suppressed because it is too large Load Diff

View File

@ -49,17 +49,18 @@ typedef enum
typedef enum
{
Act_THIS_WINDOW, // The current tab in the browser
Act_BLNK_WINDOW, // A new blank tab in the browser
Act_BRW_1ST_TAB, // The main (original, first) tab in the browser
Act_BRW_NEW_TAB, // A new (second) blank tab in the browser
Act_BRW_2ND_TAB, // The second tab in the browser
Act_UPLOAD_FILE, // Upload a file. Do not write HTML content. Write Status code instead for Dropzone.js
Act_DOWNLD_FILE, // Download a file in a new window. Do not write HTML content.
} Act_BrowserWindow_t;
Act_DOWNLD_FILE, // Download a file in a new tab. Do not write HTML content.
} Act_BrowserTab_t;
typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 33 + 24 + 115 + 94 + 416 + 165 + 172 + 42 + 14 + 97)
#define Act_NUM_ACTIONS (1 + 9 + 43 + 17 + 47 + 33 + 24 + 115 + 95 + 416 + 165 + 172 + 42 + 14 + 97)
#define Act_MAX_ACTION_COD 1671
#define Act_MAX_ACTION_COD 1672
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 12
@ -487,52 +488,53 @@ typedef signed int Act_Action_t; // Must be a signed type, because -1 is used to
#define ActSeeOneGam (ActChgCalCrs1stDay + 49)
#define ActPlyGam (ActChgCalCrs1stDay + 50)
#define ActPlyGamNxtQst (ActChgCalCrs1stDay + 51)
#define ActAnsGam (ActChgCalCrs1stDay + 52)
#define ActFrmNewGam (ActChgCalCrs1stDay + 53)
#define ActEdiOneGam (ActChgCalCrs1stDay + 54)
#define ActNewGam (ActChgCalCrs1stDay + 55)
#define ActChgGam (ActChgCalCrs1stDay + 56)
#define ActReqRemGam (ActChgCalCrs1stDay + 57)
#define ActRemGam (ActChgCalCrs1stDay + 58)
#define ActReqRstGam (ActChgCalCrs1stDay + 59)
#define ActRstGam (ActChgCalCrs1stDay + 60)
#define ActHidGam (ActChgCalCrs1stDay + 61)
#define ActShoGam (ActChgCalCrs1stDay + 62)
#define ActAddOneGamQst (ActChgCalCrs1stDay + 63)
#define ActGamLstTstQst (ActChgCalCrs1stDay + 64)
#define ActAddTstQstToGam (ActChgCalCrs1stDay + 65)
#define ActReqRemGamQst (ActChgCalCrs1stDay + 66)
#define ActRemGamQst (ActChgCalCrs1stDay + 67)
#define ActUp_GamQst (ActChgCalCrs1stDay + 68)
#define ActDwnGamQst (ActChgCalCrs1stDay + 69)
#define ActPlyGam1stQst (ActChgCalCrs1stDay + 51)
#define ActPlyGamNxtQst (ActChgCalCrs1stDay + 52)
#define ActAnsGam (ActChgCalCrs1stDay + 53)
#define ActFrmNewGam (ActChgCalCrs1stDay + 54)
#define ActEdiOneGam (ActChgCalCrs1stDay + 55)
#define ActNewGam (ActChgCalCrs1stDay + 56)
#define ActChgGam (ActChgCalCrs1stDay + 57)
#define ActReqRemGam (ActChgCalCrs1stDay + 58)
#define ActRemGam (ActChgCalCrs1stDay + 59)
#define ActReqRstGam (ActChgCalCrs1stDay + 60)
#define ActRstGam (ActChgCalCrs1stDay + 61)
#define ActHidGam (ActChgCalCrs1stDay + 62)
#define ActShoGam (ActChgCalCrs1stDay + 63)
#define ActAddOneGamQst (ActChgCalCrs1stDay + 64)
#define ActGamLstTstQst (ActChgCalCrs1stDay + 65)
#define ActAddTstQstToGam (ActChgCalCrs1stDay + 66)
#define ActReqRemGamQst (ActChgCalCrs1stDay + 67)
#define ActRemGamQst (ActChgCalCrs1stDay + 68)
#define ActUp_GamQst (ActChgCalCrs1stDay + 69)
#define ActDwnGamQst (ActChgCalCrs1stDay + 70)
#define ActSeeOneSvy (ActChgCalCrs1stDay + 70)
#define ActAnsSvy (ActChgCalCrs1stDay + 71)
#define ActFrmNewSvy (ActChgCalCrs1stDay + 72)
#define ActEdiOneSvy (ActChgCalCrs1stDay + 73)
#define ActNewSvy (ActChgCalCrs1stDay + 74)
#define ActChgSvy (ActChgCalCrs1stDay + 75)
#define ActReqRemSvy (ActChgCalCrs1stDay + 76)
#define ActRemSvy (ActChgCalCrs1stDay + 77)
#define ActReqRstSvy (ActChgCalCrs1stDay + 78)
#define ActRstSvy (ActChgCalCrs1stDay + 79)
#define ActHidSvy (ActChgCalCrs1stDay + 80)
#define ActShoSvy (ActChgCalCrs1stDay + 81)
#define ActEdiOneSvyQst (ActChgCalCrs1stDay + 82)
#define ActRcvSvyQst (ActChgCalCrs1stDay + 83)
#define ActReqRemSvyQst (ActChgCalCrs1stDay + 84)
#define ActRemSvyQst (ActChgCalCrs1stDay + 85)
#define ActSeeOneSvy (ActChgCalCrs1stDay + 71)
#define ActAnsSvy (ActChgCalCrs1stDay + 72)
#define ActFrmNewSvy (ActChgCalCrs1stDay + 73)
#define ActEdiOneSvy (ActChgCalCrs1stDay + 74)
#define ActNewSvy (ActChgCalCrs1stDay + 75)
#define ActChgSvy (ActChgCalCrs1stDay + 76)
#define ActReqRemSvy (ActChgCalCrs1stDay + 77)
#define ActRemSvy (ActChgCalCrs1stDay + 78)
#define ActReqRstSvy (ActChgCalCrs1stDay + 79)
#define ActRstSvy (ActChgCalCrs1stDay + 80)
#define ActHidSvy (ActChgCalCrs1stDay + 81)
#define ActShoSvy (ActChgCalCrs1stDay + 82)
#define ActEdiOneSvyQst (ActChgCalCrs1stDay + 83)
#define ActRcvSvyQst (ActChgCalCrs1stDay + 84)
#define ActReqRemSvyQst (ActChgCalCrs1stDay + 85)
#define ActRemSvyQst (ActChgCalCrs1stDay + 86)
#define ActSeeOneExaAnn (ActChgCalCrs1stDay + 86)
#define ActSeeDatExaAnn (ActChgCalCrs1stDay + 87)
#define ActEdiExaAnn (ActChgCalCrs1stDay + 88)
#define ActRcvExaAnn (ActChgCalCrs1stDay + 89)
#define ActPrnExaAnn (ActChgCalCrs1stDay + 90)
#define ActReqRemExaAnn (ActChgCalCrs1stDay + 91)
#define ActRemExaAnn (ActChgCalCrs1stDay + 92)
#define ActHidExaAnn (ActChgCalCrs1stDay + 93)
#define ActShoExaAnn (ActChgCalCrs1stDay + 94)
#define ActSeeOneExaAnn (ActChgCalCrs1stDay + 87)
#define ActSeeDatExaAnn (ActChgCalCrs1stDay + 88)
#define ActEdiExaAnn (ActChgCalCrs1stDay + 89)
#define ActRcvExaAnn (ActChgCalCrs1stDay + 90)
#define ActPrnExaAnn (ActChgCalCrs1stDay + 91)
#define ActReqRemExaAnn (ActChgCalCrs1stDay + 92)
#define ActRemExaAnn (ActChgCalCrs1stDay + 93)
#define ActHidExaAnn (ActChgCalCrs1stDay + 94)
#define ActShoExaAnn (ActChgCalCrs1stDay + 95)
/*****************************************************************************/
/******************************** Files tab **********************************/
@ -1567,7 +1569,7 @@ struct Act_Actions
unsigned PermissionCty;
unsigned PermissionSys;
Act_Content_t ContentType;
Act_BrowserWindow_t BrowserWindow;
Act_BrowserTab_t BrowserWindow;
void (*FunctionPriori)();
void (*FunctionPosteriori)();
const char *Icon;

View File

@ -250,13 +250,18 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 17.0 (2017-09-13)"
#define Log_PLATFORM_VERSION "SWAD 17.0.2 (2017-09-14)"
#define CSS_FILE "swad17.0.css"
#define JS_FILE "swad16.206.3.js"
// Number of lines (includes comments but not blank lines) has been got with the following command:
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*?.h sql/swad*.sql | tail -1
/*
Version 17.0.2: Sep 14, 2017 Action to show next question when playing a game. (227293 lines)
2 changes necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1671','es','N','Mostrar primera pregunta juego');
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1672','es','N','Mostrar siguiente pregunta juego');
Version 17.0.1: Sep 13, 2017 Icon to show question answers when playing a game. (227283 lines)
Copy the following icon to icon public directory:
sudo cp icon/step-forward64x64.png /var/www/html/swad/icon/

View File

@ -1221,7 +1221,7 @@ void Cty_WriteCountryName (long CtyCod,const char *ClassLink)
char ActTxt[Act_MAX_BYTES_ACTION_TXT + 1];
bool PutForm = ClassLink &&
!Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB; // Only in main browser tab
/***** Get country name *****/
Cty_GetCountryName (CtyCod,CtyName);

View File

@ -3481,7 +3481,7 @@ static void Gam_PutBigButtonToStartGame (long GamCod)
extern const char *Txt_Play;
/***** Start form *****/
Act_FormStart (ActPlyGamNxtQst);
Act_FormStart (ActPlyGam1stQst);
Gam_PutParamGameCod (GamCod);
Gam_PutParamQstInd (0); // Start by first question in game
@ -3568,7 +3568,7 @@ static void Gam_PutBigButtonToContinue (Act_Action_t NextAction,
extern const char *Txt_Continue;
/***** Start container *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_TOP\">");
fprintf (Gbl.F.Out,"<div class=\"GAM_PLAY_CONTINUE_CONTAINER\">");
/***** Start form *****/
Act_FormStart (NextAction);

View File

@ -473,7 +473,7 @@ void Gbl_Cleanup (void)
if (!Gbl.Action.UsesAJAX &&
!Gbl.WebService.IsWebService &&
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
Ses_RemoveHiddenParFromThisSession ();
Usr_FreeMyCourses ();
Usr_FreeMyDegrees ();

View File

@ -250,7 +250,7 @@ void Lay_WriteStartOfPage (void)
fprintf (Gbl.F.Out,"</head>\n");
/***** HTML body *****/
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
fprintf (Gbl.F.Out,"<body onload=\"init();\">\n"
"<div id=\"zoomLyr\" class=\"ZOOM\">"
"<img id=\"zoomImg\" src=\"%s/usr_bl.jpg\""
@ -374,7 +374,7 @@ static void Lay_WriteEndOfPage (void)
"</div>"); // main_zone_central_container
/***** Write page footer *****/
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
Lay_WriteFootFromHTMLFile ();
/***** End of main zone and page *****/
@ -466,7 +466,7 @@ static void Lay_WriteScripts (void)
Lay_WriteScriptMathJax ();
/***** Scripts used only in main window *****/
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
{
Lay_WriteScriptInit ();
Lay_WriteScriptParamsAJAX ();
@ -1232,7 +1232,7 @@ void Lay_ShowErrorAndExit (const char *Txt)
if (!Gbl.Layout.HTMLEndWritten)
{
// Here Gbl.F.Out is stdout
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
Lay_WriteAboutZone ();
fprintf (Gbl.F.Out,"</body>\n"

View File

@ -121,7 +121,7 @@ int main (void)
Con_RemoveOldConnected ();
/***** Get number of sessions *****/
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
Ses_GetNumSessions ();
/***** Check user and get user's data *****/

View File

@ -1176,9 +1176,9 @@ void Pho_ShowUsrPhoto (const struct UsrData *UsrDat,const char *PhotoURL,
extern struct Act_Actions Act_Actions[Act_NUM_ACTIONS];
bool PhotoExists;
bool PutLinkToPublicProfile = !Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB; // Only in main browser tab
bool PutZoomCode = Zoom == Pho_ZOOM && // Make zoom
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB; // Only in main browser tab
char IdCaption[Act_MAX_BYTES_ID];
/***** Start form to go to public profile *****/

View File

@ -2306,7 +2306,7 @@ void Rec_ShowSharedUsrRecord (Rec_SharedRecordViewType_t TypeOfView,
Rec_RecordHelp[Rec_SHA_RECORD_LIST] = Rec_RecordListHelp[UsrDat->Roles.InCurrentCrs.Role];
PutFormLinks = !Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW; // Only in main window
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB; // Only in main browser tab
Ins.InsCod = UsrDat->InsCod;
if (Ins.InsCod > 0)
@ -2551,7 +2551,7 @@ static void Rec_PutIconsCommands (void)
Act_Action_t NextAction;
if (!Gbl.Form.Inside && // Only if not inside another form
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW && // Only in main window
Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB && // Only in main browser tab
Gbl.Usrs.Me.Logged) // Only if I am logged
{
ICanViewUsrProfile = Pri_ShowingIsAllowed (Gbl.Record.UsrDat->ProfileVisibility,

View File

@ -258,7 +258,7 @@ void Usr_InformAboutNumClicksBeforePhoto (void)
{
if (Gbl.Usrs.Me.NumAccWithoutPhoto >= Pho_MAX_CLICKS_WITHOUT_PHOTO)
Ale_ShowAlert (Ale_WARNING,Txt_You_must_send_your_photo_because_);
else if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_THIS_WINDOW)
else if (Act_Actions[Gbl.Action.Act].BrowserWindow == Act_BRW_1ST_TAB)
{
sprintf (Message,Txt_You_can_only_perform_X_further_actions_,
Pho_MAX_CLICKS_WITHOUT_PHOTO - Gbl.Usrs.Me.NumAccWithoutPhoto);