From fa8bcbb8198772853b103f1b9f233000196d9d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Fri, 6 Dec 2019 22:18:05 +0100 Subject: [PATCH] Version19.85 --- css/{swad19.82.3.css => swad19.85.css} | 4 +- swad_assignment.c | 24 ++-- swad_attendance.c | 24 ++-- swad_changelog.h | 6 +- swad_game.c | 20 ++-- swad_survey.c | 154 ++++++++++--------------- 6 files changed, 102 insertions(+), 130 deletions(-) rename css/{swad19.82.3.css => swad19.85.css} (99%) diff --git a/css/swad19.82.3.css b/css/swad19.85.css similarity index 99% rename from css/swad19.82.3.css rename to css/swad19.85.css index 1597796f1..50bba7745 100644 --- a/css/swad19.82.3.css +++ b/css/swad19.85.css @@ -1823,7 +1823,7 @@ a:hover /* Default ==> underlined */ { box-sizing:border-box; width:100%; - margin-bottom:20px; + margin-bottom:10px; } .FRAME_TBL_CENTER { @@ -1832,7 +1832,7 @@ a:hover /* Default ==> underlined */ .FRAME_TBL_CENTER_MARGIN { margin:0 auto; - margin-bottom:20px; + margin-bottom:10px; } .FRAME_TITLE { diff --git a/swad_assignment.c b/swad_assignment.c index 88dc90558..7cad56a3f 100644 --- a/swad_assignment.c +++ b/swad_assignment.c @@ -138,12 +138,6 @@ static void Asg_ShowAllAssignments (void) Pag_CalculatePagination (&Pagination); Gbl.Asgs.CurrentPage = (unsigned) Pagination.CurrentPage; - /***** Write links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS, - 0, - &Pagination); - /***** Begin box *****/ Box_BoxBegin ("100%",Txt_Assignments,Asg_PutIconsListAssignments, Hlp_ASSESSMENT_Assignments,Box_NOT_CLOSABLE); @@ -156,6 +150,12 @@ static void Asg_ShowAllAssignments (void) Set_EndSettingsHead (); } + /***** Write links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS, + 0, + &Pagination); + if (Gbl.Asgs.Num) { /***** Table head *****/ @@ -175,6 +175,12 @@ static void Asg_ShowAllAssignments (void) else // No assignments created Ale_ShowAlert (Ale_INFO,Txt_No_assignments); + /***** Write again links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS, + 0, + &Pagination); + /***** Button to create a new assignment *****/ if (Asg_CheckIfICanCreateAssignments ()) Asg_PutButtonToCreateNewAsg (); @@ -182,12 +188,6 @@ static void Asg_ShowAllAssignments (void) /***** End box *****/ Box_BoxEnd (); - /***** Write again links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS, - 0, - &Pagination); - /***** Free list of assignments *****/ Asg_FreeListAssignments (); } diff --git a/swad_attendance.c b/swad_attendance.c index 17ad05548..1782ae297 100644 --- a/swad_attendance.c +++ b/swad_attendance.c @@ -222,12 +222,6 @@ static void Att_ShowAllAttEvents (void) Pag_CalculatePagination (&Pagination); Gbl.AttEvents.CurrentPage = (unsigned) Pagination.CurrentPage; - /***** Write links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS, - 0, - &Pagination); - /***** Begin box *****/ Box_BoxBegin ("100%",Txt_Events,Att_PutIconsInListOfAttEvents, Hlp_USERS_Attendance,Box_NOT_CLOSABLE); @@ -240,6 +234,12 @@ static void Att_ShowAllAttEvents (void) Set_EndSettingsHead (); } + /***** Write links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS, + 0, + &Pagination); + if (Gbl.AttEvents.Num) { /***** Table head *****/ @@ -285,6 +285,12 @@ static void Att_ShowAllAttEvents (void) else // No events created Ale_ShowAlert (Ale_INFO,Txt_No_events); + /***** Write again links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS, + 0, + &Pagination); + /***** Button to create a new attendance event *****/ if (ICanEdit) Att_PutButtonToCreateNewAttEvent (); @@ -292,12 +298,6 @@ static void Att_ShowAllAttEvents (void) /***** End box *****/ Box_BoxEnd (); - /***** Write again links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS, - 0, - &Pagination); - /***** Free list of attendance events *****/ Att_FreeListAttEvents (); } diff --git a/swad_changelog.h b/swad_changelog.h index c49782b3a..8e06ec7e3 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -490,14 +490,16 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.84.3 (2019-12-06)" -#define CSS_FILE "swad19.82.3.css" +#define Log_PLATFORM_VERSION "SWAD 19.85 (2019-12-06)" +#define CSS_FILE "swad19.85.css" #define JS_FILE "swad19.70.js" /* // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) // TODO: Impedir la creación y edición de proyectos si no son editables. // TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales + Version 19.85: Dec 06, 2019 Changes in layout of pagination. + Code refactoring in surveys. (247855 lines) Version 19.84.3: Dec 06, 2019 Contextual icon to show matches results. Fixed bug in matches results. (247875 lines) Version 19.84.2: Dec 06, 2019 Contextual icon to show tests results. diff --git a/swad_game.c b/swad_game.c index 2a0addc2e..3e6dac2da 100644 --- a/swad_game.c +++ b/swad_game.c @@ -201,16 +201,16 @@ static void Gam_ListAllGames (void) Pag_CalculatePagination (&Pagination); Gbl.Games.CurrentPage = (unsigned) Pagination.CurrentPage; + /***** Begin box *****/ + Box_BoxBegin ("100%",Txt_Games,Gam_PutIconsListGames, + Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE); + /***** Write links to pages *****/ if (Pagination.MoreThanOnePage) Pag_WriteLinksToPagesCentered (Pag_GAMES, 0, &Pagination); - /***** Begin box *****/ - Box_BoxBegin ("100%",Txt_Games,Gam_PutIconsListGames, - Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE); - if (Gbl.Games.Num) { /***** Table head *****/ @@ -260,6 +260,12 @@ static void Gam_ListAllGames (void) else // No games created Ale_ShowAlert (Ale_INFO,Txt_No_games); + /***** Write again links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_GAMES, + 0, + &Pagination); + /***** Button to create a new game *****/ if (Gam_CheckIfICanEditGames ()) Gam_PutButtonToCreateNewGame (); @@ -267,12 +273,6 @@ static void Gam_ListAllGames (void) /***** End box *****/ Box_BoxEnd (); - /***** Write again links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_GAMES, - 0, - &Pagination); - /***** Free list of games *****/ Gam_FreeListGames (); } diff --git a/swad_survey.c b/swad_survey.c index efad54e85..02821e2d1 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -96,15 +96,14 @@ long Svy_CurrentQstCod; // Used as parameter in contextual links /***************************** Private prototypes ****************************/ /*****************************************************************************/ -static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst); +static void Svy_ListAllSurveys (void); static bool Svy_CheckIfICanCreateSvy (void); static void Svy_PutIconsListSurveys (void); static void Svy_PutIconToCreateNewSvy (void); static void Svy_PutButtonToCreateNewSvy (void); static void Svy_PutParamsToCreateNewSvy (void); static void Svy_ParamsWhichGroupsToShow (void); -static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, - bool ShowOnlyThisSvyComplete); +static void Svy_ShowOneSurvey (long SvyCod,bool ShowOnlyThisSvyComplete); static void Svy_WriteAuthor (struct Survey *Svy); static void Svy_WriteStatus (struct Survey *Svy); static void Svy_GetParamSvyOrder (void); @@ -153,8 +152,7 @@ static void Svy_FreeTextChoiceAnswer (struct SurveyQuestion *SvyQst,unsigned Num static unsigned Svy_GetQstIndFromQstCod (long QstCod); static unsigned Svy_GetNextQuestionIndexInSvy (long SvyCod); -static void Svy_ListSvyQuestions (struct Survey *Svy, - struct SurveyQuestion *SvyQst); +static void Svy_ListSvyQuestions (struct Survey *Svy); static void Svy_PutParamsToEditQuestion (void); static void Svy_PutIconToAddNewQuestion (void); static void Svy_PutButtonToCreateNewQuestion (void); @@ -179,25 +177,20 @@ static unsigned Svy_GetNumUsrsWhoHaveAnsweredSvy (long SvyCod); void Svy_SeeAllSurveys (void) { - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); - /***** Get parameters *****/ Svy_GetParamSvyOrder (); Grp_GetParamWhichGrps (); Gbl.Svys.CurrentPage = Pag_GetParamPagNum (Pag_SURVEYS); /***** Show all surveys *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ /*************************** Show all the surveys ****************************/ /*****************************************************************************/ -static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) +static void Svy_ListAllSurveys (void) { extern const char *Hlp_ASSESSMENT_Surveys; extern const char *Txt_Surveys; @@ -223,12 +216,6 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) Pag_CalculatePagination (&Pagination); Gbl.Svys.CurrentPage = (unsigned) Pagination.CurrentPage; - /***** Write links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_SURVEYS, - 0, - &Pagination); - /***** Begin box *****/ Box_BoxBegin ("100%",Txt_Surveys,Svy_PutIconsListSurveys, Hlp_ASSESSMENT_Surveys,Box_NOT_CLOSABLE); @@ -241,6 +228,12 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) Set_EndSettingsHead (); } + /***** Write links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_SURVEYS, + 0, + &Pagination); + if (Gbl.Svys.Num) { /***** Table head *****/ @@ -278,11 +271,11 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) HTM_TR_End (); - /***** Write all the surveys *****/ + /***** Write all surveys *****/ for (NumSvy = Pagination.FirstItemVisible; NumSvy <= Pagination.LastItemVisible; NumSvy++) - Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy - 1],SvyQst,false); + Svy_ShowOneSurvey (Gbl.Svys.LstSvyCods[NumSvy - 1],false); /***** End table *****/ HTM_TABLE_End (); @@ -290,6 +283,12 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) else // No surveys created Ale_ShowAlert (Ale_INFO,Txt_No_surveys); + /***** Write again links to pages *****/ + if (Pagination.MoreThanOnePage) + Pag_WriteLinksToPagesCentered (Pag_SURVEYS, + 0, + &Pagination); + /***** Button to create a new survey *****/ if (Svy_CheckIfICanCreateSvy ()) Svy_PutButtonToCreateNewSvy (); @@ -297,12 +296,6 @@ static void Svy_ListAllSurveys (struct SurveyQuestion *SvyQst) /***** End box *****/ Box_BoxEnd (); - /***** Write again links to pages *****/ - if (Pagination.MoreThanOnePage) - Pag_WriteLinksToPagesCentered (Pag_SURVEYS, - 0, - &Pagination); - /***** Free list of surveys *****/ Svy_FreeListSurveys (); } @@ -396,10 +389,6 @@ static void Svy_ParamsWhichGroupsToShow (void) void Svy_SeeOneSurvey (void) { struct Survey Svy; - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); /***** Get parameters *****/ Svy_GetParamSvyOrder (); @@ -411,15 +400,14 @@ void Svy_SeeOneSurvey (void) Lay_ShowErrorAndExit ("Code of survey is missing."); /***** Show survey *****/ - Svy_ShowOneSurvey (Svy.SvyCod,&SvyQst,true); + Svy_ShowOneSurvey (Svy.SvyCod,true); } /*****************************************************************************/ /****************************** Show one survey ******************************/ /*****************************************************************************/ -static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, - bool ShowOnlyThisSvyComplete) +static void Svy_ShowOneSurvey (long SvyCod,bool ShowOnlyThisSvyComplete) { extern const char *Hlp_ASSESSMENT_Surveys; extern const char *Txt_Survey; @@ -677,7 +665,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst, { HTM_TR_Begin (NULL); HTM_TD_Begin ("colspan=\"5\""); - Svy_ListSvyQuestions (&Svy,SvyQst); + Svy_ListSvyQuestions (&Svy); HTM_TD_End (); HTM_TR_End (); } @@ -1537,10 +1525,6 @@ void Svy_AskRemSurvey (void) extern const char *Txt_Do_you_really_want_to_remove_the_survey_X; extern const char *Txt_Remove_survey; struct Survey Svy; - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); /***** Get parameters *****/ Svy_GetParamSvyOrder (); @@ -1564,7 +1548,7 @@ void Svy_AskRemSurvey (void) Svy.Title); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -1575,10 +1559,11 @@ void Svy_RemoveSurvey (void) { extern const char *Txt_Survey_X_removed; struct Survey Svy; - struct SurveyQuestion SvyQst; - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); + /***** Get parameters *****/ + Svy_GetParamSvyOrder (); + Grp_GetParamWhichGrps (); + Gbl.Svys.CurrentPage = Pag_GetParamPagNum (Pag_SURVEYS); /***** Get survey code *****/ if ((Svy.SvyCod = Svy_GetParamSvyCod ()) == -1L) @@ -1623,7 +1608,7 @@ void Svy_RemoveSurvey (void) Svy.Title); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -1634,10 +1619,6 @@ void Svy_AskResetSurvey (void) { extern const char *Txt_Do_you_really_want_to_reset_the_survey_X; struct Survey Svy; - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); /***** Get parameters *****/ Svy_GetParamSvyOrder (); @@ -1662,7 +1643,7 @@ void Svy_AskResetSurvey (void) Svy_PutButtonToResetSurvey (); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -1687,10 +1668,11 @@ void Svy_ResetSurvey (void) { extern const char *Txt_Survey_X_reset; struct Survey Svy; - struct SurveyQuestion SvyQst; - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); + /***** Get parameters *****/ + Svy_GetParamSvyOrder (); + Grp_GetParamWhichGrps (); + Gbl.Svys.CurrentPage = Pag_GetParamPagNum (Pag_SURVEYS); /***** Get survey code *****/ if ((Svy.SvyCod = Svy_GetParamSvyCod ()) == -1L) @@ -1718,7 +1700,7 @@ void Svy_ResetSurvey (void) Svy.Title); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -1728,10 +1710,6 @@ void Svy_ResetSurvey (void) void Svy_HideSurvey (void) { struct Survey Svy; - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); /***** Get parameters *****/ Svy_GetParamSvyOrder (); @@ -1753,7 +1731,7 @@ void Svy_HideSurvey (void) Svy.SvyCod); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -1763,10 +1741,6 @@ void Svy_HideSurvey (void) void Svy_UnhideSurvey (void) { struct Survey Svy; - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); /***** Get parameters *****/ Svy_GetParamSvyOrder (); @@ -1788,7 +1762,7 @@ void Svy_UnhideSurvey (void) Svy.SvyCod); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -1824,13 +1798,9 @@ void Svy_RequestCreatOrEditSvy (void) extern const char *Txt_Create_survey; extern const char *Txt_Save_changes; struct Survey Svy; - struct SurveyQuestion SvyQst; bool ItsANewSurvey; char Txt[Cns_MAX_BYTES_TEXT + 1]; - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); - /***** Get parameters *****/ Svy_GetParamSvyOrder (); Grp_GetParamWhichGrps (); @@ -1979,10 +1949,10 @@ void Svy_RequestCreatOrEditSvy (void) /***** Show questions of the survey ready to be edited *****/ if (!ItsANewSurvey) - Svy_ListSvyQuestions (&Svy,&SvyQst); + Svy_ListSvyQuestions (&Svy); /***** Show all surveys *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -2133,14 +2103,15 @@ void Svy_RecFormSurvey (void) extern const char *Txt_You_must_specify_the_title_of_the_survey; struct Survey OldSvy; struct Survey NewSvy; - struct SurveyQuestion SvyQst; bool ItsANewSurvey; bool NewSurveyIsCorrect = true; unsigned NumUsrsToBeNotifiedByEMail; char Txt[Cns_MAX_BYTES_TEXT + 1]; - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); + /***** Get parameters *****/ + Svy_GetParamSvyOrder (); + Grp_GetParamWhichGrps (); + Gbl.Svys.CurrentPage = Pag_GetParamPagNum (Pag_SURVEYS); /***** Get the code of the survey *****/ ItsANewSurvey = ((NewSvy.SvyCod = Svy_GetParamSvyCod ()) == -1L); @@ -2266,7 +2237,7 @@ void Svy_RecFormSurvey (void) Svy_UpdateNumUsrsNotifiedByEMailAboutSurvey (NewSvy.SvyCod,NumUsrsToBeNotifiedByEMail); /***** Show surveys again *****/ - Svy_ListAllSurveys (&SvyQst); + Svy_ListAllSurveys (); } /*****************************************************************************/ @@ -2620,7 +2591,7 @@ void Svy_RequestEditQuestion (void) Svy_ShowFormEditOneQst (SvyCod,&SvyQst,Txt); /***** Show current survey *****/ - Svy_ShowOneSurvey (SvyCod,&SvyQst,true); + Svy_ShowOneSurvey (SvyCod,true); } /*****************************************************************************/ @@ -3124,7 +3095,7 @@ void Svy_ReceiveQst (void) Svy_FreeTextChoiceAnswers (&SvyQst,Svy_MAX_ANSWERS_PER_QUESTION); /***** Show current survey *****/ - Svy_ShowOneSurvey (SvyCod,&SvyQst,true); + Svy_ShowOneSurvey (SvyCod,true); } /*****************************************************************************/ @@ -3194,8 +3165,7 @@ static unsigned Svy_GetNextQuestionIndexInSvy (long SvyCod) /************************ List the questions of a survey *********************/ /*****************************************************************************/ -static void Svy_ListSvyQuestions (struct Survey *Svy, - struct SurveyQuestion *SvyQst) +static void Svy_ListSvyQuestions (struct Survey *Svy) { extern const char *Hlp_ASSESSMENT_Surveys_questions; extern const char *Txt_Questions; @@ -3209,6 +3179,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy, MYSQL_ROW row; unsigned NumQsts; unsigned NumQst; + struct SurveyQuestion SvyQst; bool Editing = (Gbl.Action.Act == ActEdiOneSvy || Gbl.Action.Act == ActEdiOneSvyQst || Gbl.Action.Act == ActRcvSvyQst); @@ -3257,8 +3228,11 @@ static void Svy_ListSvyQuestions (struct Survey *Svy, row = mysql_fetch_row (mysql_res); + /* Initialize question to zero */ + Svy_InitQst (&SvyQst); + /* row[0] holds the code of the question */ - if (sscanf (row[0],"%ld",&(SvyQst->QstCod)) != 1) + if (sscanf (row[0],"%ld",&(SvyQst.QstCod)) != 1) Lay_ShowErrorAndExit ("Wrong code of question."); HTM_TR_Begin (NULL); @@ -3270,35 +3244,35 @@ static void Svy_ListSvyQuestions (struct Survey *Svy, /* Write icon to remove the question */ Frm_StartForm (ActReqRemSvyQst); Svy_PutParamSvyCod (Svy->SvyCod); - Svy_PutParamQstCod (SvyQst->QstCod); + Svy_PutParamQstCod (SvyQst.QstCod); Ico_PutIconRemove (); Frm_EndForm (); /* Write icon to edit the question */ - Svy_CurrentSvyCod = Svy->SvyCod; - Svy_CurrentQstCod = SvyQst->QstCod; + Svy_CurrentSvyCod = Svy->SvyCod; + Svy_CurrentQstCod = SvyQst.QstCod; Ico_PutContextualIconToEdit (ActEdiOneSvyQst,Svy_PutParamsToEditQuestion); HTM_TD_End (); } /* Write index of question inside survey (row[1]) */ - if (sscanf (row[1],"%u",&(SvyQst->QstInd)) != 1) + if (sscanf (row[1],"%u",&(SvyQst.QstInd)) != 1) Lay_ShowErrorAndExit ("Error: wrong question index."); HTM_TD_Begin ("class=\"DAT_SMALL CT COLOR%u\"",Gbl.RowEvenOdd); - HTM_Unsigned (SvyQst->QstInd + 1); + HTM_Unsigned (SvyQst.QstInd + 1); HTM_TD_End (); /* Write the question type (row[2]) */ - SvyQst->AnswerType = Svy_ConvertFromStrAnsTypDBToAnsTyp (row[2]); + SvyQst.AnswerType = Svy_ConvertFromStrAnsTypDBToAnsTyp (row[2]); HTM_TD_Begin ("class=\"DAT_SMALL CT COLOR%u\"",Gbl.RowEvenOdd); - HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]); + HTM_Txt (Txt_SURVEY_STR_ANSWER_TYPES[SvyQst.AnswerType]); HTM_TD_End (); /* Write the stem (row[3]) and the answers of this question */ HTM_TD_Begin ("class=\"DAT LT COLOR%u\"",Gbl.RowEvenOdd); Svy_WriteQstStem (row[3]); - Svy_WriteAnswersOfAQst (Svy,SvyQst,PutFormAnswerSurvey); + Svy_WriteAnswersOfAQst (Svy,&SvyQst,PutFormAnswerSurvey); HTM_TD_End (); HTM_TR_End (); @@ -3593,7 +3567,7 @@ void Svy_RequestRemoveQst (void) (long) SvyQst.QstInd + 1); /***** Show current survey *****/ - Svy_ShowOneSurvey (SvyCod,&SvyQst,true); + Svy_ShowOneSurvey (SvyCod,true); } /*****************************************************************************/ @@ -3642,7 +3616,7 @@ void Svy_RemoveQst (void) Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed); /***** Show current survey *****/ - Svy_ShowOneSurvey (SvyCod,&SvyQst,true); + Svy_ShowOneSurvey (SvyCod,true); } /*****************************************************************************/ @@ -3654,10 +3628,6 @@ void Svy_ReceiveSurveyAnswers (void) extern const char *Txt_You_already_answered_this_survey_before; extern const char *Txt_Thanks_for_answering_the_survey; struct Survey Svy; - struct SurveyQuestion SvyQst; - - /***** Initialize question to zero *****/ - Svy_InitQst (&SvyQst); /***** Get survey code *****/ if ((Svy.SvyCod = Svy_GetParamSvyCod ()) == -1L) @@ -3677,7 +3647,7 @@ void Svy_ReceiveSurveyAnswers (void) } /***** Show current survey *****/ - Svy_ShowOneSurvey (Svy.SvyCod,&SvyQst,true); + Svy_ShowOneSurvey (Svy.SvyCod,true); } /*****************************************************************************/