diff --git a/swad_changelog.h b/swad_changelog.h index 70eefe9e9..f1dfcd0f8 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -170,13 +170,14 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 16.64.21 (2016-11-19)" +#define Log_PLATFORM_VERSION "SWAD 16.64.22 (2016-11-19)" #define CSS_FILE "swad16.60.1.css" #define JS_FILE "swad16.46.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.64.22: Nov 19, 2016 Input fields required in form to edit one test question. (207340 lines) Version 16.64.21: Nov 19, 2016 Input fields required in form to configure tests. (207324 lines) Version 16.64.20: Nov 19, 2016 Input field required in new link form. (207316 lines) Version 16.64.19: Nov 19, 2016 Input field required in new folder form. (207314 lines) diff --git a/swad_test.c b/swad_test.c index 01f50ac56..29eef6f96 100644 --- a/swad_test.c +++ b/swad_test.c @@ -4559,7 +4559,8 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) "" "" "" - "
", The_ClassForm[Gbl.Prefs.Theme], @@ -4628,7 +4629,8 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) Gbl.Test.Answer.Integer); if (Gbl.Test.AnswerType != Tst_ANS_INT) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," />" + fprintf (Gbl.F.Out," required=\"required\" />" + "" ""); /* Floating point answer */ @@ -4642,14 +4644,16 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) Tst_MAX_BYTES_FLOAT_ANSWER,Gbl.Test.Answer.FloatingPoint[0]); if (Gbl.Test.AnswerType != Tst_ANS_FLOAT) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," /> %s " + fprintf (Gbl.F.Out," required=\"required\" />" + " %s " "" + fprintf (Gbl.F.Out," required=\"required\" />" + "" ""); /* T/F answer */ @@ -4665,13 +4669,17 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) fprintf (Gbl.F.Out," checked=\"checked\""); if (Gbl.Test.AnswerType != Tst_ANS_TRUE_FALSE) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," />%s " + "%s " + "%s" + fprintf (Gbl.F.Out," required=\"required\" />" + "%s" + "" "" "" "" @@ -4711,27 +4719,35 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) if (Gbl.Test.Answer.Options[NumOpt].Text) if (Gbl.Test.Answer.Options[NumOpt].Text[0]) AnswerHasContent = true; - DisplayRightColumn = NumOpt == 0 || AnswerHasContent; + DisplayRightColumn = NumOpt < 2 || // Display at least the two first options + AnswerHasContent; /***** Left column: selectors *****/ fprintf (Gbl.F.Out,"" - "" - "", + Gbl.RowEvenOdd); + + /* Radio selector for unique choice answers */ + fprintf (Gbl.F.Out,"" - ""); + + /* Checkbox for multiple choice answers */ + fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out," />"); + + fprintf (Gbl.F.Out,""); /***** Center column: letter of the answer and expand / contract icon *****/ fprintf (Gbl.F.Out,"" @@ -4779,6 +4795,8 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) " class=\"ANS_STR\" rows=\"5\"",NumOpt); if (OptionsDisabled) fprintf (Gbl.F.Out," disabled=\"disabled\""); + if (NumOpt == 0) // First textarea required + fprintf (Gbl.F.Out," required=\"required\""); fprintf (Gbl.F.Out,">"); if (AnswerHasContent) fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Text);