Version 16.32

This commit is contained in:
Antonio Cañas Vargas 2016-10-22 18:24:57 +02:00
parent b8ebabe407
commit 51cf7b51b6
5 changed files with 119 additions and 91 deletions

View File

@ -182,6 +182,7 @@ Institution:
84. ActPrnInsInf Print information on the current institution
85. ActChgInsCtyCfg Change country of institution in institution configuration
NEW. ActRenInsShoCfg Change short name of institution in institution configuration
NEW. ActRenInsFulCfg Change full name of institution in institution configuration
86. ActReqInsLog Show form to send the logo of the current institution
87. ActRecInsLog Receive and store the logo of the current institution
@ -1527,6 +1528,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActPrnInsInf */{1154,-1,TabUnk,ActSeeInsInf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Ins_PrintConfiguration ,NULL},
/* ActChgInsCtyCfg */{1590,-1,TabUnk,ActSeeInsInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,Ins_ChangeInsCtyInConfig ,Ins_ContEditAfterChgInsInConfig,NULL},
/* ActRenInsShoCfg */{1592,-1,TabUnk,ActSeeInsInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,Ins_RenameInsShortInConfig ,Ins_ContEditAfterChgInsInConfig,NULL},
/* ActRenInsFulCfg */{1591,-1,TabUnk,ActSeeInsInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,Ins_RenameInsFullInConfig ,Ins_ContEditAfterChgInsInConfig,NULL},
/* ActReqInsLog */{1245,-1,TabUnk,ActSeeInsInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Ins_RequestLogo ,NULL},
/* ActRecInsLog */{ 699,-1,TabUnk,ActSeeInsInf ,0x100,0x100,0x100,Act_CONT_DATA,Act_THIS_WINDOW,Ins_ReceiveLogo ,Ins_ShowConfiguration ,NULL},
@ -4443,6 +4445,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
ActChgCtrInsCfg, // #1589
ActChgInsCtyCfg, // #1590
ActRenInsFulCfg, // #1591
ActRenInsShoCfg, // #1592
};
/*****************************************************************************/

View File

@ -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+91+70+67+247+186+155+172+36+30+86)
#define Act_NUM_ACTIONS (1+9+51+14+92+70+67+247+186+155+172+36+30+86)
#define Act_MAX_ACTION_COD 1591
#define Act_MAX_ACTION_COD 1592
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 20
@ -182,92 +182,93 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
#define ActInsSch (ActChgInsSta+ 9)
#define ActPrnInsInf (ActChgInsSta+ 10)
#define ActChgInsCtyCfg (ActChgInsSta+ 11)
#define ActRenInsFulCfg (ActChgInsSta+ 12)
#define ActReqInsLog (ActChgInsSta+ 13)
#define ActRecInsLog (ActChgInsSta+ 14)
#define ActRemInsLog (ActChgInsSta+ 15)
#define ActRenInsShoCfg (ActChgInsSta+ 12)
#define ActRenInsFulCfg (ActChgInsSta+ 13)
#define ActReqInsLog (ActChgInsSta+ 14)
#define ActRecInsLog (ActChgInsSta+ 15)
#define ActRemInsLog (ActChgInsSta+ 16)
#define ActEdiCtr (ActChgInsSta+ 16)
#define ActReqCtr (ActChgInsSta+ 17)
#define ActNewCtr (ActChgInsSta+ 18)
#define ActRemCtr (ActChgInsSta+ 19)
#define ActChgCtrPlc (ActChgInsSta+ 20)
#define ActRenCtrSho (ActChgInsSta+ 21)
#define ActRenCtrFul (ActChgInsSta+ 22)
#define ActChgCtrWWW (ActChgInsSta+ 23)
#define ActChgCtrSta (ActChgInsSta+ 24)
#define ActEdiCtr (ActChgInsSta+ 17)
#define ActReqCtr (ActChgInsSta+ 18)
#define ActNewCtr (ActChgInsSta+ 19)
#define ActRemCtr (ActChgInsSta+ 20)
#define ActChgCtrPlc (ActChgInsSta+ 21)
#define ActRenCtrSho (ActChgInsSta+ 22)
#define ActRenCtrFul (ActChgInsSta+ 23)
#define ActChgCtrWWW (ActChgInsSta+ 24)
#define ActChgCtrSta (ActChgInsSta+ 25)
#define ActEdiDpt (ActChgInsSta+ 25)
#define ActNewDpt (ActChgInsSta+ 26)
#define ActRemDpt (ActChgInsSta+ 27)
#define ActChgDptIns (ActChgInsSta+ 28)
#define ActRenDptSho (ActChgInsSta+ 29)
#define ActRenDptFul (ActChgInsSta+ 30)
#define ActChgDptWWW (ActChgInsSta+ 31)
#define ActEdiDpt (ActChgInsSta+ 26)
#define ActNewDpt (ActChgInsSta+ 27)
#define ActRemDpt (ActChgInsSta+ 28)
#define ActChgDptIns (ActChgInsSta+ 29)
#define ActRenDptSho (ActChgInsSta+ 30)
#define ActRenDptFul (ActChgInsSta+ 31)
#define ActChgDptWWW (ActChgInsSta+ 32)
#define ActEdiPlc (ActChgInsSta+ 32)
#define ActNewPlc (ActChgInsSta+ 33)
#define ActRemPlc (ActChgInsSta+ 34)
#define ActRenPlcSho (ActChgInsSta+ 35)
#define ActRenPlcFul (ActChgInsSta+ 36)
#define ActEdiPlc (ActChgInsSta+ 33)
#define ActNewPlc (ActChgInsSta+ 34)
#define ActRemPlc (ActChgInsSta+ 35)
#define ActRenPlcSho (ActChgInsSta+ 36)
#define ActRenPlcFul (ActChgInsSta+ 37)
#define ActEdiHld (ActChgInsSta+ 37)
#define ActNewHld (ActChgInsSta+ 38)
#define ActRemHld (ActChgInsSta+ 39)
#define ActChgHldPlc (ActChgInsSta+ 40)
#define ActChgHldTyp (ActChgInsSta+ 41)
#define ActChgHldStrDat (ActChgInsSta+ 42)
#define ActChgHldEndDat (ActChgInsSta+ 43)
#define ActRenHld (ActChgInsSta+ 44)
#define ActEdiHld (ActChgInsSta+ 38)
#define ActNewHld (ActChgInsSta+ 39)
#define ActRemHld (ActChgInsSta+ 40)
#define ActChgHldPlc (ActChgInsSta+ 41)
#define ActChgHldTyp (ActChgInsSta+ 42)
#define ActChgHldStrDat (ActChgInsSta+ 43)
#define ActChgHldEndDat (ActChgInsSta+ 44)
#define ActRenHld (ActChgInsSta+ 45)
#define ActChgToSeeDocIns (ActChgInsSta+ 45)
#define ActSeeDocIns (ActChgInsSta+ 46)
#define ActExpSeeDocIns (ActChgInsSta+ 47)
#define ActConSeeDocIns (ActChgInsSta+ 48)
#define ActZIPSeeDocIns (ActChgInsSta+ 49)
#define ActReqDatSeeDocIns (ActChgInsSta+ 50)
#define ActDowSeeDocIns (ActChgInsSta+ 51)
#define ActChgToAdmDocIns (ActChgInsSta+ 52)
#define ActAdmDocIns (ActChgInsSta+ 53)
#define ActReqRemFilDocIns (ActChgInsSta+ 54)
#define ActRemFilDocIns (ActChgInsSta+ 55)
#define ActRemFolDocIns (ActChgInsSta+ 56)
#define ActCopDocIns (ActChgInsSta+ 57)
#define ActPasDocIns (ActChgInsSta+ 58)
#define ActRemTreDocIns (ActChgInsSta+ 59)
#define ActFrmCreDocIns (ActChgInsSta+ 60)
#define ActCreFolDocIns (ActChgInsSta+ 61)
#define ActCreLnkDocIns (ActChgInsSta+ 62)
#define ActRenFolDocIns (ActChgInsSta+ 63)
#define ActRcvFilDocInsDZ (ActChgInsSta+ 64)
#define ActRcvFilDocInsCla (ActChgInsSta+ 65)
#define ActExpAdmDocIns (ActChgInsSta+ 66)
#define ActConAdmDocIns (ActChgInsSta+ 67)
#define ActZIPAdmDocIns (ActChgInsSta+ 68)
#define ActShoDocIns (ActChgInsSta+ 69)
#define ActHidDocIns (ActChgInsSta+ 70)
#define ActReqDatAdmDocIns (ActChgInsSta+ 71)
#define ActChgDatAdmDocIns (ActChgInsSta+ 72)
#define ActDowAdmDocIns (ActChgInsSta+ 73)
#define ActChgToSeeDocIns (ActChgInsSta+ 46)
#define ActSeeDocIns (ActChgInsSta+ 47)
#define ActExpSeeDocIns (ActChgInsSta+ 48)
#define ActConSeeDocIns (ActChgInsSta+ 49)
#define ActZIPSeeDocIns (ActChgInsSta+ 50)
#define ActReqDatSeeDocIns (ActChgInsSta+ 51)
#define ActDowSeeDocIns (ActChgInsSta+ 52)
#define ActChgToAdmDocIns (ActChgInsSta+ 53)
#define ActAdmDocIns (ActChgInsSta+ 54)
#define ActReqRemFilDocIns (ActChgInsSta+ 55)
#define ActRemFilDocIns (ActChgInsSta+ 56)
#define ActRemFolDocIns (ActChgInsSta+ 57)
#define ActCopDocIns (ActChgInsSta+ 58)
#define ActPasDocIns (ActChgInsSta+ 59)
#define ActRemTreDocIns (ActChgInsSta+ 60)
#define ActFrmCreDocIns (ActChgInsSta+ 61)
#define ActCreFolDocIns (ActChgInsSta+ 62)
#define ActCreLnkDocIns (ActChgInsSta+ 63)
#define ActRenFolDocIns (ActChgInsSta+ 64)
#define ActRcvFilDocInsDZ (ActChgInsSta+ 65)
#define ActRcvFilDocInsCla (ActChgInsSta+ 66)
#define ActExpAdmDocIns (ActChgInsSta+ 67)
#define ActConAdmDocIns (ActChgInsSta+ 68)
#define ActZIPAdmDocIns (ActChgInsSta+ 69)
#define ActShoDocIns (ActChgInsSta+ 70)
#define ActHidDocIns (ActChgInsSta+ 71)
#define ActReqDatAdmDocIns (ActChgInsSta+ 72)
#define ActChgDatAdmDocIns (ActChgInsSta+ 73)
#define ActDowAdmDocIns (ActChgInsSta+ 74)
#define ActReqRemFilShaIns (ActChgInsSta+ 74)
#define ActRemFilShaIns (ActChgInsSta+ 75)
#define ActRemFolShaIns (ActChgInsSta+ 76)
#define ActCopShaIns (ActChgInsSta+ 77)
#define ActPasShaIns (ActChgInsSta+ 78)
#define ActRemTreShaIns (ActChgInsSta+ 79)
#define ActFrmCreShaIns (ActChgInsSta+ 80)
#define ActCreFolShaIns (ActChgInsSta+ 81)
#define ActCreLnkShaIns (ActChgInsSta+ 82)
#define ActRenFolShaIns (ActChgInsSta+ 83)
#define ActRcvFilShaInsDZ (ActChgInsSta+ 84)
#define ActRcvFilShaInsCla (ActChgInsSta+ 85)
#define ActExpShaIns (ActChgInsSta+ 86)
#define ActConShaIns (ActChgInsSta+ 87)
#define ActZIPShaIns (ActChgInsSta+ 88)
#define ActReqDatShaIns (ActChgInsSta+ 89)
#define ActChgDatShaIns (ActChgInsSta+ 90)
#define ActDowShaIns (ActChgInsSta+ 91)
#define ActReqRemFilShaIns (ActChgInsSta+ 75)
#define ActRemFilShaIns (ActChgInsSta+ 76)
#define ActRemFolShaIns (ActChgInsSta+ 77)
#define ActCopShaIns (ActChgInsSta+ 78)
#define ActPasShaIns (ActChgInsSta+ 79)
#define ActRemTreShaIns (ActChgInsSta+ 80)
#define ActFrmCreShaIns (ActChgInsSta+ 81)
#define ActCreFolShaIns (ActChgInsSta+ 82)
#define ActCreLnkShaIns (ActChgInsSta+ 83)
#define ActRenFolShaIns (ActChgInsSta+ 84)
#define ActRcvFilShaInsDZ (ActChgInsSta+ 85)
#define ActRcvFilShaInsCla (ActChgInsSta+ 86)
#define ActExpShaIns (ActChgInsSta+ 87)
#define ActConShaIns (ActChgInsSta+ 88)
#define ActZIPShaIns (ActChgInsSta+ 89)
#define ActReqDatShaIns (ActChgInsSta+ 90)
#define ActChgDatShaIns (ActChgInsSta+ 91)
#define ActDowShaIns (ActChgInsSta+ 92)
/*****************************************************************************/
/********************************* Centre tab ********************************/

View File

@ -150,13 +150,17 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.31.4 (2016-10-22)"
#define Log_PLATFORM_VERSION "SWAD 16.32 (2016-10-22)"
#define CSS_FILE "swad16.25.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.32: Oct 22, 2016 New form in institution configuration to change short name. (205141 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1592','es','N','Cambiar nombre breve ins.');
Version 16.31.4: Oct 22, 2016 Code refactoring in courses. (205114 lines)
Version 16.31.3: Oct 22, 2016 Code refactoring in degrees. (205112 lines)
Version 16.31.2: Oct 22, 2016 Code refactoring in centres. (205108 lines)

View File

@ -378,15 +378,29 @@ static void Ins_Configuration (bool PrintView)
/***** Institution short name *****/
fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">"
"%s:"
"</td>"
"<td class=\"DAT LEFT_MIDDLE\">"
"%s"
"</td>"
"</tr>",
"%s:"
"</td>"
"<td class=\"DAT_N LEFT_MIDDLE\">",
The_ClassForm[Gbl.Prefs.Theme],
Txt_Short_name,
Gbl.CurrentIns.Ins.ShortName);
Txt_Short_name);
if (!PrintView &&
Gbl.Usrs.Me.LoggedRole == Rol_SYS_ADM) // Only system admins can edit institution short name
{
Act_FormStart (ActRenInsShoCfg);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
" maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />",
Ins_MAX_LENGTH_INSTITUTION_SHORT_NAME,
Gbl.CurrentIns.Ins.ShortName,
Gbl.Form.Id);
Act_FormEnd ();
}
else // I can not edit institution short name
fprintf (Gbl.F.Out,"%s",
Gbl.CurrentIns.Ins.ShortName);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Institution WWW *****/
if (Gbl.CurrentIns.Ins.WWW[0])
@ -1540,6 +1554,11 @@ void Ins_RenameInsShort (void)
Ins_RenameInstitution (&Gbl.Inss.EditingIns,Cns_SHORT_NAME);
}
void Ins_RenameInsShortInConfig (void)
{
Ins_RenameInstitution (&Gbl.CurrentIns.Ins,Cns_SHORT_NAME);
}
/*****************************************************************************/
/***************** Change the full name of an institution ********************/
/*****************************************************************************/

View File

@ -111,6 +111,7 @@ void Ins_PutParamInsCod (long InsCod);
long Ins_GetParamOtherInsCod (void);
void Ins_RemoveInstitution (void);
void Ins_RenameInsShort (void);
void Ins_RenameInsShortInConfig (void);
void Ins_RenameInsFull (void);
void Ins_RenameInsFullInConfig (void);
void Ins_ChangeInsCtyInConfig (void);