mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-01 06:15:31 +02:00
Version 22.100.3: Apr 19, 2023 Institution admins can edit places.
This commit is contained in:
parent
15fe3d4b04
commit
a19e24b98a
|
@ -308,11 +308,11 @@ const struct Act_Actions ActLst_Actions[ActLst_NUM_ACTIONS] =
|
|||
[ActChgCtrWWW ] = { 683,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x3C6, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_ChangeCtrWWW ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||
[ActChgCtrSta ] = {1209,-1,TabUnk,ActSeeCtr , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Ctr_ChangeCtrStatus ,Ctr_ContEditAfterChgCtr ,NULL},
|
||||
|
||||
[ActEdiPlc ] = { 704,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_EditPlaces ,NULL},
|
||||
[ActNewPlc ] = { 705,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_ReceiveFormNewPlace ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActRemPlc ] = { 776,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_RemovePlace ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActRenPlcSho ] = { 894,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_RenamePlaceShort ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActRenPlcFul ] = { 895,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x200, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_RenamePlaceFull ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActEdiPlc ] = { 704,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Plc_EditPlaces ,NULL},
|
||||
[ActNewPlc ] = { 705,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_ReceiveFormNewPlace ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActRemPlc ] = { 776,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_RemovePlace ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActRenPlcSho ] = { 894,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_RenamePlaceShort ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
[ActRenPlcFul ] = { 895,-1,TabUnk,ActSeePlc , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Plc_RenamePlaceFull ,Plc_ContEditAfterChgPlc ,NULL},
|
||||
|
||||
[ActEdiDpt ] = { 677,-1,TabUnk,ActSeeDpt , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,NULL ,Dpt_EditDepartments ,NULL},
|
||||
[ActNewDpt ] = { 687,-1,TabUnk,ActSeeDpt , 0, 0, 0, 0,0x300, 0, 0,Act_CONT_NORM,Act_BRW_1ST_TAB,Dpt_ReceiveFormNewDpt ,Dpt_ContEditAfterChgDpt ,NULL},
|
||||
|
|
|
@ -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.
|
||||
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.100.2 (2023-04-19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.100.3 (2023-04-19)"
|
||||
#define CSS_FILE "swad22.95.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.100.3: Apr 19, 2023 Institution admins can edit places. (338891 lines)
|
||||
Version 22.100.2: Apr 19, 2023 Institution admins can edit departments. (338889 lines)
|
||||
Version 22.100.1: Apr 19, 2023 Changes in projects. (338897 lines)
|
||||
Version 22.100: Apr 18, 2023 Changes in resources, assignments, exams, games, attendance events and surveys. (338875 lines)
|
||||
|
|
25
swad_place.c
25
swad_place.c
|
@ -45,6 +45,17 @@
|
|||
#include "swad_place.h"
|
||||
#include "swad_place_database.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Private constants ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static const bool Plc_ICanEditPlaces[Rol_NUM_ROLES] =
|
||||
{
|
||||
/* Users who can edit */
|
||||
[Rol_INS_ADM] = true,
|
||||
[Rol_SYS_ADM] = true,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -62,7 +73,6 @@ static struct Plc_Place *Plc_EditingPlc = NULL; // Static variable to keep the p
|
|||
/*****************************************************************************/
|
||||
|
||||
static Plc_Order_t Plc_GetParPlcOrder (void);
|
||||
static bool Plc_CheckIfICanCreatePlaces (void);
|
||||
static void Plc_PutIconsListingPlaces (__attribute__((unused)) void *Args);
|
||||
static void Plc_PutIconToEditPlaces (void);
|
||||
static void Plc_EditPlacesInternal (void);
|
||||
|
@ -215,7 +225,7 @@ void Plc_SeeAllPlaces (void)
|
|||
HTM_TABLE_End ();
|
||||
|
||||
/***** Button to create place *****/
|
||||
if (Plc_CheckIfICanCreatePlaces ())
|
||||
if (Plc_ICanEditPlaces[Gbl.Usrs.Me.Role.Logged])
|
||||
{
|
||||
Frm_BeginForm (ActEdiPlc);
|
||||
Btn_PutConfirmButton (Txt_New_place);
|
||||
|
@ -242,15 +252,6 @@ static Plc_Order_t Plc_GetParPlcOrder (void)
|
|||
(unsigned long) Plc_ORDER_DEFAULT);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** Check if I can create places *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static bool Plc_CheckIfICanCreatePlaces (void)
|
||||
{
|
||||
return Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Put contextual icons in list of places *******************/
|
||||
/*****************************************************************************/
|
||||
|
@ -258,7 +259,7 @@ static bool Plc_CheckIfICanCreatePlaces (void)
|
|||
static void Plc_PutIconsListingPlaces (__attribute__((unused)) void *Args)
|
||||
{
|
||||
/***** Put icon to edit places *****/
|
||||
if (Plc_CheckIfICanCreatePlaces ())
|
||||
if (Plc_ICanEditPlaces[Gbl.Usrs.Me.Role.Logged])
|
||||
Plc_PutIconToEditPlaces ();
|
||||
|
||||
/***** Put icon to view centers *****/
|
||||
|
|
Loading…
Reference in New Issue
Block a user