mirror of https://github.com/acanas/swad-core.git
Version19.84.2
This commit is contained in:
parent
2f4e4c452c
commit
734b3782dc
|
@ -490,7 +490,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.84.1 (2019-12-06)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.84.2 (2019-12-06)"
|
||||
#define CSS_FILE "swad19.82.3.css"
|
||||
#define JS_FILE "swad19.70.js"
|
||||
/*
|
||||
|
@ -498,6 +498,8 @@ ps2pdf source.ps destination.pdf
|
|||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||
// TODO: En cada juego, poder listar los resultados en una tabla como la de resultados globales
|
||||
|
||||
Version 19.84.2: Dec 06, 2019 Contextual icon to show tests results.
|
||||
Fixed bug in tests results. (247889 lines)
|
||||
Version 19.84.1: Dec 06, 2019 Fixed bug in forms to edit dates.
|
||||
Fixed bug in edition of holidays.
|
||||
Fixed bug in API function getGames, reported by Sergio Díaz Rueda. (247890 lines)
|
||||
|
|
|
@ -326,6 +326,15 @@ void Ico_PutContextualIconToCreateInFolder (Act_Action_t NextAction,void (*FuncP
|
|||
Txt_Upload_file_or_create_folder);
|
||||
}
|
||||
|
||||
void Ico_PutContextualIconToShowResults (Act_Action_t NextAction,void (*FuncParams) (void))
|
||||
{
|
||||
extern const char *Txt_Results;
|
||||
|
||||
Lay_PutContextualLinkOnlyIcon (NextAction,NULL,FuncParams,
|
||||
"tasks.svg",
|
||||
Txt_Results);
|
||||
}
|
||||
|
||||
void Ico_PutContextualIconToZIP (Act_Action_t NextAction,void (*FuncParams) (void))
|
||||
{
|
||||
extern const char *Txt_Create_ZIP_file;
|
||||
|
|
|
@ -69,6 +69,7 @@ void Ico_PutContextualIconToPrint (Act_Action_t NextAction,void (*FuncParams) (v
|
|||
void Ico_PutContextualIconToCopy (Act_Action_t NextAction,void (*FuncParams) (void));
|
||||
void Ico_PutContextualIconToPaste (Act_Action_t NextAction,void (*FuncParams) (void));
|
||||
void Ico_PutContextualIconToCreateInFolder (Act_Action_t NextAction,void (*FuncParams) (void),bool Open);
|
||||
void Ico_PutContextualIconToShowResults (Act_Action_t NextAction,void (*FuncParams) (void));
|
||||
void Ico_PutContextualIconToZIP (Act_Action_t NextAction,void (*FuncParams) (void));
|
||||
|
||||
void Ico_PutDivIcon (const char *DivClass,const char *Icon,const char *Title);
|
||||
|
|
53
swad_test.c
53
swad_test.c
|
@ -147,8 +147,6 @@ extern struct Globals Gbl;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Tst_PutFormToViewTstResults (Act_Action_t Action);
|
||||
|
||||
static void Tst_GetQuestionsAndAnswersFromForm (void);
|
||||
static bool Tst_CheckIfNextTstAllowed (void);
|
||||
static void Tst_SetTstStatus (unsigned NumTst,Tst_Status_t TstStatus);
|
||||
|
@ -316,21 +314,6 @@ void Tst_ShowFormAskTst (void)
|
|||
/***** Read test configuration from database *****/
|
||||
Tst_GetConfigTstFromDB ();
|
||||
|
||||
/***** Put link to view tests results *****/
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_STD:
|
||||
Tst_PutFormToViewTstResults (ActReqSeeMyTstRes);
|
||||
break;
|
||||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
Tst_PutFormToViewTstResults (ActReqSeeUsrTstRes);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Take_a_test,Tst_PutIconsTests,
|
||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||
|
@ -395,22 +378,6 @@ void Tst_ShowFormAskTst (void)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Write a form to go to result of users' tests ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Tst_PutFormToViewTstResults (Act_Action_t Action)
|
||||
{
|
||||
extern const char *Txt_Results;
|
||||
|
||||
/***** Contextual menu *****/
|
||||
Mnu_ContextMenuBegin ();
|
||||
Lay_PutContextualLinkIconText (Action,NULL,NULL,
|
||||
"tasks.svg",
|
||||
Txt_Results); // Tests results
|
||||
Mnu_ContextMenuEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Generate self-assessment test ************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -496,7 +463,7 @@ void Tst_ShowNewTest (void)
|
|||
DB_FreeMySQLResult (&mysql_res);
|
||||
}
|
||||
else
|
||||
Tst_ShowFormAskTst (); // Show the form again
|
||||
Tst_ShowFormAskTst (); // Show the form again
|
||||
|
||||
/***** Free memory used for by the list of tags *****/
|
||||
Tst_FreeTagsList ();
|
||||
|
@ -1435,6 +1402,21 @@ static void Tst_PutIconsTests (void)
|
|||
Ico_PutContextualIconToConfigure (ActCfgTst,NULL);
|
||||
}
|
||||
|
||||
/***** Put icon to show results *****/
|
||||
switch (Gbl.Usrs.Me.Role.Logged)
|
||||
{
|
||||
case Rol_STD:
|
||||
Ico_PutContextualIconToShowResults (ActReqSeeMyTstRes,NULL);
|
||||
break;
|
||||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
Ico_PutContextualIconToShowResults (ActReqSeeUsrTstRes,NULL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/***** Put icon to show a figure *****/
|
||||
Gbl.Figures.FigureType = Fig_TESTS;
|
||||
Fig_PutIconToShowFigure ();
|
||||
|
@ -7670,8 +7652,11 @@ static void Tst_ShowUsrsTstResults (void)
|
|||
Usr_GetUsrCodFromEncryptedUsrCod (&Gbl.Usrs.Other.UsrDat);
|
||||
if (Usr_ChkUsrCodAndGetAllUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,Usr_DONT_GET_PREFS))
|
||||
if (Usr_CheckIfICanViewTst (&Gbl.Usrs.Other.UsrDat))
|
||||
{
|
||||
/***** Show test results *****/
|
||||
Gbl.Usrs.Other.UsrDat.Accepted = Usr_CheckIfUsrHasAcceptedInCurrentCrs (&Gbl.Usrs.Other.UsrDat);
|
||||
Tst_ShowTstResults (&Gbl.Usrs.Other.UsrDat);
|
||||
}
|
||||
}
|
||||
|
||||
/***** End table and box *****/
|
||||
|
|
Loading…
Reference in New Issue