mirror of https://github.com/acanas/swad-core.git
Version 16.107.1
This commit is contained in:
parent
ea97a58cae
commit
2463d0bcf7
|
@ -189,13 +189,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.107 (2016-12-26)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.107.1 (2016-12-26)"
|
||||
#define CSS_FILE "swad16.106.5.css"
|
||||
#define JS_FILE "swad16.101.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.107.1: Dec 26, 2016 Changes in behaviour of labels in forms.
|
||||
Code refactoring in tests. (211515 lines)
|
||||
Version 16.107: Dec 26, 2016 Changes in behaviour of labels in forms.
|
||||
Code refactoring in tests. (211510 lines)
|
||||
Version 16.106.20:Dec 26, 2016 Changes in warning about next time to take a test. (211486 lines)
|
||||
|
|
66
swad_test.c
66
swad_test.c
|
@ -218,6 +218,7 @@ static int Tst_CountNumAnswerTypesInList (void);
|
|||
static void Tst_PutFormEditOneQst (char *Stem,char *Feedback);
|
||||
static void Tst_PutFloatInputField (const char *Label,const char *Field,
|
||||
double Value);
|
||||
static void Tst_PutTFInputField (const char *Label,char Value);
|
||||
|
||||
static void Tst_FreeTextChoiceAnswers (void);
|
||||
static void Tst_FreeTextChoiceAnswer (unsigned NumOpt);
|
||||
|
@ -4662,37 +4663,17 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
|||
/* T/F answer */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td></td>"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
"<table class=\"CELLS_PAD_2\">"
|
||||
"<tr>"
|
||||
"<td class=\"%s LEFT_TOP\">"
|
||||
"<input type=\"radio\" name=\"AnsTF\" value=\"T\"",
|
||||
The_ClassForm[Gbl.Prefs.Theme]);
|
||||
if (Gbl.Test.Answer.TF == 'T')
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
if (Gbl.Test.AnswerType != Tst_ANS_TRUE_FALSE)
|
||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||
fprintf (Gbl.F.Out," required=\"required\" />"
|
||||
"%s "
|
||||
"<input type=\"radio\" name=\"AnsTF\" value=\"F\"",
|
||||
Txt_TF_QST[0]);
|
||||
if (Gbl.Test.Answer.TF == 'F')
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
if (Gbl.Test.AnswerType != Tst_ANS_TRUE_FALSE)
|
||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||
fprintf (Gbl.F.Out," required=\"required\" />"
|
||||
"%s"
|
||||
"</td>"
|
||||
"</tr>"
|
||||
"</table>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Txt_TF_QST[1]);
|
||||
"<td class=\"LEFT_TOP\">");
|
||||
Tst_PutTFInputField (Txt_TF_QST[0],'T');
|
||||
Tst_PutTFInputField (Txt_TF_QST[1],'F');
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/* Questions can be shuffled? */
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td></td>"
|
||||
"<td class=\"%s LEFT_TOP\">"
|
||||
"<td class=\"LEFT_TOP\">"
|
||||
"<label class=\"%s\">"
|
||||
"<input type=\"checkbox\" name=\"Shuffle\" value=\"Y\"",
|
||||
The_ClassForm[Gbl.Prefs.Theme]);
|
||||
if (Gbl.Test.Shuffle)
|
||||
|
@ -4700,7 +4681,10 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
|||
if (Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE &&
|
||||
Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE)
|
||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||
fprintf (Gbl.F.Out," />%s</td>"
|
||||
fprintf (Gbl.F.Out," />"
|
||||
"%s"
|
||||
"</label>"
|
||||
"</td>"
|
||||
"</tr>",
|
||||
Txt_Shuffle);
|
||||
|
||||
|
@ -4814,7 +4798,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
|||
OptionsDisabled);
|
||||
|
||||
/* Feedback */
|
||||
fprintf (Gbl.F.Out,"<div class=\"%s\">%s (%s):</div>"
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">%s (%s):<br />"
|
||||
"<textarea name=\"FbStr%u\" class=\"ANS_STR\" rows=\"2\"",
|
||||
The_ClassForm[Gbl.Prefs.Theme],Txt_Feedback,Txt_optional,
|
||||
NumOpt);
|
||||
|
@ -4824,7 +4808,8 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
|||
if (Gbl.Test.Answer.Options[NumOpt].Feedback)
|
||||
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
|
||||
fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Feedback);
|
||||
fprintf (Gbl.F.Out,"</textarea>");
|
||||
fprintf (Gbl.F.Out,"</textarea>"
|
||||
"</label>");
|
||||
|
||||
/* End of right column */
|
||||
fprintf (Gbl.F.Out,"</div>"
|
||||
|
@ -4874,6 +4859,27 @@ static void Tst_PutFloatInputField (const char *Label,const char *Field,
|
|||
"</label>");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Put input field for T/F answer **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Tst_PutTFInputField (const char *Label,char Value)
|
||||
{
|
||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||
|
||||
fprintf (Gbl.F.Out,"<label class=\"%s\">"
|
||||
"<input type=\"radio\" name=\"AnsTF\" value=\"%c\"",
|
||||
The_ClassForm[Gbl.Prefs.Theme],Value);
|
||||
if (Gbl.Test.Answer.TF == Value)
|
||||
fprintf (Gbl.F.Out," checked=\"checked\"");
|
||||
if (Gbl.Test.AnswerType != Tst_ANS_TRUE_FALSE)
|
||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||
fprintf (Gbl.F.Out," required=\"required\" />"
|
||||
"%s"
|
||||
"</label>",
|
||||
Label);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************* Initialize a new question to zero *********************/
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue