Version 15.64.17

This commit is contained in:
Antonio Cañas Vargas 2015-12-13 21:30:28 +01:00
parent 6133698d19
commit a27a6b9e07
3 changed files with 22 additions and 25 deletions

View File

@ -117,12 +117,14 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 15.64.16 (2015/12/13)"
#define Log_PLATFORM_VERSION "SWAD 15.64.17 (2015/12/13)"
#define CSS_FILE "swad15.64.5.css"
// 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 15.64.17: Dec 13, 2015 Code refactoring in contextual links.
Fixed minor bug in tests. (187009 lines)
Version 15.64.16: Dec 13, 2015 Code refactoring in contextual links.
Fixed minor bug in surveys. (187012 lines)
Version 15.64.15: Dec 13, 2015 Code refactoring in contextual links. (187025 lines)

View File

@ -1121,7 +1121,7 @@ void Tst_ShowFormAskEditTsts (void)
unsigned long NumRows;
/***** Buttons for edition *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Tst_PutFormToCreateNewTstQst (); // Put link (form) to create a new test question
TsI_PutFormToImportQuestions (); // Put link (form) to import questions from XML file
Tst_PutFormToConfigure (); // Put form to go to test configuration
@ -2082,7 +2082,7 @@ void Tst_ListQuestionsToEdit (void)
if ((NumRows = Tst_GetQuestionsForEdit (&mysql_res)) != 0) // Query database
{
/***** Buttons for edition *****/
fprintf (Gbl.F.Out,"<div class=\"CENTER_MIDDLE\">");
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
Tst_PutFormToCreateNewTstQst (); // Put link (form) to create a new test question
if (Gbl.Test.XML.CreateXML)
TsI_CreateXML (NumRows,mysql_res); // Create XML file for exporting questions and put a link to download it

View File

@ -62,6 +62,8 @@ extern struct Globals Gbl;
/***************************** Internal prototypes ***************************/
/*****************************************************************************/
static void TsI_PutParamsExportQsts (void);
static void TsI_GetAndWriteTagsXML (long QstCod);
static void TsI_WriteAnswersOfAQstXML (long QstCod);
static void TsI_ReadQuestionsFromXMLFileAndStoreInDB (const char *FileNameXML);
@ -81,27 +83,26 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
void TsI_PutFormToExportQuestions (void)
{
extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_Export_questions_to_XML_file;
extern const char *Txt_Export_questions;
/***** Start form *****/
Act_FormStart (ActLstTstQst);
/***** Put a link to create a file with questions *****/
Lay_PutContextualLink (ActLstTstQst,TsI_PutParamsExportQsts,
"export16x16.gif",
Txt_Export_questions_to_XML_file,Txt_Export_questions);
}
/***** Parameters of the form *****/
/*****************************************************************************/
/****************** Put params to export test questions **********************/
/*****************************************************************************/
static void TsI_PutParamsExportQsts (void)
{
Sta_WriteParamsDatesSeeAccesses ();
Tst_WriteParamEditQst ();
Par_PutHiddenParamChar ("OnlyThisQst",'N');
Par_PutHiddenParamUnsigned ("Order",(unsigned) Gbl.Test.SelectedOrderType);
Par_PutHiddenParamChar ("CreateXML",'Y');
/***** Put a link to create a file with questions *****/
Act_LinkFormSubmit (Txt_Export_questions_to_XML_file,The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutIconWithText ("export16x16.gif",
Txt_Export_questions_to_XML_file,
Txt_Export_questions);
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
}
/*****************************************************************************/
@ -110,20 +111,14 @@ void TsI_PutFormToExportQuestions (void)
void TsI_PutFormToImportQuestions (void)
{
extern const char *The_ClassFormBold[The_NUM_THEMES];
extern const char *Txt_Import_questions_from_XML_file;
extern const char *Txt_Import_questions;
/***** Start form *****/
Act_FormStart (ActReqImpTstQst);
/***** Put a link to create a file with questions *****/
Act_LinkFormSubmit (Txt_Import_questions_from_XML_file,The_ClassFormBold[Gbl.Prefs.Theme]);
Lay_PutIconWithText ("import16x16.gif",
Txt_Import_questions_from_XML_file,
Txt_Import_questions);
fprintf (Gbl.F.Out,"</a>");
Act_FormEnd ();
Lay_PutContextualLink (ActReqImpTstQst,NULL,
"import16x16.gif",
Txt_Import_questions_from_XML_file,
Txt_Import_questions);
}
/*****************************************************************************/