mirror of https://github.com/acanas/swad-core.git
Version19.213.1
This commit is contained in:
parent
a07888e1e6
commit
37c672fc89
|
@ -544,10 +544,12 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.213 (2020-05-06)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.213.1 (2020-05-06)"
|
||||
#define CSS_FILE "swad19.193.1.css"
|
||||
#define JS_FILE "swad19.193.1.js"
|
||||
/*
|
||||
Version 19.213.2: May 06, 2020 Change color of dates on current exam event. (? lines)
|
||||
Version 19.213.1: May 06, 2020 Fixed bug in edition of set of questions. (301357 lines)
|
||||
Version 19.213: May 06, 2020 Edition of exam event.
|
||||
Code refactoring in groups. (301327 lines)
|
||||
Version 19.212: May 05, 2020 Icon to edit exam event. (301319 lines)
|
||||
|
|
26
swad_exam.c
26
swad_exam.c
|
@ -1067,6 +1067,14 @@ void ExaSet_GetDataOfSetByCod (struct ExaSet_Set *Set)
|
|||
MYSQL_ROW row;
|
||||
char StrSetInd[Cns_MAX_DECIMAL_DIGITS_UINT + 1];
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (Set->SetCod <= 0)
|
||||
{
|
||||
/* Initialize to empty set */
|
||||
ExaSet_ResetSet (Set);
|
||||
return;
|
||||
}
|
||||
|
||||
/***** Get data of set of questions from database *****/
|
||||
if (DB_QuerySELECT (&mysql_res,"can not get set data",
|
||||
"SELECT SetCod," // row[0]
|
||||
|
@ -1120,6 +1128,14 @@ void Exa_GetDataOfExamByCod (struct Exa_Exam *Exam)
|
|||
MYSQL_ROW row;
|
||||
unsigned long NumRows;
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (Exam->ExaCod <= 0)
|
||||
{
|
||||
/* Initialize to empty exam */
|
||||
Exa_ResetExam (Exam);
|
||||
return;
|
||||
}
|
||||
|
||||
/***** Get exam data from database *****/
|
||||
NumRows = DB_QuerySELECT (&mysql_res,"can not get exam data",
|
||||
"SELECT exa_exams.ExaCod," // row[0]
|
||||
|
@ -1966,7 +1982,15 @@ void Exa_ReceiveFormExam (void)
|
|||
Exam.ExaCod = Exams.ExaCod;
|
||||
ItsANewExam = (Exam.ExaCod <= 0);
|
||||
|
||||
/***** If I can edit exams ==> receive exam from form *****/
|
||||
/***** Get all current exam data from database *****/
|
||||
// Some data are necessary to show exam and sets of questions again
|
||||
if (!ItsANewExam)
|
||||
{
|
||||
Exa_GetDataOfExamByCod (&Exam);
|
||||
Exams.ExaCod = Exam.ExaCod;
|
||||
}
|
||||
|
||||
/***** If I can edit exams ==> receive some data of exam from form *****/
|
||||
Exa_ReceiveExamFieldsFromForm (&Exam,Txt);
|
||||
if (Exa_CheckExamFieldsReceivedFromForm (&Exam))
|
||||
{
|
||||
|
|
|
@ -413,6 +413,14 @@ void ExaEvt_GetDataOfEventByCod (struct ExaEvt_Event *Event)
|
|||
MYSQL_RES *mysql_res;
|
||||
unsigned long NumRows;
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (Event->EvtCod <= 0)
|
||||
{
|
||||
/* Initialize to empty exam event */
|
||||
ExaEvt_ResetEvent (Event);
|
||||
return;
|
||||
}
|
||||
|
||||
/***** Get exam data event from database *****/
|
||||
NumRows = (unsigned)
|
||||
DB_QuerySELECT (&mysql_res,"can not get events",
|
||||
|
|
Loading…
Reference in New Issue