mirror of https://github.com/acanas/swad-core.git
Version19.125.3
This commit is contained in:
parent
2a461286e1
commit
43cc625d20
|
@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.125.2 (2020-02-17)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.125.3 (2020-02-17)"
|
||||
#define CSS_FILE "swad19.118.css"
|
||||
#define JS_FILE "swad19.91.1.js"
|
||||
/*
|
||||
|
@ -507,7 +507,9 @@ ps2pdf source.ps destination.pdf
|
|||
// TODO: En la lista de conectados central, poner el logo de la institución a la que pertenece el usuario
|
||||
// TODO: Add visibility to API function getTestConfig
|
||||
// TODO: Add visibility to games
|
||||
// TODO: Sugerencia de Jesús González Peñalver: añadir un poco más de espacio entre pregunta y pregunta en las opciones de un juego
|
||||
|
||||
Version 19.125.3: Feb 17, 2020 Changes in visibility of question stem. (278898 lines)
|
||||
Version 19.125.2: Feb 17, 2020 Removed Feedback field from tst_config database table. (278850 lines)
|
||||
1 change necessary in database:
|
||||
ALTER TABLE tst_config DROP COLUMN Feedback;
|
||||
|
|
|
@ -1925,7 +1925,8 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts,
|
|||
|
||||
/* Write stem (row[3]) */
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (row[3],"TEST_EDI");
|
||||
Tst_WriteQstStem (row[3],"TEST_EDI",
|
||||
true); // Visible
|
||||
|
||||
/* Get media (row[5]) */
|
||||
Gbl.Test.Media.MedCod = Str_ConvertStrCodToLongCod (row[5]);
|
||||
|
|
|
@ -2886,7 +2886,8 @@ static void Mch_ShowQuestionAndAnswersTch (const struct Match *Match)
|
|||
HTM_DIV_Begin ("class=\"MCH_BOTTOM\""); // Bottom
|
||||
|
||||
/* Write stem (row[1]) */
|
||||
Tst_WriteQstStem (row[1],"MCH_TCH_STEM");
|
||||
Tst_WriteQstStem (row[1],"MCH_TCH_STEM",
|
||||
true); // Visible
|
||||
|
||||
/* Get media (row[2]) */
|
||||
Gbl.Test.Media.MedCod = Str_ConvertStrCodToLongCod (row[2]);
|
||||
|
|
61
swad_test.c
61
swad_test.c
|
@ -972,7 +972,19 @@ void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestio
|
|||
|
||||
/***** Write stem (row[4]) *****/
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (row[4],"TEST_EXA");
|
||||
switch (ActionToDoWithQuestions)
|
||||
{
|
||||
case Tst_SHOW_TEST_TO_ANSWER:
|
||||
Tst_WriteQstStem (row[4],"TEST_EXA",
|
||||
true); // Visible
|
||||
break;
|
||||
case Tst_SHOW_TEST_RESULT:
|
||||
Tst_WriteQstStem (row[4],"TEST_EXA",
|
||||
TsR_IsVisibleQstAndAnsTxt (Gbl.Test.Config.Visibility));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Get and show media (row[6]) *****/
|
||||
Gbl.Test.Media.MedCod = Str_ConvertStrCodToLongCod (row[6]);
|
||||
|
@ -1009,27 +1021,38 @@ void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestio
|
|||
/********************* Write the stem of a test question *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Tst_WriteQstStem (const char *Stem,const char *ClassStem)
|
||||
void Tst_WriteQstStem (const char *Stem,const char *ClassStem,bool Visible)
|
||||
{
|
||||
extern const char *Txt_Question_not_visible;
|
||||
unsigned long StemLength;
|
||||
char *StemRigorousHTML;
|
||||
|
||||
/***** Convert the stem, that is in HTML, to rigorous HTML *****/
|
||||
StemLength = strlen (Stem) * Str_MAX_BYTES_PER_CHAR;
|
||||
if ((StemRigorousHTML = (char *) malloc (StemLength + 1)) == NULL)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Str_Copy (StemRigorousHTML,Stem,
|
||||
StemLength);
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
StemRigorousHTML,StemLength,false);
|
||||
|
||||
/***** Write the stem *****/
|
||||
/***** DIV begin *****/
|
||||
HTM_DIV_Begin ("class=\"%s\"",ClassStem);
|
||||
HTM_Txt (StemRigorousHTML);
|
||||
HTM_DIV_End ();
|
||||
|
||||
/***** Free memory allocated for the stem *****/
|
||||
free (StemRigorousHTML);
|
||||
/***** Write stem *****/
|
||||
if (Visible)
|
||||
{
|
||||
/* Convert the stem, that is in HTML, to rigorous HTML */
|
||||
StemLength = strlen (Stem) * Str_MAX_BYTES_PER_CHAR;
|
||||
if ((StemRigorousHTML = (char *) malloc (StemLength + 1)) == NULL)
|
||||
Lay_NotEnoughMemoryExit ();
|
||||
Str_Copy (StemRigorousHTML,Stem,
|
||||
StemLength);
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
StemRigorousHTML,StemLength,false);
|
||||
|
||||
/* Write stem text */
|
||||
HTM_Txt (StemRigorousHTML);
|
||||
|
||||
/* Free memory allocated for the stem */
|
||||
free (StemRigorousHTML);
|
||||
}
|
||||
else
|
||||
HTM_Txt (Txt_Question_not_visible);
|
||||
|
||||
/***** DIV end *****/
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -2849,7 +2872,8 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
|
|||
|
||||
/* Write stem (row[4]) */
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (row[4],"TEST_EDI");
|
||||
Tst_WriteQstStem (row[4],"TEST_EDI",
|
||||
true); // Visible
|
||||
|
||||
/***** Get and show media (row[6]) *****/
|
||||
Gbl.Test.Media.MedCod = Str_ConvertStrCodToLongCod (row[6]);
|
||||
|
@ -3050,7 +3074,8 @@ static void Tst_ListOneOrMoreQuestionsForSelection (unsigned long NumRows,
|
|||
|
||||
/* Write stem (row[4]) */
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (row[4],"TEST_EDI");
|
||||
Tst_WriteQstStem (row[4],"TEST_EDI",
|
||||
true); // Visible
|
||||
|
||||
/***** Get and show media (row[6]) *****/
|
||||
Gbl.Test.Media.MedCod = Str_ConvertStrCodToLongCod (row[6]);
|
||||
|
|
|
@ -137,7 +137,7 @@ void Tst_WriteQstAndAnsTest (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestio
|
|||
struct UsrData *UsrDat,
|
||||
unsigned NumQst,long QstCod,MYSQL_ROW row,
|
||||
double *ScoreThisQst,bool *AnswerIsNotBlank);
|
||||
void Tst_WriteQstStem (const char *Stem,const char *ClassStem);
|
||||
void Tst_WriteQstStem (const char *Stem,const char *ClassStem,bool Visible);
|
||||
void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback);
|
||||
|
||||
void Tst_ShowFormAskEditTsts (void);
|
||||
|
|
|
@ -959,7 +959,8 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
|||
|
||||
/***** Write the stem and the answers *****/
|
||||
HTM_TD_Begin ("class=\"LT COLOR%u\"",Gbl.RowEvenOdd);
|
||||
Tst_WriteQstStem (Stem,ClassStem);
|
||||
Tst_WriteQstStem (Stem,ClassStem,
|
||||
true); // Visible
|
||||
Tst_WriteQstFeedback (Feedback,"TEST_EDI_LIGHT");
|
||||
switch (Gbl.Test.AnswerType)
|
||||
{
|
||||
|
|
25
swad_text.c
25
swad_text.c
|
@ -31717,6 +31717,27 @@ const char *Txt_Question_modified =
|
|||
"Questão modificada.";
|
||||
#endif
|
||||
|
||||
const char *Txt_Question_not_visible =
|
||||
#if L==1 // ca
|
||||
"Pregunta no visible";
|
||||
#elif L==2 // de
|
||||
"Frage nicht sichtbar";
|
||||
#elif L==3 // en
|
||||
"Question not visible";
|
||||
#elif L==4 // es
|
||||
"Pregunta no visible";
|
||||
#elif L==5 // fr
|
||||
"Question non visible";
|
||||
#elif L==6 // gn
|
||||
"Pregunta no visible"; // Okoteve traducción
|
||||
#elif L==7 // it
|
||||
"Domanda non visibile";
|
||||
#elif L==8 // pl
|
||||
"Pytanie niewidoczne";
|
||||
#elif L==9 // pt
|
||||
"Pergunta não visível";
|
||||
#endif
|
||||
|
||||
const char *Txt_Question_removed =
|
||||
#if L==1 // ca
|
||||
"Pregunta eliminada.";
|
||||
|
@ -43599,7 +43620,7 @@ const char *Txt_Test =
|
|||
|
||||
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
|
||||
"Test nº %u que realiza usted en esta asignatura"; // Necessita traduccio
|
||||
"Test nº %u que realitza vostè en aquesta assignatura";
|
||||
#elif L==2 // de
|
||||
"Der %u. Test, den Sie in dieser Kurs machen";
|
||||
#elif L==3 // en
|
||||
|
@ -43613,7 +43634,7 @@ const char *Txt_Test_No_X_that_you_make_in_this_course = // Warning: it is very
|
|||
#elif L==7 // it
|
||||
"Test n. %u che fai in questo corso";
|
||||
#elif L==8 // pl
|
||||
"Test No. %u that you make in this course"; // Potrzebujesz tlumaczenie
|
||||
"Test nr %u który przeprowadzasz na ten kurs";
|
||||
#elif L==9 // pt
|
||||
"Teste nº %u que você faz nesta disciplina";
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue