diff --git a/swad_changelog.h b/swad_changelog.h index 1f1a2528e..3e5fc6b1c 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -40,6 +40,7 @@ // 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 | tail -1 /* + Version 14.40.12 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173478 lines) Version 14.40.11 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173288 lines) Version 14.40.10 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (173201 lines) Version 14.40.9 :Dic 25, 2014 Changes in HTML and CSS to validate HTML5 in W3C validator. (172986 lines) diff --git a/swad_test.c b/swad_test.c index a0802c5bd..0e8ed219d 100644 --- a/swad_test.c +++ b/swad_test.c @@ -532,8 +532,9 @@ static void Tst_ShowTstTotalMark (double TotalScore) /***** Write total mark ****/ fprintf (Gbl.F.Out,"" - "%s: " - "%.2lf (%.2lf %s %u)" + "" + "%s: %.2lf (%.2lf %s %u)" "" "", Txt_Score, @@ -717,7 +718,8 @@ static void Tst_WriteTestHead (unsigned NumTst) /***** Header row *****/ fprintf (Gbl.F.Out,"" - "" + "" "%s", Gbl.CurrentAct == ActSeeTst ? Txt_Test : Txt_Test_result); @@ -885,9 +887,15 @@ static void Tst_ShowTstResultAfterAssess (long TstCod,unsigned *NumQstsNotBlank, else /***** Question does not exists *****/ fprintf (Gbl.F.Out,"" - "%u. " - "" - "%s" + "" + "%u. " + "" + "" + "" + "%s" + "" "", Gbl.ColorRows[Gbl.RowEvenOdd],NumQst + 1, Gbl.ColorRows[Gbl.RowEvenOdd], @@ -920,18 +928,25 @@ static void Tst_WriteQstAndAnsExam (unsigned NumQst,long QstCod,MYSQL_ROW row, /***** Write number of question *****/ fprintf (Gbl.F.Out,"" - "%u. ", + "" + "%u. " + "", Gbl.ColorRows[Gbl.RowEvenOdd], NumQst + 1); /***** Write answer type (row[2]) *****/ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); - fprintf (Gbl.F.Out,"%s ", + fprintf (Gbl.F.Out,"" + "%s " + "", Gbl.ColorRows[Gbl.RowEvenOdd], Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); /***** Write stem (row[4]), answers depending on shuffle (row[3]) and feedback (row[5]) *****/ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); Tst_WriteQstStem (row[4],"TEST_EXA"); if (Gbl.CurrentAct == ActSeeTst) @@ -1371,7 +1386,8 @@ static void Tst_ShowFormSelTags (unsigned long NumRows,MYSQL_RES *mysql_res,bool fprintf (Gbl.F.Out,""); if (!ShowOnlyEnabledTags) fprintf (Gbl.F.Out,""); - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "" + fprintf (Gbl.F.Out,"" "" ""); } - fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" "" - "%s" + "" + "%s" + "" "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Tags); @@ -1479,7 +1499,7 @@ static void Tst_ShowFormEditTags (void) Tst_PutIconDisable (TagCod,row[1]); /* Form to rename this tag */ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); Act_FormStart (ActRenTag); Par_PutHiddenParamString ("OldTagTxt",row[1]); fprintf (Gbl.F.Out,"" - "%s:" - "", + "" + "%s:" + "" + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Plugins); for (Pluggable = Tst_PLUGGABLE_NO; Pluggable <= Tst_PLUGGABLE_YES; @@ -1591,16 +1613,20 @@ static void Tst_ShowFormConfigTst (void) /***** Number of questions *****/ fprintf (Gbl.F.Out,"" - "%s:" - "" + "" + "%s:" + "" + "" "", The_ClassFormul[Gbl.Prefs.Theme], Txt_No_of_questions); /* Minimum number of questions in a test exam */ fprintf (Gbl.F.Out,"" - "" - "" + "" "", @@ -1608,8 +1634,10 @@ static void Tst_ShowFormConfigTst (void) /* Default number of questions in a test exam */ fprintf (Gbl.F.Out,"" - "" - "" + "" "", @@ -1617,8 +1645,10 @@ static void Tst_ShowFormConfigTst (void) /* Maximum number of questions in a test exam */ fprintf (Gbl.F.Out,"" - "" - "" + "" "" @@ -1629,8 +1659,10 @@ static void Tst_ShowFormConfigTst (void) /***** Minimum time between test exams per question *****/ fprintf (Gbl.F.Out,"" - "" - "" + "" "", @@ -1640,8 +1672,10 @@ static void Tst_ShowFormConfigTst (void) /***** Feedback to students *****/ fprintf (Gbl.F.Out,"" - "" - "" + "" - "", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd],NumRow + 1); /* Write question code */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd],QstCod); /* Write the date (row[1] has the date in format YYYYMMDDHHMMSS) */ - fprintf (Gbl.F.Out,""); /* Write the question tags */ - fprintf (Gbl.F.Out,""); /* Write the question type (row[2]) */ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd], Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); /* Write if shuffle is enabled (row[3]) */ - fprintf (Gbl.F.Out,""); /* Write the stem (row[4]), the feedback (row[5]) and the answers */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd],NumHitsThisQst); /* Write average score */ - fprintf (Gbl.F.Out,""); /* Write number of times this question has been answered (not blank) */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd], NumHitsNotBlankThisQst); /* Write average score (not blank) */ - fprintf (Gbl.F.Out,""); /* Write the number of option */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 'a' + (char) NumOpt); /* Write the text of the answer */ - fprintf (Gbl.F.Out,"" - ""); /***** Write the correct answer *****/ - fprintf (Gbl.F.Out,"" - "",NumQst,Index); - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 'a' + (char) NumOpt); /***** Write the option text *****/ - fprintf (Gbl.F.Out,"
%s" + "" + "%s" + "" "" "
%s" + "" + "%s" + "" "" "
%s" + "" + "%s" + "" "" "
%s:" + "" + "%s:" + "" "" "
%s:", + "" + "%s:" + "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Feedback_to_students); for (FeedbTyp = (Tst_Feedback_t) 0; FeedbTyp < Tst_NUM_TYPES_FEEDBACK; @@ -1964,7 +1998,8 @@ static void Tst_ShowFormAnswerTypes (void) /***** Select all types of answers *****/ fprintf (Gbl.F.Out,"
" + "" "" - "" + "" "%lu " + "%lu " + "%ld " + "%ld " + "", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); Dat_WriteDate (row[1]); fprintf (Gbl.F.Out,"
"); @@ -2478,19 +2521,24 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m fprintf (Gbl.F.Out,"
", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); Tst_GetAndWriteTagsQst (QstCod); fprintf (Gbl.F.Out,"%s " + "%s " + "", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); if (Gbl.Test.AnswerType == Tst_ANS_UNIQUE_CHOICE || Gbl.Test.AnswerType == Tst_ANS_MULTIPLE_CHOICE) @@ -2513,7 +2561,8 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); Tst_WriteQstStem (row[4],"TEST_EDI"); Tst_WriteQstFeedback (row[5],"TEST_EDI_LIGHT"); @@ -2535,11 +2584,15 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m setlocale (LC_NUMERIC,"es_ES.utf8"); // Return to spanish system (TODO: this should be internationalized!!!!!!!) /* Write number of times this question has been answered */ - fprintf (Gbl.F.Out,"%lu" + "%lu" + "", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); if (NumHitsThisQst) fprintf (Gbl.F.Out,"%.2f",TotalScoreThisQst / @@ -2549,12 +2602,16 @@ static void Tst_ListOneOrMoreQuestionsToEdit (unsigned long NumRows,MYSQL_RES *m fprintf (Gbl.F.Out,"%lu" + "%lu" + "", + fprintf (Gbl.F.Out,"", Gbl.ColorRows[Gbl.RowEvenOdd]); if (NumHitsNotBlankThisQst) fprintf (Gbl.F.Out,"%.2f",TotalScoreThisQst / @@ -2704,11 +2761,16 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod) fprintf (Gbl.F.Out,"%c) " + "%c) " + "" + fprintf (Gbl.F.Out,"" "

" "%s" "

" @@ -2716,7 +2778,9 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod) Answer); /* Write the text of the feedback */ - fprintf (Gbl.F.Out,"
"); + fprintf (Gbl.F.Out,""); if (LengthFeedback) fprintf (Gbl.F.Out,"

" "%s" @@ -2893,7 +2957,7 @@ static void Tst_WriteTFAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, /***** Write the user answer *****/ fprintf (Gbl.F.Out,"

", + "", (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) ? (AnsTF == row[1][0] ? "ANS_OK" : @@ -2903,7 +2967,7 @@ static void Tst_WriteTFAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) Tst_WriteAnsTF (row[1][0]); @@ -2979,7 +3043,7 @@ static void Tst_WriteChoiceAnsSeeExam (unsigned NumQst,long QstCod,bool Shuffle) /***** Write selectors and letter of this option *****/ fprintf (Gbl.F.Out,"
"); + ""); sprintf (ParamName,"Ind%06u",NumQst); Par_PutHiddenParamUnsigned (ParamName,Index); fprintf (Gbl.F.Out," %c) " + "%c) " + "" + fprintf (Gbl.F.Out,"" "

" "%s" "

" @@ -3107,8 +3175,8 @@ static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, fprintf (Gbl.F.Out,"" ""); Tst_WriteHeadUserCorrect (); - fprintf (Gbl.F.Out,"" - "" + fprintf (Gbl.F.Out,"" + "" ""); /***** Write answers (one row per answer) *****/ @@ -3118,7 +3186,8 @@ static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, { /* Draw icon depending on user's answer */ fprintf (Gbl.F.Out,"" - ""); /* Draw icon that indicates whether the answer is correct */ - fprintf (Gbl.F.Out,""); /* Answer letter (a, b, c,...) */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 'a' + (char) NumOpt); /* Answer text and feedback */ - fprintf (Gbl.F.Out,"" - ""); /***** Write the correct answers *****/ if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) { - fprintf (Gbl.F.Out,"" ""); @@ -3444,11 +3527,12 @@ static void Tst_WriteIntAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, /***** Write the user answer *****/ fprintf (Gbl.F.Out,"" - ""); /***** Write the correct answer *****/ - fprintf (Gbl.F.Out,"" - "" - "", + fprintf (Gbl.F.Out,"" + "", Txt_User,Txt_TST_Correct_ANSWER); } @@ -3648,7 +3737,8 @@ static void Tst_WriteScoreStart (unsigned ColSpan) extern const char *Txt_Score; fprintf (Gbl.F.Out,"" - "" - "" + "" + "" "", row[0]); } @@ -4104,8 +4200,11 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) /***** Write the tags *****/ fprintf (Gbl.F.Out,"" - "" - "" + "
"); + ""); if (AnswersUsr[Indexes[NumOpt]] == true) // This answer has been selected by the user fprintf (Gbl.F.Out,"\"%s\"", @@ -3132,7 +3201,8 @@ static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) { @@ -3147,11 +3217,14 @@ static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, fprintf (Gbl.F.Out,"%c) " + "%c) " + "" + fprintf (Gbl.F.Out,"" "

" "%s" "

", @@ -3301,8 +3374,8 @@ static void Tst_WriteTextAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, /***** Write the user answer *****/ fprintf (Gbl.F.Out,"
 %s ", + fprintf (Gbl.F.Out," class=\"%s\">" + " %s ", (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) ? (Correct ? "ANS_OK" : @@ -3332,27 +3406,34 @@ static void Tst_WriteTextAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, "ANS", Gbl.Test.StrAnswersOneQst[NumQst]); } - else // If user has omitted the answer - fprintf (Gbl.F.Out," class=\"ANS\"> "); + else // If user has omitted the answer + fprintf (Gbl.F.Out," class=\"ANS\">" + " "); fprintf (Gbl.F.Out,"" + fprintf (Gbl.F.Out,"" ""); for (NumOpt = 0; NumOpt < Gbl.Test.Answer.NumOptions; NumOpt++) { /* Answer letter (a, b, c,...) */ - fprintf (Gbl.F.Out,"", + fprintf (Gbl.F.Out,"", 'a' + (char) NumOpt); /* Answer text and feedback */ - fprintf (Gbl.F.Out,"
%c) " + "%c) " + "" - "

%s

", + fprintf (Gbl.F.Out,"
" + "

" + "%s" + "

", Gbl.Test.Answer.Options[NumOpt].Text); if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) if (Gbl.Test.Answer.Options[NumOpt].Feedback) @@ -3367,7 +3448,9 @@ static void Tst_WriteTextAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, fprintf (Gbl.F.Out,"
"); } else - fprintf (Gbl.F.Out,"
?"); + fprintf (Gbl.F.Out,"" + "?"); fprintf (Gbl.F.Out,"
 %ld ", + fprintf (Gbl.F.Out," class=\"%s\">" + " %ld ", (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) ? (IntAnswerUsr == IntAnswerCorr ? "ANS_OK" : @@ -3458,7 +3542,8 @@ static void Tst_WriteIntAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, else { Gbl.Test.StrAnswersOneQst[NumQst][0] = '\0'; - fprintf (Gbl.F.Out," class=\"ANS\">?"); + fprintf (Gbl.F.Out," class=\"ANS\">" + "?"); } } else // If user has omitted the answer @@ -3466,7 +3551,7 @@ static void Tst_WriteIntAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) fprintf (Gbl.F.Out," %ld ",IntAnswerCorr); @@ -3559,7 +3644,7 @@ static void Tst_WriteFloatAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, /***** Write the user answer *****/ fprintf (Gbl.F.Out,"
"); /***** Write the correct answer *****/ - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); if (Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_EACH_GOOD_BAD || Gbl.Test.Config.FeedbackType == Tst_FEEDBACK_FULL_FEEDBACK) fprintf (Gbl.F.Out," [%lg; %lg] ",FloatAnsCorr[0],FloatAnsCorr[1]); @@ -3634,8 +3719,12 @@ static void Tst_WriteHeadUserCorrect (void) extern const char *Txt_User; extern const char *Txt_TST_Correct_ANSWER; - fprintf (Gbl.F.Out," %s  %s " + " %s " + "" + " %s " + "
" + "" "%s: " - " • %s" + " • " + "" + "%s" + "
%s:" + "" + "%s:" + "" "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Tags); for (NumTag = 0; @@ -4115,7 +4214,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) fprintf (Gbl.F.Out,""); /***** Write the tags already existing in a selector *****/ - fprintf (Gbl.F.Out,"", NumTag,NumTag,Tst_MAX_TAG_LENGTH,Gbl.Test.TagText[NumTag],NumTag); @@ -4162,8 +4262,11 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) /***** Stem *****/ fprintf (Gbl.F.Out,"" - "" - "" + "" - "" - "" + "" - "" - "" + "" - "" - "" + "" - "" + "" - "" + "
" + fprintf (Gbl.F.Out,"" "" - "" + fprintf (Gbl.F.Out,"" + "" "
%s:" + "" + "%s:" + "" "" @@ -4175,8 +4278,11 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) /***** Feedback *****/ fprintf (Gbl.F.Out,"
%s:" + "" + "%s:" + "" "" @@ -4194,8 +4300,12 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) /***** Type of answer *****/ fprintf (Gbl.F.Out,"
%s:", + "" + "%s:" + "", The_ClassFormul[Gbl.Prefs.Theme], Txt_Type, The_ClassFormul[Gbl.Prefs.Theme]); @@ -4216,8 +4326,13 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) /***** Answers *****/ /* Integer answer */ fprintf (Gbl.F.Out,"
%s:%s: " + "" + "%s:" + "" + "%s: " "" - "%s " + "" + "%s " "" - "" + "" "" "" - "" - "" + "" - "" + "
" + "" "" - "" + "" "" - "" + "" "" "" "" - "" - "" + "" + "" "", The_ClassFormul[Gbl.Prefs.Theme],Txt_Answer, The_ClassFormul[Gbl.Prefs.Theme],Txt_Feedback); @@ -4306,7 +4429,8 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) { /* Selectors and label with the letter of the answer */ fprintf (Gbl.F.Out,"" - "
%s%s" + "%s" + "" + "%s" + "
" + "" "" + fprintf (Gbl.F.Out,"" "