mirror of
https://github.com/acanas/swad-core.git
synced 2024-06-13 20:24:06 +02:00
Version 16.30
This commit is contained in:
parent
f976cb7278
commit
0484b6b9dc
|
@ -163,7 +163,6 @@ Country:
|
||||||
68. ActReqIns Request the creation of a request for a new institution (a teacher makes the petition to an administrator)
|
68. ActReqIns Request the creation of a request for a new institution (a teacher makes the petition to an administrator)
|
||||||
69. ActNewIns Request the creation of an institution
|
69. ActNewIns Request the creation of an institution
|
||||||
70. ActRemIns Remove institution
|
70. ActRemIns Remove institution
|
||||||
71. ActChgInsCty Change country of institution
|
|
||||||
72. ActRenInsSho Change short name of institution
|
72. ActRenInsSho Change short name of institution
|
||||||
73. ActRenInsFul Change full name of institution
|
73. ActRenInsFul Change full name of institution
|
||||||
74. ActChgInsWWW Change web of institution
|
74. ActChgInsWWW Change web of institution
|
||||||
|
@ -1507,7 +1506,6 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||||
/* ActReqIns */{1210,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RecFormReqIns ,NULL},
|
/* ActReqIns */{1210,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RecFormReqIns ,NULL},
|
||||||
/* ActNewIns */{ 698,-1,TabCty,ActSeeIns ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RecFormNewIns ,NULL},
|
/* ActNewIns */{ 698,-1,TabCty,ActSeeIns ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RecFormNewIns ,NULL},
|
||||||
/* ActRemIns */{ 759,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RemoveInstitution ,NULL},
|
/* ActRemIns */{ 759,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_RemoveInstitution ,NULL},
|
||||||
/* ActChgInsCty */{ 865,-1,TabCty,ActSeeIns ,0x100,0x100,0x100,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_ChangeInsCty ,NULL},
|
|
||||||
/* ActRenInsSho */{ 702,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Ins_RenameInsShort ,Ins_ContEditAfterChgIns ,NULL},
|
/* ActRenInsSho */{ 702,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Ins_RenameInsShort ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActRenInsFul */{ 701,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Ins_RenameInsFull ,Ins_ContEditAfterChgIns ,NULL},
|
/* ActRenInsFul */{ 701,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,Ins_RenameInsFull ,Ins_ContEditAfterChgIns ,NULL},
|
||||||
/* ActChgInsWWW */{ 700,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_ChangeInsWWW ,NULL},
|
/* ActChgInsWWW */{ 700,-1,TabCty,ActSeeIns ,0x1FE,0x1FE,0x1FE,Act_CONTENT_NORM,Act_MAIN_WINDOW,NULL ,Ins_ChangeInsWWW ,NULL},
|
||||||
|
@ -3715,7 +3713,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
|
||||||
ActSeeCty, // #862
|
ActSeeCty, // #862
|
||||||
ActEdiCty, // #863
|
ActEdiCty, // #863
|
||||||
ActNewCty, // #864
|
ActNewCty, // #864
|
||||||
ActChgInsCty, // #865
|
-1, // #865 (obsolete action)
|
||||||
ActRenCty, // #866
|
ActRenCty, // #866
|
||||||
ActReqDelThrCrsUsr, // #867
|
ActReqDelThrCrsUsr, // #867
|
||||||
ActDelThrForCrsUsr, // #868
|
ActDelThrForCrsUsr, // #868
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef enum
|
||||||
|
|
||||||
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
typedef int Act_Action_t; // Must be a signed type, because -1 is used to indicate obsolete action
|
||||||
|
|
||||||
#define Act_NUM_ACTIONS (1+9+51+15+90+70+67+247+186+155+172+36+30+86)
|
#define Act_NUM_ACTIONS (1+9+51+14+90+70+67+247+186+155+172+36+30+86)
|
||||||
|
|
||||||
#define Act_MAX_ACTION_COD 1590
|
#define Act_MAX_ACTION_COD 1590
|
||||||
|
|
||||||
|
@ -160,11 +160,10 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
|
||||||
#define ActReqIns (ActChgPlgIP+ 8)
|
#define ActReqIns (ActChgPlgIP+ 8)
|
||||||
#define ActNewIns (ActChgPlgIP+ 9)
|
#define ActNewIns (ActChgPlgIP+ 9)
|
||||||
#define ActRemIns (ActChgPlgIP+ 10)
|
#define ActRemIns (ActChgPlgIP+ 10)
|
||||||
#define ActChgInsCty (ActChgPlgIP+ 11)
|
#define ActRenInsSho (ActChgPlgIP+ 11)
|
||||||
#define ActRenInsSho (ActChgPlgIP+ 12)
|
#define ActRenInsFul (ActChgPlgIP+ 12)
|
||||||
#define ActRenInsFul (ActChgPlgIP+ 13)
|
#define ActChgInsWWW (ActChgPlgIP+ 13)
|
||||||
#define ActChgInsWWW (ActChgPlgIP+ 14)
|
#define ActChgInsSta (ActChgPlgIP+ 14)
|
||||||
#define ActChgInsSta (ActChgPlgIP+ 15)
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Institution tab ******************************/
|
/****************************** Institution tab ******************************/
|
||||||
|
|
|
@ -150,13 +150,17 @@
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Log_PLATFORM_VERSION "SWAD 16.29 (2016-10-20)"
|
#define Log_PLATFORM_VERSION "SWAD 16.30 (2016-10-20)"
|
||||||
#define CSS_FILE "swad16.25.css"
|
#define CSS_FILE "swad16.25.css"
|
||||||
#define JS_FILE "swad15.238.1.js"
|
#define JS_FILE "swad15.238.1.js"
|
||||||
|
|
||||||
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
// Number of lines (includes comments but not blank lines) has been got with the following command:
|
||||||
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
// nl swad*.c swad*.h css/swad*.css py/swad*.py js/swad*.js soap/swad*.h sql/swad*.sql | tail -1
|
||||||
/*
|
/*
|
||||||
|
Version 16.30: Oct 20, 2016 Removed country in edition of institutions. (? lines)
|
||||||
|
1 change necessary in database:
|
||||||
|
UPDATE actions SET Obsolete='Y' WHERE ActCod='865';
|
||||||
|
|
||||||
Version 16.29: Oct 20, 2016 Removed institution in edition of centres. (205159 lines)
|
Version 16.29: Oct 20, 2016 Removed institution in edition of centres. (205159 lines)
|
||||||
1 change necessary in database:
|
1 change necessary in database:
|
||||||
UPDATE actions SET Obsolete='Y' WHERE ActCod='720';
|
UPDATE actions SET Obsolete='Y' WHERE ActCod='720';
|
||||||
|
|
|
@ -1202,11 +1202,9 @@ void Ins_WriteSelectorOfInstitution (void)
|
||||||
static void Ins_ListInstitutionsForEdition (void)
|
static void Ins_ListInstitutionsForEdition (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Institutions_of_COUNTRY_X;
|
extern const char *Txt_Institutions_of_COUNTRY_X;
|
||||||
extern const char *Txt_Another_country;
|
|
||||||
extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT];
|
extern const char *Txt_INSTITUTION_STATUS[Ins_NUM_STATUS_TXT];
|
||||||
unsigned NumIns;
|
unsigned NumIns;
|
||||||
struct Institution *Ins;
|
struct Institution *Ins;
|
||||||
unsigned NumCty;
|
|
||||||
char WWW[Ins_MAX_LENGTH_WWW_ON_SCREEN+1];
|
char WWW[Ins_MAX_LENGTH_WWW_ON_SCREEN+1];
|
||||||
struct UsrData UsrDat;
|
struct UsrData UsrDat;
|
||||||
bool ICanEdit;
|
bool ICanEdit;
|
||||||
|
@ -1260,36 +1258,6 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
Log_DrawLogo (Sco_SCOPE_INS,Ins->InsCod,Ins->ShortName,20,NULL,true);
|
Log_DrawLogo (Sco_SCOPE_INS,Ins->InsCod,Ins->ShortName,20,NULL,true);
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/* Country */
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
|
||||||
if (Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
|
||||||
{
|
|
||||||
Act_FormStart (ActChgInsCty);
|
|
||||||
Ins_PutParamOtherInsCod (Ins->InsCod);
|
|
||||||
fprintf (Gbl.F.Out,"<select name=\"OthCtyCod\" style=\"width:40px;\""
|
|
||||||
" onchange=\"document.getElementById('%s').submit();\" />"
|
|
||||||
"<option value=\"0\"",
|
|
||||||
Gbl.Form.Id);
|
|
||||||
if (Ins->CtyCod == 0)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",Txt_Another_country);
|
|
||||||
for (NumCty = 0;
|
|
||||||
NumCty < Gbl.Ctys.Num;
|
|
||||||
NumCty++)
|
|
||||||
{
|
|
||||||
fprintf (Gbl.F.Out,"<option value=\"%ld\"",Gbl.Ctys.Lst[NumCty].CtyCod);
|
|
||||||
if (Ins->CtyCod == Gbl.Ctys.Lst[NumCty].CtyCod)
|
|
||||||
fprintf (Gbl.F.Out," selected=\"selected\"");
|
|
||||||
fprintf (Gbl.F.Out,">%s</option>",
|
|
||||||
Gbl.Ctys.Lst[NumCty].Name[Gbl.Prefs.Language]);
|
|
||||||
}
|
|
||||||
fprintf (Gbl.F.Out,"</select>");
|
|
||||||
Act_FormEnd ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
fprintf (Gbl.F.Out,"%s",Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]);
|
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
|
||||||
|
|
||||||
/* Institution short name */
|
/* Institution short name */
|
||||||
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
fprintf (Gbl.F.Out,"<td class=\"DAT LEFT_MIDDLE\">");
|
||||||
if (ICanEdit)
|
if (ICanEdit)
|
||||||
|
@ -1756,70 +1724,6 @@ void Ins_ContEditAfterChgInsInConfig (void)
|
||||||
Ins_ShowConfiguration ();
|
Ins_ShowConfiguration ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************* Change the country of a institution *********************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
void Ins_ChangeInsCty (void)
|
|
||||||
{
|
|
||||||
extern const char *Txt_The_institution_X_already_exists;
|
|
||||||
extern const char *Txt_The_country_of_the_institution_X_has_changed_to_Y;
|
|
||||||
struct Institution *Ins;
|
|
||||||
struct Country NewCty;
|
|
||||||
|
|
||||||
Ins = &Gbl.Inss.EditingIns;
|
|
||||||
|
|
||||||
/***** Get parameters from form *****/
|
|
||||||
/* Get the code of the institution */
|
|
||||||
if ((Ins->InsCod = Ins_GetParamOtherInsCod ()) < 0)
|
|
||||||
Lay_ShowErrorAndExit ("Code of institution is missing.");
|
|
||||||
|
|
||||||
/* Get the new country code for the institution */
|
|
||||||
if ((NewCty.CtyCod = Cty_GetParamOtherCtyCod ()) < 0)
|
|
||||||
Lay_ShowErrorAndExit ("Code of country is missing.");
|
|
||||||
|
|
||||||
/***** Get data of the institution from database *****/
|
|
||||||
Ins_GetDataOfInstitutionByCod (Ins,Ins_GET_BASIC_DATA);
|
|
||||||
|
|
||||||
/***** Get data of the country from database *****/
|
|
||||||
Cty_GetDataOfCountryByCod (&NewCty,Cty_GET_BASIC_DATA);
|
|
||||||
|
|
||||||
/***** Check if country has changed *****/
|
|
||||||
if (NewCty.CtyCod != Ins->CtyCod)
|
|
||||||
{
|
|
||||||
/***** Check if it already exists an institution with the same name in the new country *****/
|
|
||||||
if (Ins_CheckIfInsNameExistsInCty ("ShortName",Ins->ShortName,-1L,NewCty.CtyCod))
|
|
||||||
{
|
|
||||||
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
|
||||||
Ins->ShortName);
|
|
||||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
|
||||||
}
|
|
||||||
else if (Ins_CheckIfInsNameExistsInCty ("FullName",Ins->FullName,-1L,NewCty.CtyCod))
|
|
||||||
{
|
|
||||||
sprintf (Gbl.Message,Txt_The_institution_X_already_exists,
|
|
||||||
Ins->FullName);
|
|
||||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/***** Update the table changing the country of the institution *****/
|
|
||||||
Ins_UpdateInsCtyDB (Ins->InsCod,NewCty.CtyCod);
|
|
||||||
Ins->CtyCod = NewCty.CtyCod;
|
|
||||||
|
|
||||||
/***** Write message to show the change made *****/
|
|
||||||
sprintf (Gbl.Message,Txt_The_country_of_the_institution_X_has_changed_to_Y,
|
|
||||||
Ins->FullName,NewCty.Name[Gbl.Prefs.Language]);
|
|
||||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
|
||||||
|
|
||||||
/***** Put button to go to institution changed *****/
|
|
||||||
Ins_PutButtonToGoToIns (Ins);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/***** Show the form again *****/
|
|
||||||
Ins_EditInstitutions ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************** Update country in table of institutions ******************/
|
/****************** Update country in table of institutions ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -2045,18 +1949,6 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
Log_DrawLogo (Sco_SCOPE_INS,-1L,"",20,NULL,true);
|
Log_DrawLogo (Sco_SCOPE_INS,-1L,"",20,NULL,true);
|
||||||
fprintf (Gbl.F.Out,"</td>");
|
fprintf (Gbl.F.Out,"</td>");
|
||||||
|
|
||||||
/***** Country *****/
|
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
|
||||||
"<select name=\"OthCtyCod\""
|
|
||||||
" style=\"width:40px;\" disabled=\"disabled\">"
|
|
||||||
"<option value=\"%ld\" selected=\"selected\">"
|
|
||||||
"%s"
|
|
||||||
"</option>"
|
|
||||||
"</select>"
|
|
||||||
"</td>",
|
|
||||||
Gbl.CurrentCty.Cty.CtyCod,
|
|
||||||
Gbl.CurrentCty.Cty.Name[Gbl.Prefs.Language]);
|
|
||||||
|
|
||||||
/***** Institution short name *****/
|
/***** Institution short name *****/
|
||||||
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
fprintf (Gbl.F.Out,"<td class=\"LEFT_MIDDLE\">"
|
||||||
"<input type=\"text\" name=\"ShortName\""
|
"<input type=\"text\" name=\"ShortName\""
|
||||||
|
@ -2126,7 +2018,6 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
static void Ins_PutHeadInstitutionsForEdition (void)
|
static void Ins_PutHeadInstitutionsForEdition (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Code;
|
extern const char *Txt_Code;
|
||||||
extern const char *Txt_Country;
|
|
||||||
extern const char *Txt_Short_name_of_the_institution;
|
extern const char *Txt_Short_name_of_the_institution;
|
||||||
extern const char *Txt_Full_name_of_the_institution;
|
extern const char *Txt_Full_name_of_the_institution;
|
||||||
extern const char *Txt_WWW;
|
extern const char *Txt_WWW;
|
||||||
|
@ -2152,9 +2043,6 @@ static void Ins_PutHeadInstitutionsForEdition (void)
|
||||||
"<th class=\"LEFT_MIDDLE\">"
|
"<th class=\"LEFT_MIDDLE\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
"<th class=\"LEFT_MIDDLE\">"
|
|
||||||
"%s"
|
|
||||||
"</th>"
|
|
||||||
"<th class=\"RIGHT_MIDDLE\">"
|
"<th class=\"RIGHT_MIDDLE\">"
|
||||||
"%s"
|
"%s"
|
||||||
"</th>"
|
"</th>"
|
||||||
|
@ -2172,7 +2060,6 @@ static void Ins_PutHeadInstitutionsForEdition (void)
|
||||||
"</th>"
|
"</th>"
|
||||||
"</tr>",
|
"</tr>",
|
||||||
Txt_Code,
|
Txt_Code,
|
||||||
Txt_Country,
|
|
||||||
Txt_Short_name_of_the_institution,
|
Txt_Short_name_of_the_institution,
|
||||||
Txt_Full_name_of_the_institution,
|
Txt_Full_name_of_the_institution,
|
||||||
Txt_WWW,
|
Txt_WWW,
|
||||||
|
|
|
@ -114,7 +114,6 @@ void Ins_RenameInsShort (void);
|
||||||
void Ins_RenameInsFull (void);
|
void Ins_RenameInsFull (void);
|
||||||
void Ins_ChangeInsCtyInConfig (void);
|
void Ins_ChangeInsCtyInConfig (void);
|
||||||
void Ins_ContEditAfterChgInsInConfig (void);
|
void Ins_ContEditAfterChgInsInConfig (void);
|
||||||
void Ins_ChangeInsCty (void);
|
|
||||||
void Ins_ChangeInsWWW (void);
|
void Ins_ChangeInsWWW (void);
|
||||||
void Ins_ChangeInsStatus (void);
|
void Ins_ChangeInsStatus (void);
|
||||||
void Ins_ContEditAfterChgIns (void);
|
void Ins_ContEditAfterChgIns (void);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user