Version 16.38

This commit is contained in:
Antonio Cañas Vargas 2016-10-23 16:15:28 +02:00
parent 621145cca7
commit 4b77a53a29
5 changed files with 101 additions and 71 deletions

View File

@ -368,6 +368,7 @@ Degree:
241. ActPrnDegInf Print information on the current degree
242. ActChgDegCtrCfg Request change of the centre of a degree in degree configuration
NEW. ActRenDegShoCfg Request change of the short name of a degree in degree configuration
NEW. ActRenDegFulCfg Request change of the full name of a degree in degree configuration
243. ActReqDegLog Show form to send the logo of the current degree
244. ActRecDegLog Receive and store the logo of the current degree
@ -1725,6 +1726,7 @@ struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
/* ActPrnDegInf */{1150,-1,TabUnk,ActSeeDegInf ,0x1FF,0x1FF,0x1FF,Act_CONT_NORM,Act_BLNK_WINDOW,NULL ,Deg_PrintConfiguration ,NULL},
/* ActChgDegCtrCfg */{1588,-1,TabUnk,ActSeeDegInf ,0x180,0x180,0x180,Act_CONT_NORM,Act_THIS_WINDOW,Deg_ChangeDegCtrInConfig ,Deg_ContEditAfterChgDegInConfig,NULL},
/* ActRenDegShoCfg */{1598,-1,TabUnk,ActSeeDegInf ,0x1C0,0x1C0,0x1C0,Act_CONT_NORM,Act_THIS_WINDOW,Deg_RenameDegreeShortInConfig ,Deg_ContEditAfterChgDegInConfig,NULL},
/* ActRenDegFulCfg */{1597,-1,TabUnk,ActSeeDegInf ,0x1C0,0x1C0,0x1C0,Act_CONT_NORM,Act_THIS_WINDOW,Deg_RenameDegreeFullInConfig ,Deg_ContEditAfterChgDegInConfig,NULL},
/* ActReqDegLog */{1246,-1,TabUnk,ActSeeDegInf ,0x100,0x100,0x100,Act_CONT_NORM,Act_THIS_WINDOW,NULL ,Deg_RequestLogo ,NULL},
/* ActRecDegLog */{ 553,-1,TabUnk,ActSeeDegInf ,0x100,0x100,0x100,Act_CONT_DATA,Act_THIS_WINDOW,Deg_ReceiveLogo ,Deg_ShowConfiguration ,NULL},
@ -4461,6 +4463,7 @@ Act_Action_t Act_FromActCodToAction[1+Act_MAX_ACTION_COD] = // Do not reuse uniq
ActRenCtrShoCfg, // #1595
ActChgCtrWWWCfg, // #1596
ActRenDegFulCfg, // #1597
ActRenDegShoCfg, // #1598
};
/*****************************************************************************/

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+93+73+68+247+186+155+172+36+30+86)
#define Act_NUM_ACTIONS (1+9+51+14+93+73+69+247+186+155+172+36+30+86)
#define Act_MAX_ACTION_COD 1597
#define Act_MAX_ACTION_COD 1598
#define Act_MAX_OPTIONS_IN_MENU_PER_TAB 11
@ -368,69 +368,70 @@ typedef int Act_Action_t; // Must be a signed type, because -1 is used to indica
#define ActDegSch (ActDowShaCtr+ 6)
#define ActPrnDegInf (ActDowShaCtr+ 7)
#define ActChgDegCtrCfg (ActDowShaCtr+ 8)
#define ActRenDegFulCfg (ActDowShaCtr+ 9)
#define ActReqDegLog (ActDowShaCtr+ 10)
#define ActRecDegLog (ActDowShaCtr+ 11)
#define ActRemDegLog (ActDowShaCtr+ 12)
#define ActRenDegShoCfg (ActDowShaCtr+ 9)
#define ActRenDegFulCfg (ActDowShaCtr+ 10)
#define ActReqDegLog (ActDowShaCtr+ 11)
#define ActRecDegLog (ActDowShaCtr+ 12)
#define ActRemDegLog (ActDowShaCtr+ 13)
#define ActEdiCrs (ActDowShaCtr+ 13)
#define ActReqCrs (ActDowShaCtr+ 14)
#define ActNewCrs (ActDowShaCtr+ 15)
#define ActRemCrs (ActDowShaCtr+ 16)
#define ActChgInsCrsCod (ActDowShaCtr+ 17)
#define ActChgCrsYea (ActDowShaCtr+ 18)
#define ActRenCrsSho (ActDowShaCtr+ 19)
#define ActRenCrsFul (ActDowShaCtr+ 20)
#define ActChgCrsSta (ActDowShaCtr+ 21)
#define ActEdiCrs (ActDowShaCtr+ 14)
#define ActReqCrs (ActDowShaCtr+ 15)
#define ActNewCrs (ActDowShaCtr+ 16)
#define ActRemCrs (ActDowShaCtr+ 17)
#define ActChgInsCrsCod (ActDowShaCtr+ 18)
#define ActChgCrsYea (ActDowShaCtr+ 19)
#define ActRenCrsSho (ActDowShaCtr+ 20)
#define ActRenCrsFul (ActDowShaCtr+ 21)
#define ActChgCrsSta (ActDowShaCtr+ 22)
#define ActChgToSeeDocDeg (ActDowShaCtr+ 22)
#define ActSeeDocDeg (ActDowShaCtr+ 23)
#define ActExpSeeDocDeg (ActDowShaCtr+ 24)
#define ActConSeeDocDeg (ActDowShaCtr+ 25)
#define ActZIPSeeDocDeg (ActDowShaCtr+ 26)
#define ActReqDatSeeDocDeg (ActDowShaCtr+ 27)
#define ActDowSeeDocDeg (ActDowShaCtr+ 28)
#define ActChgToAdmDocDeg (ActDowShaCtr+ 29)
#define ActAdmDocDeg (ActDowShaCtr+ 30)
#define ActReqRemFilDocDeg (ActDowShaCtr+ 31)
#define ActRemFilDocDeg (ActDowShaCtr+ 32)
#define ActRemFolDocDeg (ActDowShaCtr+ 33)
#define ActCopDocDeg (ActDowShaCtr+ 34)
#define ActPasDocDeg (ActDowShaCtr+ 35)
#define ActRemTreDocDeg (ActDowShaCtr+ 36)
#define ActFrmCreDocDeg (ActDowShaCtr+ 37)
#define ActCreFolDocDeg (ActDowShaCtr+ 38)
#define ActCreLnkDocDeg (ActDowShaCtr+ 39)
#define ActRenFolDocDeg (ActDowShaCtr+ 40)
#define ActRcvFilDocDegDZ (ActDowShaCtr+ 41)
#define ActRcvFilDocDegCla (ActDowShaCtr+ 42)
#define ActExpAdmDocDeg (ActDowShaCtr+ 43)
#define ActConAdmDocDeg (ActDowShaCtr+ 44)
#define ActZIPAdmDocDeg (ActDowShaCtr+ 45)
#define ActShoDocDeg (ActDowShaCtr+ 46)
#define ActHidDocDeg (ActDowShaCtr+ 47)
#define ActReqDatAdmDocDeg (ActDowShaCtr+ 48)
#define ActChgDatAdmDocDeg (ActDowShaCtr+ 49)
#define ActDowAdmDocDeg (ActDowShaCtr+ 50)
#define ActChgToSeeDocDeg (ActDowShaCtr+ 23)
#define ActSeeDocDeg (ActDowShaCtr+ 24)
#define ActExpSeeDocDeg (ActDowShaCtr+ 25)
#define ActConSeeDocDeg (ActDowShaCtr+ 26)
#define ActZIPSeeDocDeg (ActDowShaCtr+ 27)
#define ActReqDatSeeDocDeg (ActDowShaCtr+ 28)
#define ActDowSeeDocDeg (ActDowShaCtr+ 29)
#define ActChgToAdmDocDeg (ActDowShaCtr+ 30)
#define ActAdmDocDeg (ActDowShaCtr+ 31)
#define ActReqRemFilDocDeg (ActDowShaCtr+ 32)
#define ActRemFilDocDeg (ActDowShaCtr+ 33)
#define ActRemFolDocDeg (ActDowShaCtr+ 34)
#define ActCopDocDeg (ActDowShaCtr+ 35)
#define ActPasDocDeg (ActDowShaCtr+ 36)
#define ActRemTreDocDeg (ActDowShaCtr+ 37)
#define ActFrmCreDocDeg (ActDowShaCtr+ 38)
#define ActCreFolDocDeg (ActDowShaCtr+ 39)
#define ActCreLnkDocDeg (ActDowShaCtr+ 40)
#define ActRenFolDocDeg (ActDowShaCtr+ 41)
#define ActRcvFilDocDegDZ (ActDowShaCtr+ 42)
#define ActRcvFilDocDegCla (ActDowShaCtr+ 43)
#define ActExpAdmDocDeg (ActDowShaCtr+ 44)
#define ActConAdmDocDeg (ActDowShaCtr+ 45)
#define ActZIPAdmDocDeg (ActDowShaCtr+ 46)
#define ActShoDocDeg (ActDowShaCtr+ 47)
#define ActHidDocDeg (ActDowShaCtr+ 48)
#define ActReqDatAdmDocDeg (ActDowShaCtr+ 49)
#define ActChgDatAdmDocDeg (ActDowShaCtr+ 50)
#define ActDowAdmDocDeg (ActDowShaCtr+ 51)
#define ActReqRemFilShaDeg (ActDowShaCtr+ 51)
#define ActRemFilShaDeg (ActDowShaCtr+ 52)
#define ActRemFolShaDeg (ActDowShaCtr+ 53)
#define ActCopShaDeg (ActDowShaCtr+ 54)
#define ActPasShaDeg (ActDowShaCtr+ 55)
#define ActRemTreShaDeg (ActDowShaCtr+ 56)
#define ActFrmCreShaDeg (ActDowShaCtr+ 57)
#define ActCreFolShaDeg (ActDowShaCtr+ 58)
#define ActCreLnkShaDeg (ActDowShaCtr+ 59)
#define ActRenFolShaDeg (ActDowShaCtr+ 60)
#define ActRcvFilShaDegDZ (ActDowShaCtr+ 61)
#define ActRcvFilShaDegCla (ActDowShaCtr+ 62)
#define ActExpShaDeg (ActDowShaCtr+ 63)
#define ActConShaDeg (ActDowShaCtr+ 64)
#define ActZIPShaDeg (ActDowShaCtr+ 65)
#define ActReqDatShaDeg (ActDowShaCtr+ 66)
#define ActChgDatShaDeg (ActDowShaCtr+ 67)
#define ActDowShaDeg (ActDowShaCtr+ 68)
#define ActReqRemFilShaDeg (ActDowShaCtr+ 52)
#define ActRemFilShaDeg (ActDowShaCtr+ 53)
#define ActRemFolShaDeg (ActDowShaCtr+ 54)
#define ActCopShaDeg (ActDowShaCtr+ 55)
#define ActPasShaDeg (ActDowShaCtr+ 56)
#define ActRemTreShaDeg (ActDowShaCtr+ 57)
#define ActFrmCreShaDeg (ActDowShaCtr+ 58)
#define ActCreFolShaDeg (ActDowShaCtr+ 59)
#define ActCreLnkShaDeg (ActDowShaCtr+ 60)
#define ActRenFolShaDeg (ActDowShaCtr+ 61)
#define ActRcvFilShaDegDZ (ActDowShaCtr+ 62)
#define ActRcvFilShaDegCla (ActDowShaCtr+ 63)
#define ActExpShaDeg (ActDowShaCtr+ 64)
#define ActConShaDeg (ActDowShaCtr+ 65)
#define ActZIPShaDeg (ActDowShaCtr+ 66)
#define ActReqDatShaDeg (ActDowShaCtr+ 67)
#define ActChgDatShaDeg (ActDowShaCtr+ 68)
#define ActDowShaDeg (ActDowShaCtr+ 69)
/*****************************************************************************/
/******************************** Course tab *********************************/

View File

@ -150,13 +150,17 @@
/****************************** Public constants *****************************/
/*****************************************************************************/
#define Log_PLATFORM_VERSION "SWAD 16.37 (2016-10-23)"
#define Log_PLATFORM_VERSION "SWAD 16.38 (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.38: Oct 23, 2016 New form in degree configuration to change full name. (205354 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1598','es','N','Cambiar nombre breve titulac.');
Version 16.37: Oct 23, 2016 New form in degree configuration to change full name. (205326 lines)
1 change necessary in database:
INSERT INTO actions (ActCod,Language,Obsolete,Txt) VALUES ('1597','es','N','Cambiar nombre completo titulac.');

View File

@ -398,15 +398,30 @@ static void Deg_Configuration (bool PrintView)
/***** Degree 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.CurrentDeg.Deg.ShortName);
Txt_Short_name);
if (!PrintView &&
Gbl.Usrs.Me.LoggedRole >= Rol_CTR_ADM)
// Only centre admins, institution admins and system admins can edit degree short name
{
/* Form to change degree short name */
Act_FormStart (ActRenDegShoCfg);
fprintf (Gbl.F.Out,"<input type=\"text\" name=\"ShortName\""
" maxlength=\"%u\" value=\"%s\""
" class=\"INPUT_SHORT_NAME\""
" onchange=\"document.getElementById('%s').submit();\" />",
Deg_MAX_LENGTH_DEGREE_SHORT_NAME,
Gbl.CurrentDeg.Deg.ShortName,
Gbl.Form.Id);
Act_FormEnd ();
}
else // I can not edit degree short name
fprintf (Gbl.F.Out,"%s",Gbl.CurrentDeg.Deg.ShortName);
fprintf (Gbl.F.Out,"</td>"
"</tr>");
/***** Degree WWW *****/
if (Gbl.CurrentDeg.Deg.WWW[0])
@ -2303,9 +2318,15 @@ void Deg_RemoveDegreeCompletely (long DegCod)
void Deg_RenameDegreeShort (void)
{
Deg_GetDegCodFromForm ();
Deg_RenameDegree (&Gbl.Degs.EditingDeg,Cns_SHORT_NAME);
}
void Deg_RenameDegreeShortInConfig (void)
{
Deg_RenameDegree (&Gbl.CurrentDeg.Deg,Cns_SHORT_NAME);
}
/*****************************************************************************/
/********************* Change the full name of a degree **********************/
/*****************************************************************************/

View File

@ -126,6 +126,7 @@ long Deg_GetCtrCodOfDegreeByCod (long DegCod);
long Deg_GetInsCodOfDegreeByCod (long DegCod);
void Deg_RemoveDegreeCompletely (long DegCod);
void Deg_RenameDegreeShort (void);
void Deg_RenameDegreeShortInConfig (void);
void Deg_RenameDegreeFull (void);
void Deg_RenameDegreeFullInConfig (void);
void Deg_ChangeDegCtrInConfig (void);