Version 18.22

This commit is contained in:
Antonio Cañas Vargas 2018-12-09 13:11:20 +01:00
parent 2cd279a629
commit 36ba8dc076
6 changed files with 172 additions and 158 deletions

View File

@ -2281,7 +2281,8 @@ a:hover img.CENTRE_PHOTO_SHOW
.TAG_SEL {box-sizing:border-box; width:346px;} .TAG_SEL {box-sizing:border-box; width:346px;}
.TAG_TXT {box-sizing:border-box; width:346px;} .TAG_TXT {box-sizing:border-box; width:346px;}
.STEM {box-sizing:border-box; width:700px;} .STEM {box-sizing:border-box; width:700px;}
.ANS {color:#404040; font-size:12pt;} .ANS_TXT {color:#404040; font-size:12pt;}
.ANS_0 {color:#404040; font-size:12pt; font-weight:bold;}
.ANS_OK {color:#008000; font-size:12pt; font-weight:bold;} .ANS_OK {color:#008000; font-size:12pt; font-weight:bold;}
.ANS_BAD {color:red; font-size:12pt; font-weight:bold;} .ANS_BAD {color:red; font-size:12pt; font-weight:bold;}
.ANS_STR {box-sizing:border-box; width:600px;} .ANS_STR {box-sizing:border-box; width:600px;}

View File

@ -360,12 +360,13 @@ En OpenSWAD:
ps2pdf source.ps destination.pdf ps2pdf source.ps destination.pdf
*/ */
#define Log_PLATFORM_VERSION "SWAD 18.21.3 (2018-12-08)" #define Log_PLATFORM_VERSION "SWAD 18.22 (2018-12-09)"
#define CSS_FILE "swad18.4.css" #define CSS_FILE "swad18.22.css"
#define JS_FILE "swad17.17.1.js" #define JS_FILE "swad17.17.1.js"
/* /*
Version 18.21.4: Dec 08, 2018 Check icons replaced by HTML entities in tests. (? lines) Version 18.22: Dec 09, 2018 Check icons replaced by HTML entities in tests.
Version 18.21.3: Dec 08, 2018 Fixed bug when changing language, reported by Agostinho Silva. (237044 lines) Changes in test feedback. (237055 lines)
Version 18.21.3: Dec 09, 2018 Fixed bug when changing language, reported by Agostinho Silva. (237044 lines)
Version 18.21.2: Dec 08, 2018 Check icons replaced by HTML entities in listing of users. (237039 lines) Version 18.21.2: Dec 08, 2018 Check icons replaced by HTML entities in listing of users. (237039 lines)
Version 18.21.1: Dec 08, 2018 Some messages translated to Portuguese (still 464 messages to be translated). (237046 lines) Version 18.21.1: Dec 08, 2018 Some messages translated to Portuguese (still 464 messages to be translated). (237046 lines)
Version 18.21: Dec 08, 2018 Code refactoring related to languages. (237098 lines) Version 18.21: Dec 08, 2018 Code refactoring related to languages. (237098 lines)

View File

@ -195,15 +195,18 @@ static void Tst_ListOneOrMoreQuestionsForSelection (long GamCod,
static void Tst_WriteAnswersEdit (long QstCod); static void Tst_WriteAnswersEdit (long QstCod);
static void Tst_WriteAnswersTestToAnswer (unsigned NumQst,long QstCod,bool Shuffle); static void Tst_WriteAnswersTestToAnswer (unsigned NumQst,long QstCod,bool Shuffle);
static void Tst_WriteAnswersTestResult (unsigned NumQst,long QstCod, static void Tst_WriteAnswersTestResult (struct UsrData *UsrDat,
unsigned NumQst,long QstCod,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);
static void Tst_WriteTFAnsViewTest (unsigned NumQst); static void Tst_WriteTFAnsViewTest (unsigned NumQst);
static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteTFAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);
static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle); static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle);
static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);
static void Tst_WriteChoiceAnsViewGame (struct Game *Game, static void Tst_WriteChoiceAnsViewGame (struct Game *Game,
unsigned NumQst,long QstCod, unsigned NumQst,long QstCod,
@ -211,18 +214,21 @@ static void Tst_WriteChoiceAnsViewGame (struct Game *Game,
bool ShowResult); bool ShowResult);
static void Tst_WriteTextAnsViewTest (unsigned NumQst); static void Tst_WriteTextAnsViewTest (unsigned NumQst);
static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);
static void Tst_WriteIntAnsViewTest (unsigned NumQst); static void Tst_WriteIntAnsViewTest (unsigned NumQst);
static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);
static void Tst_WriteFloatAnsViewTest (unsigned NumQst); static void Tst_WriteFloatAnsViewTest (unsigned NumQst);
static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);
static void Tst_WriteHeadUserCorrect (void); static void Tst_WriteHeadUserCorrect (struct UsrData *UsrDat);
static void Tst_WriteScoreStart (unsigned ColSpan); static void Tst_WriteScoreStart (unsigned ColSpan);
static void Tst_WriteScoreEnd (void); static void Tst_WriteScoreEnd (void);
static void Tst_WriteParamQstCod (unsigned NumQst,long QstCod); static void Tst_WriteParamQstCod (unsigned NumQst,long QstCod);
@ -851,6 +857,7 @@ static void Tst_ShowTestQuestionsWhenSeeing (MYSQL_RES *mysql_res)
Lay_ShowErrorAndExit ("Wrong code of question."); Lay_ShowErrorAndExit ("Wrong code of question.");
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_TO_ANSWER, Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_TO_ANSWER,
&Gbl.Usrs.Me.UsrDat,
NULL,NumQst,QstCod,row, NULL,NumQst,QstCod,row,
&ScoreThisQst, // Not used here &ScoreThisQst, // Not used here
&AnswerIsNotBlank); // Not used here &AnswerIsNotBlank); // Not used here
@ -953,6 +960,7 @@ static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank
/***** Write question and answers *****/ /***** Write question and answers *****/
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT, Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT,
&Gbl.Usrs.Me.UsrDat,
NULL,NumQst,QstCod,row, NULL,NumQst,QstCod,row,
&ScoreThisQst,&AnswerIsNotBlank); &ScoreThisQst,&AnswerIsNotBlank);
@ -993,6 +1001,7 @@ static void Tst_ShowTestResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank
/*****************************************************************************/ /*****************************************************************************/
void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions, void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
struct UsrData *UsrDat,
struct Game *Game, struct Game *Game,
unsigned NumQst,long QstCod,MYSQL_ROW row, unsigned NumQst,long QstCod,MYSQL_ROW row,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
@ -1046,7 +1055,7 @@ void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestio
Tst_WriteAnswersTestToAnswer (NumQst,QstCod,(row[3][0] == 'Y')); Tst_WriteAnswersTestToAnswer (NumQst,QstCod,(row[3][0] == 'Y'));
break; break;
case Tst_SHOW_TEST_RESULT: case Tst_SHOW_TEST_RESULT:
Tst_WriteAnswersTestResult (NumQst,QstCod,ScoreThisQst,AnswerIsNotBlank); Tst_WriteAnswersTestResult (UsrDat,NumQst,QstCod,ScoreThisQst,AnswerIsNotBlank);
/* Write question feedback (row[5]) */ /* Write question feedback (row[5]) */
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
@ -3351,7 +3360,7 @@ unsigned Tst_GetAnswersQst (long QstCod,MYSQL_RES **mysql_res,bool Shuffle)
static void Tst_WriteAnswersEdit (long QstCod) static void Tst_WriteAnswersEdit (long QstCod)
{ {
extern const char *Txt_TEST_Correct_answer; extern const char *Txt_TST_Answer_given_by_the_teachers;
unsigned NumOpt; unsigned NumOpt;
unsigned i; unsigned i;
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
@ -3448,8 +3457,8 @@ static void Tst_WriteAnswersEdit (long QstCod)
" alt=\"%s\" title=\"%s\"" " alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />", " class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL, Gbl.Prefs.IconsURL,
Txt_TEST_Correct_answer, Txt_TST_Answer_given_by_the_teachers,
Txt_TEST_Correct_answer); Txt_TST_Answer_given_by_the_teachers);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write the number of option */ /* Write the number of option */
@ -3528,7 +3537,8 @@ static void Tst_WriteAnswersTestToAnswer (unsigned NumQst,long QstCod,bool Shuff
/************* Write answers of a question when assessing a test *************/ /************* Write answers of a question when assessing a test *************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteAnswersTestResult (unsigned NumQst,long QstCod, static void Tst_WriteAnswersTestResult (struct UsrData *UsrDat,
unsigned NumQst,long QstCod,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
{ {
MYSQL_RES *mysql_res; MYSQL_RES *mysql_res;
@ -3548,20 +3558,21 @@ static void Tst_WriteAnswersTestResult (unsigned NumQst,long QstCod,
switch (Gbl.Test.AnswerType) switch (Gbl.Test.AnswerType)
{ {
case Tst_ANS_INT: case Tst_ANS_INT:
Tst_WriteIntAnsAssessTest (NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank); Tst_WriteIntAnsAssessTest (UsrDat,NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank);
break; break;
case Tst_ANS_FLOAT: case Tst_ANS_FLOAT:
Tst_WriteFloatAnsAssessTest (NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank);
Tst_WriteFloatAnsAssessTest (UsrDat,NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank);
break; break;
case Tst_ANS_TRUE_FALSE: case Tst_ANS_TRUE_FALSE:
Tst_WriteTFAnsAssessTest (NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank); Tst_WriteTFAnsAssessTest (UsrDat,NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank);
break; break;
case Tst_ANS_UNIQUE_CHOICE: case Tst_ANS_UNIQUE_CHOICE:
case Tst_ANS_MULTIPLE_CHOICE: case Tst_ANS_MULTIPLE_CHOICE:
Tst_WriteChoiceAnsAssessTest (NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank); Tst_WriteChoiceAnsAssessTest (UsrDat,NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank);
break; break;
case Tst_ANS_TEXT: case Tst_ANS_TEXT:
Tst_WriteTextAnsAssessTest (NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank); Tst_WriteTextAnsAssessTest (UsrDat,NumQst,mysql_res,ScoreThisQst,AnswerIsNotBlank);
break; break;
default: default:
break; break;
@ -3645,7 +3656,8 @@ void Tst_WriteAnsTF (char AnsTF)
/************** Write false / true answer when assessing a test **************/ /************** Write false / true answer when assessing a test **************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteTFAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
{ {
MYSQL_ROW row; MYSQL_ROW row;
@ -3684,7 +3696,7 @@ static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Tbl_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect (UsrDat);
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
/***** Write the user answer *****/ /***** Write the user answer *****/
@ -3694,12 +3706,12 @@ static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ?
(AnsTF == row[1][0] ? "ANS_OK" : (AnsTF == row[1][0] ? "ANS_OK" :
"ANS_BAD") : "ANS_BAD") :
"ANS"); "ANS_0");
Tst_WriteAnsTF (AnsTF); Tst_WriteAnsTF (AnsTF);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write the correct answer *****/ /***** Write the correct answer *****/
fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_MIDDLE\">");
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
Tst_WriteAnsTF (row[1][0]); Tst_WriteAnsTF (row[1][0]);
@ -3715,7 +3727,7 @@ static void Tst_WriteTFAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
{ {
Tst_WriteScoreStart (2); Tst_WriteScoreStart (2);
if (AnsTF == '\0') // If user has omitted the answer if (AnsTF == '\0') // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS\">%.2lf",0.0); fprintf (Gbl.F.Out,"ANS_0\">%.2lf",0.0);
else if (AnsTF == row[1][0]) // If correct else if (AnsTF == row[1][0]) // If correct
fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0); fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0);
else // If wrong else // If wrong
@ -3807,7 +3819,7 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle
NumQst,NumOpt, NumQst,NumOpt,
NumQst,Index); NumQst,Index);
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
"<label for=\"Ans%06u_%u\" class=\"ANS\">" "<label for=\"Ans%06u_%u\" class=\"ANS_TXT\">"
"%c)&nbsp;" "%c)&nbsp;"
"</label>" "</label>"
"</td>", "</td>",
@ -3816,7 +3828,7 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle
/***** Write the option text *****/ /***** Write the option text *****/
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
"<label for=\"Ans%06u_%u\" class=\"ANS\">" "<label for=\"Ans%06u_%u\" class=\"ANS_TXT\">"
"%s" "%s"
"</label>", "</label>",
NumQst,NumOpt, NumQst,NumOpt,
@ -3839,11 +3851,12 @@ static void Tst_WriteChoiceAnsViewTest (unsigned NumQst,long QstCod,bool Shuffle
/******* Write single or multiple choice answer when assessing a test ********/ /******* Write single or multiple choice answer when assessing a test ********/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteChoiceAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
{ {
extern const char *Txt_TEST_User_answer; extern const char *Txt_TST_Answer_given_by_the_user;
extern const char *Txt_TEST_Correct_answer; extern const char *Txt_TST_Answer_given_by_the_teachers;
unsigned NumOpt; unsigned NumOpt;
MYSQL_ROW row; MYSQL_ROW row;
char StrOneIndex[10 + 1]; char StrOneIndex[10 + 1];
@ -3851,6 +3864,11 @@ static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
unsigned Indexes[Tst_MAX_OPTIONS_PER_QUESTION]; // Indexes of all answers of this question unsigned Indexes[Tst_MAX_OPTIONS_PER_QUESTION]; // Indexes of all answers of this question
int AnsUsr; int AnsUsr;
bool AnswersUsr[Tst_MAX_OPTIONS_PER_QUESTION]; bool AnswersUsr[Tst_MAX_OPTIONS_PER_QUESTION];
struct
{
char *Class;
char *Str;
} Ans;
unsigned NumOptTotInQst = 0; unsigned NumOptTotInQst = 0;
unsigned NumOptCorrInQst = 0; unsigned NumOptCorrInQst = 0;
unsigned NumAnsGood = 0; unsigned NumAnsGood = 0;
@ -3937,7 +3955,7 @@ static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
/***** Start table *****/ /***** Start table *****/
Tbl_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect (UsrDat);
fprintf (Gbl.F.Out,"<td></td>" fprintf (Gbl.F.Out,"<td></td>"
"<td></td>" "<td></td>"
"</tr>"); "</tr>");
@ -3947,49 +3965,59 @@ static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
NumOpt < Gbl.Test.Answer.NumOptions; NumOpt < Gbl.Test.Answer.NumOptions;
NumOpt++) NumOpt++)
{ {
/* Draw icon depending on user's answer */ fprintf (Gbl.F.Out,"<tr>");
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"CENTER_TOP\">");
if (AnswersUsr[Indexes[NumOpt]] == true) // This answer has been selected by the user
fprintf (Gbl.F.Out,"<img src=\"%s/%s16x16.gif\""
" alt=\"%s\" title=\"%s\""
" class=\"ICO20x20\" />",
Gbl.Prefs.IconsURL,
(Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ?
(Gbl.Test.Answer.Options[Indexes[NumOpt]].Correct ? "ok_green" :
"ok_red") :
"ok_on",
Txt_TEST_User_answer,
Txt_TEST_User_answer);
fprintf (Gbl.F.Out,"</td>");
/* Draw icon that indicates whether the answer is correct */ /* Draw icon depending on user's answer */
fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_TOP\">"); if (AnswersUsr[Indexes[NumOpt]] == true) // This answer has been selected by the user
{
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
{ {
if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Correct) if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Correct)
fprintf (Gbl.F.Out,"<img src=\"%s/ok_on16x16.gif\"" {
" alt=\"%s\" title=\"%s\"" Ans.Class = "ANS_OK";
" class=\"ICO20x20\" />", Ans.Str = "&check;";
Gbl.Prefs.IconsURL,
Txt_TEST_Correct_answer,
Txt_TEST_Correct_answer);
} }
else else
fprintf (Gbl.F.Out,"?"); {
fprintf (Gbl.F.Out,"</td>"); Ans.Class = "ANS_BAD";
Ans.Str = "&cross;";
}
}
else
{
Ans.Class = "ANS_0";
Ans.Str = "&bull;";
}
fprintf (Gbl.F.Out,"<td class=\"%s CENTER_TOP\" title=\"%s\">%s</td>",
Ans.Class,Txt_TST_Answer_given_by_the_user,Ans.Str);
}
else // This answer has NOT been selected by the user
fprintf (Gbl.F.Out,"<td></td>");
/* Draw icon that indicates whether the answer is correct */
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
{
if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Correct)
fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_TOP\" title=\"%s\">&bull;</td>",
Txt_TST_Answer_given_by_the_teachers);
else
fprintf (Gbl.F.Out,"<td></td>");
}
else
fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_TOP\">?</td>");
/* Answer letter (a, b, c,...) */ /* Answer letter (a, b, c,...) */
fprintf (Gbl.F.Out,"<td class=\"ANS LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"ANS_TXT LEFT_TOP\">"
"%c)&nbsp;" "%c)&nbsp;"
"</td>", "</td>",
'a' + (char) NumOpt); 'a' + (char) NumOpt);
/* Answer text and feedback */ /* Answer text and feedback */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
"<div class=\"ANS\">" "<div class=\"ANS_TXT\">"
"%s", "%s",
Gbl.Test.Answer.Options[Indexes[NumOpt]].Text); Gbl.Test.Answer.Options[Indexes[NumOpt]].Text);
Img_ShowImage (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Image, Img_ShowImage (&Gbl.Test.Answer.Options[Indexes[NumOpt]].Image,
@ -4062,7 +4090,7 @@ static void Tst_WriteChoiceAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
{ {
Tst_WriteScoreStart (4); Tst_WriteScoreStart (4);
if (*ScoreThisQst == 0.0) if (*ScoreThisQst == 0.0)
fprintf (Gbl.F.Out,"ANS"); fprintf (Gbl.F.Out,"ANS_0");
else if (*ScoreThisQst > 0.0) else if (*ScoreThisQst > 0.0)
fprintf (Gbl.F.Out,"ANS_OK"); fprintf (Gbl.F.Out,"ANS_OK");
else else
@ -4198,7 +4226,8 @@ static void Tst_WriteTextAnsViewTest (unsigned NumQst)
/***************** Write text answer when assessing a test *******************/ /***************** Write text answer when assessing a test *******************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteTextAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
{ {
unsigned NumOpt; unsigned NumOpt;
@ -4253,12 +4282,12 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Tbl_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect (UsrDat);
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
/***** Write the user answer *****/ /***** Write the user answer *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\""); "<td");
if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question
{ {
/* Filter the user answer */ /* Filter the user answer */
@ -4287,18 +4316,17 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
break; break;
} }
} }
fprintf (Gbl.F.Out,"%s CENTER_TOP\">" fprintf (Gbl.F.Out," class=\"%s CENTER_TOP\">"
"&nbsp;%s&nbsp;", "%s",
(Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ?
(Correct ? "ANS_OK" : (Correct ? "ANS_OK" :
"ANS_BAD") : "ANS_BAD") :
"ANS", "ANS_0",
Gbl.Test.StrAnswersOneQst[NumQst]); Gbl.Test.StrAnswersOneQst[NumQst]);
} }
else // If user has omitted the answer else // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS CENTER_TOP\">" fprintf (Gbl.F.Out,">");
"&nbsp;");
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write the correct answers *****/ /***** Write the correct answers *****/
@ -4313,14 +4341,14 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
NumOpt++) NumOpt++)
{ {
/* Answer letter (a, b, c,...) */ /* Answer letter (a, b, c,...) */
fprintf (Gbl.F.Out,"<td class=\"ANS LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"ANS_0 LEFT_TOP\">"
"%c)&nbsp;" "%c)&nbsp;"
"</td>", "</td>",
'a' + (char) NumOpt); 'a' + (char) NumOpt);
/* Answer text and feedback */ /* Answer text and feedback */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">" fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
"<div class=\"ANS\">" "<div class=\"ANS_0\">"
"%s" "%s"
"</div>", "</div>",
Gbl.Test.Answer.Options[NumOpt].Text); Gbl.Test.Answer.Options[NumOpt].Text);
@ -4338,7 +4366,7 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
Tbl_EndTable (); Tbl_EndTable ();
} }
else else
fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_TOP\">" fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_TOP\">"
"?"); "?");
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
"</tr>"); "</tr>");
@ -4365,7 +4393,7 @@ static void Tst_WriteTextAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
{ {
Tst_WriteScoreStart (4); Tst_WriteScoreStart (4);
if (!Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has omitted the answer if (!Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS\">%.2lf",0.0); fprintf (Gbl.F.Out,"ANS_0\">%.2lf",0.0);
else if (Correct) // If correct else if (Correct) // If correct
fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0); fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0);
else // If wrong else // If wrong
@ -4392,7 +4420,8 @@ static void Tst_WriteIntAnsViewTest (unsigned NumQst)
/**************** Write integer answer when assessing a test *****************/ /**************** Write integer answer when assessing a test *****************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteIntAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
{ {
MYSQL_ROW row; MYSQL_ROW row;
@ -4418,39 +4447,39 @@ static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Tbl_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect (UsrDat);
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
/***** Write the user answer *****/ /***** Write the user answer *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\""); "<td");
if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question
{ {
if (sscanf (Gbl.Test.StrAnswersOneQst[NumQst],"%ld",&IntAnswerUsr) == 1) if (sscanf (Gbl.Test.StrAnswersOneQst[NumQst],"%ld",&IntAnswerUsr) == 1)
fprintf (Gbl.F.Out,"%s CENTER_MIDDLE\">" fprintf (Gbl.F.Out," class=\"%s CENTER_MIDDLE\">"
"&nbsp;%ld&nbsp;", "%ld",
(Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ?
(IntAnswerUsr == IntAnswerCorr ? "ANS_OK" : (IntAnswerUsr == IntAnswerCorr ? "ANS_OK" :
"ANS_BAD") : "ANS_BAD") :
"ANS", "ANS_0",
IntAnswerUsr); IntAnswerUsr);
else else
{ {
Gbl.Test.StrAnswersOneQst[NumQst][0] = '\0'; Gbl.Test.StrAnswersOneQst[NumQst][0] = '\0';
fprintf (Gbl.F.Out,"ANS CENTER_MIDDLE\">" fprintf (Gbl.F.Out," class=\"ANS_0 CENTER_MIDDLE\">"
"?"); "?");
} }
} }
else // If user has omitted the answer else // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS CENTER_MIDDLE\">&nbsp;"); fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write the correct answer *****/ /***** Write the correct answer *****/
fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_MIDDLE\">");
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
fprintf (Gbl.F.Out,"&nbsp;%ld&nbsp;",IntAnswerCorr); fprintf (Gbl.F.Out,"%ld",IntAnswerCorr);
else else
fprintf (Gbl.F.Out,"?"); fprintf (Gbl.F.Out,"?");
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
@ -4478,7 +4507,7 @@ static void Tst_WriteIntAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
{ {
Tst_WriteScoreStart (2); Tst_WriteScoreStart (2);
if (!Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has omitted the answer if (!Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS\">%.2lf",0.0); fprintf (Gbl.F.Out,"ANS_0\">%.2lf",0.0);
else if (IntAnswerUsr == IntAnswerCorr) // If correct else if (IntAnswerUsr == IntAnswerCorr) // If correct
fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0); fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0);
else // If wrong else // If wrong
@ -4505,7 +4534,8 @@ static void Tst_WriteFloatAnsViewTest (unsigned NumQst)
/***************** Write float answer when assessing a test ******************/ /***************** Write float answer when assessing a test ******************/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res, static void Tst_WriteFloatAnsAssessTest (struct UsrData *UsrDat,
unsigned NumQst,MYSQL_RES *mysql_res,
double *ScoreThisQst,bool *AnswerIsNotBlank) double *ScoreThisQst,bool *AnswerIsNotBlank)
{ {
MYSQL_ROW row; MYSQL_ROW row;
@ -4544,36 +4574,36 @@ static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
/***** Header with the title of each column *****/ /***** Header with the title of each column *****/
Tbl_StartTable (2); Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<tr>"); fprintf (Gbl.F.Out,"<tr>");
Tst_WriteHeadUserCorrect (); Tst_WriteHeadUserCorrect (UsrDat);
fprintf (Gbl.F.Out,"</tr>"); fprintf (Gbl.F.Out,"</tr>");
/***** Write the user answer *****/ /***** Write the user answer *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\""); "<td");
if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has answered the question
{ {
FloatAnsUsr = Tst_GetFloatAnsFromStr (Gbl.Test.StrAnswersOneQst[NumQst]); FloatAnsUsr = Tst_GetFloatAnsFromStr (Gbl.Test.StrAnswersOneQst[NumQst]);
if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // It's a correct floating point number if (Gbl.Test.StrAnswersOneQst[NumQst][0]) // It's a correct floating point number
fprintf (Gbl.F.Out,"%s CENTER_MIDDLE\">&nbsp;%lg&nbsp;", fprintf (Gbl.F.Out," class=\"%s CENTER_MIDDLE\">%lg",
(Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ? Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) ?
((FloatAnsUsr >= FloatAnsCorr[0] && ((FloatAnsUsr >= FloatAnsCorr[0] &&
FloatAnsUsr <= FloatAnsCorr[1]) ? "ANS_OK" : FloatAnsUsr <= FloatAnsCorr[1]) ? "ANS_OK" :
"ANS_BAD") : "ANS_BAD") :
"ANS", "ANS_0",
FloatAnsUsr); FloatAnsUsr);
else // Not a floating point number else // Not a floating point number
fprintf (Gbl.F.Out,"ANS CENTER_MIDDLE\">?"); fprintf (Gbl.F.Out," class=\"ANS_0 CENTER_MIDDLE\">?");
} }
else // If user has omitted the answer else // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS CENTER_MIDDLE\">&nbsp;"); fprintf (Gbl.F.Out,">");
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write the correct answer *****/ /***** Write the correct answer *****/
fprintf (Gbl.F.Out,"<td class=\"ANS CENTER_MIDDLE\">"); fprintf (Gbl.F.Out,"<td class=\"ANS_0 CENTER_MIDDLE\">");
if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD || if (Gbl.Test.Config.Feedback == Tst_FEEDBACK_EACH_GOOD_BAD ||
Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK) Gbl.Test.Config.Feedback == Tst_FEEDBACK_FULL_FEEDBACK)
fprintf (Gbl.F.Out,"&nbsp;[%lg; %lg]&nbsp;",FloatAnsCorr[0],FloatAnsCorr[1]); fprintf (Gbl.F.Out,"[%lg; %lg]",FloatAnsCorr[0],FloatAnsCorr[1]);
else else
fprintf (Gbl.F.Out,"?"); fprintf (Gbl.F.Out,"?");
fprintf (Gbl.F.Out,"</td>" fprintf (Gbl.F.Out,"</td>"
@ -4602,7 +4632,7 @@ static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
{ {
Tst_WriteScoreStart (2); Tst_WriteScoreStart (2);
if (!Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has omitted the answer if (!Gbl.Test.StrAnswersOneQst[NumQst][0]) // If user has omitted the answer
fprintf (Gbl.F.Out,"ANS\">%.2lf",0.0); fprintf (Gbl.F.Out,"ANS_0\">%.2lf",0.0);
else if (FloatAnsUsr >= FloatAnsCorr[0] && else if (FloatAnsUsr >= FloatAnsCorr[0] &&
FloatAnsUsr <= FloatAnsCorr[1]) // If correct (inside the interval) FloatAnsUsr <= FloatAnsCorr[1]) // If correct (inside the interval)
fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0); fprintf (Gbl.F.Out,"ANS_OK\">%.2lf",1.0);
@ -4619,18 +4649,19 @@ static void Tst_WriteFloatAnsAssessTest (unsigned NumQst,MYSQL_RES *mysql_res,
/********* one for the user's answer and other for the correct answer ********/ /********* one for the user's answer and other for the correct answer ********/
/*****************************************************************************/ /*****************************************************************************/
static void Tst_WriteHeadUserCorrect (void) static void Tst_WriteHeadUserCorrect (struct UsrData *UsrDat)
{ {
extern const char *Txt_User[Usr_NUM_SEXS]; extern const char *Txt_User[Usr_NUM_SEXS];
extern const char *Txt_TST_Correct_ANSWER; extern const char *Txt_ROLES_PLURAL_Abc[Rol_NUM_ROLES][Usr_NUM_SEXS];
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_MIDDLE\">" fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_MIDDLE\">"
"&nbsp;%s&nbsp;" "%s"
"</td>" "</td>"
"<td class=\"DAT_SMALL CENTER_MIDDLE\">" "<td class=\"DAT_SMALL CENTER_MIDDLE\">"
"&nbsp;%s&nbsp;" "%s"
"</td>", "</td>",
Txt_User[Usr_SEX_UNKNOWN],Txt_TST_Correct_ANSWER); Txt_User[UsrDat->Sex],
Txt_ROLES_PLURAL_Abc[Rol_TCH][Usr_SEX_UNKNOWN]);
} }
/*****************************************************************************/ /*****************************************************************************/
@ -8422,6 +8453,7 @@ static void Tst_ShowTestResult (time_t TstTimeUTC)
/***** Write questions and answers *****/ /***** Write questions and answers *****/
Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT, Tst_WriteQstAndAnsTest (Tst_SHOW_TEST_RESULT,
&Gbl.Usrs.Other.UsrDat,
NULL,NumQst,QstCod,row, NULL,NumQst,QstCod,row,
&ScoreThisQst, // Not used here &ScoreThisQst, // Not used here
&AnswerIsNotBlank); // Not used here &AnswerIsNotBlank); // Not used here

View File

@ -144,6 +144,7 @@ void Tst_ShowNewTest (void);
void Tst_AssessTest (void); void Tst_AssessTest (void);
void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions, void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
struct UsrData *UsrDat,
struct Game *Game, struct Game *Game,
unsigned NumQst,long QstCod,MYSQL_ROW row, unsigned NumQst,long QstCod,MYSQL_ROW row,
double *ScoreThisQst,bool *AnswerIsNotBlank); double *ScoreThisQst,bool *AnswerIsNotBlank);

View File

@ -1003,7 +1003,7 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
extern const char *Txt_New_question; extern const char *Txt_New_question;
extern const char *Txt_no_tags; extern const char *Txt_no_tags;
extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES]; extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES];
extern const char *Txt_TEST_Correct_answer; extern const char *Txt_TST_Answer_given_by_the_teachers;
static unsigned NumQst = 0; static unsigned NumQst = 0;
static unsigned NumNonExistingQst = 0; static unsigned NumNonExistingQst = 0;
const char *Stem = (StemElem != NULL) ? StemElem->Content : const char *Stem = (StemElem != NULL) ? StemElem->Content :
@ -1095,8 +1095,8 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
Gbl.Prefs.IconsURL, Gbl.Prefs.IconsURL,
QuestionExists ? "ok_off" : QuestionExists ? "ok_off" :
"ok_on", "ok_on",
Txt_TEST_Correct_answer, Txt_TST_Answer_given_by_the_teachers,
Txt_TEST_Correct_answer); Txt_TST_Answer_given_by_the_teachers);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/***** Write the stem and the answers *****/ /***** Write the stem and the answers *****/
@ -1164,8 +1164,8 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
Gbl.Prefs.IconsURL, Gbl.Prefs.IconsURL,
QuestionExists ? "ok_off" : QuestionExists ? "ok_off" :
"ok_on", "ok_on",
Txt_TEST_Correct_answer, Txt_TST_Answer_given_by_the_teachers,
Txt_TEST_Correct_answer); Txt_TST_Answer_given_by_the_teachers);
fprintf (Gbl.F.Out,"</td>"); fprintf (Gbl.F.Out,"</td>");
/* Write the number of option */ /* Write the number of option */

View File

@ -42771,48 +42771,6 @@ const char *Txt_Test =
"Teste"; "Teste";
#endif #endif
const char *Txt_TEST_Correct_answer =
#if L==1 // ca
"Resposta correcta";
#elif L==2 // de
"Correct answer"; // Need Übersetzung
#elif L==3 // en
"Correct answer";
#elif L==4 // es
"Respuesta correcta";
#elif L==5 // fr
"Correct answer"; // Besoin de traduction
#elif L==6 // gn
"Respuesta correcta"; // Okoteve traducción
#elif L==7 // it
"Risposta corretta";
#elif L==8 // pl
"Prawidlowa odpowiedz";
#elif L==9 // pt
"Correct answer"; // Necessita de tradução
#endif
const char *Txt_TEST_User_answer =
#if L==1 // ca
"Resposta usuari";
#elif L==2 // de
"User's answer"; // Need Übersetzung
#elif L==3 // en
"User's answer";
#elif L==4 // es
"Respuesta usuario";
#elif L==5 // fr
"User's answer"; // Besoin de traduction
#elif L==6 // gn
"Respuesta usuario"; // Okoteve traducción
#elif L==7 // it
"Risposta utente";
#elif L==8 // pl
"User's answer"; // Potrzebujesz tlumaczenie
#elif L==9 // pt
"User's answer"; // Necessita de tradução
#endif
const char *Txt_Test_No_X_that_you_make_in_this_course = // Warning: it is very important to include %u in the following sentences const char *Txt_Test_No_X_that_you_make_in_this_course = // Warning: it is very important to include %u in the following sentences
#if L==1 // ca #if L==1 // ca
"Test n&ordm; %u que realiza usted en esta asignatura"; // Necessita traduccio "Test n&ordm; %u que realiza usted en esta asignatura"; // Necessita traduccio
@ -49467,25 +49425,46 @@ const char *Txt_Total_BR_score =
"Pontua&ccedil;&atilde;o<br />total"; "Pontua&ccedil;&atilde;o<br />total";
#endif #endif
const char *Txt_TST_Correct_ANSWER = const char *Txt_TST_Answer_given_by_the_teachers =
#if L==1 // ca #if L==1 // ca
"Correcta"; "Resposta donada pels professors";
#elif L==2 // de #elif L==2 // de
"Richtige"; "Antwort von den Lehrern";
#elif L==3 // en #elif L==3 // en
"Correct"; "Answer given by the teachers";
#elif L==4 // es #elif L==4 // es
"Correcta"; "Respuesta dada por los profesores";
#elif L==5 // fr #elif L==5 // fr
"Bonne"; "R&eacute;ponse donn&eacute;e par les professeurs";
#elif L==6 // gn #elif L==6 // gn
"Correcta"; // Okoteve traducción "Respuesta dada por los profesores"; // Okoteve traducción
#elif L==7 // it #elif L==7 // it
"Corretta"; "Risposta fornita dagli insegnanti";
#elif L==8 // pl #elif L==8 // pl
"Poprawna"; "Odpowied&zacute; udzielona przez nauczycieli";
#elif L==9 // pt #elif L==9 // pt
"Correta"; "Resposta dada pelos professores";
#endif
const char *Txt_TST_Answer_given_by_the_user =
#if L==1 // ca
"Resposta donada per l'usuari/a";
#elif L==2 // de
"Antwort vom Benutzer";
#elif L==3 // en
"Answer given by the user";
#elif L==4 // es
"Respuesta dada por el usuario/a";
#elif L==5 // fr
"R&eacute;ponse donn&eacute;e par l'utilisateur/se";
#elif L==6 // gn
"Respuesta dada por el usuario/a"; // Okoteve traducción
#elif L==7 // it
"Risposta fornita dall'utente";
#elif L==8 // pl
"Odpowied&zacute; udzielona przez u&zdot;ytkownika";
#elif L==9 // pt
"Resposta dada pelo usu&aacute;rio/a";
#endif #endif
const char *Txt_TST_PLUGGABLE[Tst_NUM_OPTIONS_PLUGGABLE] = const char *Txt_TST_PLUGGABLE[Tst_NUM_OPTIONS_PLUGGABLE] =