mirror of https://github.com/acanas/swad-core.git
Version 15.157.3
This commit is contained in:
parent
0153a4c680
commit
16ad544a85
|
@ -134,13 +134,14 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 15.157.2 (2016-03-20)"
|
#define Log_PLATFORM_VERSION "SWAD 15.157.3 (2016-03-20)"
|
||||||
#define CSS_FILE "swad15.157.css"
|
#define CSS_FILE "swad15.157.css"
|
||||||
#define JS_FILE "swad15.131.3.js"
|
#define JS_FILE "swad15.131.3.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// 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
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 15.157.3: Mar 20, 2016 Changes in layout of tests. (196247 lines)
|
||||||
Version 15.157.2: Mar 20, 2016 Fixed bug in surveys. (196241 lines)
|
Version 15.157.2: Mar 20, 2016 Fixed bug in surveys. (196241 lines)
|
||||||
Version 15.157.1: Mar 20, 2016 Changed names of functions related to degree types. (196237 lines)
|
Version 15.157.1: Mar 20, 2016 Changed names of functions related to degree types. (196237 lines)
|
||||||
Version 15.157: Mar 20, 2016 Changes in tagline and title. (196227 lines)
|
Version 15.157: Mar 20, 2016 Changes in tagline and title. (196227 lines)
|
||||||
|
|
|
@ -2952,7 +2952,7 @@ static void Svy_ListSvyQuestions (struct Survey *Svy,struct SurveyQuestion *SvyQ
|
||||||
/***** Put button to add a new question in this survey *****/
|
/***** Put button to add a new question in this survey *****/
|
||||||
Svy_PutButtonToCreateNewQuestion ();
|
Svy_PutButtonToCreateNewQuestion ();
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End frame *****/
|
||||||
Lay_EndRoundFrame ();
|
Lay_EndRoundFrame ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
25
swad_test.c
25
swad_test.c
|
@ -132,7 +132,7 @@ extern struct Globals Gbl;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Tst_PutFormToSeeResultsOfUsersTests (void);
|
static void Tst_PutFormToSeeResultsOfUsersTests (void);
|
||||||
static void Tst_PutFormToEdit (void);
|
static void Tst_PutIconToEdit (void);
|
||||||
static void Tst_PutFormToConfigure (void);
|
static void Tst_PutFormToConfigure (void);
|
||||||
|
|
||||||
static void Tst_GetQuestionsAndAnswersFromForm (void);
|
static void Tst_GetQuestionsAndAnswersFromForm (void);
|
||||||
|
@ -243,27 +243,32 @@ static void Tst_GetExamQuestionsFromDB (long TstCod);
|
||||||
void Tst_ShowFormAskTst (void)
|
void Tst_ShowFormAskTst (void)
|
||||||
{
|
{
|
||||||
extern const char *The_ClassForm[The_NUM_THEMES];
|
extern const char *The_ClassForm[The_NUM_THEMES];
|
||||||
|
extern const char *Txt_Test;
|
||||||
extern const char *Txt_No_of_questions;
|
extern const char *Txt_No_of_questions;
|
||||||
extern const char *Txt_Generate_exam;
|
extern const char *Txt_Generate_exam;
|
||||||
extern const char *Txt_No_test_questions_in_X;
|
extern const char *Txt_No_test_questions_in_X;
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned long NumRows;
|
unsigned long NumRows;
|
||||||
|
bool ICanEdit = (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT ||
|
||||||
|
Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
|
||||||
|
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM);
|
||||||
|
|
||||||
/***** Read test configuration from database *****/
|
/***** Read test configuration from database *****/
|
||||||
Tst_GetConfigTstFromDB ();
|
Tst_GetConfigTstFromDB ();
|
||||||
|
|
||||||
/***** Put form to go to test edition and configuration *****/
|
/***** Put form to go to test edition and configuration *****/
|
||||||
if (Gbl.Usrs.Me.LoggedRole == Rol_STUDENT ||
|
if (ICanEdit)
|
||||||
Gbl.Usrs.Me.LoggedRole == Rol_TEACHER ||
|
|
||||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
|
||||||
{
|
{
|
||||||
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
fprintf (Gbl.F.Out,"<div class=\"CONTEXT_MENU\">");
|
||||||
Tst_PutFormToSeeResultsOfUsersTests ();
|
Tst_PutFormToSeeResultsOfUsersTests ();
|
||||||
Tst_PutFormToEdit ();
|
|
||||||
Tst_PutFormToConfigure ();
|
Tst_PutFormToConfigure ();
|
||||||
fprintf (Gbl.F.Out,"</div>");
|
fprintf (Gbl.F.Out,"</div>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***** Start frame *****/
|
||||||
|
Lay_StartRoundFrame (NULL,Txt_Test,ICanEdit ? Tst_PutIconToEdit :
|
||||||
|
NULL);
|
||||||
|
|
||||||
/***** Get tags *****/
|
/***** Get tags *****/
|
||||||
if ((NumRows = Tst_GetEnabledTagsFromThisCrs (&mysql_res)) != 0)
|
if ((NumRows = Tst_GetEnabledTagsFromThisCrs (&mysql_res)) != 0)
|
||||||
{
|
{
|
||||||
|
@ -306,6 +311,9 @@ void Tst_ShowFormAskTst (void)
|
||||||
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
Lay_ShowAlert (Lay_INFO,Gbl.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***** End frame *****/
|
||||||
|
Lay_EndRoundFrame ();
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
DB_FreeMySQLResult (&mysql_res);
|
DB_FreeMySQLResult (&mysql_res);
|
||||||
}
|
}
|
||||||
|
@ -325,15 +333,14 @@ static void Tst_PutFormToSeeResultsOfUsersTests (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/************** Write a form to go to edition of test questions **************/
|
/*************** Write icon to go to edition of test questions ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Tst_PutFormToEdit (void)
|
static void Tst_PutIconToEdit (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Edit;
|
extern const char *Txt_Edit;
|
||||||
|
|
||||||
Lay_PutContextualLink (ActEdiTstQst,NULL,"edit64x64.png",
|
Lay_PutContextualLink (ActEdiTstQst,NULL,"edit64x64.png",Txt_Edit,NULL);
|
||||||
Txt_Edit,Txt_Edit);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue