mirror of https://github.com/acanas/swad-core.git
Version 22.120.13:Sep 10, 2023 Code refactoring related to hidden-visible in program items.
This commit is contained in:
parent
50ef20a997
commit
ee1a516acd
|
@ -629,11 +629,12 @@ 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.
|
||||
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.120.12 (2023-09-10)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.120.13 (2023-09-10)"
|
||||
#define CSS_FILE "swad22.120.4.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.120.12:Sep 10, 2023 Code refactoring related to hidden-visible in exam sessions. (337584 lines)
|
||||
Version 22.120.13:Sep 10, 2023 Code refactoring related to hidden-visible in program items. (337587 lines)
|
||||
Version 22.120.12:Sep 10, 2023 Code refactoring related to hidden-visible in games. (337584 lines)
|
||||
Version 22.120.11:Sep 09, 2023 Code refactoring related to hidden-visible in exam sessions. (337594 lines)
|
||||
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)
|
||||
|
|
|
@ -165,7 +165,7 @@ static void Prg_GetItemDataFromRow (MYSQL_RES **mysql_res,
|
|||
struct Prg_Item *Item,
|
||||
unsigned NumRows);
|
||||
|
||||
static void Prg_HideOrUnhideItem (bool Hide);
|
||||
static void Prg_HideOrUnhideItem (HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||
|
||||
static void Prg_MoveUpDownItem (Prg_MoveUpDown_t UpDown);
|
||||
static bool Prg_ExchangeItemRanges (int NumItemTop,int NumItemBottom);
|
||||
|
@ -1453,15 +1453,15 @@ void Prg_RemoveItem (void)
|
|||
|
||||
void Prg_HideItem (void)
|
||||
{
|
||||
Prg_HideOrUnhideItem (true);
|
||||
Prg_HideOrUnhideItem (HidVis_HIDDEN);
|
||||
}
|
||||
|
||||
void Prg_UnhideItem (void)
|
||||
{
|
||||
Prg_HideOrUnhideItem (false);
|
||||
Prg_HideOrUnhideItem (HidVis_VISIBLE);
|
||||
}
|
||||
|
||||
static void Prg_HideOrUnhideItem (bool Hide)
|
||||
static void Prg_HideOrUnhideItem (HidVis_HiddenOrVisible_t HiddenOrVisible)
|
||||
{
|
||||
struct Prg_Item Item;
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ static void Prg_HideOrUnhideItem (bool Hide)
|
|||
Err_WrongItemExit ();
|
||||
|
||||
/***** Hide/unhide program item *****/
|
||||
Prg_DB_HideOrUnhideItem (Item.Hierarchy.ItmCod,Hide);
|
||||
Prg_DB_HideOrUnhideItem (Item.Hierarchy.ItmCod,HiddenOrVisible);
|
||||
|
||||
/***** Show program items highlighting subtree *****/
|
||||
Prg_ShowAllItems (Prg_EDIT_ITEMS,Item.Hierarchy.ItmCod,-1L);
|
||||
|
|
|
@ -85,18 +85,19 @@ void Prg_DB_UpdateItem (const struct Prg_Item *Item,const char *Txt)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* Hide/unhide a program item *************************/
|
||||
/************************* Hide/unhide a program item ************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Prg_DB_HideOrUnhideItem (long ItmCod,bool Hide)
|
||||
void Prg_DB_HideOrUnhideItem (long ItmCod,
|
||||
HidVis_HiddenOrVisible_t HiddenOrVisible)
|
||||
{
|
||||
DB_QueryUPDATE ("can not hide/unhide program item",
|
||||
"UPDATE prg_items"
|
||||
" SET Hidden='%c'"
|
||||
" WHERE ItmCod=%ld"
|
||||
" AND CrsCod=%ld", // Extra check
|
||||
Hide ? 'Y' :
|
||||
'N',
|
||||
HiddenOrVisible == HidVis_HIDDEN ? 'Y' :
|
||||
'N',
|
||||
ItmCod,
|
||||
Gbl.Hierarchy.Crs.CrsCod);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,8 @@
|
|||
//--------------------------------- Items -------------------------------------
|
||||
long Prg_DB_InsertItem (const struct Prg_Item *Item,const char *Txt);
|
||||
void Prg_DB_UpdateItem (const struct Prg_Item *Item,const char *Txt);
|
||||
void Prg_DB_HideOrUnhideItem (long ItmCod,bool Hide);
|
||||
void Prg_DB_HideOrUnhideItem (long ItmCod,
|
||||
HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||
void Prg_DB_UpdateIndexRange (long Diff,long Begin,long End);
|
||||
void Prg_DB_LockTableItems (void);
|
||||
void Prg_DB_MoveDownItems (unsigned Index);
|
||||
|
|
Loading…
Reference in New Issue