mirror of https://github.com/acanas/swad-core.git
Version 22.120.10:Sep 09, 2023 Code refactoring related to hidden-visible in exams.
This commit is contained in:
parent
4323ce62ed
commit
4b24021f9f
|
@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr
|
||||||
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
#define Log_PLATFORM_VERSION "SWAD 22.120.9 (2023-09-09)"
|
#define Log_PLATFORM_VERSION "SWAD 22.120.10 (2023-09-09)"
|
||||||
#define CSS_FILE "swad22.120.4.css"
|
#define CSS_FILE "swad22.120.4.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.120.10:Sep 09, 2023 Code refactoring related to hidden-visible in exams. (337604 lines)
|
||||||
Version 22.120.9: Sep 09, 2023 Code refactoring related to hidden-visible in attendance. (337607 lines)
|
Version 22.120.9: Sep 09, 2023 Code refactoring related to hidden-visible in attendance. (337607 lines)
|
||||||
Version 22.120.8: Sep 09, 2023 Code refactoring related to hidden-visible in assignments. (337610 lines)
|
Version 22.120.8: Sep 09, 2023 Code refactoring related to hidden-visible in assignments. (337610 lines)
|
||||||
Version 22.120.7: Sep 09, 2023 Code refactoring related to hidden-visible in agendas. (337619 lines)
|
Version 22.120.7: Sep 09, 2023 Code refactoring related to hidden-visible in agendas. (337619 lines)
|
||||||
|
|
20
swad_exam.c
20
swad_exam.c
|
@ -137,7 +137,7 @@ static void Exa_RemoveAllMedFilesFromStemOfAllQstsFromCrs (long CrsCod);
|
||||||
static void Exa_RemoveAllMedFilesFromAnsOfAllQstsFromExam (long ExaCod);
|
static void Exa_RemoveAllMedFilesFromAnsOfAllQstsFromExam (long ExaCod);
|
||||||
static void Exa_RemoveAllMedFilesFromAnsOfAllQstsFromCrs (long CrsCod);
|
static void Exa_RemoveAllMedFilesFromAnsOfAllQstsFromCrs (long CrsCod);
|
||||||
|
|
||||||
static void Exa_HideUnhideExam (bool Hide);
|
static void Exa_HideUnhideExam (HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||||
|
|
||||||
static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
||||||
char Txt[Cns_MAX_BYTES_TEXT + 1],
|
char Txt[Cns_MAX_BYTES_TEXT + 1],
|
||||||
|
@ -1174,28 +1174,20 @@ static void Exa_RemoveAllMedFilesFromAnsOfAllQstsFromCrs (long CrsCod)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Hide an exam ******************************/
|
/***************************** Hide/unhide an exam ***************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Exa_HideExam (void)
|
void Exa_HideExam (void)
|
||||||
{
|
{
|
||||||
Exa_HideUnhideExam (true);
|
Exa_HideUnhideExam (HidVis_HIDDEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************************* Unhide an exam ******************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void Exa_UnhideExam (void)
|
void Exa_UnhideExam (void)
|
||||||
{
|
{
|
||||||
Exa_HideUnhideExam (false);
|
Exa_HideUnhideExam (HidVis_VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
static void Exa_HideUnhideExam (HidVis_HiddenOrVisible_t HiddenOrVisible)
|
||||||
/******************************* Unhide an exam ******************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
static void Exa_HideUnhideExam (bool Hide)
|
|
||||||
{
|
{
|
||||||
struct Exa_Exams Exams;
|
struct Exa_Exams Exams;
|
||||||
|
|
||||||
|
@ -1214,7 +1206,7 @@ static void Exa_HideUnhideExam (bool Hide)
|
||||||
Exa_GetExamDataByCod (&Exams.Exam);
|
Exa_GetExamDataByCod (&Exams.Exam);
|
||||||
|
|
||||||
/***** Unhide exam *****/
|
/***** Unhide exam *****/
|
||||||
Exa_DB_HideOrUnhideExam (Exams.Exam.ExaCod,Hide);
|
Exa_DB_HideOrUnhideExam (Exams.Exam.ExaCod,HiddenOrVisible);
|
||||||
|
|
||||||
/***** Show exams again *****/
|
/***** Show exams again *****/
|
||||||
Exa_ListAllExams (&Exams);
|
Exa_ListAllExams (&Exams);
|
||||||
|
|
|
@ -105,14 +105,15 @@ void Exa_DB_UpdateExam (const struct Exa_Exam *Exam,const char *Txt)
|
||||||
/*************************** Hide/unhide an exam *****************************/
|
/*************************** Hide/unhide an exam *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Exa_DB_HideOrUnhideExam (long ExaCod,bool Hide)
|
void Exa_DB_HideOrUnhideExam (long ExaCod,
|
||||||
|
HidVis_HiddenOrVisible_t HiddenOrVisible)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not hide/unhide exam",
|
DB_QueryUPDATE ("can not hide/unhide exam",
|
||||||
"UPDATE exa_exams"
|
"UPDATE exa_exams"
|
||||||
" SET Hidden='%c'"
|
" SET Hidden='%c'"
|
||||||
" WHERE ExaCod=%ld",
|
" WHERE ExaCod=%ld",
|
||||||
Hide ? 'Y' :
|
HiddenOrVisible == HidVis_HIDDEN ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
ExaCod);
|
ExaCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@
|
||||||
//---------------------------- Exams ------------------------------------------
|
//---------------------------- Exams ------------------------------------------
|
||||||
long Exa_DB_CreateExam (const struct Exa_Exam *Exam,const char *Txt);
|
long Exa_DB_CreateExam (const struct Exa_Exam *Exam,const char *Txt);
|
||||||
void Exa_DB_UpdateExam (const struct Exa_Exam *Exam,const char *Txt);
|
void Exa_DB_UpdateExam (const struct Exa_Exam *Exam,const char *Txt);
|
||||||
void Exa_DB_HideOrUnhideExam (long ExaCod,bool Hide);
|
void Exa_DB_HideOrUnhideExam (long ExaCod,
|
||||||
|
HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||||
unsigned Exa_DB_GetListExams (MYSQL_RES **mysql_res,Exa_Order_t SelectedOrder);
|
unsigned Exa_DB_GetListExams (MYSQL_RES **mysql_res,Exa_Order_t SelectedOrder);
|
||||||
unsigned Exa_DB_GetExamDataByCod (MYSQL_RES **mysql_res,long ExaCod);
|
unsigned Exa_DB_GetExamDataByCod (MYSQL_RES **mysql_res,long ExaCod);
|
||||||
unsigned Exa_DB_GetExamStartEnd (MYSQL_RES **mysql_res,long ExaCod);
|
unsigned Exa_DB_GetExamStartEnd (MYSQL_RES **mysql_res,long ExaCod);
|
||||||
|
|
Loading…
Reference in New Issue