mirror of https://github.com/acanas/swad-core.git
Version 22.120.17:Sep 10, 2023 Code refactoring related to hidden-visible in surveys.
This commit is contained in:
parent
8165d5ca08
commit
87bd725069
|
@ -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.16 (2023-09-10)"
|
#define Log_PLATFORM_VERSION "SWAD 22.120.17 (2023-09-10)"
|
||||||
#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.17:Sep 10, 2023 Code refactoring related to hidden-visible in surveys. (337563 lines)
|
||||||
Version 22.120.16:Sep 10, 2023 Code refactoring in project visibility. (337575 lines)
|
Version 22.120.16:Sep 10, 2023 Code refactoring in project visibility. (337575 lines)
|
||||||
Version 22.120.15:Sep 10, 2023 Code refactoring related to hidden-visible in projects. (337580 lines)
|
Version 22.120.15:Sep 10, 2023 Code refactoring related to hidden-visible in projects. (337580 lines)
|
||||||
Version 22.120.14:Sep 10, 2023 Code refactoring related to hidden-visible in program resources. (337590 lines)
|
Version 22.120.14:Sep 10, 2023 Code refactoring related to hidden-visible in program resources. (337590 lines)
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
//-------------------------------- Rubrics ------------------------------------
|
//-------------------------------- Rubrics ------------------------------------
|
||||||
long Rub_DB_CreateRubric (const struct Rub_Rubric *Rubric);
|
long Rub_DB_CreateRubric (const struct Rub_Rubric *Rubric);
|
||||||
void Rub_DB_UpdateRubric (const struct Rub_Rubric *Rubric);
|
void Rub_DB_UpdateRubric (const struct Rub_Rubric *Rubric);
|
||||||
void Rub_DB_HideOrUnhideRubric (long RubCod,bool Hide);
|
|
||||||
|
|
||||||
unsigned Rub_DB_GetListRubrics (MYSQL_RES **mysql_res);
|
unsigned Rub_DB_GetListRubrics (MYSQL_RES **mysql_res);
|
||||||
unsigned Rub_DB_GetRubricDataByCod (MYSQL_RES **mysql_res,long RubCod);
|
unsigned Rub_DB_GetRubricDataByCod (MYSQL_RES **mysql_res,long RubCod);
|
||||||
|
|
|
@ -96,6 +96,8 @@ static void Svy_GetListSurveys (struct Svy_Surveys *Surveys);
|
||||||
static void Svy_SetAllowedAndHiddenScopes (unsigned *ScopesAllowed,
|
static void Svy_SetAllowedAndHiddenScopes (unsigned *ScopesAllowed,
|
||||||
unsigned *HiddenAllowed);
|
unsigned *HiddenAllowed);
|
||||||
|
|
||||||
|
static void Svy_HideUnhideSurvey (HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||||
|
|
||||||
static void Svy_SetDefaultAndAllowedScope (struct Svy_Survey *Svy);
|
static void Svy_SetDefaultAndAllowedScope (struct Svy_Survey *Svy);
|
||||||
static void Svy_ShowLstGrpsToEditSurvey (long SvyCod);
|
static void Svy_ShowLstGrpsToEditSurvey (long SvyCod);
|
||||||
static void Svy_CreateSurvey (struct Svy_Survey *Svy,const char *Txt);
|
static void Svy_CreateSurvey (struct Svy_Survey *Svy,const char *Txt);
|
||||||
|
@ -1546,41 +1548,20 @@ void Svy_ResetSurvey (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************** Hide a survey ******************************/
|
/*************************** Hide/unhide a survey ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Svy_HideSurvey (void)
|
void Svy_HideSurvey (void)
|
||||||
{
|
{
|
||||||
struct Svy_Surveys Surveys;
|
Svy_HideUnhideSurvey (HidVis_HIDDEN);
|
||||||
|
|
||||||
/***** Reset surveys *****/
|
|
||||||
Svy_ResetSurveys (&Surveys);
|
|
||||||
|
|
||||||
/***** Get parameters *****/
|
|
||||||
Surveys.SelectedOrder = Svy_GetParSvyOrder ();
|
|
||||||
Grp_GetParWhichGroups ();
|
|
||||||
Surveys.CurrentPage = Pag_GetParPagNum (Pag_SURVEYS);
|
|
||||||
|
|
||||||
/***** Get survey code *****/
|
|
||||||
Surveys.Svy.SvyCod = ParCod_GetAndCheckPar (ParCod_Svy);
|
|
||||||
|
|
||||||
/***** Get data of the survey from database *****/
|
|
||||||
Svy_GetSurveyDataByCod (&Surveys.Svy);
|
|
||||||
if (!Surveys.Svy.Status.ICanEdit)
|
|
||||||
Err_NoPermissionExit ();
|
|
||||||
|
|
||||||
/***** Hide survey *****/
|
|
||||||
Svy_DB_HideOrUnhideSurvey (Surveys.Svy.SvyCod,true);
|
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
|
||||||
Svy_ListAllSurveys (&Surveys);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************************** Show a survey ******************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void Svy_UnhideSurvey (void)
|
void Svy_UnhideSurvey (void)
|
||||||
|
{
|
||||||
|
Svy_HideUnhideSurvey (HidVis_VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Svy_HideUnhideSurvey (HidVis_HiddenOrVisible_t HiddenOrVisible)
|
||||||
{
|
{
|
||||||
struct Svy_Surveys Surveys;
|
struct Svy_Surveys Surveys;
|
||||||
|
|
||||||
|
@ -1601,7 +1582,7 @@ void Svy_UnhideSurvey (void)
|
||||||
Err_NoPermissionExit ();
|
Err_NoPermissionExit ();
|
||||||
|
|
||||||
/***** Show survey *****/
|
/***** Show survey *****/
|
||||||
Svy_DB_HideOrUnhideSurvey (Surveys.Svy.SvyCod,false);
|
Svy_DB_HideOrUnhideSurvey (Surveys.Svy.SvyCod,HiddenOrVisible);
|
||||||
|
|
||||||
/***** Show surveys again *****/
|
/***** Show surveys again *****/
|
||||||
Svy_ListAllSurveys (&Surveys);
|
Svy_ListAllSurveys (&Surveys);
|
||||||
|
|
|
@ -105,17 +105,18 @@ void Svy_DB_UpdateSurvey (const struct Svy_Survey *Svy,const char *Txt)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Hide a project *******************************/
|
/*************************** Hide/unhide a survey ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Svy_DB_HideOrUnhideSurvey (long SvyCod,bool Hide)
|
void Svy_DB_HideOrUnhideSurvey (long SvyCod,
|
||||||
|
HidVis_HiddenOrVisible_t HiddenOrVisible)
|
||||||
{
|
{
|
||||||
DB_QueryUPDATE ("can not hide/unhide survey",
|
DB_QueryUPDATE ("can not hide/unhide survey",
|
||||||
"UPDATE svy_surveys"
|
"UPDATE svy_surveys"
|
||||||
" SET Hidden='%c'"
|
" SET Hidden='%c'"
|
||||||
" WHERE SvyCod=%ld",
|
" WHERE SvyCod=%ld",
|
||||||
Hide ? 'Y' :
|
HiddenOrVisible == HidVis_HIDDEN ? 'Y' :
|
||||||
'N',
|
'N',
|
||||||
SvyCod);
|
SvyCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@
|
||||||
//-------------------------------- Surveys ------------------------------------
|
//-------------------------------- Surveys ------------------------------------
|
||||||
long Svy_DB_CreateSurvey (const struct Svy_Survey *Svy,const char *Txt);
|
long Svy_DB_CreateSurvey (const struct Svy_Survey *Svy,const char *Txt);
|
||||||
void Svy_DB_UpdateSurvey (const struct Svy_Survey *Svy,const char *Txt);
|
void Svy_DB_UpdateSurvey (const struct Svy_Survey *Svy,const char *Txt);
|
||||||
void Svy_DB_HideOrUnhideSurvey (long SvyCod,bool Hide);
|
void Svy_DB_HideOrUnhideSurvey (long SvyCod,
|
||||||
|
HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||||
void Svy_DB_UpdateNumUsrsNotifiedByEMailAboutSurvey (long SvyCod,
|
void Svy_DB_UpdateNumUsrsNotifiedByEMailAboutSurvey (long SvyCod,
|
||||||
unsigned NumUsrsToBeNotifiedByEMail);
|
unsigned NumUsrsToBeNotifiedByEMail);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue