Version 14.127.1

This commit is contained in:
Antonio Cañas Vargas 2015-09-06 11:36:34 +02:00
parent c0bc40c61a
commit 5843c57acf
6 changed files with 30 additions and 45 deletions

View File

@ -334,8 +334,9 @@ static void Asg_ShowOneAssignment (long AsgCod)
if (Gbl.CurrentCrs.Grps.NumGrps)
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Asg);
fprintf (Gbl.F.Out,"<p class=\"%s\" style=\"text-align:justify;\">"
"%s</p>"
fprintf (Gbl.F.Out,"<p class=\"%s\">"
"%s"
"</p>"
"</td>"
"</tr>",
Asg.Hidden ? "DAT_LIGHT" :

View File

@ -358,7 +358,7 @@ static void Att_ShowOneAttEvent (struct AttendanceEvent *Att,bool ShowOnlyThisAt
if (Gbl.CurrentCrs.Grps.NumGrps)
Att_GetAndWriteNamesOfGrpsAssociatedToAttEvent (Att);
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:justify;\">%s</div>",
fprintf (Gbl.F.Out,"<div class=\"%s\">%s</div>",
Att->Hidden ? "DAT_LIGHT" :
"DAT",
Txt);

View File

@ -103,11 +103,12 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 14.127 (2015/09/05)"
#define Log_PLATFORM_VERSION "SWAD 14.127.1 (2015/09/06)"
// 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 14.127.1: Sep 06, 2015 Justify alignment is no longer used. (184259 lines)
Version 14.127: Sep 05, 2015 Changes in styles. (184273 lines)
Version 14.126.2: Sep 05, 2015 Changes in styles. (184250 lines)
Version 14.126.1: Sep 05, 2015 Changes in styles. (184213 lines)

View File

@ -1577,8 +1577,7 @@ static void Inf_ShowPlainTxtInfo (Inf_InfoType_t InfoType)
Lay_WriteHeaderClassPhoto (3,false,false,Gbl.CurrentIns.Ins.InsCod,Gbl.CurrentDeg.Deg.DegCod,Gbl.CurrentCrs.Crs.CrsCod);
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"LEFT_MIDDLE\">"
"<p class=\"DAT\" style=\"text-align:justify;\">");
"<td class=\"DAT LEFT_MIDDLE\">");
/***** Convert to respectful HTML and insert links *****/
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
@ -1589,8 +1588,7 @@ static void Inf_ShowPlainTxtInfo (Inf_InfoType_t InfoType)
fprintf (Gbl.F.Out,"%s",TxtHTML);
/***** Finish table *****/
fprintf (Gbl.F.Out,"</p>"
"</td>"
fprintf (Gbl.F.Out,"</td>"
"</tr>");
Lay_EndRoundFrameTable ();
}
@ -1746,22 +1744,20 @@ int Inf_WritePlainTextIntoHTMLBuffer (Inf_InfoType_t InfoType,char **HTMLBuffer)
Txt_INFO_TITLE[InfoType]); // Page title
/***** Write plain text into text buffer *****/
fprintf (FileHTMLTmp,"<tr>"
"<td class=\"LEFT_MIDDLE\">"
"<p class=\"DAT\" style=\"text-align:justify;\">");
fprintf (FileHTMLTmp,"<div class=\"DAT LEFT_MIDDLE\">\n");
/* Convert to respectful HTML and insert links */
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
TxtHTML,Cns_MAX_BYTES_LONG_TEXT,false); // Convert from HTML to recpectful HTML
TxtHTML,Cns_MAX_BYTES_LONG_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinkInURLs (TxtHTML,Cns_MAX_BYTES_LONG_TEXT,60); // Insert links
/* Write text */
fprintf (FileHTMLTmp,"%s",TxtHTML);
/***** Write end of page into file *****/
fprintf (FileHTMLTmp,"</p>\n"
"</html>\n"
"</body>\n");
fprintf (FileHTMLTmp,"</div>\n"
"</html>\n"
"</body>\n");
/***** Compute length of file *****/
Length = (size_t) ftell (FileHTMLTmp);

View File

@ -135,7 +135,7 @@ static unsigned Svy_GetQstIndFromQstCod (long QstCod);
static unsigned Svy_GetNextQuestionIndexInSvy (long SvyCod);
static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQst);
static void Svy_WriteParamEditQst (struct SurveyQuestion *SvyQst);
static void Svy_WriteQstStem (const char *Stem,const char *TextStyle);
static void Svy_WriteQstStem (const char *Stem);
static void Svy_WriteAnswersOfAQst (struct Survey *Svy,struct SurveyQuestion *SvyQst);
static void Svy_DrawBarNumUsrs (unsigned NumUsrs,unsigned MaxUsrs);
static void Svy_ReceiveAndStoreUserAnswersToASurvey (long SvyCod);
@ -484,7 +484,7 @@ static void Svy_ShowOneSurvey (long SvyCod,struct SurveyQuestion *SvyQst,bool Sh
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to recpectful HTML
Str_InsertLinkInURLs (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
fprintf (Gbl.F.Out,"<p class=\"%s\" style=\"text-align:justify;\">"
fprintf (Gbl.F.Out,"<p class=\"%s\">"
"%s"
"</p>"
"</td>"
@ -3016,14 +3016,15 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
/* Write the question type (row[2]) */
SvyQst->AnswerType = Svy_ConvertFromStrAnsTypDBToAnsTyp (row[2]);
fprintf (Gbl.F.Out,"<td class=\"DAT_SMALL CENTER_TOP COLOR%u\">"
"%s",
"%s"
"</td>",
Gbl.RowEvenOdd,
Txt_SURVEY_STR_ANSWER_TYPES[SvyQst->AnswerType]);
/* Write the stem (row[3]) */
Svy_WriteQstStem (row[3],"TEST_EDI");
/* Write the answers of this question */
/* Write the stem (row[3]) and the answers of this question */
fprintf (Gbl.F.Out,"<td class=\"TEST_EDI LEFT_TOP COLOR%u\">",
Gbl.RowEvenOdd);
Svy_WriteQstStem (row[3]);
Svy_WriteAnswersOfAQst (Svy,SvyQst);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
@ -3090,7 +3091,7 @@ static void Svy_WriteParamEditQst (struct SurveyQuestion *SvyQst)
/****************** Write the heading of a survey question *******************/
/*****************************************************************************/
static void Svy_WriteQstStem (const char *Stem,const char *TextStyle)
static void Svy_WriteQstStem (const char *Stem)
{
unsigned long LengthHeading;
char *HeadingRigorousHTML;
@ -3104,11 +3105,7 @@ static void Svy_WriteQstStem (const char *Stem,const char *TextStyle)
HeadingRigorousHTML,LengthHeading,false);
/* Write the stem */
fprintf (Gbl.F.Out,"<td class=\"%s LEFT_TOP COLOR%u\">"
"<div style=\"text-align:justify;\">"
"<tt>%s</tt>"
"</div>",
TextStyle,Gbl.RowEvenOdd,HeadingRigorousHTML);
fprintf (Gbl.F.Out,"<tt>%s</tt>",HeadingRigorousHTML);
/* Free memory allocated for the stem */
free ((void *) HeadingRigorousHTML);

View File

@ -983,7 +983,7 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem)
StemRigorousHTML,StemLength,false);
/***** Write the stem *****/
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:justify;\">"
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s"
"</div>",
ClassStem,StemRigorousHTML);
@ -1014,7 +1014,7 @@ void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback)
FeedbackRigorousHTML,FeedbackLength,false);
/***** Write the feedback *****/
fprintf (Gbl.F.Out,"<div class=\"%s\" style=\"text-align:justify;\">"
fprintf (Gbl.F.Out,"<div class=\"%s\">"
"%s"
"</div>",
ClassFeedback,FeedbackRigorousHTML);
@ -2768,19 +2768,14 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod)
/* Write the text of the answer */
fprintf (Gbl.F.Out,"<td class=\"TEST_EDI LEFT_TOP\">"
"<div style=\"text-align:justify;\">"
"%s"
"</div>"
"</td>",
Answer);
/* Write the text of the feedback */
fprintf (Gbl.F.Out,"<td class=\"TEST_EDI_LIGHT LEFT_TOP\">");
if (LengthFeedback)
fprintf (Gbl.F.Out,"<div style=\"text-align:justify;\">"
"%s"
"</div>",
Feedback);
fprintf (Gbl.F.Out,"%s",Feedback);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
@ -3055,9 +3050,7 @@ static void Tst_WriteChoiceAnsSeeExam (unsigned NumQst,long QstCod,bool Shuffle)
/***** Write the option text *****/
fprintf (Gbl.F.Out,"<td class=\"TEST_EXA LEFT_TOP\">"
"<div style=\"text-align:justify;\">"
"%s"
"</div>"
"</td>"
"</tr>",
Gbl.Test.Answer.Options[NumOpt].Text);
@ -3219,16 +3212,14 @@ static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res,
/* Answer text and feedback */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
"<div class=\"TEST_EXA\""
" style=\"text-align:justify;\">"
"<div class=\"TEST_EXA\">"
"%s"
"</div>",
Gbl.Test.Answer.Options[Indexes[NumOpt]].Text);
if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK)
if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback)
if (Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback[0])
fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\""
" style=\"text-align:justify;\">"
fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\">"
"%s"
"</div>",
Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback);
@ -3425,15 +3416,14 @@ static void Tst_WriteTextAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res,
/* Answer text and feedback */
fprintf (Gbl.F.Out,"<td class=\"LEFT_TOP\">"
"<div class=\"ANS\" style=\"text-align:justify;\">"
"<div class=\"ANS\">"
"%s"
"</div>",
Gbl.Test.Answer.Options[NumOpt].Text);
if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK)
if (Gbl.Test.Answer.Options[NumOpt].Feedback)
if (Gbl.Test.Answer.Options[NumOpt].Feedback[0])
fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\""
" style=\"text-align:justify;\">"
fprintf (Gbl.F.Out,"<div class=\"TEST_EXA_LIGHT\">"
"%s"
"</div>",
Gbl.Test.Answer.Options[NumOpt].Feedback);