mirror of https://github.com/acanas/swad-core.git
Version 15.60.4
This commit is contained in:
parent
f7e9ba3cff
commit
10d994760d
174
swad_action.c
174
swad_action.c
|
@ -1308,158 +1308,6 @@ New! 1124. ActChgMyTT1stDay Change first day of week and show timetable of th
|
|||
1122. ActDowBrf Download a file in the briefcase
|
||||
*/
|
||||
|
||||
const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||
{
|
||||
// TabUnk **********
|
||||
{
|
||||
},
|
||||
// TabSys **********
|
||||
{
|
||||
{ActSysReqSch ,true },
|
||||
|
||||
{ActSeeCty ,true },
|
||||
|
||||
{ActSeePen ,false},
|
||||
{ActReqRemOldCrs ,true },
|
||||
|
||||
{ActSeeDegTyp ,false},
|
||||
{ActSeeMai ,false},
|
||||
{ActSeeBan ,false},
|
||||
{ActSeeLnk ,true },
|
||||
|
||||
{ActLstPlg ,true },
|
||||
|
||||
{ActSetUp ,true },
|
||||
},
|
||||
// TabCty **********
|
||||
{
|
||||
{ActCtyReqSch ,true },
|
||||
|
||||
{ActSeeCtyInf ,false},
|
||||
{ActSeeIns ,true },
|
||||
},
|
||||
// TabIns **********
|
||||
{
|
||||
{ActInsReqSch ,true },
|
||||
|
||||
{ActSeeInsInf ,false},
|
||||
{ActSeeCtr ,false},
|
||||
{ActSeeDpt ,false},
|
||||
{ActSeePlc ,false},
|
||||
{ActSeeHld ,true },
|
||||
|
||||
{ActSeeAdmDocIns ,false},
|
||||
{ActAdmComIns ,true },
|
||||
},
|
||||
// TabCtr **********
|
||||
{
|
||||
{ActCtrReqSch ,true },
|
||||
|
||||
{ActSeeCtrInf ,false},
|
||||
{ActSeeDeg ,true },
|
||||
|
||||
{ActSeeAdmDocCtr ,false},
|
||||
{ActAdmComCtr ,true },
|
||||
},
|
||||
// TabDeg **********
|
||||
{
|
||||
{ActDegReqSch ,true },
|
||||
|
||||
{ActSeeDegInf ,false},
|
||||
{ActSeeCrs ,true },
|
||||
|
||||
{ActSeeAdmDocDeg ,false},
|
||||
{ActAdmComDeg ,true },
|
||||
|
||||
},
|
||||
// TabCrs **********
|
||||
{
|
||||
{ActCrsReqSch ,true },
|
||||
|
||||
{ActSeeCrsInf ,false},
|
||||
{ActSeeTchGui ,false},
|
||||
{ActSeeSyl ,true },
|
||||
|
||||
{ActSeeAdmDocCrs ,false},
|
||||
{ActAdmCom ,true },
|
||||
|
||||
{ActSeeCrsTT ,false},
|
||||
{ActSeeBib ,false},
|
||||
{ActSeeFAQ ,false},
|
||||
{ActSeeCrsLnk ,true },
|
||||
},
|
||||
// TabAss **********
|
||||
{
|
||||
{ActSeeAss ,true },
|
||||
|
||||
{ActSeeAsg ,false},
|
||||
{ActAdmAsgWrkUsr ,true },
|
||||
{ActReqAsgWrkCrs ,true },
|
||||
|
||||
{ActReqTst ,true },
|
||||
|
||||
{ActSeeCal ,false},
|
||||
{ActSeeExaAnn ,false},
|
||||
{ActSeeAdmMrk ,true },
|
||||
},
|
||||
// TabUsr **********
|
||||
{
|
||||
{ActReqSelGrp ,true },
|
||||
|
||||
{ActLstStd ,false},
|
||||
{ActLstTch ,false},
|
||||
{ActLstOth ,true },
|
||||
|
||||
{ActSeeAtt ,true},
|
||||
|
||||
{ActReqSignUp ,false},
|
||||
{ActSeeSignUpReq ,false},
|
||||
{ActLstCon ,false},
|
||||
{ActReqPubPrf ,true },
|
||||
},
|
||||
// TabMsg **********
|
||||
{
|
||||
{ActSeeNtf ,true },
|
||||
|
||||
{ActSeeAnn ,false},
|
||||
{ActSeeNot ,false},
|
||||
{ActSeeFor ,false},
|
||||
{ActSeeChtRms ,true },
|
||||
|
||||
{ActReqMsgUsr ,false},
|
||||
{ActSeeRcvMsg ,false},
|
||||
{ActSeeSntMsg ,true },
|
||||
|
||||
{ActMaiStd ,true },
|
||||
|
||||
},
|
||||
// TabSta **********
|
||||
{
|
||||
{ActSeeAllSvy ,true },
|
||||
|
||||
{ActReqUseGbl ,false},
|
||||
{ActSeePhoDeg ,false},
|
||||
{ActReqStaCrs ,true },
|
||||
|
||||
{ActReqAccGbl ,true },
|
||||
},
|
||||
// TabPrf **********
|
||||
{
|
||||
{ActFrmLogIn ,true },
|
||||
|
||||
{ActMyCrs ,false},
|
||||
{ActSeeMyTT ,true },
|
||||
|
||||
{ActFrmUsrAcc ,false},
|
||||
{ActReqEdiRecCom ,false},
|
||||
{ActEdiPrf ,true },
|
||||
|
||||
{ActAdmBrf ,true },
|
||||
|
||||
{ActMFUAct ,true },
|
||||
},
|
||||
};
|
||||
|
||||
struct Act_Actions Act_Actions[Act_NUM_ACTIONS] =
|
||||
{
|
||||
// TabUnk ******************************************************************
|
||||
|
@ -4780,28 +4628,6 @@ void Act_AdjustCurrentAction (void)
|
|||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* When I change to another tab, go to the first option allowed ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
Act_Action_t Act_GetFirstActionAvailableInCurrentTab (void)
|
||||
{
|
||||
unsigned NumOptInMenu;
|
||||
Act_Action_t Action;
|
||||
|
||||
/* Change current action to the first allowed action in current tab */
|
||||
for (NumOptInMenu = 0;
|
||||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||
NumOptInMenu++)
|
||||
{
|
||||
if ((Action = Act_Menu[Gbl.CurrentTab][NumOptInMenu].Action) == 0)
|
||||
return ActUnk;
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||
return Action;
|
||||
}
|
||||
return ActUnk;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** Allocate list of most frequently used actions ****************/
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1360,11 +1360,7 @@ struct Act_Tabs
|
|||
{
|
||||
char *Icon;
|
||||
};
|
||||
struct Act_Menu
|
||||
{
|
||||
Act_Action_t Action;
|
||||
bool SubsequentSeparation;
|
||||
};
|
||||
|
||||
struct Act_Actions
|
||||
{
|
||||
long ActCod; // Unique, time-persistent numerical code for the action
|
||||
|
@ -1413,7 +1409,6 @@ void Act_PutIconLink (const char *Icon,const char *Title);
|
|||
|
||||
void Act_AdjustActionWhenNoUsrLogged (void);
|
||||
void Act_AdjustCurrentAction (void);
|
||||
Act_Action_t Act_GetFirstActionAvailableInCurrentTab (void);
|
||||
|
||||
void Act_AllocateMFUActions (struct Act_ListMFUActions *ListMFUActions,unsigned MaxActionsShown);
|
||||
void Act_FreeMFUActions (struct Act_ListMFUActions *ListMFUActions);
|
||||
|
|
|
@ -103,7 +103,6 @@
|
|||
// TODO: Show nicknames of users in lists?
|
||||
// TODO: Form to register and remove system admins
|
||||
// TODO: Fix this bug: when an admin clicks on "Use this email" in the email of another user the email was confirmed, the email becomes unconfirmed
|
||||
// TODO: Replace "Curso o semestre" by "Año o semestre"
|
||||
// TODO: Reply to one user, suggested by Francisco Ocaña Lara
|
||||
// TODO: Reply to all
|
||||
|
||||
|
@ -111,12 +110,15 @@
|
|||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.60.2 (2015/12/08)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 15.60.4 (2015/12/08)"
|
||||
#define CSS_FILE "swad15.59.4.css"
|
||||
|
||||
// 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 15.60.4: Dec 08, 2015 Change in text about first / last year of a degree. (186589 lines)
|
||||
Version 15.60.3: Dec 08, 2015 Fixed bug in country.
|
||||
Code refactoring in menu. (186588 lines)
|
||||
Version 15.60.2: Dec 08, 2015 Link to user's country in public profile. (186592 lines)
|
||||
Version 15.60.1: Dec 07, 2015 Fixed names of some small icons.
|
||||
New link in student's record card to see her/his attendance. (186576 lines)
|
||||
|
|
|
@ -1138,12 +1138,12 @@ bool Cty_GetDataOfCountryByCod (struct Country *Cty)
|
|||
Lan <= Txt_NUM_LANGUAGES;
|
||||
Lan++)
|
||||
{
|
||||
strcpy (Cty->Name[Lan],row[1+Lan]);
|
||||
strcpy (Cty->WWW[Lan],row[1+Txt_NUM_LANGUAGES+Lan]);
|
||||
strcpy (Cty->Name[Lan],row[Lan]);
|
||||
strcpy (Cty->WWW[Lan],row[Txt_NUM_LANGUAGES+Lan]);
|
||||
}
|
||||
|
||||
/* Get number of institutions in this country */
|
||||
if (sscanf (row[1+Txt_NUM_LANGUAGES*2],"%u",&(Cty->NumInss)) != 1)
|
||||
if (sscanf (row[Txt_NUM_LANGUAGES*2+1],"%u",&(Cty->NumInss)) != 1)
|
||||
Cty->NumInss = 0;
|
||||
}
|
||||
else
|
||||
|
|
146
swad_menu.c
146
swad_menu.c
|
@ -66,6 +66,149 @@ const char *Mnu_MenuIcons[Mnu_NUM_MENUS] =
|
|||
"vertical",
|
||||
};
|
||||
|
||||
// Actions not initialized are 0 by default
|
||||
const Act_Action_t Mnu_MenuActions[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||
{
|
||||
// TabUnk **********
|
||||
{
|
||||
},
|
||||
// TabSys **********
|
||||
{
|
||||
ActSysReqSch,
|
||||
ActSeeCty,
|
||||
ActSeePen,
|
||||
ActReqRemOldCrs,
|
||||
ActSeeDegTyp,
|
||||
ActSeeMai,
|
||||
ActSeeBan,
|
||||
ActSeeLnk,
|
||||
ActLstPlg,
|
||||
ActSetUp,
|
||||
},
|
||||
// TabCty **********
|
||||
{
|
||||
ActCtyReqSch,
|
||||
ActSeeCtyInf,
|
||||
ActSeeIns,
|
||||
},
|
||||
// TabIns **********
|
||||
{
|
||||
ActInsReqSch,
|
||||
ActSeeInsInf,
|
||||
ActSeeCtr,
|
||||
ActSeeDpt,
|
||||
ActSeePlc,
|
||||
ActSeeHld,
|
||||
ActSeeAdmDocIns,
|
||||
ActAdmComIns,
|
||||
},
|
||||
// TabCtr **********
|
||||
{
|
||||
ActCtrReqSch,
|
||||
ActSeeCtrInf,
|
||||
ActSeeDeg,
|
||||
ActSeeAdmDocCtr,
|
||||
ActAdmComCtr,
|
||||
},
|
||||
// TabDeg **********
|
||||
{
|
||||
ActDegReqSch,
|
||||
ActSeeDegInf,
|
||||
ActSeeCrs,
|
||||
ActSeeAdmDocDeg,
|
||||
ActAdmComDeg,
|
||||
},
|
||||
// TabCrs **********
|
||||
{
|
||||
ActCrsReqSch,
|
||||
ActSeeCrsInf,
|
||||
ActSeeTchGui,
|
||||
ActSeeSyl,
|
||||
ActSeeAdmDocCrs,
|
||||
ActAdmCom,
|
||||
ActSeeCrsTT,
|
||||
ActSeeBib,
|
||||
ActSeeFAQ,
|
||||
ActSeeCrsLnk,
|
||||
},
|
||||
// TabAss **********
|
||||
{
|
||||
ActSeeAss,
|
||||
ActSeeAsg,
|
||||
ActAdmAsgWrkUsr,
|
||||
ActReqAsgWrkCrs,
|
||||
ActReqTst,
|
||||
ActSeeCal,
|
||||
ActSeeExaAnn,
|
||||
ActSeeAdmMrk,
|
||||
},
|
||||
// TabUsr **********
|
||||
{
|
||||
ActReqSelGrp,
|
||||
ActLstStd,
|
||||
ActLstTch,
|
||||
ActLstOth,
|
||||
ActSeeAtt,
|
||||
ActReqSignUp,
|
||||
ActSeeSignUpReq,
|
||||
ActLstCon,
|
||||
ActReqPubPrf,
|
||||
},
|
||||
// TabMsg **********
|
||||
{
|
||||
ActSeeNtf,
|
||||
ActSeeAnn,
|
||||
ActSeeNot,
|
||||
ActSeeFor,
|
||||
ActSeeChtRms,
|
||||
ActReqMsgUsr,
|
||||
ActSeeRcvMsg,
|
||||
ActSeeSntMsg,
|
||||
ActMaiStd,
|
||||
},
|
||||
// TabSta **********
|
||||
{
|
||||
ActSeeAllSvy,
|
||||
ActReqUseGbl,
|
||||
ActSeePhoDeg,
|
||||
ActReqStaCrs,
|
||||
ActReqAccGbl,
|
||||
},
|
||||
// TabPrf **********
|
||||
{
|
||||
ActFrmLogIn,
|
||||
ActMyCrs,
|
||||
ActSeeMyTT,
|
||||
ActFrmUsrAcc,
|
||||
ActReqEdiRecCom,
|
||||
ActEdiPrf,
|
||||
ActAdmBrf,
|
||||
ActMFUAct,
|
||||
},
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/******* When I change to another tab, go to the first option allowed ********/
|
||||
/*****************************************************************************/
|
||||
|
||||
Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void)
|
||||
{
|
||||
unsigned NumOptInMenu;
|
||||
Act_Action_t Action;
|
||||
|
||||
/* Change current action to the first allowed action in current tab */
|
||||
for (NumOptInMenu = 0;
|
||||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||
NumOptInMenu++)
|
||||
{
|
||||
if ((Action = Mnu_MenuActions[Gbl.CurrentTab][NumOptInMenu]) == 0)
|
||||
return ActUnk;
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||
return Action;
|
||||
}
|
||||
return ActUnk;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************* Write horizontal menu of current tab ********************/
|
||||
/*****************************************************************************/
|
||||
|
@ -74,7 +217,6 @@ void Mnu_WriteMenuThisTab (void)
|
|||
{
|
||||
extern const char *The_ClassTxtMenuOn[The_NUM_THEMES];
|
||||
extern const char *The_ClassTxtMenuOff[The_NUM_THEMES];
|
||||
extern const struct Act_Menu Act_Menu[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
||||
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
||||
unsigned NumOptInMenu;
|
||||
Act_Action_t NumAct;
|
||||
|
@ -90,7 +232,7 @@ void Mnu_WriteMenuThisTab (void)
|
|||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||
NumOptInMenu++)
|
||||
{
|
||||
NumAct = Act_Menu[Gbl.CurrentTab][NumOptInMenu].Action;
|
||||
NumAct = Mnu_MenuActions[Gbl.CurrentTab][NumOptInMenu];
|
||||
if (NumAct == 0) // At the end of each tab, actions are initialized to 0, so 0 marks the end of the menu
|
||||
break;
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (NumAct))
|
||||
|
|
|
@ -49,6 +49,7 @@ typedef enum
|
|||
/***************************** Public prototypes *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void);
|
||||
void Mnu_WriteMenuThisTab (void);
|
||||
|
||||
void Mnu_PutIconsToSelectMenu (void);
|
||||
|
|
44
swad_text.c
44
swad_text.c
|
@ -11713,23 +11713,23 @@ const char *Txt_First_name =
|
|||
|
||||
const char *Txt_First_BR_year = // "First academic year", the opposite to "Last academic year"
|
||||
#if L==1
|
||||
"Prim.<br />curso"; // Necessita traduccio
|
||||
"Primer<br />año/sem."; // Necessita traduccio
|
||||
#elif L==2
|
||||
"First<br />year"; // Need Übersetzung
|
||||
"First<br />year/sem."; // Need Übersetzung
|
||||
#elif L==3
|
||||
"First<br />year";
|
||||
"First<br />year/sem.";
|
||||
#elif L==4
|
||||
"Prim.<br />curso";
|
||||
"Primer<br />año/sem.";
|
||||
#elif L==5
|
||||
"First<br />year"; // Besoin de traduction
|
||||
"First<br />year/sem."; // Besoin de traduction
|
||||
#elif L==6
|
||||
"Prim.<br />curso"; // Okoteve traducción
|
||||
"Primer<br />año/sem."; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Primo<br />anno";
|
||||
"Primo<br />anno/sem.";
|
||||
#elif L==8
|
||||
"Pierwszy<br />rok";
|
||||
"Pierwszy<br />rok/sem.";
|
||||
#elif L==9
|
||||
"First<br />year"; // Necessita de tradução
|
||||
"First<br />year/sem."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_Folder =
|
||||
|
@ -15238,23 +15238,23 @@ const char *Txt_Last_clicks_in_real_time =
|
|||
|
||||
const char *Txt_Last_BR_year = // "Last academic year", the opposite to "First academic year"
|
||||
#if L==1
|
||||
"Último<br />curso"; // Necessita traduccio
|
||||
"Último<br />año/sem."; // Necessita traduccio
|
||||
#elif L==2
|
||||
"Last<br />year"; // Need Übersetzung
|
||||
"Last<br />year/sem."; // Need Übersetzung
|
||||
#elif L==3
|
||||
"Last<br />year";
|
||||
"Last<br />year/sem.";
|
||||
#elif L==4
|
||||
"Último<br />curso";
|
||||
"Último<br />año/sem.";
|
||||
#elif L==5
|
||||
"Last<br />year"; // Besoin de traduction
|
||||
"Last<br />year/sem."; // Besoin de traduction
|
||||
#elif L==6
|
||||
"Último<br />curso"; // Okoteve traducción
|
||||
"Último<br />año/sem."; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Ultimo<br />anno";
|
||||
"Last<br />anno/sem.";
|
||||
#elif L==8
|
||||
"Ostatni<br />rok";
|
||||
"Ostatni<br />rok/sem.";
|
||||
#elif L==9
|
||||
"Last<br />year"; // Necessita de tradução
|
||||
"Last<br />year/sem."; // Necessita de tradução
|
||||
#endif
|
||||
|
||||
const char *Txt_LAYOUT_SIDE_COLUMNS[4] =
|
||||
|
@ -48355,19 +48355,19 @@ const char *Txt_XML_file_content =
|
|||
"Conteúdo do arquivo XML";
|
||||
#endif
|
||||
|
||||
const char *Txt_Year_OF_A_DEGREE = // 1, 2, 3..., not 1984, 2011...
|
||||
const char *Txt_Year_OF_A_DEGREE = // 1, 2, 3..., not 1984, 2011...
|
||||
#if L==1
|
||||
"Curs o semestre";
|
||||
"Any o semestre";
|
||||
#elif L==2
|
||||
"Jahr oder Semester";
|
||||
#elif L==3
|
||||
"Year or semester";
|
||||
#elif L==4
|
||||
"Curso o semestre";
|
||||
"Año o semestre";
|
||||
#elif L==5
|
||||
"Année ou semestre";
|
||||
#elif L==6
|
||||
"Curso o semestre"; // Okoteve traducción
|
||||
"Año o semestre"; // Okoteve traducción
|
||||
#elif L==7
|
||||
"Anno o semestre";
|
||||
#elif L==8
|
||||
|
|
|
@ -1981,10 +1981,10 @@ void Usr_ChkUsrAndGetUsrData (void)
|
|||
if (Gbl.Usrs.Me.Logged)
|
||||
{
|
||||
if ((Action = Act_GetMyLastActionInCurrentTab ()) == ActUnk)
|
||||
Action = Act_GetFirstActionAvailableInCurrentTab ();
|
||||
Action = Mnu_GetFirstActionAvailableInCurrentTab ();
|
||||
}
|
||||
else
|
||||
Action = Act_GetFirstActionAvailableInCurrentTab ();
|
||||
Action = Mnu_GetFirstActionAvailableInCurrentTab ();
|
||||
if (Action != ActUnk)
|
||||
Gbl.CurrentAct = Action;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue