mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-08 09:45:26 +02:00
Version 16.107.1
This commit is contained in:
parent
ea97a58cae
commit
2463d0bcf7
|
@ -189,13 +189,15 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** 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 CSS_FILE "swad16.106.5.css"
|
||||||
#define JS_FILE "swad16.101.js"
|
#define JS_FILE "swad16.101.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// 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.
|
Version 16.107: Dec 26, 2016 Changes in behaviour of labels in forms.
|
||||||
Code refactoring in tests. (211510 lines)
|
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)
|
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_PutFormEditOneQst (char *Stem,char *Feedback);
|
||||||
static void Tst_PutFloatInputField (const char *Label,const char *Field,
|
static void Tst_PutFloatInputField (const char *Label,const char *Field,
|
||||||
double Value);
|
double Value);
|
||||||
|
static void Tst_PutTFInputField (const char *Label,char Value);
|
||||||
|
|
||||||
static void Tst_FreeTextChoiceAnswers (void);
|
static void Tst_FreeTextChoiceAnswers (void);
|
||||||
static void Tst_FreeTextChoiceAnswer (unsigned NumOpt);
|
static void Tst_FreeTextChoiceAnswer (unsigned NumOpt);
|
||||||
|
@ -4662,37 +4663,17 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
/* T/F answer */
|
/* T/F answer */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td></td>"
|
"<td></td>"
|
||||||
"<td class=\"LEFT_TOP\">"
|
"<td class=\"LEFT_TOP\">");
|
||||||
"<table class=\"CELLS_PAD_2\">"
|
Tst_PutTFInputField (Txt_TF_QST[0],'T');
|
||||||
"<tr>"
|
Tst_PutTFInputField (Txt_TF_QST[1],'F');
|
||||||
"<td class=\"%s LEFT_TOP\">"
|
fprintf (Gbl.F.Out,"</td>"
|
||||||
"<input type=\"radio\" name=\"AnsTF\" value=\"T\"",
|
"</tr>");
|
||||||
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]);
|
|
||||||
|
|
||||||
/* Questions can be shuffled? */
|
/* Questions can be shuffled? */
|
||||||
fprintf (Gbl.F.Out,"<tr>"
|
fprintf (Gbl.F.Out,"<tr>"
|
||||||
"<td></td>"
|
"<td></td>"
|
||||||
"<td class=\"%s LEFT_TOP\">"
|
"<td class=\"LEFT_TOP\">"
|
||||||
|
"<label class=\"%s\">"
|
||||||
"<input type=\"checkbox\" name=\"Shuffle\" value=\"Y\"",
|
"<input type=\"checkbox\" name=\"Shuffle\" value=\"Y\"",
|
||||||
The_ClassForm[Gbl.Prefs.Theme]);
|
The_ClassForm[Gbl.Prefs.Theme]);
|
||||||
if (Gbl.Test.Shuffle)
|
if (Gbl.Test.Shuffle)
|
||||||
|
@ -4700,7 +4681,10 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
if (Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE &&
|
if (Gbl.Test.AnswerType != Tst_ANS_UNIQUE_CHOICE &&
|
||||||
Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE)
|
Gbl.Test.AnswerType != Tst_ANS_MULTIPLE_CHOICE)
|
||||||
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
fprintf (Gbl.F.Out," disabled=\"disabled\"");
|
||||||
fprintf (Gbl.F.Out," />%s</td>"
|
fprintf (Gbl.F.Out," />"
|
||||||
|
"%s"
|
||||||
|
"</label>"
|
||||||
|
"</td>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_Shuffle);
|
Txt_Shuffle);
|
||||||
|
|
||||||
|
@ -4814,7 +4798,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback)
|
||||||
OptionsDisabled);
|
OptionsDisabled);
|
||||||
|
|
||||||
/* Feedback */
|
/* 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\"",
|
"<textarea name=\"FbStr%u\" class=\"ANS_STR\" rows=\"2\"",
|
||||||
The_ClassForm[Gbl.Prefs.Theme],Txt_Feedback,Txt_optional,
|
The_ClassForm[Gbl.Prefs.Theme],Txt_Feedback,Txt_optional,
|
||||||
NumOpt);
|
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)
|
||||||
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
|
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.Test.Answer.Options[NumOpt].Feedback);
|
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 */
|
/* End of right column */
|
||||||
fprintf (Gbl.F.Out,"</div>"
|
fprintf (Gbl.F.Out,"</div>"
|
||||||
|
@ -4874,6 +4859,27 @@ static void Tst_PutFloatInputField (const char *Label,const char *Field,
|
||||||
"</label>");
|
"</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 *********************/
|
/********************* Initialize a new question to zero *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user