From 7ef89c02e82a39c7a2a21647867c6f0cfc572dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Sat, 11 Apr 2015 13:05:44 +0200 Subject: [PATCH] Version 14.110.6 --- css/swad_desktop.css | 9 ++-- css/swad_mobile.css | 1 + swad_changelog.h | 4 +- swad_test.c | 98 +++++++++++++++++++++++++------------------- 4 files changed, 65 insertions(+), 47 deletions(-) diff --git a/css/swad_desktop.css b/css/swad_desktop.css index a3adb1e8d..d2ef44161 100644 --- a/css/swad_desktop.css +++ b/css/swad_desktop.css @@ -851,15 +851,16 @@ a:hover img.CENTRE_PHOTO_SHOW .STATUS_RED {color:#FF0000; font-size:10pt;} .STATUS_RED_LIGHT {color:#F98A8A; font-size:10pt;} +/********************************** Tests ************************************/ .ANS {color:#404040; font-size:12pt; font-weight:bold;} .ANS_OK {color:#008000; font-size:12pt; font-weight:bold;} .ANS_BAD {color:#FF0000; font-size:12pt; font-weight:bold;} .TST_TIT {color:#404040; font-size:14pt;} .TEST {color:#404040; font-size:10pt;} -.TEST_EXA {font-family:"Courier New", "DejaVu LGC Sans Mono", "Bitstream Vera Sans Mono", monospace; color:#404040; font-size:10pt;} -.TEST_EXA_LIGHT {font-family:"Courier New", "DejaVu LGC Sans Mono", "Bitstream Vera Sans Mono", monospace; color:#A0A0A0; font-size:10pt;} -.TEST_EDI {font-family:"Courier New", "DejaVu LGC Sans Mono", "Bitstream Vera Sans Mono", monospace; color:#404040; font-size:10pt;} -.TEST_EDI_LIGHT {font-family:"Courier New", "DejaVu LGC Sans Mono", "Bitstream Vera Sans Mono", monospace; color:#A0A0A0; font-size:10pt;} +.TEST_EXA {color:#404040; font-size:10pt;} +.TEST_EXA_LIGHT {color:#A0A0A0; font-size:10pt;} +.TEST_EDI {color:#404040; font-size:10pt;} +.TEST_EDI_LIGHT {color:#A0A0A0; font-size:10pt;} .HOR {font-family:"Arial Narrow", "Nimbus Sans L", "DejaVu LGC Sans Condensed", sans-serif; color:#345C6C; font-size:8pt; line-height:110%; letter-spacing:0;} .FREE0 {background-color:#F4F2EA; border:solid 1px; border-color:#F4F2EA #E0D9C2 #EEEADC #F4F2EA;} diff --git a/css/swad_mobile.css b/css/swad_mobile.css index b93535e94..9185b8f1d 100644 --- a/css/swad_mobile.css +++ b/css/swad_mobile.css @@ -662,6 +662,7 @@ a:hover img.CENTRE_PHOTO_SHOW .STATUS_RED {color:#FF0000; font-size:14pt;} .STATUS_RED_LIGHT {color:#F98A8A; font-size:14pt;} +/********************************** Tests ************************************/ .ANS {color:#404040; font-size:16pt; font-weight:bold;} .ANS_OK {color:#008000; font-size:16pt; font-weight:bold;} .ANS_BAD {color:#FF0000; font-size:16pt; font-weight:bold;} diff --git a/swad_changelog.h b/swad_changelog.h index befd4a4f7..5f0118971 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -103,11 +103,13 @@ /****************************** Public constants *****************************/ /*****************************************************************************/ -#define Log_PLATFORM_VERSION "SWAD 14.110.5 (2015/04/11)" +#define Log_PLATFORM_VERSION "SWAD 14.110.6 (2015/04/11)" // 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.110.6: Apr 11, 2015 Help on edition of test questions. + Changes in layout of edition of test questions. (184702 lines) Version 14.110.5: Apr 11, 2015 Fixed bug in tests. (184685 lines) Version 14.110.4: Apr 11, 2015 Changes in MathJax configuration. (184685 lines) Version 14.110.3: Apr 09, 2015 Changes in conversion from Markdown to HTML5 using pandoc. (184599 lines) diff --git a/swad_test.c b/swad_test.c index 0bac4190b..af734b829 100644 --- a/swad_test.c +++ b/swad_test.c @@ -988,9 +988,9 @@ void Tst_WriteQstStem (const char *Stem,const char *ClassStem) StemRigorousHTML,StemLength,false); /***** Write the stem *****/ - fprintf (Gbl.F.Out,"

" - "%s" - "

", + fprintf (Gbl.F.Out,"
" + "%s" + "
", ClassStem,StemRigorousHTML); /***** Free memory allocated for the stem *****/ @@ -1019,9 +1019,9 @@ void Tst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback) FeedbackRigorousHTML,FeedbackLength,false); /***** Write the feedback *****/ - fprintf (Gbl.F.Out,"

" - "%s" - "

", + fprintf (Gbl.F.Out,"
" + "%s" + "
", ClassFeedback,FeedbackRigorousHTML); /***** Free memory allocated for the feedback *****/ @@ -2800,9 +2800,9 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod) /* Write the text of the answer */ fprintf (Gbl.F.Out,"" - "

" - "%s" - "

" + "
" + "%s" + "
" "", Answer); @@ -2811,9 +2811,9 @@ static void Tst_WriteAnswersOfAQstEdit (long QstCod) " style=\"text-align:left;" " vertical-align:top;\">"); if (LengthFeedback) - fprintf (Gbl.F.Out,"

" - "%s" - "

", + fprintf (Gbl.F.Out,"
" + "%s" + "
", Feedback); fprintf (Gbl.F.Out,"" ""); @@ -3091,9 +3091,9 @@ static void Tst_WriteChoiceAnsSeeExam (unsigned NumQst,long QstCod,bool Shuffle) /***** Write the option text *****/ fprintf (Gbl.F.Out,"" - "

" - "%s" - "

" + "
" + "%s" + "
" "" "", Gbl.Test.Answer.Options[NumOpt].Text); @@ -3254,16 +3254,16 @@ static void Tst_WriteChoiceAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, /* Answer text and feedback */ fprintf (Gbl.F.Out,"" - "

" - "%s" - "

", + "
" + "%s" + "
", 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,"

" - "%s" - "

", + fprintf (Gbl.F.Out,"
" + "%s" + "
", Gbl.Test.Answer.Options[Indexes[NumOpt]].Feedback); fprintf (Gbl.F.Out,"" ""); @@ -3460,17 +3460,17 @@ static void Tst_WriteTextAnsAssessExam (unsigned NumQst,MYSQL_RES *mysql_res, /* Answer text and feedback */ 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) if (Gbl.Test.Answer.Options[NumOpt].Feedback[0]) - fprintf (Gbl.F.Out,"

" - "%s" - "

", + "%s" + "", Gbl.Test.Answer.Options[NumOpt].Feedback); fprintf (Gbl.F.Out,"" ""); @@ -4095,7 +4095,7 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) extern const char *Txt_Answer; extern const char *Txt_Shuffle; extern const char *Txt_Save; - char Title[256]; + char Title[512]; char Query[512]; MYSQL_RES *mysql_res; MYSQL_ROW row; @@ -4112,9 +4112,6 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) Tst_InitQst (); if (Tst_GetQstCod ()) // If parameter QstCod received ==> question already exists in the database { - sprintf (Title,Txt_Question_code_X,Gbl.Test.QstCod); - Lay_WriteTitle (Title); - /***** Get the type of answer and the stem from the database *****/ /* Get the question from database */ sprintf (Query,"SELECT AnsType,Shuffle,Stem,Feedback" @@ -4214,19 +4211,26 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) /* Free structure that stores the query result */ DB_FreeMySQLResult (&mysql_res); } - else - Lay_WriteTitle (Txt_New_question); } - /***** Help for text editor *****/ - Lay_HelpPlainEditor (); - - /***** Start form *****/ + /***** Start form and table *****/ Act_FormStart (ActRcvTstQst); - if (Gbl.Test.QstCod != -1) // If the question already has assigned a code + if (Gbl.Test.QstCod > 0) // The question already has assigned a code + { Par_PutHiddenParamLong ("QstCod",Gbl.Test.QstCod); - fprintf (Gbl.F.Out,""); + sprintf (Title,Txt_Question_code_X,Gbl.Test.QstCod); + Lay_StartRoundFrameTable10 (NULL,2,Title); + } + else + Lay_StartRoundFrameTable10 (NULL,2,Txt_New_question); + + /***** Help for text editor *****/ + fprintf (Gbl.F.Out,"" + "" + ""); /***** Get tags already existing for questions in current course *****/ NumRows = Tst_GetAllTagsFromCurrentCrs (&mysql_res); @@ -4502,14 +4506,24 @@ static void Tst_PutFormEditOneQst (char *Stem,char *Feedback) "" ""); } - - /***** Send and undo buttons *****/ fprintf (Gbl.F.Out,"
"); + Lay_HelpPlainEditor (); + fprintf (Gbl.F.Out,"
" - "" - ""); + "" + ""); + + /***** Send button *****/ + fprintf (Gbl.F.Out,"" + ""); Lay_PutConfirmButton (Txt_Save); + fprintf (Gbl.F.Out,"" + ""); + + /***** End table *****/ + Lay_EndRoundFrameTable10 (); + + /***** End form *****/ Act_FormEnd (); + /***** Free memory for answers *****/ Tst_FreeTextChoiceAnswers (); }