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 84. ActPrnInsInf Print information on the current institution
85. ActChgInsCtyCfg Change country of institution in institution configuration 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 NEW. ActRenInsFulCfg Change full name of institution in institution configuration
86. ActReqInsLog Show form to send the logo of the current institution 86. ActReqInsLog Show form to send the logo of the current institution
87. ActRecInsLog Receive and store 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}, /* 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}, /* 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}, /* 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}, /* 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}, /* 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 ActChgCtrInsCfg, // #1589
ActChgInsCtyCfg, // #1590 ActChgInsCtyCfg, // #1590
ActRenInsFulCfg, // #1591 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 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 #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 ActInsSch (ActChgInsSta+ 9)
#define ActPrnInsInf (ActChgInsSta+ 10) #define ActPrnInsInf (ActChgInsSta+ 10)
#define ActChgInsCtyCfg (ActChgInsSta+ 11) #define ActChgInsCtyCfg (ActChgInsSta+ 11)
#define ActRenInsFulCfg (ActChgInsSta+ 12) #define ActRenInsShoCfg (ActChgInsSta+ 12)
#define ActReqInsLog (ActChgInsSta+ 13) #define ActRenInsFulCfg (ActChgInsSta+ 13)
#define ActRecInsLog (ActChgInsSta+ 14) #define ActReqInsLog (ActChgInsSta+ 14)
#define ActRemInsLog (ActChgInsSta+ 15) #define ActRecInsLog (ActChgInsSta+ 15)
#define ActRemInsLog (ActChgInsSta+ 16)
#define ActEdiCtr (ActChgInsSta+ 16) #define ActEdiCtr (ActChgInsSta+ 17)
#define ActReqCtr (ActChgInsSta+ 17) #define ActReqCtr (ActChgInsSta+ 18)
#define ActNewCtr (ActChgInsSta+ 18) #define ActNewCtr (ActChgInsSta+ 19)
#define ActRemCtr (ActChgInsSta+ 19) #define ActRemCtr (ActChgInsSta+ 20)
#define ActChgCtrPlc (ActChgInsSta+ 20) #define ActChgCtrPlc (ActChgInsSta+ 21)
#define ActRenCtrSho (ActChgInsSta+ 21) #define ActRenCtrSho (ActChgInsSta+ 22)
#define ActRenCtrFul (ActChgInsSta+ 22) #define ActRenCtrFul (ActChgInsSta+ 23)
#define ActChgCtrWWW (ActChgInsSta+ 23) #define ActChgCtrWWW (ActChgInsSta+ 24)
#define ActChgCtrSta (ActChgInsSta+ 24) #define ActChgCtrSta (ActChgInsSta+ 25)
#define ActEdiDpt (ActChgInsSta+ 25) #define ActEdiDpt (ActChgInsSta+ 26)
#define ActNewDpt (ActChgInsSta+ 26) #define ActNewDpt (ActChgInsSta+ 27)
#define ActRemDpt (ActChgInsSta+ 27) #define ActRemDpt (ActChgInsSta+ 28)
#define ActChgDptIns (ActChgInsSta+ 28) #define ActChgDptIns (ActChgInsSta+ 29)
#define ActRenDptSho (ActChgInsSta+ 29) #define ActRenDptSho (ActChgInsSta+ 30)
#define ActRenDptFul (ActChgInsSta+ 30) #define ActRenDptFul (ActChgInsSta+ 31)
#define ActChgDptWWW (ActChgInsSta+ 31) #define ActChgDptWWW (ActChgInsSta+ 32)
#define ActEdiPlc (ActChgInsSta+ 32) #define ActEdiPlc (ActChgInsSta+ 33)
#define ActNewPlc (ActChgInsSta+ 33) #define ActNewPlc (ActChgInsSta+ 34)
#define ActRemPlc (ActChgInsSta+ 34) #define ActRemPlc (ActChgInsSta+ 35)
#define ActRenPlcSho (ActChgInsSta+ 35) #define ActRenPlcSho (ActChgInsSta+ 36)
#define ActRenPlcFul (ActChgInsSta+ 36) #define ActRenPlcFul (ActChgInsSta+ 37)
#define ActEdiHld (ActChgInsSta+ 37) #define ActEdiHld (ActChgInsSta+ 38)
#define ActNewHld (ActChgInsSta+ 38) #define ActNewHld (ActChgInsSta+ 39)
#define ActRemHld (ActChgInsSta+ 39) #define ActRemHld (ActChgInsSta+ 40)
#define ActChgHldPlc (ActChgInsSta+ 40) #define ActChgHldPlc (ActChgInsSta+ 41)
#define ActChgHldTyp (ActChgInsSta+ 41) #define ActChgHldTyp (ActChgInsSta+ 42)
#define ActChgHldStrDat (ActChgInsSta+ 42) #define ActChgHldStrDat (ActChgInsSta+ 43)
#define ActChgHldEndDat (ActChgInsSta+ 43) #define ActChgHldEndDat (ActChgInsSta+ 44)
#define ActRenHld (ActChgInsSta+ 44) #define ActRenHld (ActChgInsSta+ 45)
#define ActChgToSeeDocIns (ActChgInsSta+ 45) #define ActChgToSeeDocIns (ActChgInsSta+ 46)
#define ActSeeDocIns (ActChgInsSta+ 46) #define ActSeeDocIns (ActChgInsSta+ 47)
#define ActExpSeeDocIns (ActChgInsSta+ 47) #define ActExpSeeDocIns (ActChgInsSta+ 48)
#define ActConSeeDocIns (ActChgInsSta+ 48) #define ActConSeeDocIns (ActChgInsSta+ 49)
#define ActZIPSeeDocIns (ActChgInsSta+ 49) #define ActZIPSeeDocIns (ActChgInsSta+ 50)
#define ActReqDatSeeDocIns (ActChgInsSta+ 50) #define ActReqDatSeeDocIns (ActChgInsSta+ 51)
#define ActDowSeeDocIns (ActChgInsSta+ 51) #define ActDowSeeDocIns (ActChgInsSta+ 52)
#define ActChgToAdmDocIns (ActChgInsSta+ 52) #define ActChgToAdmDocIns (ActChgInsSta+ 53)
#define ActAdmDocIns (ActChgInsSta+ 53) #define ActAdmDocIns (ActChgInsSta+ 54)
#define ActReqRemFilDocIns (ActChgInsSta+ 54) #define ActReqRemFilDocIns (ActChgInsSta+ 55)
#define ActRemFilDocIns (ActChgInsSta+ 55) #define ActRemFilDocIns (ActChgInsSta+ 56)
#define ActRemFolDocIns (ActChgInsSta+ 56) #define ActRemFolDocIns (ActChgInsSta+ 57)
#define ActCopDocIns (ActChgInsSta+ 57) #define ActCopDocIns (ActChgInsSta+ 58)
#define ActPasDocIns (ActChgInsSta+ 58) #define ActPasDocIns (ActChgInsSta+ 59)
#define ActRemTreDocIns (ActChgInsSta+ 59) #define ActRemTreDocIns (ActChgInsSta+ 60)
#define ActFrmCreDocIns (ActChgInsSta+ 60) #define ActFrmCreDocIns (ActChgInsSta+ 61)
#define ActCreFolDocIns (ActChgInsSta+ 61) #define ActCreFolDocIns (ActChgInsSta+ 62)
#define ActCreLnkDocIns (ActChgInsSta+ 62) #define ActCreLnkDocIns (ActChgInsSta+ 63)
#define ActRenFolDocIns (ActChgInsSta+ 63) #define ActRenFolDocIns (ActChgInsSta+ 64)
#define ActRcvFilDocInsDZ (ActChgInsSta+ 64) #define ActRcvFilDocInsDZ (ActChgInsSta+ 65)
#define ActRcvFilDocInsCla (ActChgInsSta+ 65) #define ActRcvFilDocInsCla (ActChgInsSta+ 66)
#define ActExpAdmDocIns (ActChgInsSta+ 66) #define ActExpAdmDocIns (ActChgInsSta+ 67)
#define ActConAdmDocIns (ActChgInsSta+ 67) #define ActConAdmDocIns (ActChgInsSta+ 68)
#define ActZIPAdmDocIns (ActChgInsSta+ 68) #define ActZIPAdmDocIns (ActChgInsSta+ 69)
#define ActShoDocIns (ActChgInsSta+ 69) #define ActShoDocIns (ActChgInsSta+ 70)
#define ActHidDocIns (ActChgInsSta+ 70) #define ActHidDocIns (ActChgInsSta+ 71)
#define ActReqDatAdmDocIns (ActChgInsSta+ 71) #define ActReqDatAdmDocIns (ActChgInsSta+ 72)
#define ActChgDatAdmDocIns (ActChgInsSta+ 72) #define ActChgDatAdmDocIns (ActChgInsSta+ 73)
#define ActDowAdmDocIns (ActChgInsSta+ 73) #define ActDowAdmDocIns (ActChgInsSta+ 74)
#define ActReqRemFilShaIns (ActChgInsSta+ 74) #define ActReqRemFilShaIns (ActChgInsSta+ 75)
#define ActRemFilShaIns (ActChgInsSta+ 75) #define ActRemFilShaIns (ActChgInsSta+ 76)
#define ActRemFolShaIns (ActChgInsSta+ 76) #define ActRemFolShaIns (ActChgInsSta+ 77)
#define ActCopShaIns (ActChgInsSta+ 77) #define ActCopShaIns (ActChgInsSta+ 78)
#define ActPasShaIns (ActChgInsSta+ 78) #define ActPasShaIns (ActChgInsSta+ 79)
#define ActRemTreShaIns (ActChgInsSta+ 79) #define ActRemTreShaIns (ActChgInsSta+ 80)
#define ActFrmCreShaIns (ActChgInsSta+ 80) #define ActFrmCreShaIns (ActChgInsSta+ 81)
#define ActCreFolShaIns (ActChgInsSta+ 81) #define ActCreFolShaIns (ActChgInsSta+ 82)
#define ActCreLnkShaIns (ActChgInsSta+ 82) #define ActCreLnkShaIns (ActChgInsSta+ 83)
#define ActRenFolShaIns (ActChgInsSta+ 83) #define ActRenFolShaIns (ActChgInsSta+ 84)
#define ActRcvFilShaInsDZ (ActChgInsSta+ 84) #define ActRcvFilShaInsDZ (ActChgInsSta+ 85)
#define ActRcvFilShaInsCla (ActChgInsSta+ 85) #define ActRcvFilShaInsCla (ActChgInsSta+ 86)
#define ActExpShaIns (ActChgInsSta+ 86) #define ActExpShaIns (ActChgInsSta+ 87)
#define ActConShaIns (ActChgInsSta+ 87) #define ActConShaIns (ActChgInsSta+ 88)
#define ActZIPShaIns (ActChgInsSta+ 88) #define ActZIPShaIns (ActChgInsSta+ 89)
#define ActReqDatShaIns (ActChgInsSta+ 89) #define ActReqDatShaIns (ActChgInsSta+ 90)
#define ActChgDatShaIns (ActChgInsSta+ 90) #define ActChgDatShaIns (ActChgInsSta+ 91)
#define ActDowShaIns (ActChgInsSta+ 91) #define ActDowShaIns (ActChgInsSta+ 92)
/*****************************************************************************/ /*****************************************************************************/
/********************************* Centre tab ********************************/ /********************************* Centre tab ********************************/

View File

@ -150,13 +150,17 @@
/****************************** Public constants *****************************/ /****************************** 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 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.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.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.3: Oct 22, 2016 Code refactoring in degrees. (205112 lines)
Version 16.31.2: Oct 22, 2016 Code refactoring in centres. (205108 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 *****/ /***** Institution short name *****/
fprintf (Gbl.F.Out,"<tr>" fprintf (Gbl.F.Out,"<tr>"
"<td class=\"%s RIGHT_MIDDLE\">" "<td class=\"%s RIGHT_MIDDLE\">"
"%s:" "%s:"
"</td>" "</td>"
"<td class=\"DAT LEFT_MIDDLE\">" "<td class=\"DAT_N LEFT_MIDDLE\">",
"%s"
"</td>"
"</tr>",
The_ClassForm[Gbl.Prefs.Theme], The_ClassForm[Gbl.Prefs.Theme],
Txt_Short_name, Txt_Short_name);
Gbl.CurrentIns.Ins.ShortName); 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 *****/ /***** Institution WWW *****/
if (Gbl.CurrentIns.Ins.WWW[0]) if (Gbl.CurrentIns.Ins.WWW[0])
@ -1540,6 +1554,11 @@ void Ins_RenameInsShort (void)
Ins_RenameInstitution (&Gbl.Inss.EditingIns,Cns_SHORT_NAME); 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 ********************/ /***************** Change the full name of an institution ********************/
/*****************************************************************************/ /*****************************************************************************/

View File

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