Version18.116.10

This commit is contained in:
Antonio Cañas Vargas 2019-04-20 22:50:57 +02:00
parent 9e10644120
commit ea43710d33
3 changed files with 20 additions and 62 deletions

View File

@ -448,10 +448,11 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf
*/
#define Log_PLATFORM_VERSION "SWAD 18.116.9 (2019-04-20)"
#define Log_PLATFORM_VERSION "SWAD 18.116.10 (2019-04-20)"
#define CSS_FILE "swad18.112.1.css"
#define JS_FILE "swad18.116.5.js"
/*
Version 18.116.10: Apr 20, 2019 Changed the behaviour of hiding/showing a survey. (242802 lines)
Version 18.116.9: Apr 20, 2019 Changed the behaviour of hiding/showing a game. (242841 lines)
Version 18.116.8: Apr 20, 2019 Changed the behaviour of hiding/showing an exam announcement. (242881 lines)
Version 18.116.7: Apr 20, 2019 Changed the behaviour of hiding/showing a banner. (242934 lines)

View File

@ -106,7 +106,8 @@ static void Svy_WriteAuthor (struct Survey *Svy);
static void Svy_WriteStatus (struct Survey *Svy);
static void Svy_GetParamSvyOrder (void);
static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible);
static void Svy_PutFormsToRemEditOneSvy (const struct Survey *Svy,
const char *Anchor);
static void Svy_PutParams (void);
static void Svy_SetAllowedAndHiddenScopes (unsigned *ScopesAllowed,
@ -431,6 +432,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
extern const char *Txt_Users;
extern const char *Txt_Answer_survey;
extern const char *Txt_View_survey_results;
char *Anchor = NULL;
static unsigned UniqueId = 0;
struct Survey Svy;
char Txt[Cns_MAX_BYTES_TEXT + 1];
@ -444,6 +446,9 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
Svy.SvyCod = SvyCod;
Svy_GetDataOfSurveyByCod (&Svy);
/***** Set anchor string *****/
Frm_SetAnchorStr (Svy.SvyCod,&Anchor);
/***** Start table *****/
if (ShowOnlyThisSvyComplete)
Tbl_StartTableWide (2);
@ -456,7 +461,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
if (Svy.Status.ICanEdit)
Svy_PutFormsToRemEditOneSvy (Svy.SvyCod,Svy.Status.Visible);
Svy_PutFormsToRemEditOneSvy (&Svy,Anchor);
fprintf (Gbl.F.Out,"</td>");
/* Start date/time */
@ -501,8 +506,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
if (!ShowOnlyThisSvyComplete)
fprintf (Gbl.F.Out," COLOR%u",Gbl.RowEvenOdd);
fprintf (Gbl.F.Out,"\">");
/* Put form to view survey */
Lay_StartArticle (Anchor);
Frm_StartForm (ActSeeOneSvy);
Svy_PutParamSvyCod (SvyCod);
Svy_PutHiddenParamSvyOrder ();
@ -514,6 +518,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
fprintf (Gbl.F.Out,"%s</a>",
Svy.Title);
Frm_EndForm ();
Lay_EndArticle ();
/* Number of questions and number of distinct users who have already answered this survey */
fprintf (Gbl.F.Out,"<div class=\"%s\">%s: %u; %s: %u</div>"
@ -677,6 +682,9 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,
/***** End box *****/
Box_EndBox ();
}
/***** Free anchor string *****/
Frm_FreeAnchorStr (Anchor);
}
/*****************************************************************************/
@ -794,11 +802,12 @@ void Svy_PutHiddenParamSvyOrder (void)
/******************* Put a link (form) to edit one survey ********************/
/*****************************************************************************/
static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
static void Svy_PutFormsToRemEditOneSvy (const struct Survey *Svy,
const char *Anchor)
{
extern const char *Txt_Reset;
Gbl.Svys.SvyCodToEdit = SvyCod; // Used as parameters in contextual links
Gbl.Svys.SvyCodToEdit = Svy->SvyCod; // Used as parameters in contextual links
/***** Put form to remove survey *****/
Ico_PutContextualIconToRemove (ActReqRemSvy,Svy_PutParams);
@ -809,10 +818,10 @@ static void Svy_PutFormsToRemEditOneSvy (long SvyCod,bool Visible)
Txt_Reset);
/***** Put form to hide/show survey *****/
if (Visible)
Ico_PutContextualIconToHide (ActHidSvy,NULL,Svy_PutParams);
if (Svy->Status.Visible)
Ico_PutContextualIconToHide (ActHidSvy,Anchor,Svy_PutParams);
else
Ico_PutContextualIconToUnhide (ActShoSvy,NULL,Svy_PutParams);
Ico_PutContextualIconToUnhide (ActShoSvy,Anchor,Svy_PutParams);
/***** Put form to edit survey *****/
Ico_PutContextualIconToEdit (ActEdiOneSvy,Svy_PutParams);
@ -1677,7 +1686,6 @@ void Svy_ResetSurvey (void)
void Svy_HideSurvey (void)
{
extern const char *Txt_Survey_X_is_now_hidden;
struct Survey Svy;
struct SurveyQuestion SvyQst;
@ -1698,10 +1706,6 @@ void Svy_HideSurvey (void)
"UPDATE surveys SET Hidden='Y' WHERE SvyCod=%ld",
Svy.SvyCod);
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_is_now_hidden,
Svy.Title);
/***** Show surveys again *****/
Svy_ListAllSurveys (&SvyQst);
}
@ -1712,7 +1716,6 @@ void Svy_HideSurvey (void)
void Svy_UnhideSurvey (void)
{
extern const char *Txt_Survey_X_is_now_visible;
struct Survey Svy;
struct SurveyQuestion SvyQst;
@ -1733,10 +1736,6 @@ void Svy_UnhideSurvey (void)
"UPDATE surveys SET Hidden='N' WHERE SvyCod=%ld",
Svy.SvyCod);
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Survey_X_is_now_visible,
Svy.Title);
/***** Show surveys again *****/
Svy_ListAllSurveys (&SvyQst);
}

View File

@ -41547,48 +41547,6 @@ const char *Txt_SURVEY_Type_of_user_not_allowed =
"Tipo de usu&aacute;rio n&atilde;o permitido";
#endif
const char *Txt_Survey_X_is_now_hidden = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca
"L'enquesta <strong>%s</strong> ara est&agrave; oculta.";
#elif L==2 // de
"Die Umfrage <strong>%s</strong> ist jetzt ausgeblendet.";
#elif L==3 // en
"Survey <strong>%s</strong> is now hidden.";
#elif L==4 // es
"La encuesta <strong>%s</strong> ahora est&aacute; oculta.";
#elif L==5 // fr
"Le sondage <strong>%s</strong> est maintenant cach&eacute;.";
#elif L==6 // gn
"La encuesta <strong>%s</strong> ahora est&aacute; oculta."; // Okoteve traducción
#elif L==7 // it
"Il sondaggio <strong>%s</strong> &egrave; ora nascosto.";
#elif L==8 // pl
"Badanie <strong>%s</strong> jest teraz ukryta.";
#elif L==9 // pt
"O inqu&eacute;rito <strong>%s</strong> &eacute; agora oculto.";
#endif
const char *Txt_Survey_X_is_now_visible = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca
"L'enquesta <strong>%s</strong> ara est&agrave; visible.";
#elif L==2 // de
"Die Umfrage <strong>%s</strong> ist jetzt sichtbar.";
#elif L==3 // en
"Survey <strong>%s</strong> is now visible.";
#elif L==4 // es
"La encuesta <strong>%s</strong> ahora est&aacute; visible.";
#elif L==5 // fr
"Le sondage <strong>%s</strong> est maintenant visible.";
#elif L==6 // gn
"La encuesta <strong>%s</strong> ahora est&aacute; visible."; // Okoteve traducción
#elif L==7 // it
"Il sondaggio <strong>%s</strong> &egrave; ora visibile.";
#elif L==8 // pl
"Badanie <strong>%s</strong> jest teraz widoczne.";
#elif L==9 // pt
"O inqu&eacute;rito <strong>%s</strong> &eacute; agora vis&iacute;vel.";
#endif
const char *Txt_Survey_X_removed = // Warning: it is very important to include %s in the following sentences
#if L==1 // ca
"Enquesta <strong>%s</strong> eliminada.";