diff --git a/swad_changelog.h b/swad_changelog.h index 5a5feff4c..2448937e0 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -149,13 +149,15 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.42 (2016-10-24)" +#define Log_PLATFORM_VERSION "SWAD 16.42.1 (2016-10-25)" #define CSS_FILE "swad16.32.1.css" #define JS_FILE "swad15.238.1.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 16.42.1: Oct 25, 2016 Added button "New question" in survey when the survey has no questions. + Change in layout of survey questions. (205485 lines) Version 16.42: Oct 24, 2016 Changres in rules to admin other user and change other user's photo. (205481 lines) Version 16.41.10: Oct 24, 2016 Column ID in statistic of hits in a course is now left aligned. (205474 lines) Version 16.41.9: Oct 24, 2016 Changed permissions to edit institution logo and institution WWW. (205474 lines) diff --git a/swad_survey.c b/swad_survey.c index e0131b26b..9361197d3 100644 --- a/swad_survey.c +++ b/swad_survey.c @@ -2958,13 +2958,15 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ else // This survey has no questions Lay_ShowAlert (Lay_INFO,Txt_This_survey_has_no_questions); - /***** Free structure that stores the query result *****/ - DB_FreeMySQLResult (&mysql_res); - - if (Svy->Status.ICanEdit && Editing) + if (Svy->Status.ICanEdit && // I can edit + (!NumQsts || // This survey has no questions + Editing)) // I am editing /***** Put button to add a new question in this survey *****/ Svy_PutButtonToCreateNewQuestion (); + /***** Free structure that stores the query result *****/ + DB_FreeMySQLResult (&mysql_res); + /***** End frame *****/ Lay_EndRoundFrame (); } @@ -3040,7 +3042,7 @@ static void Svy_WriteAnswersOfAQst (struct Survey *Svy,struct SurveyQuestion *Sv /***** Write the answers *****/ if (NumAnswers) { - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,"
"); for (NumAns = 0; NumAns < NumAnswers; NumAns++)