mirror of https://github.com/acanas/swad-core.git
Version 16.36
This commit is contained in:
parent
df26c24f1f
commit
9c5b4d48e3
|
@ -287,6 +287,7 @@ Centre:
|
|||
172. ActChgCtrInsCfg Request change of the institution of a centre in centre configuration
|
||||
NEW. ActRenCtrShoCfg Change short name centre in centre configuration
|
||||
NEW. ActRenCtrFulCfg Change full name centre in centre configuration
|
||||
NEW. ActChgCtrWWWCfg Change web of centre in centre configuration
|
||||
173. ActReqCtrLog Show form to send the logo of the current centre
|
||||
174. ActRecCtrLog Receive and store the logo of the current centre
|
||||
175. ActRemCtrLog Remove the logo of the current centre
|
||||
|
@ -1639,6 +1640,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
|||
/* ActChgCtrInsCfg */{1589,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,Ctr_ChangeCtrInsInConfig ,Ctr_ContEditAfterChgCtrInConfig,NULL},
|
||||
/* ActRenCtrShoCfg */{1595,-1,TabUnk,ActSeeCtrInf ,0x180,0x180,0x180,Act_CONT_NORM,Act_THIS_WINDOW,Ctr_RenameCentreShortInConfig ,Ctr_ContEditAfterChgCtrInConfig,NULL},
|
||||
/* ActRenCtrFulCfg */{1594,-1,TabUnk,ActSeeCtrInf ,0x180,0x180,0x180,Act_CONT_NORM,Act_THIS_WINDOW,Ctr_RenameCentreFullInConfig ,Ctr_ContEditAfterChgCtrInConfig,NULL},
|
||||
/* ActChgCtrWWWCfg */{1596,-1,TabUnk,ActSeeCtrInf ,0x180,0x180,0x180,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Ctr_ChangeCtrWWWInConfig ,NULL},
|
||||
/* ActReqCtrLog */{1244,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Ctr_RequestLogo ,NULL},
|
||||
/* ActRecCtrLog */{1051,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_DATA,Act_THIS_WINDOW,Ctr_ReceiveLogo ,Ctr_ShowConfiguration ,NULL},
|
||||
/* ActRemCtrLog */{1342,-1,TabUnk,ActSeeCtrInf ,0x100,0x100,0x100,Act_CONT_DATA,Act_THIS_WINDOW,Ctr_RemoveLogo ,Ctr_ShowConfiguration ,NULL},
|
||||
|
@ -4455,6 +4457,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
|
|||
ActChgInsWWWCfg, // #1593
|
||||
ActRenCtrFulCfg, // #1594
|
||||
ActRenCtrShoCfg, // #1595
|
||||
ActChgCtrWWWCfg, // #1596
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
129
swad_action.h
129
swad_action.h
|
@ -55,9 +55,9 @@ typedef enum
|
|||
|
||||
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+14+93+72+67+247+186+155+172+36+30+86)
|
||||
#define Act_NUM_ACTIONS (1+9+51+14+93+73+67+247+186+155+172+36+30+86)
|
||||
|
||||
#define Act_MAX_ACTION_COD 1595
|
||||
#define Act_MAX_ACTION_COD 1596
|
||||
|
||||
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 11
|
||||
|
||||
|
@ -287,71 +287,72 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
|
|||
#define ActChgCtrInsCfg (ActDowShaIns+ 8)
|
||||
#define ActRenCtrShoCfg (ActDowShaIns+ 9)
|
||||
#define ActRenCtrFulCfg (ActDowShaIns+ 10)
|
||||
#define ActReqCtrLog (ActDowShaIns+ 11)
|
||||
#define ActRecCtrLog (ActDowShaIns+ 12)
|
||||
#define ActRemCtrLog (ActDowShaIns+ 13)
|
||||
#define ActReqCtrPho (ActDowShaIns+ 14)
|
||||
#define ActRecCtrPho (ActDowShaIns+ 15)
|
||||
#define ActChgCtrPhoAtt (ActDowShaIns+ 16)
|
||||
#define ActChgCtrWWWCfg (ActDowShaIns+ 11)
|
||||
#define ActReqCtrLog (ActDowShaIns+ 12)
|
||||
#define ActRecCtrLog (ActDowShaIns+ 13)
|
||||
#define ActRemCtrLog (ActDowShaIns+ 14)
|
||||
#define ActReqCtrPho (ActDowShaIns+ 15)
|
||||
#define ActRecCtrPho (ActDowShaIns+ 16)
|
||||
#define ActChgCtrPhoAtt (ActDowShaIns+ 17)
|
||||
|
||||
#define ActEdiDeg (ActDowShaIns+ 17)
|
||||
#define ActReqDeg (ActDowShaIns+ 18)
|
||||
#define ActNewDeg (ActDowShaIns+ 19)
|
||||
#define ActRemDeg (ActDowShaIns+ 20)
|
||||
#define ActRenDegSho (ActDowShaIns+ 21)
|
||||
#define ActRenDegFul (ActDowShaIns+ 22)
|
||||
#define ActChgDegTyp (ActDowShaIns+ 23)
|
||||
#define ActChgDegWWW (ActDowShaIns+ 24)
|
||||
#define ActChgDegSta (ActDowShaIns+ 25)
|
||||
#define ActEdiDeg (ActDowShaIns+ 18)
|
||||
#define ActReqDeg (ActDowShaIns+ 19)
|
||||
#define ActNewDeg (ActDowShaIns+ 20)
|
||||
#define ActRemDeg (ActDowShaIns+ 21)
|
||||
#define ActRenDegSho (ActDowShaIns+ 22)
|
||||
#define ActRenDegFul (ActDowShaIns+ 23)
|
||||
#define ActChgDegTyp (ActDowShaIns+ 24)
|
||||
#define ActChgDegWWW (ActDowShaIns+ 25)
|
||||
#define ActChgDegSta (ActDowShaIns+ 26)
|
||||
|
||||
#define ActChgToSeeDocCtr (ActDowShaIns+ 26)
|
||||
#define ActSeeDocCtr (ActDowShaIns+ 27)
|
||||
#define ActExpSeeDocCtr (ActDowShaIns+ 28)
|
||||
#define ActConSeeDocCtr (ActDowShaIns+ 29)
|
||||
#define ActZIPSeeDocCtr (ActDowShaIns+ 30)
|
||||
#define ActReqDatSeeDocCtr (ActDowShaIns+ 31)
|
||||
#define ActDowSeeDocCtr (ActDowShaIns+ 32)
|
||||
#define ActChgToAdmDocCtr (ActDowShaIns+ 33)
|
||||
#define ActAdmDocCtr (ActDowShaIns+ 34)
|
||||
#define ActReqRemFilDocCtr (ActDowShaIns+ 35)
|
||||
#define ActRemFilDocCtr (ActDowShaIns+ 36)
|
||||
#define ActRemFolDocCtr (ActDowShaIns+ 37)
|
||||
#define ActCopDocCtr (ActDowShaIns+ 38)
|
||||
#define ActPasDocCtr (ActDowShaIns+ 39)
|
||||
#define ActRemTreDocCtr (ActDowShaIns+ 40)
|
||||
#define ActFrmCreDocCtr (ActDowShaIns+ 41)
|
||||
#define ActCreFolDocCtr (ActDowShaIns+ 42)
|
||||
#define ActCreLnkDocCtr (ActDowShaIns+ 43)
|
||||
#define ActRenFolDocCtr (ActDowShaIns+ 44)
|
||||
#define ActRcvFilDocCtrDZ (ActDowShaIns+ 45)
|
||||
#define ActRcvFilDocCtrCla (ActDowShaIns+ 46)
|
||||
#define ActExpAdmDocCtr (ActDowShaIns+ 47)
|
||||
#define ActConAdmDocCtr (ActDowShaIns+ 48)
|
||||
#define ActZIPAdmDocCtr (ActDowShaIns+ 49)
|
||||
#define ActShoDocCtr (ActDowShaIns+ 50)
|
||||
#define ActHidDocCtr (ActDowShaIns+ 51)
|
||||
#define ActReqDatAdmDocCtr (ActDowShaIns+ 52)
|
||||
#define ActChgDatAdmDocCtr (ActDowShaIns+ 53)
|
||||
#define ActDowAdmDocCtr (ActDowShaIns+ 54)
|
||||
#define ActChgToSeeDocCtr (ActDowShaIns+ 27)
|
||||
#define ActSeeDocCtr (ActDowShaIns+ 28)
|
||||
#define ActExpSeeDocCtr (ActDowShaIns+ 29)
|
||||
#define ActConSeeDocCtr (ActDowShaIns+ 30)
|
||||
#define ActZIPSeeDocCtr (ActDowShaIns+ 31)
|
||||
#define ActReqDatSeeDocCtr (ActDowShaIns+ 32)
|
||||
#define ActDowSeeDocCtr (ActDowShaIns+ 33)
|
||||
#define ActChgToAdmDocCtr (ActDowShaIns+ 34)
|
||||
#define ActAdmDocCtr (ActDowShaIns+ 35)
|
||||
#define ActReqRemFilDocCtr (ActDowShaIns+ 36)
|
||||
#define ActRemFilDocCtr (ActDowShaIns+ 37)
|
||||
#define ActRemFolDocCtr (ActDowShaIns+ 38)
|
||||
#define ActCopDocCtr (ActDowShaIns+ 39)
|
||||
#define ActPasDocCtr (ActDowShaIns+ 40)
|
||||
#define ActRemTreDocCtr (ActDowShaIns+ 41)
|
||||
#define ActFrmCreDocCtr (ActDowShaIns+ 42)
|
||||
#define ActCreFolDocCtr (ActDowShaIns+ 43)
|
||||
#define ActCreLnkDocCtr (ActDowShaIns+ 44)
|
||||
#define ActRenFolDocCtr (ActDowShaIns+ 45)
|
||||
#define ActRcvFilDocCtrDZ (ActDowShaIns+ 46)
|
||||
#define ActRcvFilDocCtrCla (ActDowShaIns+ 47)
|
||||
#define ActExpAdmDocCtr (ActDowShaIns+ 48)
|
||||
#define ActConAdmDocCtr (ActDowShaIns+ 49)
|
||||
#define ActZIPAdmDocCtr (ActDowShaIns+ 50)
|
||||
#define ActShoDocCtr (ActDowShaIns+ 51)
|
||||
#define ActHidDocCtr (ActDowShaIns+ 52)
|
||||
#define ActReqDatAdmDocCtr (ActDowShaIns+ 53)
|
||||
#define ActChgDatAdmDocCtr (ActDowShaIns+ 54)
|
||||
#define ActDowAdmDocCtr (ActDowShaIns+ 55)
|
||||
|
||||
#define ActReqRemFilShaCtr (ActDowShaIns+ 55)
|
||||
#define ActRemFilShaCtr (ActDowShaIns+ 56)
|
||||
#define ActRemFolShaCtr (ActDowShaIns+ 57)
|
||||
#define ActCopShaCtr (ActDowShaIns+ 58)
|
||||
#define ActPasShaCtr (ActDowShaIns+ 59)
|
||||
#define ActRemTreShaCtr (ActDowShaIns+ 60)
|
||||
#define ActFrmCreShaCtr (ActDowShaIns+ 61)
|
||||
#define ActCreFolShaCtr (ActDowShaIns+ 62)
|
||||
#define ActCreLnkShaCtr (ActDowShaIns+ 63)
|
||||
#define ActRenFolShaCtr (ActDowShaIns+ 64)
|
||||
#define ActRcvFilShaCtrDZ (ActDowShaIns+ 65)
|
||||
#define ActRcvFilShaCtrCla (ActDowShaIns+ 66)
|
||||
#define ActExpShaCtr (ActDowShaIns+ 67)
|
||||
#define ActConShaCtr (ActDowShaIns+ 68)
|
||||
#define ActZIPShaCtr (ActDowShaIns+ 69)
|
||||
#define ActReqDatShaCtr (ActDowShaIns+ 70)
|
||||
#define ActChgDatShaCtr (ActDowShaIns+ 71)
|
||||
#define ActDowShaCtr (ActDowShaIns+ 72)
|
||||
#define ActReqRemFilShaCtr (ActDowShaIns+ 56)
|
||||
#define ActRemFilShaCtr (ActDowShaIns+ 57)
|
||||
#define ActRemFolShaCtr (ActDowShaIns+ 58)
|
||||
#define ActCopShaCtr (ActDowShaIns+ 59)
|
||||
#define ActPasShaCtr (ActDowShaIns+ 60)
|
||||
#define ActRemTreShaCtr (ActDowShaIns+ 61)
|
||||
#define ActFrmCreShaCtr (ActDowShaIns+ 62)
|
||||
#define ActCreFolShaCtr (ActDowShaIns+ 63)
|
||||
#define ActCreLnkShaCtr (ActDowShaIns+ 64)
|
||||
#define ActRenFolShaCtr (ActDowShaIns+ 65)
|
||||
#define ActRcvFilShaCtrDZ (ActDowShaIns+ 66)
|
||||
#define ActRcvFilShaCtrCla (ActDowShaIns+ 67)
|
||||
#define ActExpShaCtr (ActDowShaIns+ 68)
|
||||
#define ActConShaCtr (ActDowShaIns+ 69)
|
||||
#define ActZIPShaCtr (ActDowShaIns+ 70)
|
||||
#define ActReqDatShaCtr (ActDowShaIns+ 71)
|
||||
#define ActChgDatShaCtr (ActDowShaIns+ 72)
|
||||
#define ActDowShaCtr (ActDowShaIns+ 73)
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************************* Degree tab ********************************/
|
||||
|
|
106
swad_centre.c
106
swad_centre.c
|
@ -94,6 +94,7 @@ static void Ctr_UpdateCtrInsDB (long CtrCod,long InsCod);
|
|||
static void Ctr_GetCtrCodFromForm (void);
|
||||
static void Ctr_RenameCentre (struct Centre *Ctr,Cns_ShortOrFullName_t ShortOrFullName);
|
||||
static bool Ctr_CheckIfCtrNameExistsInIns (const char *FieldName,const char *Name,long CtrCod,long InsCod);
|
||||
static void Ctr_UpdateCtrWWWDB (long CtrCod,const char NewWWW[Cns_MAX_LENGTH_WWW+1]);
|
||||
static void Ctr_PutButtonToGoToCtr (struct Centre *Ctr);
|
||||
|
||||
static void Ctr_PutFormToCreateCentre (void);
|
||||
|
@ -370,7 +371,8 @@ static void Ctr_Configuration (bool PrintView)
|
|||
Txt_Institution);
|
||||
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only system admins can move a centre to another institution
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
// Only system admins can move a centre to another institution
|
||||
{
|
||||
/* Get list of institutions of the current country */
|
||||
Ins_GetListInstitutions (Gbl.CurrentCty.Cty.CtyCod,Ins_GET_BASIC_DATA);
|
||||
|
@ -410,8 +412,10 @@ static void Ctr_Configuration (bool PrintView)
|
|||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Centre);
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Only institution admins and system admins can edit centre full name
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
|
||||
// Only institution admins and system admins can edit centre full name
|
||||
{
|
||||
/* Form to change centre full name */
|
||||
Act_FormStart (ActRenCtrFulCfg);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
|
@ -436,8 +440,10 @@ static void Ctr_Configuration (bool PrintView)
|
|||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Short_name);
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Only institution admins and system admins can edit centre short name
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
|
||||
// Only institution admins and system admins can edit centre short name
|
||||
{
|
||||
/* Form to change centre short name */
|
||||
Act_FormStart (ActRenCtrShoCfg);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
|
@ -454,15 +460,29 @@ static void Ctr_Configuration (bool PrintView)
|
|||
"</tr>");
|
||||
|
||||
/***** Centre WWW *****/
|
||||
if (Gbl.CurrentCtr.Ctr.WWW[0])
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Web);
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
|
||||
// Only institution admins and system admins can change centre WWW
|
||||
{
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
"<td class=\"%s RIGHT_MIDDLE\">"
|
||||
"%s:"
|
||||
"</td>"
|
||||
"<td class=\"DAT LEFT_MIDDLE\">",
|
||||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Web);
|
||||
/* Form to change centre WWW */
|
||||
Act_FormStart (ActChgCtrWWWCfg);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"WWW\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
" class=\"INPUT_WWW\""
|
||||
" onchange=\"document.getElementById('%s').submit();\" />",
|
||||
Cns_MAX_LENGTH_WWW,
|
||||
Gbl.CurrentCtr.Ctr.WWW,
|
||||
Gbl.Form.Id);
|
||||
Act_FormEnd ();
|
||||
}
|
||||
else // I can not change centre WWW
|
||||
fprintf (Gbl.F.Out,"<div class=\"EXTERNAL_WWW\">"
|
||||
"<a href=\"%s\" target=\"_blank\" class=\"DAT\">"
|
||||
"%s"
|
||||
|
@ -470,9 +490,8 @@ static void Ctr_Configuration (bool PrintView)
|
|||
"</div>",
|
||||
Gbl.CurrentCtr.Ctr.WWW,
|
||||
Gbl.CurrentCtr.Ctr.WWW);
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
}
|
||||
fprintf (Gbl.F.Out,"</td>"
|
||||
"</tr>");
|
||||
|
||||
/***** Shortcut to the centre *****/
|
||||
fprintf (Gbl.F.Out,"<tr>"
|
||||
|
@ -1914,7 +1933,6 @@ void Ctr_ChangeCtrWWW (void)
|
|||
extern const char *Txt_The_new_web_address_is_X;
|
||||
extern const char *Txt_You_can_not_leave_the_web_address_empty;
|
||||
struct Centre *Ctr;
|
||||
char Query[256+Cns_MAX_LENGTH_WWW];
|
||||
char NewWWW[Cns_MAX_LENGTH_WWW+1];
|
||||
|
||||
Ctr = &Gbl.Ctrs.EditingCtr;
|
||||
|
@ -1933,30 +1951,66 @@ void Ctr_ChangeCtrWWW (void)
|
|||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
{
|
||||
/* Update the table changing old WWW by new WWW */
|
||||
sprintf (Query,"UPDATE centres SET WWW='%s' WHERE CtrCod='%ld'",
|
||||
NewWWW,Ctr->CtrCod);
|
||||
DB_QueryUPDATE (Query,"can not update the web of a centre");
|
||||
/***** Update database changing old WWW by new WWW *****/
|
||||
Ctr_UpdateCtrWWWDB (Ctr->CtrCod,NewWWW);
|
||||
strcpy (Ctr->WWW,NewWWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_new_web_address_is_X,
|
||||
NewWWW);
|
||||
sprintf (Gbl.Message,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
|
||||
/***** Put button to go to centre changed *****/
|
||||
Ctr_PutButtonToGoToCtr (Ctr);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf (Gbl.Message,"%s",Txt_You_can_not_leave_the_web_address_empty);
|
||||
Lay_ShowAlert (Lay_WARNING,Gbl.Message);
|
||||
}
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
strcpy (Ctr->WWW,NewWWW);
|
||||
Ctr_EditCentres ();
|
||||
}
|
||||
|
||||
void Ctr_ChangeCtrWWWInConfig (void)
|
||||
{
|
||||
extern const char *Txt_The_new_web_address_is_X;
|
||||
extern const char *Txt_You_can_not_leave_the_web_address_empty;
|
||||
char NewWWW[Cns_MAX_LENGTH_WWW+1];
|
||||
|
||||
/***** Get parameters from form *****/
|
||||
/* Get the new WWW for the centre */
|
||||
Par_GetParToText ("WWW",NewWWW,Cns_MAX_LENGTH_WWW);
|
||||
|
||||
/***** Check if new WWW is empty *****/
|
||||
if (NewWWW[0])
|
||||
{
|
||||
/***** Update database changing old WWW by new WWW *****/
|
||||
Ctr_UpdateCtrWWWDB (Gbl.CurrentCtr.Ctr.CtrCod,NewWWW);
|
||||
strcpy (Gbl.CurrentCtr.Ctr.WWW,NewWWW);
|
||||
|
||||
/***** Write message to show the change made *****/
|
||||
sprintf (Gbl.Message,Txt_The_new_web_address_is_X,NewWWW);
|
||||
Lay_ShowAlert (Lay_SUCCESS,Gbl.Message);
|
||||
}
|
||||
else
|
||||
Lay_ShowAlert (Lay_WARNING,Txt_You_can_not_leave_the_web_address_empty);
|
||||
|
||||
/***** Show the form again *****/
|
||||
Ctr_ShowConfiguration ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Update database changing old WWW by new WWW ****************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Ctr_UpdateCtrWWWDB (long CtrCod,const char NewWWW[Cns_MAX_LENGTH_WWW+1])
|
||||
{
|
||||
char Query[256+Cns_MAX_LENGTH_WWW];
|
||||
|
||||
/***** Update database changing old WWW by new WWW *****/
|
||||
sprintf (Query,"UPDATE centres SET WWW='%s' WHERE CtrCod='%ld'",
|
||||
NewWWW,CtrCod);
|
||||
DB_QueryUPDATE (Query,"can not update the web of a centre");
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*********************** Change the status of a centre ***********************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -113,6 +113,7 @@ void Ctr_RenameCentreShortInConfig (void);
|
|||
void Ctr_RenameCentreFull (void);
|
||||
void Ctr_RenameCentreFullInConfig (void);
|
||||
void Ctr_ChangeCtrWWW (void);
|
||||
void Ctr_ChangeCtrWWWInConfig (void);
|
||||
void Ctr_ChangeCtrStatus (void);
|
||||
void Ctr_ContEditAfterChgCtr (void);
|
||||
|
||||
|
|
|
@ -150,13 +150,17 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.35 (2016-10-23)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 16.36 (2016-10-23)"
|
||||
#define CSS_FILE "swad16.32.1.css"
|
||||
#define JS_FILE "swad15.238.1.js"
|
||||
|
||||
// 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
|
||||
/*
|
||||
Version 16.36: Oct 23, 2016 New form in centre configuration to change WWW. (205311 lines)
|
||||
1 change necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1596','es','N','Cambiar web de centro');
|
||||
|
||||
Version 16.35: Oct 23, 2016 New form in centre configuration to change short name. (205248 lines)
|
||||
1 change necessary in database:
|
||||
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1595','es','N','Cambiar nombre breve centro');
|
||||
|
|
|
@ -216,7 +216,8 @@ static void Crs_Configuration (bool PrintView)
|
|||
|
||||
/* Get list of degrees administrated by me */
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_CTR_ADM) // Only centre admins, institution admins and system admin can move a course to another degree
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_CTR_ADM)
|
||||
// Only centre admins, institution admins and system admin can move a course to another degree
|
||||
{
|
||||
/* Get list of degrees of the current centre */
|
||||
Deg_GetListDegsOfCurrentCtr ();
|
||||
|
|
|
@ -334,7 +334,8 @@ static void Deg_Configuration (bool PrintView)
|
|||
Txt_Centre);
|
||||
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM) // Only institution admins and system admin can move a degree to another centre
|
||||
Gbl.Usrs.Me.LoggedRole >= Rol_INS_ADM)
|
||||
// Only institution admins and system admin can move a degree to another centre
|
||||
{
|
||||
/* Get list of centres of the current institution */
|
||||
Ctr_GetListCentres (Gbl.CurrentIns.Ins.InsCod);
|
||||
|
|
|
@ -318,7 +318,8 @@ static void Ins_Configuration (bool PrintView)
|
|||
Txt_Country);
|
||||
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only system admins can move an institution to another country
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
// Only system admins can move an institution to another country
|
||||
{
|
||||
/* Get list of countries */
|
||||
Cty_GetListCountries (Cty_GET_BASIC_DATA);
|
||||
|
@ -358,8 +359,10 @@ static void Ins_Configuration (bool PrintView)
|
|||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Institution);
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only system admins can edit institution full name
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
// Only system admins can edit institution full name
|
||||
{
|
||||
/* Form to change institution full name */
|
||||
Act_FormStart (ActRenInsFulCfg);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"FullName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
|
@ -384,8 +387,10 @@ static void Ins_Configuration (bool PrintView)
|
|||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Short_name);
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only system admins can edit institution short name
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
// Only system admins can edit institution short name
|
||||
{
|
||||
/* Form to change institution short name */
|
||||
Act_FormStart (ActRenInsShoCfg);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
|
@ -410,8 +415,10 @@ static void Ins_Configuration (bool PrintView)
|
|||
The_ClassForm[Gbl.Prefs.Theme],
|
||||
Txt_Web);
|
||||
if (!PrintView &&
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only system admins can change institution WWW
|
||||
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM)
|
||||
// Only system admins can change institution WWW
|
||||
{
|
||||
/* Form to change institution WWW */
|
||||
Act_FormStart (ActChgInsWWWCfg);
|
||||
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"WWW\""
|
||||
" maxlength=\"%u\" value=\"%s\""
|
||||
|
|
Loading…
Reference in New Issue