Version 16.251.8

This commit is contained in:
Antonio Cañas Vargas 2017-09-06 13:18:35 +02:00
parent 06aab12fd6
commit bfa85c9f50
4 changed files with 30 additions and 40 deletions

View File

@ -2283,6 +2283,12 @@ a:hover img.CENTRE_PHOTO_SHOW
.TEST_EDI {color:#404040; font-size:12pt;}
.TEST_EDI_LIGHT {color:#A0A0A0; font-size:12pt;}
.TEST_TAG_LIST
{
padding:0;
margin:0 0 0 1em;
}
.TEST_IMG_SHOW_STEM_CONTAINER
{
box-sizing:border-box;

View File

@ -238,13 +238,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.251.7 (2017-09-04)"
#define CSS_FILE "swad16.235.1.css"
#define Log_PLATFORM_VERSION "SWAD 16.251.8 (2017-09-06)"
#define CSS_FILE "swad16.251.8.css"
#define JS_FILE "swad16.206.3.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.251.8: Sep 06, 2017 Listing games for remote control. Not finished. (227211 lines)
Version 16.251.7: Sep 04, 2017 Listing games for remote control. Not finished. (227218 lines)
Version 16.251.6: Sep 01, 2017 Listing games for remote control. Not finished. (227111 lines)
Version 16.251.5: Sep 01, 2017 Listing games for remote control. Not finished. (227045 lines)

View File

@ -152,7 +152,7 @@ static void Rmt_AllocateListSelectedQuestions (void);
static void Rmt_FreeListsSelectedQuestions (void);
static unsigned Rmt_CountNumQuestionsInList (void);
static void Rmt_WriteQstStem (const char *Stem);
// static void Rmt_WriteQstStem (const char *Stem);
static void Rmt_WriteAnswersOfAQst (Tst_ActionToDoWithQuestions_t ActionToDoWithQuestions,
struct Game *Game,struct GameQuestion *GameQst);
static void Rmt_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs);
@ -3088,7 +3088,7 @@ static void Rmt_ListGameQuestions (struct Game *Game,struct GameQuestion *GameQs
/* Write the stem (row[3]) and the answers of this question */
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
Rmt_WriteQstStem (row[3]);
// Rmt_WriteQstStem (row[3]);
Rmt_WriteAnswersOfAQst (ActionToDoWithQuestions,Game,GameQst);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
@ -3261,13 +3261,13 @@ static unsigned Rmt_CountNumQuestionsInList (void)
/*****************************************************************************/
/****************** Write the heading of a game question *******************/
/*****************************************************************************/
/*
static void Rmt_WriteQstStem (const char *Stem)
{
char *HeadingRigorousHTML;
size_t Length;
/* Convert the stem, that is in HTML, to rigorous HTML */
* Convert the stem, that is in HTML, to rigorous HTML *
Length = strlen (Stem) * Str_MAX_BYTES_PER_CHAR;
if ((HeadingRigorousHTML = malloc (Length + 1)) == NULL)
Lay_ShowErrorAndExit ("Not enough memory to store stem of question.");
@ -3276,13 +3276,13 @@ static void Rmt_WriteQstStem (const char *Stem)
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
HeadingRigorousHTML,Length,false);
/* Write the stem */
* Write the stem *
fprintf (Gbl.F.Out,"%s",HeadingRigorousHTML);
/* Free memory allocated for the stem */
* Free memory allocated for the stem *
free ((void *) HeadingRigorousHTML);
}
*/
/*****************************************************************************/
/************** Get and write the answers of a game question ***************/
/*****************************************************************************/

View File

@ -2821,7 +2821,6 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
extern const char *Txt_Code;
extern const char *Txt_Date;
extern const char *Txt_Tags;
extern const char *Txt_Type;
extern const char *Txt_TST_STR_ORDER_FULL[Tst_NUM_TYPES_ORDER_QST];
extern const char *Txt_TST_STR_ORDER_SHORT[Tst_NUM_TYPES_ORDER_QST];
extern const char *Txt_TST_STR_ANSWER_TYPES[Tst_NUM_ANS_TYPES];
@ -2859,15 +2858,11 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
"</th>"
"<th class=\"CENTER_TOP\">"
"%s"
"</th>"
"<th class=\"CENTER_TOP\">"
"%s"
"</th>",
Txt_No_INDEX,
Txt_Code,
Txt_Date,
Txt_Tags,
Txt_Type,
Txt_Shuffle);
/* Stem and answers of question */
@ -2958,10 +2953,16 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
fprintf (Gbl.F.Out,"</td>");
/* Write number of question */
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
"%lu&nbsp;"
"</td>",
Gbl.RowEvenOdd,NumRow + 1);
fprintf (Gbl.F.Out,"<td class=\"RIGHT_TOP COLOR%u\">"
"<div class=\"TEST_NUM_QST\">%lu</div>",
Gbl.RowEvenOdd,
NumRow + 1);
/* Write answer type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<div class=\"DAT_SMALL\">%s</div>"
"</td>",
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
/* Write question code */
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
@ -2988,14 +2989,6 @@ static void Tst_ListOneOrMoreQuestionsForEdition (unsigned long NumRows,
Tst_GetAndWriteTagsQst (Gbl.Test.QstCod);
fprintf (Gbl.F.Out,"</td>");
/* Write the question type (row[2]) */
Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
"%s&nbsp;"
"</td>",
Gbl.RowEvenOdd,
Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]);
/* Write if shuffle is enabled (row[3]) */
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">",
Gbl.RowEvenOdd);
@ -4667,28 +4660,18 @@ static void Tst_GetAndWriteTagsQst (long QstCod)
if ((NumRows = Tst_GetTagsQst (QstCod,&mysql_res))) // Result: TagTxt
{
/***** Write the tags *****/
Tbl_StartTable (2);
fprintf (Gbl.F.Out,"<ul class=\"TEST_TAG_LIST DAT_SMALL\">");
for (NumRow = 0;
NumRow < NumRows;
NumRow++)
{
row = mysql_fetch_row (mysql_res);
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"DAT_SMALL LEFT_TOP\">"
"&nbsp;&#8226;&nbsp;"
"</td>"
"<td class=\"DAT_SMALL LEFT_TOP\">"
"%s"
"</td>"
"</tr>",
row[0]);
fprintf (Gbl.F.Out,"<li>%s</li>",row[0]);
}
Tbl_EndTable ();
fprintf (Gbl.F.Out,"</ul>");
}
else
fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\">&nbsp;(%s)&nbsp;</span>",
fprintf (Gbl.F.Out,"<span class=\"DAT_SMALL\">(%s)</span>",
Txt_no_tags);
/***** Free structure that stores the query result *****/