mirror of https://github.com/acanas/swad-core.git
Version 22.86.1: Mar 29, 2023 Icon to remove resource clipboard only if there are resources.
This commit is contained in:
parent
3b33d6b45c
commit
2bf309cf1b
|
@ -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.86 (2023-03-29)"
|
#define Log_PLATFORM_VERSION "SWAD 22.86.1 (2023-03-29)"
|
||||||
#define CSS_FILE "swad22.86.css"
|
#define CSS_FILE "swad22.86.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 22.86.1: Mar 29, 2023 Icon to remove resource clipboard only if there are resources. (338596 lines)
|
||||||
Version 22.86: Mar 29, 2023 New actions to see and remove the resource clipboard in rubrics. (338578 lines)
|
Version 22.86: Mar 29, 2023 New actions to see and remove the resource clipboard in rubrics. (338578 lines)
|
||||||
Version 22.85.1: Mar 29, 2023 Code refactoring in links to update sections. (338447 lines)
|
Version 22.85.1: Mar 29, 2023 Code refactoring in links to update sections. (338447 lines)
|
||||||
Version 22.85: Mar 29, 2023 New action to remove the resource clipboard in program. (338449 lines)
|
Version 22.85: Mar 29, 2023 New action to remove the resource clipboard in program. (338449 lines)
|
||||||
|
|
|
@ -872,6 +872,7 @@ static void PrgRsc_PutIconsClipboard (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
/***** Put icon to remove resource clipboard in program *****/
|
/***** Put icon to remove resource clipboard in program *****/
|
||||||
if (Prg_CheckIfICanEditProgram ())
|
if (Prg_CheckIfICanEditProgram ())
|
||||||
|
if (Rsc_DB_GetNumResourcesInClipboard ()) // Only if there are resources
|
||||||
Ico_PutContextualIconToRemove (ActRemRscCli_InPrg,NULL,
|
Ico_PutContextualIconToRemove (ActRemRscCli_InPrg,NULL,
|
||||||
NULL,NULL);
|
NULL,NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,22 @@ void Rsc_DB_CopyToClipboard (Rsc_Type_t Type,long Cod)
|
||||||
Cod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
/******************** Get number of resources in clipboard *******************/
|
||||||
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
unsigned Rsc_DB_GetNumResourcesInClipboard (void)
|
||||||
|
{
|
||||||
|
return (unsigned)
|
||||||
|
DB_QueryCOUNT ("can not get resources",
|
||||||
|
"SELECT COUNT(*)"
|
||||||
|
" FROM rsc_clipboards"
|
||||||
|
" WHERE UsrCod=%ld"
|
||||||
|
" AND CrsCod=%ld",
|
||||||
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
|
Gbl.Hierarchy.Crs.CrsCod);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************** Get all resources from resource clipboard ****************/
|
/****************** Get all resources from resource clipboard ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Rsc_DB_CopyToClipboard (Rsc_Type_t Type,long Cod);
|
void Rsc_DB_CopyToClipboard (Rsc_Type_t Type,long Cod);
|
||||||
|
|
||||||
|
unsigned Rsc_DB_GetNumResourcesInClipboard (void);
|
||||||
unsigned Rsc_DB_GetClipboard (MYSQL_RES **mysql_res);
|
unsigned Rsc_DB_GetClipboard (MYSQL_RES **mysql_res);
|
||||||
|
|
||||||
void Rsc_DB_RemoveClipboard (void);
|
void Rsc_DB_RemoveClipboard (void);
|
||||||
|
|
|
@ -175,6 +175,7 @@ static void RubRsc_PutIconsClipboard (__attribute__((unused)) void *Args)
|
||||||
{
|
{
|
||||||
/***** Put icon to remove resource clipboard in rubrics *****/
|
/***** Put icon to remove resource clipboard in rubrics *****/
|
||||||
if (Rub_CheckIfICanEditRubrics ())
|
if (Rub_CheckIfICanEditRubrics ())
|
||||||
|
if (Rsc_DB_GetNumResourcesInClipboard ()) // Only if there are resources
|
||||||
Ico_PutContextualIconToRemove (ActRemRscCli_InRub,NULL,
|
Ico_PutContextualIconToRemove (ActRemRscCli_InRub,NULL,
|
||||||
NULL,NULL);
|
NULL,NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue