swad-core/swad_institution_config.c

597 lines
20 KiB
C
Raw Permalink Normal View History

2019-12-29 16:21:42 +01:00
// swad_institution.c: institutions
/*
SWAD (Shared Workspace At a Distance),
is a web platform developed at the University of Granada (Spain),
and used to support university teaching.
This file is part of SWAD core.
Copyright (C) 1999-2024 Antonio Ca<EFBFBD>as Vargas
2019-12-29 16:21:42 +01:00
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*****************************************************************************/
/********************************* Headers ***********************************/
/*****************************************************************************/
2020-01-03 22:16:51 +01:00
#define _GNU_SOURCE // For asprintf
2019-12-29 16:21:42 +01:00
#include <stdbool.h> // For boolean type
#include <stddef.h> // For NULL
2020-01-03 22:16:51 +01:00
#include <stdio.h> // For asprintf
#include <stdlib.h> // For free
2019-12-29 16:21:42 +01:00
#include "swad_action_list.h"
#include "swad_alert.h"
#include "swad_box.h"
#include "swad_center_database.h"
2019-12-29 16:21:42 +01:00
#include "swad_database.h"
#include "swad_department_database.h"
#include "swad_error.h"
2020-05-03 20:58:03 +02:00
#include "swad_figure_cache.h"
2019-12-29 16:21:42 +01:00
#include "swad_form.h"
#include "swad_global.h"
#include "swad_help.h"
2021-02-11 22:57:09 +01:00
#include "swad_hierarchy.h"
2019-12-29 20:11:57 +01:00
#include "swad_hierarchy_config.h"
#include "swad_hierarchy_type.h"
2019-12-29 16:21:42 +01:00
#include "swad_HTML.h"
#include "swad_institution.h"
#include "swad_institution_database.h"
2019-12-29 16:21:42 +01:00
#include "swad_logo.h"
#include "swad_parameter.h"
2020-04-14 17:15:17 +02:00
#include "swad_place.h"
2019-12-29 16:21:42 +01:00
/*****************************************************************************/
/************** External global variables from others modules ****************/
/*****************************************************************************/
extern struct Globals Gbl;
/*****************************************************************************/
/***************************** Private prototypes ****************************/
/*****************************************************************************/
static void InsCfg_Configuration (Vie_ViewType_t ViewType);
2020-04-08 18:18:46 +02:00
static void InsCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args);
2019-12-29 16:21:42 +01:00
static void InsCfg_Map (void);
static void InsCfg_Country (Vie_ViewType_t ViewType,Frm_PutForm_t PutForm);
2019-12-29 16:21:42 +01:00
static void InsCfg_NumUsrs (void);
static void InsCfg_NumDegs (void);
static void InsCfg_NumCrss (void);
static void InsCfg_NumDpts (void);
/*****************************************************************************/
/*************** Show information of the current institution *****************/
/*****************************************************************************/
void InsCfg_ShowConfiguration (void)
{
InsCfg_Configuration (Vie_VIEW);
2019-12-29 16:21:42 +01:00
/***** Show help to enrol me *****/
Hlp_ShowHelpWhatWouldYouLikeToDo ();
}
/*****************************************************************************/
/*************** Print information of the current institution ****************/
/*****************************************************************************/
void InsCfg_PrintConfiguration (void)
{
InsCfg_Configuration (Vie_PRINT);
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/***************** Information of the current institution ********************/
/*****************************************************************************/
static void InsCfg_Configuration (Vie_ViewType_t ViewType)
2019-12-29 16:21:42 +01:00
{
extern const char *Hlp_INSTITUTION_Information;
Hie_PutLink_t PutLink;
Frm_PutForm_t PutFormCty;
Frm_PutForm_t PutFormName;
Frm_PutForm_t PutFormWWW;
2020-01-26 14:10:27 +01:00
unsigned NumCtrs;
unsigned NumCtrsWithMap;
2019-12-29 16:21:42 +01:00
/***** Trivial check *****/
if (Gbl.Hierarchy.Node[Hie_INS].HieCod <= 0) // No institution selected
2019-12-29 16:21:42 +01:00
return;
/***** Initializations *****/
PutLink = (ViewType == Vie_VIEW &&
Gbl.Hierarchy.Node[Hie_INS].WWW[0]) ? Hie_PUT_LINK :
Hie_DONT_PUT_LINK;
2019-12-29 16:21:42 +01:00
PutFormCty =
PutFormName = (ViewType == Vie_VIEW &&
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM) ? Frm_PUT_FORM :
Frm_DONT_PUT_FORM;
PutFormWWW = (ViewType == Vie_VIEW &&
Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM) ? Frm_PUT_FORM :
Frm_DONT_PUT_FORM;
2019-12-29 16:21:42 +01:00
/***** Begin box *****/
Box_BoxBegin (NULL,
ViewType == Vie_VIEW ? InsCfg_PutIconsToPrintAndUpload :
NULL,NULL,
ViewType == Vie_VIEW ? Hlp_INSTITUTION_Information :
NULL,Box_NOT_CLOSABLE);
2019-12-29 16:21:42 +01:00
/***** Title *****/
HieCfg_Title (PutLink,Hie_INS);
2019-12-29 16:21:42 +01:00
/**************************** Left part ***********************************/
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT\"");
2019-12-29 16:21:42 +01:00
/***** Begin table *****/
HTM_TABLE_BeginPadding (2);
2019-12-29 16:21:42 +01:00
/***** Country *****/
InsCfg_Country (ViewType,PutFormCty);
2019-12-29 16:21:42 +01:00
/***** Institution name *****/
HieCfg_Name (PutFormName,Hie_INS,Nam_FULL_NAME);
HieCfg_Name (PutFormName,Hie_INS,Nam_SHRT_NAME);
2019-12-29 16:21:42 +01:00
/***** Institution WWW *****/
HieCfg_WWW (ViewType,PutFormWWW,ActChgInsWWWCfg,Gbl.Hierarchy.Node[Hie_INS].WWW);
2019-12-29 16:21:42 +01:00
/***** Shortcut to the institution *****/
HieCfg_Shortcut (ViewType,ParCod_Ins,Gbl.Hierarchy.Node[Hie_INS].HieCod);
2019-12-29 16:21:42 +01:00
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInIns (Gbl.Hierarchy.Node[Hie_INS].HieCod);
2019-12-29 16:21:42 +01:00
switch (ViewType)
{
case Vie_VIEW:
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
Hie_INS, // ...in institution
Gbl.Hierarchy.Node[Hie_INS].HieCod);
/***** Number of users who claim to belong to this institution,
number of centers,
number of degrees,
number of courses,
number of departments *****/
InsCfg_NumUsrs ();
HieCfg_NumCtrs (NumCtrs,Frm_PUT_FORM);
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
InsCfg_NumDegs ();
InsCfg_NumCrss ();
InsCfg_NumDpts ();
/***** Number of users in courses of this institution *****/
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_TCH);
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_NET);
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_STD);
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_UNK);
break;
case Vie_PRINT:
/***** QR code with link to the institution *****/
HieCfg_QR (ParCod_Ins,Gbl.Hierarchy.Node[Hie_INS].HieCod);
break;
default:
Err_WrongTypeExit ();
break;
}
2019-12-29 16:21:42 +01:00
/***** End table *****/
HTM_TABLE_End ();
2019-12-29 16:21:42 +01:00
/***** End of left part *****/
HTM_DIV_End ();
2019-12-29 16:21:42 +01:00
/**************************** Right part **********************************/
if (NumCtrsWithMap)
{
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT\"");
2019-12-29 16:21:42 +01:00
/***** Institution map *****/
InsCfg_Map ();
2019-12-29 16:21:42 +01:00
HTM_DIV_End ();
}
2019-12-29 16:21:42 +01:00
/***** End box *****/
Box_BoxEnd ();
}
/*****************************************************************************/
/********* Put contextual icons in configuration of an institution ***********/
/*****************************************************************************/
2020-04-08 18:18:46 +02:00
static void InsCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args)
2019-12-29 16:21:42 +01:00
{
2020-04-08 18:18:46 +02:00
/***** Icon to print info about institution *****/
Ico_PutContextualIconToPrint (ActPrnInsInf,NULL,NULL);
2019-12-29 16:21:42 +01:00
2020-04-08 18:18:46 +02:00
if (Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM)
/***** Icon to upload logo of institution *****/
Lgo_PutIconToChangeLogo (Hie_INS);
2019-12-29 16:21:42 +01:00
2020-04-08 18:18:46 +02:00
/***** Put icon to view places *****/
Plc_PutIconToViewPlaces ();
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/*************************** Draw institution map ****************************/
2019-12-29 16:21:42 +01:00
/*****************************************************************************/
2020-01-03 13:21:05 +01:00
#define InsCfg_MAP_CONTAINER_ID "ins_mapid"
2019-12-29 16:21:42 +01:00
static void InsCfg_Map (void)
{
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
2020-01-03 13:21:05 +01:00
MYSQL_RES *mysql_res;
2020-01-03 19:29:29 +01:00
unsigned Zoom;
2020-01-03 13:21:05 +01:00
unsigned NumCtrs;
unsigned NumCtr;
struct Hie_Node Ctr;
struct Map_Coordinates Coord;
struct Map_Coordinates InsAvgCoord;
2020-01-03 13:21:05 +01:00
2019-12-29 16:21:42 +01:00
/***** Leaflet CSS *****/
2020-01-03 13:21:05 +01:00
Map_LeafletCSS ();
2019-12-29 16:21:42 +01:00
/***** Leaflet script *****/
2020-01-03 13:21:05 +01:00
Map_LeafletScript ();
2019-12-29 16:21:42 +01:00
/***** Container for the map *****/
2020-01-03 13:21:05 +01:00
HTM_DIV_Begin ("id=\"%s\"",InsCfg_MAP_CONTAINER_ID);
2019-12-29 16:21:42 +01:00
HTM_DIV_End ();
/***** Script to draw the map *****/
HTM_SCRIPT_Begin (NULL,NULL);
2020-01-03 13:21:05 +01:00
/* Let's create a map with pretty Mapbox Streets tiles */
Ctr_DB_GetAvgCoordAndZoomInCurrentIns (&InsAvgCoord,&Zoom);
2020-01-03 19:29:29 +01:00
Map_CreateMap (InsCfg_MAP_CONTAINER_ID,&InsAvgCoord,Zoom);
2020-01-03 13:21:05 +01:00
/* Add Mapbox Streets tile layer to our map */
Map_AddTileLayer ();
/* Get centers with coordinates */
NumCtrs = Ctr_DB_GetCtrsWithCoordsInCurrentIns (&mysql_res);
2020-01-03 13:21:05 +01:00
/* Add a marker and a popup for each center */
2020-01-03 13:21:05 +01:00
for (NumCtr = 0;
NumCtr < NumCtrs;
NumCtr++)
{
/* Get next center */
Ctr.HieCod = DB_GetNextCode (mysql_res);
2020-01-03 13:21:05 +01:00
/* Get data of center */
Hie_GetDataByCod[Hie_CTR] (&Ctr);
2020-01-03 13:21:05 +01:00
/* Get coordinates of center */
Ctr_GetCoordByCod (Ctr.HieCod,&Coord);
2020-01-03 13:21:05 +01:00
/* Add marker */
Map_AddMarker (&Coord);
2020-01-03 13:21:05 +01:00
/* Add popup */
Map_AddPopup (Ctr.ShrtName,Gbl.Hierarchy.Node[Hie_INS].ShrtName,
2020-01-03 17:15:17 +01:00
false); // Closed
2020-01-03 13:21:05 +01:00
}
/* Free structure that stores the query result */
DB_FreeMySQLResult (&mysql_res);
2019-12-29 16:21:42 +01:00
HTM_SCRIPT_End ();
}
/*****************************************************************************/
/***************** Show country in institution configuration *****************/
/*****************************************************************************/
static void InsCfg_Country (Vie_ViewType_t ViewType,Frm_PutForm_t PutForm)
2019-12-29 16:21:42 +01:00
{
extern const char *Par_CodeStr[Par_NUM_PAR_COD];
extern const char *Txt_HIERARCHY_SINGUL_Abc[Hie_NUM_LEVELS];
2019-12-29 16:21:42 +01:00
unsigned NumCty;
const struct Hie_Node *Cty;
const char *Id[Frm_NUM_PUT_FORM] =
{
[Frm_DONT_PUT_FORM] = NULL,
[Frm_PUT_FORM ] = Par_CodeStr[ParCod_OthCty],
};
2019-12-29 16:21:42 +01:00
/***** Get list of countries *****/
Cty_GetBasicListOfCountries ();
2019-12-29 16:21:42 +01:00
/***** Country *****/
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("Frm_C1 RT",Id[PutForm],Txt_HIERARCHY_SINGUL_Abc[Hie_CTY]);
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT DAT_%s\"",The_GetSuffix ());
switch (PutForm)
{
case Frm_DONT_PUT_FORM: // I can not move institution to another country
if (ViewType == Vie_VIEW)
{
Frm_BeginFormGoTo (ActSeeCtyInf);
ParCod_PutPar (ParCod_Cty,Gbl.Hierarchy.Node[Hie_CTY].HieCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Node[Hie_CTY].FullName),
"class=\"BT_LINK\"");
Str_FreeGoToTitle ();
}
Cty_DrawCountryMap (&Gbl.Hierarchy.Node[Hie_CTY],"COUNTRY_MAP_TINY");
HTM_NBSP ();
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTY].FullName);
if (ViewType == Vie_VIEW)
{
HTM_BUTTON_End ();
Frm_EndForm ();
}
break;
case Frm_PUT_FORM:
/* Put form to select country */
Frm_BeginForm (ActChgInsCtyCfg);
HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE,NULL,
"id=\"OthCtyCod\" name=\"OthCtyCod\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());
for (NumCty = 0;
NumCty < Gbl.Hierarchy.List[Hie_SYS].Num;
NumCty++)
{
Cty = &Gbl.Hierarchy.List[Hie_SYS].Lst[NumCty];
HTM_OPTION (HTM_Type_LONG,&Cty->HieCod,
Cty->HieCod == Gbl.Hierarchy.Node[Hie_CTY].HieCod ? HTM_OPTION_SELECTED :
HTM_OPTION_UNSELECTED,
HTM_OPTION_ENABLED,
"%s",Cty->FullName);
}
HTM_SELECT_End ();
Frm_EndForm ();
break;
}
HTM_TD_End ();
2019-12-29 16:21:42 +01:00
HTM_TR_End ();
// Do not free list of countries here, because it can be reused
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/** Show number of users who claim to belong to instit. in instit. config. ***/
/*****************************************************************************/
static void InsCfg_NumUsrs (void)
{
extern const char *Txt_Users_of_the_institution;
/***** Number of users *****/
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("Frm_C1 RT",NULL,Txt_Users_of_the_institution);
2019-12-29 16:21:42 +01:00
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_%s\"",The_GetSuffix ());
HTM_Unsigned (Hie_GetCachedNumUsrsWhoClaimToBelongTo (Hie_INS,
&Gbl.Hierarchy.Node[Hie_INS]));
HTM_TD_End ();
2019-12-29 16:21:42 +01:00
HTM_TR_End ();
}
/*****************************************************************************/
/*********** Show number of degrees in institution configuration *************/
/*****************************************************************************/
static void InsCfg_NumDegs (void)
{
extern const char *Txt_HIERARCHY_PLURAL_Abc[Hie_NUM_LEVELS];
2019-12-29 16:21:42 +01:00
/***** Number of degrees *****/
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("Frm_C1 RT",NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_DEG]);
2019-12-29 16:21:42 +01:00
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_%s\"",The_GetSuffix ());
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_DEG, // Number of degrees...
Hie_INS, // ...in institution
Gbl.Hierarchy.Node[Hie_INS].HieCod));
HTM_TD_End ();
2019-12-29 16:21:42 +01:00
HTM_TR_End ();
}
/*****************************************************************************/
/************ Show number of courses in institution configuration ************/
/*****************************************************************************/
static void InsCfg_NumCrss (void)
{
extern const char *Txt_HIERARCHY_PLURAL_Abc[Hie_NUM_LEVELS];
2019-12-29 16:21:42 +01:00
/***** Number of courses *****/
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("Frm_C1 RT",NULL,Txt_HIERARCHY_PLURAL_Abc[Hie_CRS]);
2019-12-29 16:21:42 +01:00
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_%s\"",The_GetSuffix ());
HTM_Unsigned (Hie_GetCachedNumNodesInHieLvl (Hie_CRS, // Number of courses...
Hie_INS, // ...in institution
Gbl.Hierarchy.Node[Hie_INS].HieCod));
HTM_TD_End ();
2019-12-29 16:21:42 +01:00
HTM_TR_End ();
}
/*****************************************************************************/
/********** Show number of departments in institution configuration **********/
/*****************************************************************************/
static void InsCfg_NumDpts (void)
{
extern const char *Txt_Departments;
/***** Number of departments *****/
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("Frm_C1 RT",NULL,Txt_Departments);
2019-12-29 16:21:42 +01:00
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_%s\"",The_GetSuffix ());
HTM_Unsigned (Dpt_GetNumDptsInIns (Gbl.Hierarchy.Node[Hie_INS].HieCod));
HTM_TD_End ();
2019-12-29 16:21:42 +01:00
HTM_TR_End ();
}
/*****************************************************************************/
/******** Show a form for sending a logo of the current institution **********/
/*****************************************************************************/
void InsCfg_ReqLogo (void)
2019-12-29 16:21:42 +01:00
{
Lgo_RequestLogo (Hie_INS);
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/************** Receive the logo of the current institution ******************/
/*****************************************************************************/
void InsCfg_ReceiveLogo (void)
{
Lgo_ReceiveLogo (Hie_INS);
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/*************** Remove the logo of the current institution ******************/
/*****************************************************************************/
void InsCfg_RemoveLogo (void)
{
Lgo_RemoveLogo (Hie_INS);
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/******************* Change the country of a institution *********************/
/*****************************************************************************/
void InsCfg_ChangeInsCty (void)
{
extern bool (*Hie_GetDataByCod[Hie_NUM_LEVELS]) (struct Hie_Node *Node);
2019-12-29 16:21:42 +01:00
extern const char *Txt_The_country_of_the_institution_X_has_changed_to_Y;
struct Hie_Node NewCty;
const char *Names[Nam_NUM_SHRT_FULL_NAMES];
2019-12-29 16:21:42 +01:00
/***** Get the new country code for the institution *****/
NewCty.HieCod = ParCod_GetAndCheckPar (ParCod_OthCty);
2019-12-29 16:21:42 +01:00
/***** Check if country has changed *****/
if (NewCty.HieCod != Gbl.Hierarchy.Node[Hie_INS].PrtCod)
2019-12-29 16:21:42 +01:00
{
/***** Get data of the country from database *****/
Hie_GetDataByCod[Hie_CTY] (&NewCty);
2019-12-29 16:21:42 +01:00
/***** Check if it already exists an institution with the same name in the new country *****/
Names[Nam_SHRT_NAME] = Gbl.Hierarchy.Node[Hie_INS].ShrtName;
Names[Nam_FULL_NAME] = Gbl.Hierarchy.Node[Hie_INS].FullName;
if (!Nam_CheckIfNameExists (Ins_DB_CheckIfInsNameExistsInCty,
Names,
-1L,
NewCty.HieCod,
0)) // Unused
2019-12-29 16:21:42 +01:00
{
/***** Update the table changing the country of the institution *****/
Ins_DB_UpdateInsCty (Gbl.Hierarchy.Node[Hie_INS].HieCod,NewCty.HieCod);
Gbl.Hierarchy.Node[Hie_INS].PrtCod =
Gbl.Hierarchy.Node[Hie_CTY].HieCod = NewCty.HieCod;
2019-12-29 16:21:42 +01:00
/***** Initialize again current course, degree, center... *****/
2019-12-29 16:21:42 +01:00
Hie_InitHierarchy ();
/***** Write message to show the change made *****/
Ale_CreateAlert (Ale_SUCCESS,NULL,
Txt_The_country_of_the_institution_X_has_changed_to_Y,
Names[Nam_FULL_NAME],NewCty.FullName);
2019-12-29 16:21:42 +01:00
}
}
}
/*****************************************************************************/
/************ Change the name of an institution in configuration *************/
/*****************************************************************************/
void InsCfg_RenameInsShort (void)
{
/***** Rename institution *****/
Ins_RenameInstitution (&Gbl.Hierarchy.Node[Hie_INS],Nam_SHRT_NAME);
2019-12-29 16:21:42 +01:00
}
void InsCfg_RenameInsFull (void)
{
/***** Rename institution *****/
Ins_RenameInstitution (&Gbl.Hierarchy.Node[Hie_INS],Nam_FULL_NAME);
2019-12-29 16:21:42 +01:00
}
/*****************************************************************************/
/********************** Change the URL of a institution **********************/
/*****************************************************************************/
void InsCfg_ChangeInsWWW (void)
{
extern const char *Txt_The_new_web_address_is_X;
char NewWWW[WWW_MAX_BYTES_WWW + 1];
2019-12-29 16:21:42 +01:00
/***** Get parameters from form *****/
/* Get the new WWW for the institution */
Par_GetParText ("WWW",NewWWW,WWW_MAX_BYTES_WWW);
2019-12-29 16:21:42 +01:00
/***** Check if new WWW is empty *****/
if (NewWWW[0])
{
/***** Update database changing old WWW by new WWW *****/
Ins_DB_UpdateInsWWW (Gbl.Hierarchy.Node[Hie_INS].HieCod,NewWWW);
Str_Copy (Gbl.Hierarchy.Node[Hie_INS].WWW,NewWWW,
sizeof (Gbl.Hierarchy.Node[Hie_INS].WWW) - 1);
2019-12-29 16:21:42 +01:00
/***** Write message to show the change made *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_The_new_web_address_is_X,
NewWWW);
}
else
Ale_ShowAlertYouCanNotLeaveFieldEmpty ();
/***** Show the form again *****/
InsCfg_ShowConfiguration ();
}
/*****************************************************************************/
/*** Show msg. of success after changing an institution in instit. config. ***/
/*****************************************************************************/
void InsCfg_ContEditAfterChgIns (void)
{
/***** Write success / warning message *****/
Ale_ShowAlerts (NULL);
/***** Show the form again *****/
InsCfg_ShowConfiguration ();
}