mirror of https://github.com/acanas/swad-core.git
Version19.235.1
This commit is contained in:
parent
7a73b73618
commit
b44885a767
|
@ -557,14 +557,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
||||||
En OpenSWAD:
|
En OpenSWAD:
|
||||||
ps2pdf source.ps destination.pdf
|
ps2pdf source.ps destination.pdf
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 19.235 (2020-05-17)"
|
#define Log_PLATFORM_VERSION "SWAD 19.235.1 (2020-05-17)"
|
||||||
#define CSS_FILE "swad19.230.1.css"
|
#define CSS_FILE "swad19.230.1.css"
|
||||||
#define JS_FILE "swad19.230.3.js"
|
#define JS_FILE "swad19.230.3.js"
|
||||||
/*
|
/*
|
||||||
TODO: Comprobar si el directorio público que devuelve Ses_GetPublicDirFromCache sigue existiendo.
|
TODO: Comprobar si el directorio público que devuelve Ses_GetPublicDirFromCache sigue existiendo.
|
||||||
// Si no existe, hay que crear un nuevo directorio y meterlo en cache
|
// Si no existe, hay que crear un nuevo directorio y meterlo en cache
|
||||||
TODO: ¿Mover importar y exportar a icono en la esquina?
|
|
||||||
|
|
||||||
|
Version 19.235.1: May 17, 2020 Changes in edition of bank of questions. (301193 lines)
|
||||||
Version 19.235: May 17, 2020 New module swad_tag for question tags. (301147 lines)
|
Version 19.235: May 17, 2020 New module swad_tag for question tags. (301147 lines)
|
||||||
Version 19.234: May 17, 2020 Option to edit tags in bank of questions. (301061 lines)
|
Version 19.234: May 17, 2020 Option to edit tags in bank of questions. (301061 lines)
|
||||||
Copy the following 3 icons to icon public directory:
|
Copy the following 3 icons to icon public directory:
|
||||||
|
|
15
swad_tag.c
15
swad_tag.c
|
@ -104,6 +104,21 @@ void Tag_FreeTagsList (struct Tag_Tags *Tags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/*************** Put a link (form) to import test questions ******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
void Tag_PutIconToEditTags (void)
|
||||||
|
{
|
||||||
|
extern const char *Txt_Edit_tags;
|
||||||
|
|
||||||
|
/***** Put a link to create a file with questions *****/
|
||||||
|
Lay_PutContextualLinkOnlyIcon (ActEdiTag,NULL,
|
||||||
|
NULL,NULL,
|
||||||
|
"tag.svg",
|
||||||
|
Txt_Edit_tags);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************* Check if current course has test tags *******************/
|
/******************* Check if current course has test tags *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -59,6 +59,8 @@ struct Tag_Tags
|
||||||
void Tag_ResetTags (struct Tag_Tags *Tags);
|
void Tag_ResetTags (struct Tag_Tags *Tags);
|
||||||
void Tag_FreeTagsList (struct Tag_Tags *Tags);
|
void Tag_FreeTagsList (struct Tag_Tags *Tags);
|
||||||
|
|
||||||
|
void Tag_PutIconToEditTags (void);
|
||||||
|
|
||||||
bool Tag_CheckIfCurrentCrsHasTestTags (void);
|
bool Tag_CheckIfCurrentCrsHasTestTags (void);
|
||||||
unsigned Tag_GetAllTagsFromCurrentCrs (MYSQL_RES **mysql_res);
|
unsigned Tag_GetAllTagsFromCurrentCrs (MYSQL_RES **mysql_res);
|
||||||
unsigned Tag_GetEnabledTagsFromThisCrs (MYSQL_RES **mysql_res);
|
unsigned Tag_GetEnabledTagsFromThisCrs (MYSQL_RES **mysql_res);
|
||||||
|
|
58
swad_test.c
58
swad_test.c
|
@ -150,7 +150,8 @@ static void Tst_ShowFormRequestSelectTestsForSet (struct Exa_Exams *Exams,
|
||||||
static void Tst_ShowFormRequestSelectTestsForGame (struct Gam_Games *Games,
|
static void Tst_ShowFormRequestSelectTestsForGame (struct Gam_Games *Games,
|
||||||
struct Tst_Test *Test);
|
struct Tst_Test *Test);
|
||||||
static bool Tst_CheckIfICanEditTests (void);
|
static bool Tst_CheckIfICanEditTests (void);
|
||||||
static void Tst_PutIconsBankQsts (void *Test);
|
static void Tst_PutIconsRequestBankQsts (__attribute__((unused)) void *Args);
|
||||||
|
static void Tst_PutIconsEditBankQsts (void *Test);
|
||||||
static void Tst_PutIconsTests (__attribute__((unused)) void *Args);
|
static void Tst_PutIconsTests (__attribute__((unused)) void *Args);
|
||||||
static void Tst_PutButtonToAddQuestion (void);
|
static void Tst_PutButtonToAddQuestion (void);
|
||||||
|
|
||||||
|
@ -1170,14 +1171,9 @@ static void Tst_ShowFormRequestEditTests (struct Tst_Test *Test)
|
||||||
[Dat_END_TIME ] = Dat_HMS_DO_NOT_SET
|
[Dat_END_TIME ] = Dat_HMS_DO_NOT_SET
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Contextual menu *****/
|
|
||||||
Mnu_ContextMenuBegin ();
|
|
||||||
TsI_PutFormToImportQuestions (); // Import questions from XML file
|
|
||||||
Mnu_ContextMenuEnd ();
|
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_Question_bank,
|
Box_BoxBegin (NULL,Txt_Question_bank,
|
||||||
Tst_PutIconsBankQsts,Test,
|
Tst_PutIconsRequestBankQsts,NULL,
|
||||||
Hlp_ASSESSMENT_Tests_editing_questions,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests_editing_questions,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Get tags already present in the table of questions *****/
|
/***** Get tags already present in the table of questions *****/
|
||||||
|
@ -1390,7 +1386,30 @@ static bool Tst_CheckIfICanEditTests (void)
|
||||||
/********************* Put contextual icons in tests *************************/
|
/********************* Put contextual icons in tests *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Tst_PutIconsBankQsts (void *Test)
|
static void Tst_PutIconsRequestBankQsts (__attribute__((unused)) void *Args)
|
||||||
|
{
|
||||||
|
extern const char *Txt_New_question;
|
||||||
|
|
||||||
|
/***** Put icon to create a new test question *****/
|
||||||
|
Ico_PutContextualIconToAdd (ActEdiOneTstQst,NULL,
|
||||||
|
NULL,NULL,
|
||||||
|
Txt_New_question);
|
||||||
|
|
||||||
|
/***** Put icon to edit tags *****/
|
||||||
|
Tag_PutIconToEditTags ();
|
||||||
|
|
||||||
|
/***** Put icon to import questions *****/
|
||||||
|
TsI_PutIconToImportQuestions ();
|
||||||
|
|
||||||
|
/***** Put icon to show a figure *****/
|
||||||
|
Fig_PutIconToShowFigure (Fig_TESTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/********************* Put contextual icons in tests *************************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
static void Tst_PutIconsEditBankQsts (void *Test)
|
||||||
{
|
{
|
||||||
extern const char *Txt_New_question;
|
extern const char *Txt_New_question;
|
||||||
|
|
||||||
|
@ -1415,11 +1434,11 @@ static void Tst_PutIconsBankQsts (void *Test)
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Txt_New_question);
|
Txt_New_question);
|
||||||
|
|
||||||
/***** Put form to edit tags *****/
|
/***** Put icon to edit tags *****/
|
||||||
Lay_PutContextualLinkOnlyIcon (ActEdiTag,NULL,
|
Tag_PutIconToEditTags ();
|
||||||
NULL,NULL,
|
|
||||||
"tag.svg",
|
/***** Put icon to export questions *****/
|
||||||
"Editar descriptores"); // TODO: Need translation!!!
|
TsI_PutIconToExportQuestions (Test);
|
||||||
|
|
||||||
/***** Put icon to show a figure *****/
|
/***** Put icon to show a figure *****/
|
||||||
Fig_PutIconToShowFigure (Fig_TESTS);
|
Fig_PutIconToShowFigure (Fig_TESTS);
|
||||||
|
@ -1792,14 +1811,13 @@ void Tst_ListQuestionsToEdit (void)
|
||||||
if (Test.NumQsts)
|
if (Test.NumQsts)
|
||||||
{
|
{
|
||||||
/* Contextual menu */
|
/* Contextual menu */
|
||||||
Mnu_ContextMenuBegin ();
|
|
||||||
|
|
||||||
if (TsI_GetCreateXMLParamFromForm ())
|
if (TsI_GetCreateXMLParamFromForm ())
|
||||||
|
{
|
||||||
|
Mnu_ContextMenuBegin ();
|
||||||
TsI_CreateXML (Test.NumQsts,mysql_res); // Create XML file with exported questions...
|
TsI_CreateXML (Test.NumQsts,mysql_res); // Create XML file with exported questions...
|
||||||
// ...and put a link to download it
|
// ...and put a link to download it
|
||||||
else
|
Mnu_ContextMenuEnd ();
|
||||||
TsI_PutFormToExportQuestions (&Test); // Export questions
|
}
|
||||||
Mnu_ContextMenuEnd ();
|
|
||||||
|
|
||||||
/* Show the table with the questions */
|
/* Show the table with the questions */
|
||||||
Tst_ListOneOrMoreQuestionsForEdition (&Test,mysql_res);
|
Tst_ListOneOrMoreQuestionsForEdition (&Test,mysql_res);
|
||||||
|
@ -2292,7 +2310,7 @@ static void Tst_ListOneQstToEdit (struct Tst_Test *Test)
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_Questions,
|
Box_BoxBegin (NULL,Txt_Questions,
|
||||||
Tst_PutIconsBankQsts,Test,
|
Tst_PutIconsEditBankQsts,Test,
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write the heading *****/
|
/***** Write the heading *****/
|
||||||
|
@ -2326,7 +2344,7 @@ static void Tst_ListOneOrMoreQuestionsForEdition (struct Tst_Test *Test,
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_Questions,
|
Box_BoxBegin (NULL,Txt_Questions,
|
||||||
Tst_PutIconsBankQsts,Test,
|
Tst_PutIconsEditBankQsts,Test,
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write the heading *****/
|
/***** Write the heading *****/
|
||||||
|
|
|
@ -88,12 +88,12 @@ static void TsI_WriteRowImportedQst (struct XMLElement *StemElem,
|
||||||
/**************** Put a link (form) to export test questions *****************/
|
/**************** Put a link (form) to export test questions *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TsI_PutFormToExportQuestions (struct Tst_Test *Test)
|
void TsI_PutIconToExportQuestions (struct Tst_Test *Test)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Export_questions;
|
extern const char *Txt_Export_questions;
|
||||||
|
|
||||||
/***** Put a link to create a file with questions *****/
|
/***** Put a link to create a file with questions *****/
|
||||||
Lay_PutContextualLinkIconText (ActLstTstQst,NULL,
|
Lay_PutContextualLinkOnlyIcon (ActLstTstQst,NULL,
|
||||||
TsI_PutParamsExportQsts,Test,
|
TsI_PutParamsExportQsts,Test,
|
||||||
"file-import.svg",
|
"file-import.svg",
|
||||||
Txt_Export_questions);
|
Txt_Export_questions);
|
||||||
|
@ -137,12 +137,12 @@ bool TsI_GetCreateXMLParamFromForm (void)
|
||||||
/*************** Put a link (form) to import test questions ******************/
|
/*************** Put a link (form) to import test questions ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TsI_PutFormToImportQuestions (void)
|
void TsI_PutIconToImportQuestions (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Import_questions;
|
extern const char *Txt_Import_questions;
|
||||||
|
|
||||||
/***** Put a link to create a file with questions *****/
|
/***** Put a link to create a file with questions *****/
|
||||||
Lay_PutContextualLinkIconText (ActReqImpTstQst,NULL,
|
Lay_PutContextualLinkOnlyIcon (ActReqImpTstQst,NULL,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
"file-export.svg",
|
"file-export.svg",
|
||||||
Txt_Import_questions);
|
Txt_Import_questions);
|
||||||
|
|
|
@ -39,9 +39,9 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void TsI_PutFormToExportQuestions (struct Tst_Test *Test);
|
void TsI_PutIconToExportQuestions (struct Tst_Test *Test);
|
||||||
bool TsI_GetCreateXMLParamFromForm (void);
|
bool TsI_GetCreateXMLParamFromForm (void);
|
||||||
void TsI_PutFormToImportQuestions (void);
|
void TsI_PutIconToImportQuestions (void);
|
||||||
void TsI_CreateXML (unsigned long NumRows,MYSQL_RES *mysql_res);
|
void TsI_CreateXML (unsigned long NumRows,MYSQL_RES *mysql_res);
|
||||||
void TsI_ShowFormImportQstsFromXML (void);
|
void TsI_ShowFormImportQstsFromXML (void);
|
||||||
void TsI_ImportQstsFromXML (void);
|
void TsI_ImportQstsFromXML (void);
|
||||||
|
|
21
swad_text.c
21
swad_text.c
|
@ -10401,6 +10401,27 @@ const char *Txt_Edit_rich_text =
|
||||||
"Editar texto rico";
|
"Editar texto rico";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
const char *Txt_Edit_tags =
|
||||||
|
#if L==1 // ca
|
||||||
|
"Editar descriptors";
|
||||||
|
#elif L==2 // de
|
||||||
|
"Tags bearbeiten";
|
||||||
|
#elif L==3 // en
|
||||||
|
"Edit tags";
|
||||||
|
#elif L==4 // es
|
||||||
|
"Editar descriptores";
|
||||||
|
#elif L==5 // fr
|
||||||
|
"Éditer descripteurs";
|
||||||
|
#elif L==6 // gn
|
||||||
|
"Editar descriptores"; // Okoteve traducción
|
||||||
|
#elif L==7 // it
|
||||||
|
"Editare etichette";
|
||||||
|
#elif L==8 // pl
|
||||||
|
"Edycja tagów";
|
||||||
|
#elif L==9 // pt
|
||||||
|
"Editar descritores";
|
||||||
|
#endif
|
||||||
|
|
||||||
const char *Txt_Editable =
|
const char *Txt_Editable =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Editables";
|
"Editables";
|
||||||
|
|
Loading…
Reference in New Issue