mirror of https://github.com/acanas/swad-core.git
Version 23.70: Mar 19, 2024 Code refactoring and bug fixing in syllabus.
This commit is contained in:
parent
e84bf1b504
commit
f3d16e64c3
|
@ -110,8 +110,7 @@ void MFU_GetMFUActions (struct MFU_ListMFUActions *ListMFUActions,unsigned MaxAc
|
|||
{
|
||||
/* Get action code */
|
||||
ActCod = DB_GetNextCode (mysql_res);
|
||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
||||
if ((Action = Act_GetActionFromActCod (ActCod)) != ActUnk)
|
||||
if (Act_GetIndexInMenu (Action) >= 0) // MFU actions must be only actions shown on menu (database could contain wrong action numbers)
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||
ListMFUActions->Actions[ListMFUActions->NumActions++] = Action;
|
||||
|
@ -148,7 +147,7 @@ Act_Action_t MFU_GetMyLastActionInCurrentTab (void)
|
|||
ActCod = DB_GetNextCode (mysql_res);
|
||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
||||
if (Act_GetTab (Act_GetSuperAction (Action)) == Gbl.Action.Tab)
|
||||
if (Act_GetTab (Action) == Gbl.Action.Tab)
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||
{
|
||||
MoreRecentActionInCurrentTab = Action;
|
||||
|
@ -213,7 +212,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
|||
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
||||
{
|
||||
/* Action string */
|
||||
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action))),
|
||||
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Action)),
|
||||
sizeof (TabStr) - 1);
|
||||
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
||||
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
||||
|
@ -271,7 +270,7 @@ void MFU_WriteSmallMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
|||
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
||||
{
|
||||
/* Action string */
|
||||
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action))),
|
||||
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Action)),
|
||||
sizeof (TabStr) - 1);
|
||||
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
||||
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
||||
|
|
|
@ -47,10 +47,10 @@ Act_Action_t Act_GetActionFromActCod (long ActCod)
|
|||
{
|
||||
extern Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD];
|
||||
|
||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
||||
return ActLst_FromActCodToAction[ActCod];
|
||||
|
||||
if (ActCod < 0 || ActCod > ActLst_MAX_ACTION_COD)
|
||||
return ActUnk;
|
||||
|
||||
return ActLst_FromActCodToAction[ActCod];
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -201,11 +201,21 @@ const char *Act_GetIconFromAction (Act_Action_t Action)
|
|||
const char *Act_GetTitleAction (Act_Action_t Action)
|
||||
{
|
||||
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
||||
Tab_Tab_t Tab;
|
||||
signed int IndexInMenu;
|
||||
|
||||
if ((unsigned) Action >= ActLst_NUM_ACTIONS)
|
||||
return NULL;
|
||||
|
||||
return Txt_MENU_TITLE[Act_GetTab (Action)][Act_GetIndexInMenu (Action)];
|
||||
Tab = Act_GetTab (Action);
|
||||
if (Tab == TabUnk)
|
||||
return NULL;
|
||||
|
||||
IndexInMenu = Act_GetIndexInMenu (Action);
|
||||
if (IndexInMenu < 0)
|
||||
return NULL;
|
||||
|
||||
return Txt_MENU_TITLE[Tab][IndexInMenu];
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -29,20 +29,18 @@
|
|||
|
||||
typedef enum
|
||||
{
|
||||
ActAll,
|
||||
/********************************* No tab *********************************/
|
||||
|
||||
ActAll,
|
||||
ActUnk,
|
||||
ActMnu,
|
||||
|
||||
ActRefCon,
|
||||
|
||||
ActWebSvc,
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************************* Start tab *********************************/
|
||||
/*****************************************************************************/
|
||||
/******************************* Start tab ********************************/
|
||||
|
||||
// Log in ------------------------------------------------------------------
|
||||
|
||||
// Log in
|
||||
ActFrmLogIn,
|
||||
ActLogIn,
|
||||
ActLogInNew,
|
||||
|
@ -52,11 +50,13 @@ typedef enum
|
|||
ActSndNewPwd,
|
||||
ActLogOut,
|
||||
|
||||
// Search
|
||||
// Search ------------------------------------------------------------------
|
||||
|
||||
ActReqSch,
|
||||
ActSch,
|
||||
|
||||
// Timeline
|
||||
// Timeline ----------------------------------------------------------------
|
||||
|
||||
ActSeeGblTL,
|
||||
ActRefNewPubGblTL,
|
||||
ActRefOldPubGblTL,
|
||||
|
@ -77,7 +77,8 @@ typedef enum
|
|||
ActReqRemComGblTL,
|
||||
ActRemComGblTL,
|
||||
|
||||
// Profiles
|
||||
// Profiles ----------------------------------------------------------------
|
||||
|
||||
ActSeeSocPrf,
|
||||
ActReqOthPubPrf,
|
||||
ActRefOldPubUsrTL,
|
||||
|
@ -105,12 +106,14 @@ typedef enum
|
|||
ActSeeFlr,
|
||||
ActSeeUsrAgd,
|
||||
|
||||
// Calendar
|
||||
// Calendar ----------------------------------------------------------------
|
||||
|
||||
ActSeeCal,
|
||||
ActPrnCal,
|
||||
ActChgCal1stDay,
|
||||
|
||||
// Notifications
|
||||
// Notifications -----------------------------------------------------------
|
||||
|
||||
ActSeeNtf,
|
||||
ActSeeNewNtf,
|
||||
ActMrkNtfSee,
|
||||
|
@ -121,15 +124,15 @@ typedef enum
|
|||
ActRenMaiSho,
|
||||
ActRenMaiFul,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** System tab *********************************/
|
||||
/*****************************************************************************/
|
||||
/****************************** System tab ********************************/
|
||||
|
||||
// System info -------------------------------------------------------------
|
||||
|
||||
// System info
|
||||
ActSeeSysInf,
|
||||
ActPrnSysInf,
|
||||
|
||||
// Countries
|
||||
// Countries ---------------------------------------------------------------
|
||||
|
||||
ActSeeCty,
|
||||
ActEdiCty,
|
||||
ActNewCty,
|
||||
|
@ -137,10 +140,12 @@ typedef enum
|
|||
ActRenCty,
|
||||
ActChgCtyWWW,
|
||||
|
||||
// Pending
|
||||
// Pending -----------------------------------------------------------------
|
||||
|
||||
ActSeePen,
|
||||
|
||||
// Links
|
||||
// Links -------------------------------------------------------------------
|
||||
|
||||
ActSeeLnk,
|
||||
ActEdiLnk,
|
||||
ActNewLnk,
|
||||
|
@ -160,7 +165,8 @@ typedef enum
|
|||
ActChgBanWWW,
|
||||
ActClkBan,
|
||||
|
||||
// Plugins
|
||||
// Plugins -----------------------------------------------------------------
|
||||
|
||||
ActSeePlg,
|
||||
ActEdiPlg,
|
||||
ActNewPlg,
|
||||
|
@ -172,22 +178,23 @@ typedef enum
|
|||
ActChgPlgURL,
|
||||
ActChgPlgIP,
|
||||
|
||||
// Maintenance
|
||||
// Maintenance -------------------------------------------------------------
|
||||
|
||||
ActMtn,
|
||||
ActSetUp,
|
||||
ActReqRemOldCrs,
|
||||
ActRemOldCrs,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Country tab ********************************/
|
||||
/*****************************************************************************/
|
||||
/****************************** Country tab *******************************/
|
||||
|
||||
// Country info ------------------------------------------------------------
|
||||
|
||||
// Country info
|
||||
ActSeeCtyInf,
|
||||
ActPrnCtyInf,
|
||||
ActChgCtyMapAtt,
|
||||
|
||||
// Institutions
|
||||
// Institutions ------------------------------------------------------------
|
||||
|
||||
ActSeeIns,
|
||||
ActEdiIns,
|
||||
ActReqIns,
|
||||
|
@ -198,11 +205,10 @@ typedef enum
|
|||
ActChgInsWWW,
|
||||
ActChgInsSta,
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Institution tab ******************************/
|
||||
/*****************************************************************************/
|
||||
/**************************** Institution tab *****************************/
|
||||
|
||||
// Institution info --------------------------------------------------------
|
||||
|
||||
// Institution info
|
||||
ActSeeInsInf,
|
||||
ActPrnInsInf,
|
||||
ActChgInsCtyCfg,
|
||||
|
@ -213,7 +219,8 @@ typedef enum
|
|||
ActRecInsLog,
|
||||
ActRemInsLog,
|
||||
|
||||
// Centers
|
||||
// Centers -----------------------------------------------------------------
|
||||
|
||||
ActSeeCtr,
|
||||
ActEdiCtr,
|
||||
ActReqCtr,
|
||||
|
@ -225,7 +232,8 @@ typedef enum
|
|||
ActChgCtrWWW,
|
||||
ActChgCtrSta,
|
||||
|
||||
// Places
|
||||
// Places ------------------------------------------------------------------
|
||||
|
||||
ActSeePlc,
|
||||
ActEdiPlc,
|
||||
ActNewPlc,
|
||||
|
@ -233,7 +241,8 @@ typedef enum
|
|||
ActRenPlcSho,
|
||||
ActRenPlcFul,
|
||||
|
||||
// Departments
|
||||
// Departments -------------------------------------------------------------
|
||||
|
||||
ActSeeDpt,
|
||||
ActEdiDpt,
|
||||
ActNewDpt,
|
||||
|
@ -243,7 +252,8 @@ typedef enum
|
|||
ActRenDptFul,
|
||||
ActChgDptWWW,
|
||||
|
||||
// Holidays
|
||||
// Holidays ----------------------------------------------------------------
|
||||
|
||||
ActSeeHld,
|
||||
ActEdiHld,
|
||||
ActNewHld,
|
||||
|
@ -254,11 +264,10 @@ typedef enum
|
|||
ActChgHldEndDat,
|
||||
ActRenHld,
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************************* Center tab ********************************/
|
||||
/*****************************************************************************/
|
||||
/******************************* Center tab *******************************/
|
||||
|
||||
// Center info -------------------------------------------------------------
|
||||
|
||||
// Center info
|
||||
ActSeeCtrInf,
|
||||
ActPrnCtrInf,
|
||||
ActChgCtrInsCfg,
|
||||
|
@ -276,7 +285,8 @@ typedef enum
|
|||
ActRecCtrPho,
|
||||
ActChgCtrPhoAtt,
|
||||
|
||||
// Degrees
|
||||
// Degrees -----------------------------------------------------------------
|
||||
|
||||
ActSeeDeg,
|
||||
ActEdiDeg,
|
||||
ActReqDeg,
|
||||
|
@ -293,7 +303,8 @@ typedef enum
|
|||
ActRemDegTyp,
|
||||
ActRenDegTyp,
|
||||
|
||||
// Buildings
|
||||
// Buildings ---------------------------------------------------------------
|
||||
|
||||
ActSeeBld,
|
||||
ActEdiBld,
|
||||
ActNewBld,
|
||||
|
@ -302,7 +313,8 @@ typedef enum
|
|||
ActRenBldFul,
|
||||
ActRenBldLoc,
|
||||
|
||||
// Rooms
|
||||
// Rooms -------------------------------------------------------------------
|
||||
|
||||
ActSeeRoo,
|
||||
ActEdiRoo,
|
||||
ActNewRoo,
|
||||
|
@ -315,10 +327,10 @@ typedef enum
|
|||
ActChgRooMaxUsr,
|
||||
ActChgRooMAC,
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************************* Degree tab ********************************/
|
||||
/*****************************************************************************/
|
||||
// Degree info
|
||||
/******************************* Degree tab *******************************/
|
||||
|
||||
// Degree info -------------------------------------------------------------
|
||||
|
||||
ActSeeDegInf,
|
||||
ActPrnDegInf,
|
||||
ActChgDegCtrCfg,
|
||||
|
@ -329,7 +341,8 @@ typedef enum
|
|||
ActRecDegLog,
|
||||
ActRemDegLog,
|
||||
|
||||
// Courses
|
||||
// Courses -----------------------------------------------------------------
|
||||
|
||||
ActSeeCrs,
|
||||
ActEdiCrs,
|
||||
ActReqCrs,
|
||||
|
@ -341,11 +354,10 @@ typedef enum
|
|||
ActRenCrsFul,
|
||||
ActChgCrsSta,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Course tab *********************************/
|
||||
/*****************************************************************************/
|
||||
/****************************** Course tab ********************************/
|
||||
|
||||
// Course info -------------------------------------------------------------
|
||||
|
||||
// Course info
|
||||
ActSeeCrsInf,
|
||||
ActPrnCrsInf,
|
||||
ActChgCrsDegCfg,
|
||||
|
@ -365,7 +377,8 @@ typedef enum
|
|||
ActRcvPlaTxtCrsInf,
|
||||
ActRcvRchTxtCrsInf,
|
||||
|
||||
// Program
|
||||
// Program -----------------------------------------------------------------
|
||||
|
||||
ActSeePrg,
|
||||
ActEdiPrg,
|
||||
ActSeePrgItm,
|
||||
|
@ -400,7 +413,8 @@ typedef enum
|
|||
ActFrmChgLnkPrgRsc,
|
||||
ActChgLnkPrgRsc,
|
||||
|
||||
// Teaching guide
|
||||
// Teaching guide ----------------------------------------------------------
|
||||
|
||||
ActSeeTchGui,
|
||||
ActEdiTchGui,
|
||||
ActChgFrcReaTchGui,
|
||||
|
@ -414,7 +428,8 @@ typedef enum
|
|||
ActRcvPlaTxtTchGui,
|
||||
ActRcvRchTxtTchGui,
|
||||
|
||||
// Syllabus
|
||||
// Syllabus ----------------------------------------------------------------
|
||||
|
||||
ActSeeSyl,
|
||||
ActSeeSylLec,
|
||||
ActSeeSylPra,
|
||||
|
@ -455,7 +470,8 @@ typedef enum
|
|||
ActRcvRchTxtSylLec,
|
||||
ActRcvRchTxtSylPra,
|
||||
|
||||
// Bibliography
|
||||
// Bibliography ------------------------------------------------------------
|
||||
|
||||
ActSeeBib,
|
||||
ActEdiBib,
|
||||
ActChgFrcReaBib,
|
||||
|
@ -469,7 +485,8 @@ typedef enum
|
|||
ActRcvPlaTxtBib,
|
||||
ActRcvRchTxtBib,
|
||||
|
||||
// FAQ
|
||||
// FAQ ---------------------------------------------------------------------
|
||||
|
||||
ActSeeFAQ,
|
||||
ActEdiFAQ,
|
||||
ActChgFrcReaFAQ,
|
||||
|
@ -483,7 +500,8 @@ typedef enum
|
|||
ActRcvPlaTxtFAQ,
|
||||
ActRcvRchTxtFAQ,
|
||||
|
||||
// Links
|
||||
// Links -------------------------------------------------------------------
|
||||
|
||||
ActSeeCrsLnk,
|
||||
ActEdiCrsLnk,
|
||||
ActChgFrcReaCrsLnk,
|
||||
|
@ -497,7 +515,8 @@ typedef enum
|
|||
ActRcvPlaTxtCrsLnk,
|
||||
ActRcvRchTxtCrsLnk,
|
||||
|
||||
// Assessment
|
||||
// Assessment --------------------------------------------------------------
|
||||
|
||||
ActSeeAss,
|
||||
ActEdiAss,
|
||||
ActChgFrcReaAss,
|
||||
|
@ -511,18 +530,18 @@ typedef enum
|
|||
ActRcvPlaTxtAss,
|
||||
ActRcvRchTxtAss,
|
||||
|
||||
// Timetable
|
||||
// Timetable ---------------------------------------------------------------
|
||||
|
||||
ActSeeCrsTT,
|
||||
ActPrnCrsTT,
|
||||
ActEdiCrsTT,
|
||||
ActChgCrsTT,
|
||||
ActChgCrsTT1stDay,
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Assessment tab ********************************/
|
||||
/*****************************************************************************/
|
||||
/*************************** Assessment tab *******************************/
|
||||
|
||||
// Assignments -------------------------------------------------------------
|
||||
|
||||
// Assignments
|
||||
ActSeeAllAsg,
|
||||
ActFrmNewAsg,
|
||||
ActEdiOneAsg,
|
||||
|
@ -536,7 +555,8 @@ typedef enum
|
|||
ActUnhAsg,
|
||||
ActReqLnkAsg,
|
||||
|
||||
// Projects
|
||||
// Projects ----------------------------------------------------------------
|
||||
|
||||
ActSeeAllPrj,
|
||||
ActCfgPrj,
|
||||
ActChgNETCanCrePrj,
|
||||
|
@ -613,7 +633,8 @@ typedef enum
|
|||
ActChgDatAssPrj,
|
||||
ActDowAssPrj,
|
||||
|
||||
// Calls for exams
|
||||
// Calls for exams ---------------------------------------------------------
|
||||
|
||||
ActSeeAllCfe,
|
||||
ActSeeOneCfe,
|
||||
ActSeeDatCfe,
|
||||
|
@ -626,7 +647,8 @@ typedef enum
|
|||
ActUnhCfe,
|
||||
ActReqLnkCfe,
|
||||
|
||||
// Questions
|
||||
// Questions ---------------------------------------------------------------
|
||||
|
||||
ActEdiTstQst,
|
||||
ActEdiOneTstQst,
|
||||
ActReqImpTstQst,
|
||||
|
@ -644,7 +666,8 @@ typedef enum
|
|||
ActDisTag,
|
||||
ActRenTag,
|
||||
|
||||
// Test
|
||||
// Test --------------------------------------------------------------------
|
||||
|
||||
ActReqTst,
|
||||
ActSeeTst,
|
||||
ActReqAssTst,
|
||||
|
@ -658,7 +681,8 @@ typedef enum
|
|||
ActSeeUsrTstResCrs,
|
||||
ActSeeOneTstResOth,
|
||||
|
||||
// Exams
|
||||
// Exams -------------------------------------------------------------------
|
||||
|
||||
ActSeeAllExa,
|
||||
ActSeeOneExa,
|
||||
ActFrmNewExa,
|
||||
|
@ -706,7 +730,8 @@ typedef enum
|
|||
ActSeeOneExaResOth,
|
||||
ActChgVisExaRes,
|
||||
|
||||
// Games
|
||||
// Games -------------------------------------------------------------------
|
||||
|
||||
ActSeeAllGam,
|
||||
ActSeeOneGam,
|
||||
ActReqNewMch,
|
||||
|
@ -756,7 +781,8 @@ typedef enum
|
|||
ActDwnGamQst,
|
||||
ActReqLnkGam,
|
||||
|
||||
// Rubrics
|
||||
// Rubrics -----------------------------------------------------------------
|
||||
|
||||
ActSeeAllRub,
|
||||
ActSeeOneRub,
|
||||
ActFrmNewRub,
|
||||
|
@ -779,11 +805,10 @@ typedef enum
|
|||
ActChgMaxRubCri,
|
||||
ActChgWeiRubCri,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Files tab **********************************/
|
||||
/*****************************************************************************/
|
||||
/****************************** Files tab *********************************/
|
||||
|
||||
// Documents of institution ------------------------------------------------
|
||||
|
||||
// Documents of institution
|
||||
ActSeeAdmDocIns,
|
||||
ActChgToSeeDocIns,
|
||||
ActSeeDocIns,
|
||||
|
@ -815,7 +840,8 @@ typedef enum
|
|||
ActChgDatAdmDocIns,
|
||||
ActDowAdmDocIns,
|
||||
|
||||
// Shared files of institution
|
||||
// Shared files of institution ---------------------------------------------
|
||||
|
||||
ActAdmShaIns,
|
||||
ActReqRemFilShaIns,
|
||||
ActRemFilShaIns,
|
||||
|
@ -836,7 +862,8 @@ typedef enum
|
|||
ActChgDatShaIns,
|
||||
ActDowShaIns,
|
||||
|
||||
// Documents of center
|
||||
// Documents of center -----------------------------------------------------
|
||||
|
||||
ActSeeAdmDocCtr,
|
||||
ActChgToSeeDocCtr,
|
||||
ActSeeDocCtr,
|
||||
|
@ -868,7 +895,8 @@ typedef enum
|
|||
ActChgDatAdmDocCtr,
|
||||
ActDowAdmDocCtr,
|
||||
|
||||
// Shared files of center
|
||||
// Shared files of center --------------------------------------------------
|
||||
|
||||
ActAdmShaCtr,
|
||||
ActReqRemFilShaCtr,
|
||||
ActRemFilShaCtr,
|
||||
|
@ -889,7 +917,8 @@ typedef enum
|
|||
ActChgDatShaCtr,
|
||||
ActDowShaCtr,
|
||||
|
||||
// Deocuments of degree
|
||||
// Documents of degree -----------------------------------------------------
|
||||
|
||||
ActSeeAdmDocDeg,
|
||||
ActChgToSeeDocDeg,
|
||||
ActSeeDocDeg,
|
||||
|
@ -921,7 +950,8 @@ typedef enum
|
|||
ActChgDatAdmDocDeg,
|
||||
ActDowAdmDocDeg,
|
||||
|
||||
// Shared files of degree
|
||||
// Shared files of degree --------------------------------------------------
|
||||
|
||||
ActAdmShaDeg,
|
||||
ActReqRemFilShaDeg,
|
||||
ActRemFilShaDeg,
|
||||
|
@ -942,7 +972,8 @@ typedef enum
|
|||
ActChgDatShaDeg,
|
||||
ActDowShaDeg,
|
||||
|
||||
// Documents of course
|
||||
// Documents of course -----------------------------------------------------
|
||||
|
||||
ActSeeAdmDocCrsGrp,
|
||||
ActChgToSeeDocCrs,
|
||||
ActSeeDocCrs,
|
||||
|
@ -1003,7 +1034,8 @@ typedef enum
|
|||
ActChgDatAdmDocGrp,
|
||||
ActDowAdmDocGrp,
|
||||
|
||||
// Private documents for course teachers
|
||||
// Private documents for course teachers -----------------------------------
|
||||
|
||||
ActAdmTchCrsGrp,
|
||||
ActChgToAdmTch,
|
||||
ActAdmTchCrs,
|
||||
|
@ -1045,7 +1077,8 @@ typedef enum
|
|||
ActChgDatTchGrp,
|
||||
ActDowTchGrp,
|
||||
|
||||
// Shared files of course
|
||||
// Shared files of course --------------------------------------------------
|
||||
|
||||
ActAdmShaCrsGrp,
|
||||
ActChgToAdmSha,
|
||||
ActAdmShaCrs,
|
||||
|
@ -1087,7 +1120,8 @@ typedef enum
|
|||
ActChgDatShaGrp,
|
||||
ActDowShaGrp,
|
||||
|
||||
// Assignments and works of user
|
||||
// Assignments and works of user -------------------------------------------
|
||||
|
||||
ActAdmAsgWrkUsr,
|
||||
ActReqRemFilAsgUsr,
|
||||
ActRemFilAsgUsr,
|
||||
|
@ -1126,7 +1160,8 @@ typedef enum
|
|||
ActChgDatWrkUsr,
|
||||
ActDowWrkUsr,
|
||||
|
||||
// Assignments and works of course
|
||||
// Assignments and works of course -----------------------------------------
|
||||
|
||||
ActReqAsgWrkCrs,
|
||||
ActAdmAsgWrkCrs,
|
||||
ActReqRemFilAsgCrs,
|
||||
|
@ -1166,7 +1201,8 @@ typedef enum
|
|||
ActChgDatWrkCrs,
|
||||
ActDowWrkCrs,
|
||||
|
||||
// Marks
|
||||
// Marks -------------------------------------------------------------------
|
||||
|
||||
ActSeeAdmMrk,
|
||||
ActChgToSeeMrk,
|
||||
ActSeeMrkCrs,
|
||||
|
@ -1227,7 +1263,8 @@ typedef enum
|
|||
ActChgNumRowHeaGrp,
|
||||
ActChgNumRowFooGrp,
|
||||
|
||||
// Briefcase
|
||||
// Briefcase ---------------------------------------------------------------
|
||||
|
||||
ActAdmBrf,
|
||||
ActReqRemFilBrf,
|
||||
ActRemFilBrf,
|
||||
|
@ -1250,11 +1287,10 @@ typedef enum
|
|||
ActReqRemOldBrf,
|
||||
ActRemOldBrf,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Users tab ***********************************/
|
||||
/*****************************************************************************/
|
||||
/***************************** Users tab **********************************/
|
||||
|
||||
// Groups ------------------------------------------------------------------
|
||||
|
||||
// Groups
|
||||
ActReqSelGrp,
|
||||
ActChgGrp,
|
||||
ActReqEdiGrp,
|
||||
|
@ -1277,7 +1313,8 @@ typedef enum
|
|||
ActChgGrpRoo,
|
||||
ActChgMaxStdGrp,
|
||||
|
||||
// Students
|
||||
// Students ----------------------------------------------------------------
|
||||
|
||||
ActLstStd,
|
||||
ActLstStdAll,
|
||||
ActPrnStdPho,
|
||||
|
@ -1325,7 +1362,8 @@ typedef enum
|
|||
ActChgVisFie,
|
||||
ActRcvRecCrs,
|
||||
|
||||
// Teachers
|
||||
// Teachers ----------------------------------------------------------------
|
||||
|
||||
ActLstTch,
|
||||
ActLstTchAll,
|
||||
ActPrnTchPho,
|
||||
|
@ -1374,7 +1412,8 @@ typedef enum
|
|||
ActLogInUsrAgd,
|
||||
ActLogInUsrAgdLan,
|
||||
|
||||
// Others
|
||||
// Others ------------------------------------------------------------------
|
||||
|
||||
ActLstOth,
|
||||
ActNewAdmIns,
|
||||
ActRemAdmIns,
|
||||
|
@ -1413,7 +1452,8 @@ typedef enum
|
|||
ActLstSimUsr,
|
||||
ActRemDupUsr,
|
||||
|
||||
// Attendance
|
||||
// Attendance --------------------------------------------------------------
|
||||
|
||||
ActSeeAllAtt,
|
||||
ActReqLstUsrAtt,
|
||||
ActSeeLstMyAtt,
|
||||
|
@ -1433,23 +1473,26 @@ typedef enum
|
|||
ActRecAttStd,
|
||||
ActRecAttMe,
|
||||
|
||||
// Sign up
|
||||
// Sign up -----------------------------------------------------------------
|
||||
|
||||
ActReqSignUp,
|
||||
ActSignUp,
|
||||
|
||||
// Requests
|
||||
// Requests ----------------------------------------------------------------
|
||||
|
||||
ActSeeSignUpReq,
|
||||
ActUpdSignUpReq,
|
||||
ActReqRejSignUp,
|
||||
ActRejSignUp,
|
||||
|
||||
// Connected
|
||||
// Connected ---------------------------------------------------------------
|
||||
|
||||
ActLstCon,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************* Messages tab ********************************/
|
||||
/*****************************************************************************/
|
||||
// Announcements
|
||||
/***************************** Messages tab *******************************/
|
||||
|
||||
// Announcements -----------------------------------------------------------
|
||||
|
||||
ActSeeAnn,
|
||||
ActWriAnn,
|
||||
ActNewAnn,
|
||||
|
@ -1457,7 +1500,8 @@ typedef enum
|
|||
ActUnhAnn,
|
||||
ActRemAnn,
|
||||
|
||||
// Notices
|
||||
// Notices -----------------------------------------------------------------
|
||||
|
||||
ActSeeAllNot,
|
||||
ActSeeOneNot,
|
||||
ActWriNot,
|
||||
|
@ -1467,7 +1511,8 @@ typedef enum
|
|||
ActReqRemNot,
|
||||
ActRemNot,
|
||||
|
||||
// Forums
|
||||
// Forums ------------------------------------------------------------------
|
||||
|
||||
ActSeeFor,
|
||||
ActSeeForCrsUsr,
|
||||
ActSeeForCrsTch,
|
||||
|
@ -1603,11 +1648,13 @@ typedef enum
|
|||
ActDisPstForSWATch,
|
||||
ActReqLnkForCrsUsr,
|
||||
|
||||
// Chat
|
||||
// Chat --------------------------------------------------------------------
|
||||
|
||||
ActSeeChtRms,
|
||||
ActCht,
|
||||
|
||||
// Messages
|
||||
// Messages ----------------------------------------------------------------
|
||||
|
||||
ActSeeRcvMsg,
|
||||
ActReqMsgUsr,
|
||||
ActSeeSntMsg,
|
||||
|
@ -1627,28 +1674,31 @@ typedef enum
|
|||
ActUnbUsrMsg,
|
||||
ActUnbUsrLst,
|
||||
|
||||
// Mail
|
||||
// Mail --------------------------------------------------------------------
|
||||
|
||||
ActReqMaiUsr,
|
||||
ActMaiUsr,
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Analytics tab ********************************/
|
||||
/*****************************************************************************/
|
||||
/**************************** Analytics tab *******************************/
|
||||
|
||||
// Figures -----------------------------------------------------------------
|
||||
|
||||
// Figures
|
||||
ActReqUseGbl,
|
||||
ActSeeUseGbl,
|
||||
|
||||
// Degrees
|
||||
// Degrees -----------------------------------------------------------------
|
||||
|
||||
ActSeePhoDeg,
|
||||
ActPrnPhoDeg,
|
||||
ActCalPhoDeg,
|
||||
|
||||
// Indicators
|
||||
// Indicators --------------------------------------------------------------
|
||||
|
||||
ActReqStaCrs,
|
||||
ActSeeAllStaCrs,
|
||||
|
||||
// Surveys
|
||||
// Surveys -----------------------------------------------------------------
|
||||
|
||||
ActSeeAllSvy,
|
||||
ActSeeOneSvy,
|
||||
ActAnsSvy,
|
||||
|
@ -1669,7 +1719,8 @@ typedef enum
|
|||
ActReqRemSvyQst,
|
||||
ActRemSvyQst,
|
||||
|
||||
// Visits
|
||||
// Visits ------------------------------------------------------------------
|
||||
|
||||
ActReqAccGbl,
|
||||
ActSeeAccGbl,
|
||||
ActReqAccCrs,
|
||||
|
@ -1677,32 +1728,36 @@ typedef enum
|
|||
ActLstClk,
|
||||
ActRefLstClk,
|
||||
|
||||
// Report
|
||||
// Report ------------------------------------------------------------------
|
||||
|
||||
ActReqMyUsgRep,
|
||||
ActSeeMyUsgRep,
|
||||
|
||||
// Frequent
|
||||
// Frequent ----------------------------------------------------------------
|
||||
|
||||
ActMFUAct,
|
||||
|
||||
/*****************************************************************************/
|
||||
/******************************** Profile tab ********************************/
|
||||
/*****************************************************************************/
|
||||
/****************************** Profile tab *******************************/
|
||||
|
||||
// Session -----------------------------------------------------------------
|
||||
|
||||
// Session
|
||||
ActFrmRolSes,
|
||||
ActChgMyRol,
|
||||
|
||||
// Courses
|
||||
// Courses -----------------------------------------------------------------
|
||||
|
||||
ActMyCrs,
|
||||
|
||||
// Timetable
|
||||
// Timetable ---------------------------------------------------------------
|
||||
|
||||
ActSeeMyTT,
|
||||
ActPrnMyTT,
|
||||
ActEdiTut,
|
||||
ActChgTut,
|
||||
ActChgMyTT1stDay,
|
||||
|
||||
// Agenda
|
||||
// Agenda ------------------------------------------------------------------
|
||||
|
||||
ActSeeMyAgd,
|
||||
ActFrmNewEvtMyAgd,
|
||||
ActEdiOneEvtMyAgd,
|
||||
|
@ -1716,7 +1771,8 @@ typedef enum
|
|||
ActPubEvtMyAgd,
|
||||
ActPrnAgdQR,
|
||||
|
||||
// Account
|
||||
// Account -----------------------------------------------------------------
|
||||
|
||||
ActFrmMyAcc,
|
||||
ActChkUsrAcc,
|
||||
ActCreMyAcc,
|
||||
|
@ -1733,7 +1789,8 @@ typedef enum
|
|||
ActRemMyAcc,
|
||||
ActPrnUsrQR,
|
||||
|
||||
// Record
|
||||
// Record ------------------------------------------------------------------
|
||||
|
||||
ActReqEdiRecSha,
|
||||
ActChgMyData,
|
||||
ActReqMyPho,
|
||||
|
@ -1750,7 +1807,8 @@ typedef enum
|
|||
ActReqEdiMyNet,
|
||||
ActChgMyNet,
|
||||
|
||||
// Settings
|
||||
// Settings ----------------------------------------------------------------
|
||||
|
||||
ActReqEdiSet,
|
||||
ActChgThe,
|
||||
ActReqChgLan,
|
||||
|
@ -1766,6 +1824,7 @@ typedef enum
|
|||
ActChgExtPriPrf,
|
||||
ActChgCooPrf,
|
||||
ActChgNtfPrf,
|
||||
|
||||
} Act_Action_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
|||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
||||
*/
|
||||
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.69 (2024-03-14)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.70 (2024-03-19)"
|
||||
#define CSS_FILE "swad23.67.2.css"
|
||||
#define JS_FILE "swad23.53.6.js"
|
||||
/*
|
||||
Version 23.70: Mar 19, 2024 Code refactoring and bug fixing in syllabus. (335413 lines)
|
||||
Version 23.69: Mar 14, 2024 Actions defined as enum type. (335591 lines)
|
||||
Version 23.68.1: Mar 14, 2024 Code refactoring in menu icons. (335591 lines)
|
||||
Version 23.68: Mar 14, 2024 New order in list of actions. (335700 lines)
|
||||
|
|
|
@ -83,22 +83,22 @@ void Frm_BeginFormGoTo (Act_Action_t NextAction)
|
|||
|
||||
void Frm_BeginForm (Act_Action_t NextAction)
|
||||
{
|
||||
Frm_BeginFormAnchorOnSubmit (NextAction,NULL,NULL);
|
||||
Frm_BeginFormInternal (NextAction,true,NULL,NULL,NULL); // Do put now parameter location (if no open session)
|
||||
}
|
||||
|
||||
void Frm_BeginFormAnchor (Act_Action_t NextAction,const char *Anchor)
|
||||
{
|
||||
Frm_BeginFormAnchorOnSubmit (NextAction,Anchor,NULL);
|
||||
Frm_BeginFormInternal (NextAction,true,NULL,Anchor,NULL); // Do put now parameter location (if no open session)
|
||||
}
|
||||
|
||||
void Frm_BeginFormOnSubmit (Act_Action_t NextAction,const char *OnSubmit)
|
||||
{
|
||||
Frm_BeginFormAnchorOnSubmit (NextAction,NULL,OnSubmit);
|
||||
Frm_BeginFormInternal (NextAction,true,NULL,NULL,OnSubmit); // Do put now parameter location (if no open session)
|
||||
}
|
||||
|
||||
void Frm_BeginFormAnchorOnSubmit (Act_Action_t NextAction,const char *Anchor,const char *OnSubmit)
|
||||
{
|
||||
Frm_BeginFormInternal (NextAction,true,NULL,Anchor,OnSubmit); // Do put now parameter location (if no open session)
|
||||
Frm_BeginFormInternal (NextAction,true,NULL,Anchor,OnSubmit);// Do put now parameter location (if no open session)
|
||||
}
|
||||
|
||||
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id)
|
||||
|
|
279
swad_info.c
279
swad_info.c
|
@ -54,22 +54,6 @@
|
|||
|
||||
extern struct Globals Gbl;
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************************** Public constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
const Act_Action_t Inf_ActionsSeeInfo[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActSeeCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActSeeTchGui,
|
||||
[Inf_LECTURES ] = ActSeeSylLec,
|
||||
[Inf_PRACTICALS ] = ActSeeSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActSeeBib,
|
||||
[Inf_FAQ ] = ActSeeFAQ,
|
||||
[Inf_LINKS ] = ActSeeCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActSeeAss,
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Private constants *****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -244,7 +228,6 @@ void Inf_ShowInfo (void)
|
|||
case Rol_NET:
|
||||
case Rol_TCH:
|
||||
case Rol_SYS_ADM:
|
||||
/* Put */
|
||||
if (FromDB.Src != Inf_NONE)
|
||||
{
|
||||
/***** Contextual menu *****/
|
||||
|
@ -259,6 +242,9 @@ void Inf_ShowInfo (void)
|
|||
break;
|
||||
}
|
||||
|
||||
/****** Form to select syllabus *****/
|
||||
Syl_PutFormWhichSyllabus (Syllabus.WhichSyllabus);
|
||||
|
||||
switch (FromDB.Src)
|
||||
{
|
||||
case Inf_NONE:
|
||||
|
@ -269,7 +255,7 @@ void Inf_ShowInfo (void)
|
|||
{
|
||||
case Inf_LECTURES:
|
||||
case Inf_PRACTICALS:
|
||||
ShowWarningNoInfo = !Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
ShowWarningNoInfo = !Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
break;
|
||||
case Inf_INTRODUCTION:
|
||||
case Inf_TEACHING_GUIDE:
|
||||
|
@ -316,28 +302,54 @@ void Inf_ShowInfo (void)
|
|||
|
||||
static void Inf_PutIconToViewInfo (void *Type)
|
||||
{
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
static struct
|
||||
{
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActSeeCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActSeeTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActSeeSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActSeeSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActSeeBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActSeeFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActSeeCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActSeeAss ,NULL,NULL},
|
||||
};
|
||||
|
||||
if (Type)
|
||||
Ico_PutContextualIconToView (Inf_ActionsSeeInfo[*((Inf_Type_t *) Type)],NULL,
|
||||
NULL,NULL);
|
||||
Ico_PutContextualIconToView (Inf_Actions[*((Inf_Type_t *) Type)].NextAction,NULL,
|
||||
Inf_Actions[*((Inf_Type_t *) Type)].FuncPars,
|
||||
Inf_Actions[*((Inf_Type_t *) Type)].Args);
|
||||
}
|
||||
|
||||
void Inf_PutIconToEditInfo (void *Type)
|
||||
{
|
||||
static const Act_Action_t Inf_ActionsEditInfo[Inf_NUM_TYPES] =
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
static struct
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActEdiCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActEdiTchGui,
|
||||
[Inf_LECTURES ] = ActEdiSylLec,
|
||||
[Inf_PRACTICALS ] = ActEdiSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActEdiBib,
|
||||
[Inf_FAQ ] = ActEdiFAQ,
|
||||
[Inf_LINKS ] = ActEdiCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActEdiAss,
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActEdiCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActEdiTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActEdiSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActEdiSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActEdiBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActEdiFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActEdiCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActEdiAss ,NULL,NULL},
|
||||
};
|
||||
|
||||
if (Type)
|
||||
Ico_PutContextualIconToEdit (Inf_ActionsEditInfo[*((Inf_Type_t *) Type)],NULL,
|
||||
NULL,NULL);
|
||||
Ico_PutContextualIconToEdit (Inf_Actions[*((Inf_Type_t *) Type)].NextAction,NULL,
|
||||
Inf_Actions[*((Inf_Type_t *) Type)].FuncPars,
|
||||
Inf_Actions[*((Inf_Type_t *) Type)].Args);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -441,9 +453,27 @@ bool Inf_GetIfIMustReadAnyCrsInfoInThisCrs (void)
|
|||
|
||||
void Inf_WriteMsgYouMustReadInfo (void)
|
||||
{
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
extern const char *Txt_Required_reading;
|
||||
extern const char *Txt_You_should_read_the_following_information;
|
||||
static struct
|
||||
{
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActSeeCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActSeeTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActSeeSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActSeeSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActSeeBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActSeeFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActSeeCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActSeeAss ,NULL,NULL},
|
||||
};
|
||||
Inf_Type_t InfoType;
|
||||
const char *TitleAction;
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (Txt_Required_reading,NULL,NULL,NULL,Box_CLOSABLE);
|
||||
|
@ -460,11 +490,14 @@ void Inf_WriteMsgYouMustReadInfo (void)
|
|||
if (Gbl.Crs.Info.MustBeRead[InfoType])
|
||||
{
|
||||
HTM_LI_Begin (NULL);
|
||||
Frm_BeginForm (Inf_ActionsSeeInfo[InfoType]);
|
||||
HTM_BUTTON_Submit_Begin (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]),
|
||||
Frm_BeginForm (Inf_Actions[InfoType].NextAction);
|
||||
if (Inf_Actions[InfoType].FuncPars)
|
||||
Inf_Actions[InfoType].FuncPars (Inf_Actions[InfoType].Args);
|
||||
TitleAction = Act_GetTitleAction (Inf_Actions[InfoType].NextAction);
|
||||
HTM_BUTTON_Submit_Begin (TitleAction,
|
||||
"class=\"BT_LINK FORM_IN_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Txt (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]));
|
||||
HTM_Txt (TitleAction);
|
||||
HTM_BUTTON_End ();
|
||||
Frm_EndForm ();
|
||||
HTM_LI_End ();
|
||||
|
@ -828,7 +861,7 @@ void Inf_FormsToSelSendInfo (void)
|
|||
[Inf_ASSESSMENT ] = ActSelInfSrcAss,
|
||||
};
|
||||
/* Functions to write forms in course edition (FAQ, links, etc.) */
|
||||
static void (*Inf_FormsForEditionTypes[Inf_NUM_SOURCES])(Inf_Src_t InfoSrc) =
|
||||
static void (*Inf_FormsForEditionTypes[Inf_NUM_SOURCES])(struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc) =
|
||||
{
|
||||
[Inf_NONE ] = NULL,
|
||||
[Inf_EDITOR ] = Inf_FormToEnterIntegratedEditor,
|
||||
|
@ -895,6 +928,7 @@ void Inf_FormsToSelSendInfo (void)
|
|||
InfoSrc == FromDB.Src ? " BG_HIGHLIGHT" :
|
||||
"");
|
||||
Frm_BeginForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus.WhichSyllabus);
|
||||
HTM_INPUT_RADIO ("InfoSrc",InfoSrc != FromDB.Src &&
|
||||
(InfoSrc == Inf_NONE ||
|
||||
InfoAvailable[InfoSrc]) ? HTM_SUBMIT_ON_CLICK :
|
||||
|
@ -925,7 +959,7 @@ void Inf_FormsToSelSendInfo (void)
|
|||
HTM_SPAN_End ();
|
||||
}
|
||||
if (Inf_FormsForEditionTypes[InfoSrc])
|
||||
Inf_FormsForEditionTypes[InfoSrc] (InfoSrc);
|
||||
Inf_FormsForEditionTypes[InfoSrc] (&Syllabus,InfoSrc);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TR_End ();
|
||||
|
@ -980,9 +1014,10 @@ static bool Inf_CheckIfInfoAvailable (struct Syl_Syllabus *Syllabus,
|
|||
/****************** Form to enter in integrated editor ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Inf_FormToEnterIntegratedEditor (Inf_Src_t InfoSrc)
|
||||
void Inf_FormToEnterIntegratedEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc)
|
||||
{
|
||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
Btn_PutConfirmButton (Act_GetActionText (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]));
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -991,11 +1026,12 @@ void Inf_FormToEnterIntegratedEditor (Inf_Src_t InfoSrc)
|
|||
/****************** Form to enter in plain text editor ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Inf_FormToEnterPlainTextEditor (Inf_Src_t InfoSrc)
|
||||
void Inf_FormToEnterPlainTextEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc)
|
||||
{
|
||||
extern const char *Txt_Edit_plain_text;
|
||||
|
||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
Btn_PutConfirmButton (Txt_Edit_plain_text);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1004,11 +1040,12 @@ void Inf_FormToEnterPlainTextEditor (Inf_Src_t InfoSrc)
|
|||
/******************* Form to enter in rich text editor ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Inf_FormToEnterRichTextEditor (Inf_Src_t InfoSrc)
|
||||
void Inf_FormToEnterRichTextEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc)
|
||||
{
|
||||
extern const char *Txt_Edit_rich_text;
|
||||
|
||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
Btn_PutConfirmButton (Txt_Edit_rich_text);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -1017,13 +1054,14 @@ void Inf_FormToEnterRichTextEditor (Inf_Src_t InfoSrc)
|
|||
/******************* Form to upload a file with a page ***********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Inf_FormToSendPage (Inf_Src_t InfoSrc)
|
||||
void Inf_FormToSendPage (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc)
|
||||
{
|
||||
extern const char *Txt_File;
|
||||
extern const char *Txt_Upload_file;
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
|
||||
/***** File *****/
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
|
@ -1046,7 +1084,7 @@ void Inf_FormToSendPage (Inf_Src_t InfoSrc)
|
|||
/********************* Form to send a link to a web page *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Inf_FormToSendURL (Inf_Src_t InfoSrc)
|
||||
void Inf_FormToSendURL (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc)
|
||||
{
|
||||
extern const char *Txt_URL;
|
||||
extern const char *Txt_Send_URL;
|
||||
|
@ -1059,6 +1097,7 @@ void Inf_FormToSendURL (Inf_Src_t InfoSrc)
|
|||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
|
||||
/***** Link *****/
|
||||
if ((FileURL = fopen (PathFile,"rb")) != NULL)
|
||||
|
@ -1094,34 +1133,13 @@ void Inf_FormToSendURL (Inf_Src_t InfoSrc)
|
|||
static void Inf_AsignInfoType (struct Inf_Info *Info,
|
||||
struct Syl_Syllabus *Syllabus)
|
||||
{
|
||||
switch (Gbl.Action.Act)
|
||||
Syllabus->WhichSyllabus = Syl_NONE;
|
||||
switch (Act_GetSuperAction (Gbl.Action.Act))
|
||||
{
|
||||
case ActSeeCrsInf:
|
||||
case ActEdiCrsInf:
|
||||
case ActChgFrcReaCrsInf:
|
||||
case ActChgHavReaCrsInf:
|
||||
case ActSelInfSrcCrsInf:
|
||||
case ActEditorCrsInf:
|
||||
case ActRcvURLCrsInf:
|
||||
case ActRcvPagCrsInf:
|
||||
case ActPlaTxtEdiCrsInf:
|
||||
case ActRchTxtEdiCrsInf:
|
||||
case ActRcvPlaTxtCrsInf:
|
||||
case ActRcvRchTxtCrsInf:
|
||||
Info->Type = Inf_INTRODUCTION;
|
||||
break;
|
||||
case ActSeeTchGui:
|
||||
case ActEdiTchGui:
|
||||
case ActChgFrcReaTchGui:
|
||||
case ActChgHavReaTchGui:
|
||||
case ActSelInfSrcTchGui:
|
||||
case ActEditorTchGui:
|
||||
case ActRcvURLTchGui:
|
||||
case ActRcvPagTchGui:
|
||||
case ActPlaTxtEdiTchGui:
|
||||
case ActRchTxtEdiTchGui:
|
||||
case ActRcvPlaTxtTchGui:
|
||||
case ActRcvRchTxtTchGui:
|
||||
Info->Type = Inf_TEACHING_GUIDE;
|
||||
break;
|
||||
case ActSeeSyl:
|
||||
|
@ -1129,92 +1147,21 @@ static void Inf_AsignInfoType (struct Inf_Info *Info,
|
|||
Info->Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
break;
|
||||
case ActSeeSylLec:
|
||||
case ActEdiSylLec:
|
||||
case ActChgFrcReaSylLec:
|
||||
case ActChgHavReaSylLec:
|
||||
case ActSelInfSrcSylLec:
|
||||
case ActEditorSylLec:
|
||||
case ActRcvURLSylLec:
|
||||
case ActRcvPagSylLec:
|
||||
case ActPlaTxtEdiSylLec:
|
||||
case ActRchTxtEdiSylLec:
|
||||
case ActRcvPlaTxtSylLec:
|
||||
case ActRcvRchTxtSylLec:
|
||||
Syllabus->WhichSyllabus = Syl_LECTURES;
|
||||
Info->Type = Inf_LECTURES;
|
||||
break;
|
||||
case ActSeeSylPra:
|
||||
case ActEdiSylPra:
|
||||
case ActChgFrcReaSylPra:
|
||||
case ActChgHavReaSylPra:
|
||||
case ActSelInfSrcSylPra:
|
||||
case ActEditorSylPra:
|
||||
case ActRcvURLSylPra:
|
||||
case ActRcvPagSylPra:
|
||||
case ActPlaTxtEdiSylPra:
|
||||
case ActRchTxtEdiSylPra:
|
||||
case ActRcvPlaTxtSylPra:
|
||||
case ActRcvRchTxtSylPra:
|
||||
Syllabus->WhichSyllabus = Syl_PRACTICALS;
|
||||
Info->Type = Inf_PRACTICALS;
|
||||
break;
|
||||
case ActSeeBib:
|
||||
case ActEdiBib:
|
||||
case ActChgFrcReaBib:
|
||||
case ActChgHavReaBib:
|
||||
case ActSelInfSrcBib:
|
||||
case ActEditorBib:
|
||||
case ActRcvURLBib:
|
||||
case ActRcvPagBib:
|
||||
case ActPlaTxtEdiBib:
|
||||
case ActRchTxtEdiBib:
|
||||
case ActRcvPlaTxtBib:
|
||||
case ActRcvRchTxtBib:
|
||||
Info->Type = Inf_BIBLIOGRAPHY;
|
||||
break;
|
||||
case ActSeeFAQ:
|
||||
case ActEdiFAQ:
|
||||
case ActChgFrcReaFAQ:
|
||||
case ActChgHavReaFAQ:
|
||||
case ActSelInfSrcFAQ:
|
||||
case ActEditorFAQ:
|
||||
case ActRcvURLFAQ:
|
||||
case ActRcvPagFAQ:
|
||||
case ActPlaTxtEdiFAQ:
|
||||
case ActRchTxtEdiFAQ:
|
||||
case ActRcvPlaTxtFAQ:
|
||||
case ActRcvRchTxtFAQ:
|
||||
Info->Type = Inf_FAQ;
|
||||
break;
|
||||
case ActSeeCrsLnk:
|
||||
case ActEdiCrsLnk:
|
||||
case ActChgFrcReaCrsLnk:
|
||||
case ActChgHavReaCrsLnk:
|
||||
case ActSelInfSrcCrsLnk:
|
||||
case ActEditorCrsLnk:
|
||||
case ActRcvURLCrsLnk:
|
||||
case ActRcvPagCrsLnk:
|
||||
case ActPlaTxtEdiCrsLnk:
|
||||
case ActRchTxtEdiCrsLnk:
|
||||
case ActRcvPlaTxtCrsLnk:
|
||||
case ActRcvRchTxtCrsLnk:
|
||||
Info->Type = Inf_LINKS;
|
||||
break;
|
||||
case ActSeeAss:
|
||||
case ActEdiAss:
|
||||
case ActChgFrcReaAss:
|
||||
case ActChgHavReaAss:
|
||||
case ActSelInfSrcAss:
|
||||
case ActEditorAss:
|
||||
case ActRcvURLAss:
|
||||
case ActRcvPagAss:
|
||||
case ActPlaTxtEdiAss:
|
||||
case ActRchTxtEdiAss:
|
||||
case ActRcvPlaTxtAss:
|
||||
case ActRcvRchTxtAss:
|
||||
Info->Type = Inf_ASSESSMENT;
|
||||
break;
|
||||
default:
|
||||
Err_WrongActionExit ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1615,20 +1562,26 @@ static bool Inf_CheckAndShowRichTxt (void)
|
|||
|
||||
void Inf_EditPlainTxtInfo (void)
|
||||
{
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
extern const char *Txt_Save_changes;
|
||||
struct Syl_Syllabus Syllabus;
|
||||
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||
static const Act_Action_t Inf_ActionsRcvPlaTxtInfo[Inf_NUM_TYPES] =
|
||||
static struct
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActRcvPlaTxtCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActRcvPlaTxtTchGui,
|
||||
[Inf_LECTURES ] = ActRcvPlaTxtSylLec,
|
||||
[Inf_PRACTICALS ] = ActRcvPlaTxtSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActRcvPlaTxtBib,
|
||||
[Inf_FAQ ] = ActRcvPlaTxtFAQ,
|
||||
[Inf_LINKS ] = ActRcvPlaTxtCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActRcvPlaTxtAss,
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActRcvPlaTxtCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActRcvPlaTxtTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActRcvPlaTxtSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActRcvPlaTxtSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActRcvPlaTxtBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActRcvPlaTxtFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActRcvPlaTxtCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActRcvPlaTxtAss ,NULL,NULL},
|
||||
};
|
||||
const char *HelpEdit[Inf_NUM_TYPES] =
|
||||
{
|
||||
|
@ -1649,7 +1602,9 @@ void Inf_EditPlainTxtInfo (void)
|
|||
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
||||
|
||||
/***** Begin form and box *****/
|
||||
Frm_BeginForm (Inf_ActionsRcvPlaTxtInfo[Gbl.Crs.Info.Type]);
|
||||
Frm_BeginForm (Inf_Actions[Gbl.Crs.Info.Type].NextAction);
|
||||
if (Inf_Actions[Gbl.Crs.Info.Type].FuncPars)
|
||||
Inf_Actions[Gbl.Crs.Info.Type].FuncPars (Inf_Actions[Gbl.Crs.Info.Type].Args);
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],NULL,NULL,
|
||||
HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
|
||||
|
@ -1682,20 +1637,26 @@ void Inf_EditPlainTxtInfo (void)
|
|||
|
||||
void Inf_EditRichTxtInfo (void)
|
||||
{
|
||||
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
extern const char *Txt_Save_changes;
|
||||
struct Syl_Syllabus Syllabus;
|
||||
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||
static const Act_Action_t Inf_ActionsRcvRchTxtInfo[Inf_NUM_TYPES] =
|
||||
static struct
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActRcvRchTxtCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActRcvRchTxtTchGui,
|
||||
[Inf_LECTURES ] = ActRcvRchTxtSylLec,
|
||||
[Inf_PRACTICALS ] = ActRcvRchTxtSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActRcvRchTxtBib,
|
||||
[Inf_FAQ ] = ActRcvRchTxtFAQ,
|
||||
[Inf_LINKS ] = ActRcvRchTxtCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActRcvRchTxtAss,
|
||||
const Act_Action_t NextAction;
|
||||
void (*FuncPars) (void *Args);
|
||||
void *Args;
|
||||
} Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = {ActRcvRchTxtCrsInf,NULL,NULL},
|
||||
[Inf_TEACHING_GUIDE] = {ActRcvRchTxtTchGui,NULL,NULL},
|
||||
[Inf_LECTURES ] = {ActRcvRchTxtSylLec,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_LECTURES ]},
|
||||
[Inf_PRACTICALS ] = {ActRcvRchTxtSylPra,Syl_PutParWhichSyllabus,&Syl_WhichSyllabus[Syl_PRACTICALS]},
|
||||
[Inf_BIBLIOGRAPHY ] = {ActRcvRchTxtBib ,NULL,NULL},
|
||||
[Inf_FAQ ] = {ActRcvRchTxtFAQ ,NULL,NULL},
|
||||
[Inf_LINKS ] = {ActRcvRchTxtCrsLnk,NULL,NULL},
|
||||
[Inf_ASSESSMENT ] = {ActRcvRchTxtAss ,NULL,NULL},
|
||||
};
|
||||
const char *HelpEdit[Inf_NUM_TYPES] =
|
||||
{
|
||||
|
@ -1716,7 +1677,9 @@ void Inf_EditRichTxtInfo (void)
|
|||
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
||||
|
||||
/***** Begin form and box *****/
|
||||
Frm_BeginForm (Inf_ActionsRcvRchTxtInfo[Gbl.Crs.Info.Type]);
|
||||
Frm_BeginForm (Inf_Actions[Gbl.Crs.Info.Type].NextAction);
|
||||
if (Inf_Actions[Gbl.Crs.Info.Type].FuncPars)
|
||||
Inf_Actions[Gbl.Crs.Info.Type].FuncPars (Inf_Actions[Gbl.Crs.Info.Type].Args);
|
||||
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],NULL,NULL,
|
||||
HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||
|
||||
|
|
10
swad_info.h
10
swad_info.h
|
@ -88,11 +88,11 @@ void Inf_BuildPathPage (long CrsCod,Inf_Type_t InfoType,char PathDir[PATH_MAX +
|
|||
void Inf_WriteURLIntoTxtBuffer (char TxtBuffer[Cns_MAX_BYTES_WWW + 1]);
|
||||
void Inf_SetInfoSrc (void);
|
||||
void Inf_FormsToSelSendInfo (void);
|
||||
void Inf_FormToEnterIntegratedEditor (Inf_Src_t InfoSrc);
|
||||
void Inf_FormToEnterPlainTextEditor (Inf_Src_t InfoSrc);
|
||||
void Inf_FormToEnterRichTextEditor (Inf_Src_t InfoSrc);
|
||||
void Inf_FormToSendPage (Inf_Src_t InfoSrc);
|
||||
void Inf_FormToSendURL (Inf_Src_t InfoSrc);
|
||||
void Inf_FormToEnterIntegratedEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||
void Inf_FormToEnterPlainTextEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||
void Inf_FormToEnterRichTextEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||
void Inf_FormToSendPage (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||
void Inf_FormToSendURL (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||
Inf_Src_t Inf_GetInfoSrcFromForm (void);
|
||||
Inf_Src_t Inf_GetInfoSrcFromDB (long CrsCod,Inf_Type_t InfoType);
|
||||
void Inf_GetAndCheckInfoSrcFromDB (struct Syl_Syllabus *Syllabus,
|
||||
|
|
|
@ -347,16 +347,11 @@ static void Mai_GetMailDomain (const char *Email,
|
|||
void Mai_WriteWarningEmailNotifications (void)
|
||||
{
|
||||
extern const char *Txt_You_can_only_receive_email_notifications_if_;
|
||||
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
||||
extern const char *Txt_Domains;
|
||||
Tab_Tab_t TabMyAccount = Act_GetTab (ActFrmMyAcc);
|
||||
Tab_Tab_t TabMailDomains = Act_GetTab (ActSeeMai);
|
||||
|
||||
Ale_ShowAlert (Ale_WARNING,Txt_You_can_only_receive_email_notifications_if_,
|
||||
Tab_GetTxt (TabMyAccount),
|
||||
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
||||
Tab_GetTxt (TabMailDomains),
|
||||
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
||||
Tab_GetTxt (Act_GetTab (ActFrmMyAcc)),Act_GetTitleAction (ActFrmMyAcc),
|
||||
Tab_GetTxt (Act_GetTab (ActSeeMai )),Act_GetTitleAction (ActSeeMai ),
|
||||
Txt_Domains);
|
||||
}
|
||||
|
||||
|
|
17
swad_menu.c
17
swad_menu.c
|
@ -240,14 +240,13 @@ Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void)
|
|||
void Mnu_WriteMenuThisTab (void)
|
||||
{
|
||||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
||||
extern const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB];
|
||||
static const char *ClassIcoMenu[Ico_NUM_ICON_SETS] =
|
||||
{
|
||||
[Ico_ICON_SET_AWESOME] = "MENU_ICO",
|
||||
[Ico_ICON_SET_NUVOLA ] = NULL,
|
||||
};
|
||||
unsigned NumOptInMenu;
|
||||
Act_Action_t NumAct;
|
||||
Act_Action_t Action;
|
||||
const char *Title;
|
||||
bool IsTheSelectedAction;
|
||||
|
||||
|
@ -262,14 +261,14 @@ void Mnu_WriteMenuThisTab (void)
|
|||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||
NumOptInMenu++)
|
||||
{
|
||||
NumAct = Mnu_Menu[Gbl.Action.Tab][NumOptInMenu].Action;
|
||||
if (NumAct == 0) // At the end of each tab, actions are initialized to 0, so 0 marks the end of the menu
|
||||
Action = Mnu_Menu[Gbl.Action.Tab][NumOptInMenu].Action;
|
||||
if (Action == 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))
|
||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||
{
|
||||
IsTheSelectedAction = (NumAct == Act_GetSuperAction (Gbl.Action.Act));
|
||||
IsTheSelectedAction = (Action == Act_GetSuperAction (Gbl.Action.Act));
|
||||
|
||||
Title = Act_GetActionText (NumAct);
|
||||
Title = Act_GetActionText (Action);
|
||||
|
||||
/***** Begin option *****/
|
||||
HTM_LI_Begin ("class=\"MENU_LIST_ITEM %s\"",
|
||||
|
@ -277,7 +276,7 @@ void Mnu_WriteMenuThisTab (void)
|
|||
"MENU_OPT_OFF");
|
||||
|
||||
/***** Begin form *****/
|
||||
Frm_BeginForm (NumAct);
|
||||
Frm_BeginForm (Action);
|
||||
|
||||
/***** Begin link *****/
|
||||
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
|
||||
|
@ -298,7 +297,7 @@ void Mnu_WriteMenuThisTab (void)
|
|||
HTM_DIV_End ();
|
||||
HTM_DIV_Begin ("class=\"MENU_TXT MENU_TXT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Txt (Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]);
|
||||
HTM_Txt (Act_GetTitleAction (Action));
|
||||
HTM_DIV_End ();
|
||||
HTM_DIV_End ();
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@ static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report)
|
|||
{
|
||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
||||
{
|
||||
TabTxt = Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action)));
|
||||
TabTxt = Tab_GetTxt (Act_GetTab (Action));
|
||||
if (TabTxt)
|
||||
fprintf (Rep_File,"%s > ",TabTxt);
|
||||
}
|
||||
|
|
204
swad_syllabus.c
204
swad_syllabus.c
|
@ -50,6 +50,17 @@
|
|||
#include "swad_string.h"
|
||||
#include "swad_xml.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/***************************** Public constants ******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS] =
|
||||
{
|
||||
[Syl_NONE ] = Syl_NONE,
|
||||
[Syl_LECTURES ] = Syl_LECTURES,
|
||||
[Syl_PRACTICALS] = Syl_PRACTICALS
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/************** External global variables from others modules ****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -106,17 +117,14 @@ struct LstItemsSyllabus Syl_LstItemsSyllabus;
|
|||
/***************************** Private prototypes ****************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected);
|
||||
|
||||
static unsigned Syl_GetParItemNumber (void);
|
||||
|
||||
static void Syl_SetSyllabusTypeFromAction (struct Syl_Syllabus *Syllabus);
|
||||
static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus);
|
||||
static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
||||
int Level,int *CodItem,const char *Text,bool NewItem);
|
||||
static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
||||
bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text);
|
||||
static void Syl_PutParNumItem (void *ParNumItem);
|
||||
static void Syl_PutParsSyllabus (void *Syllabus);
|
||||
|
||||
static void Syl_WriteNumItem (char *StrDst,FILE *FileTgt,int Level,int *CodItem);
|
||||
|
||||
|
@ -154,22 +162,44 @@ Syl_WhichSyllabus_t Syl_GetParWhichSyllabus (void)
|
|||
(unsigned long) Syl_DEFAULT_WHICH_SYLLABUS);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/****************** Put parameter with type of syllabus **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Syl_PutParWhichSyllabus (void *SyllabusSelected)
|
||||
{
|
||||
if (SyllabusSelected)
|
||||
if (*((Syl_WhichSyllabus_t *) SyllabusSelected) != Syl_NONE)
|
||||
Par_PutParUnsigned (NULL,"WhichSyllabus",
|
||||
(unsigned) *((Syl_WhichSyllabus_t *) SyllabusSelected));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ Write form to select syllabus **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected)
|
||||
void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t WhichSyllabus)
|
||||
{
|
||||
extern const char *Txt_SYLLABUS_WHICH_SYLLABUS[Syl_NUM_WHICH_SYLLABUS];
|
||||
Syl_WhichSyllabus_t WhichSyl;
|
||||
|
||||
/***** If no syllabus ==> nothing to do *****/
|
||||
switch (Gbl.Crs.Info.Type)
|
||||
{
|
||||
case Inf_LECTURES:
|
||||
case Inf_PRACTICALS:
|
||||
break;
|
||||
default: // Nothing to do
|
||||
return;
|
||||
}
|
||||
|
||||
/***** Form to select which syllabus I want to see (lectures/practicals) *****/
|
||||
Frm_BeginForm (ActSeeSyl);
|
||||
HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE DAT_%s\"",The_GetSuffix ());
|
||||
HTM_UL_Begin (NULL);
|
||||
|
||||
for (WhichSyl = (Syl_WhichSyllabus_t) 0;
|
||||
WhichSyl <= (Syl_WhichSyllabus_t) (For_NUM_FORUM_SETS - 1);
|
||||
for (WhichSyl = (Syl_WhichSyllabus_t) 1;
|
||||
WhichSyl <= (Syl_WhichSyllabus_t) (Syl_NUM_WHICH_SYLLABUS - 1);
|
||||
WhichSyl++)
|
||||
{
|
||||
HTM_LI_Begin (NULL);
|
||||
|
@ -177,7 +207,7 @@ static void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected)
|
|||
HTM_INPUT_RADIO ("WhichSyllabus",HTM_SUBMIT_ON_CLICK,
|
||||
"value=\"%u\"%s",
|
||||
(unsigned) WhichSyl,
|
||||
WhichSyl == SyllabusSelected ? " checked=\"checked\"" :
|
||||
WhichSyl == WhichSyllabus ? " checked=\"checked\"" :
|
||||
"");
|
||||
HTM_Txt (Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyl]);
|
||||
HTM_LABEL_End ();
|
||||
|
@ -226,10 +256,12 @@ bool Syl_CheckSyllabus (struct Syl_Syllabus *Syllabus,long CrsCod)
|
|||
/*****************************************************************************/
|
||||
// Return true if info available
|
||||
|
||||
bool Syl_CheckAndEditSyllabus (struct Syl_Syllabus *Syllabus)
|
||||
bool Syl_CheckAndShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||
{
|
||||
/***** Set syllabus type depending on current action *****/
|
||||
Syl_SetSyllabusTypeFromAction (Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus->WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
@ -275,72 +307,7 @@ void Syl_EditSyllabus (void)
|
|||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Edit syllabus *****/
|
||||
Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************* Set syllabus type depending on the current action *************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Syl_SetSyllabusTypeFromAction (struct Syl_Syllabus *Syllabus)
|
||||
{
|
||||
Gbl.Crs.Info.Type = Inf_LECTURES;
|
||||
|
||||
/***** Set the type of syllabus (lectures or practicals) *****/
|
||||
switch (Gbl.Action.Act)
|
||||
{
|
||||
case ActSeeSyl:
|
||||
Gbl.Crs.Info.Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
break;
|
||||
case ActSeeSylLec:
|
||||
case ActEdiSylLec:
|
||||
case ActDelItmSylLec:
|
||||
case ActUp_IteSylLec:
|
||||
case ActDwnIteSylLec:
|
||||
case ActRgtIteSylLec:
|
||||
case ActLftIteSylLec:
|
||||
case ActInsIteSylLec:
|
||||
case ActModIteSylLec:
|
||||
case ActChgFrcReaSylLec:
|
||||
case ActChgHavReaSylLec:
|
||||
case ActSelInfSrcSylLec:
|
||||
case ActRcvURLSylLec:
|
||||
case ActRcvPagSylLec:
|
||||
case ActEditorSylLec:
|
||||
case ActPlaTxtEdiSylLec:
|
||||
case ActRchTxtEdiSylLec:
|
||||
case ActRcvPlaTxtSylLec:
|
||||
case ActRcvRchTxtSylLec:
|
||||
Syllabus->WhichSyllabus = Syl_LECTURES;
|
||||
Gbl.Crs.Info.Type = Inf_LECTURES;
|
||||
break;
|
||||
case ActSeeSylPra:
|
||||
case ActEdiSylPra:
|
||||
case ActDelItmSylPra:
|
||||
case ActUp_IteSylPra:
|
||||
case ActDwnIteSylPra:
|
||||
case ActRgtIteSylPra:
|
||||
case ActLftIteSylPra:
|
||||
case ActInsIteSylPra:
|
||||
case ActModIteSylPra:
|
||||
case ActChgFrcReaSylPra:
|
||||
case ActChgHavReaSylPra:
|
||||
case ActSelInfSrcSylPra:
|
||||
case ActRcvURLSylPra:
|
||||
case ActRcvPagSylPra:
|
||||
case ActEditorSylPra:
|
||||
case ActPlaTxtEdiSylPra:
|
||||
case ActRchTxtEdiSylPra:
|
||||
case ActRcvPlaTxtSylPra:
|
||||
case ActRcvRchTxtSylPra:
|
||||
Syllabus->WhichSyllabus = Syl_PRACTICALS;
|
||||
Gbl.Crs.Info.Type = Inf_PRACTICALS;
|
||||
break;
|
||||
default:
|
||||
Err_WrongActionExit ();
|
||||
break;
|
||||
}
|
||||
Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -516,7 +483,6 @@ int Syl_ReadLevelItemSyllabus (FILE *XML)
|
|||
|
||||
static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||
{
|
||||
extern const Act_Action_t Inf_ActionsSeeInfo[Inf_NUM_TYPES];
|
||||
extern const char *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||
extern const char *Hlp_COURSE_Syllabus_edit;
|
||||
extern const char *Hlp_COURSE_Syllabus;
|
||||
|
@ -533,6 +499,17 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
|||
[Vie_VIEW] = 0,
|
||||
[Vie_EDIT] = 5,
|
||||
};
|
||||
static const Act_Action_t Inf_Actions[Inf_NUM_TYPES] =
|
||||
{
|
||||
[Inf_INTRODUCTION ] = ActSeeCrsInf,
|
||||
[Inf_TEACHING_GUIDE] = ActSeeTchGui,
|
||||
[Inf_LECTURES ] = ActSeeSylLec,
|
||||
[Inf_PRACTICALS ] = ActSeeSylPra,
|
||||
[Inf_BIBLIOGRAPHY ] = ActSeeBib,
|
||||
[Inf_FAQ ] = ActSeeFAQ,
|
||||
[Inf_LINKS ] = ActSeeCrsLnk,
|
||||
[Inf_ASSESSMENT ] = ActSeeAss,
|
||||
};
|
||||
bool ShowRowInsertNewItem = (Gbl.Action.Act == ActInsIteSylLec || Gbl.Action.Act == ActInsIteSylPra ||
|
||||
Gbl.Action.Act == ActModIteSylLec || Gbl.Action.Act == ActModIteSylPra ||
|
||||
Gbl.Action.Act == ActRgtIteSylLec || Gbl.Action.Act == ActRgtIteSylPra ||
|
||||
|
@ -549,9 +526,6 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
|||
NULL,
|
||||
*HelpLink[Syllabus->ViewType],Box_NOT_CLOSABLE);
|
||||
|
||||
/****** Form to select syllabus *****/
|
||||
Syl_PutFormWhichSyllabus (Syllabus->WhichSyllabus);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWide ();
|
||||
|
||||
|
@ -596,7 +570,8 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
|||
/***** Button to view *****/
|
||||
if (Syllabus->ViewType == Vie_EDIT)
|
||||
{
|
||||
Frm_BeginForm (Inf_ActionsSeeInfo[Gbl.Crs.Info.Type]);
|
||||
Frm_BeginForm (Inf_Actions[Gbl.Crs.Info.Type]);
|
||||
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||
Btn_PutConfirmButton (Txt_Done);
|
||||
Frm_EndForm ();
|
||||
}
|
||||
|
@ -674,7 +649,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
else
|
||||
Ico_PutContextualIconToRemove (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
|
||||
ActDelItmSylPra,NULL,
|
||||
Syl_PutParNumItem,&Syllabus->ParNumItem);
|
||||
Syl_PutParsSyllabus,Syllabus);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Icon to get up an item *****/
|
||||
|
@ -684,7 +659,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActUp_IteSylLec :
|
||||
ActUp_IteSylPra,
|
||||
NULL,
|
||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-up.svg",Ico_BLACK);
|
||||
else
|
||||
Ico_PutIconOff ("arrow-up.svg",Ico_BLACK,
|
||||
|
@ -698,7 +673,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDwnIteSylLec :
|
||||
ActDwnIteSylPra,
|
||||
NULL,
|
||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-down.svg",Ico_BLACK);
|
||||
else
|
||||
Ico_PutIconOff ("arrow-down.svg",Ico_BLACK,
|
||||
|
@ -711,7 +686,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActRgtIteSylLec :
|
||||
ActRgtIteSylPra,
|
||||
NULL,
|
||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-left.svg",Ico_BLACK);
|
||||
else
|
||||
Ico_PutIconOff ("arrow-left.svg",Ico_BLACK,
|
||||
|
@ -725,7 +700,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
|||
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActLftIteSylLec :
|
||||
ActLftIteSylPra,
|
||||
NULL,
|
||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
||||
Syl_PutParsSyllabus,Syllabus,
|
||||
"arrow-right.svg",Ico_BLACK);
|
||||
else
|
||||
Ico_PutIconOff ("arrow-right.svg",Ico_BLACK,
|
||||
|
@ -863,7 +838,7 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
|||
(Gbl.Crs.Info.Type == Inf_LECTURES ? ActModIteSylLec :
|
||||
ActModIteSylPra));
|
||||
Syllabus->ParNumItem = NumItem;
|
||||
Syl_PutParNumItem (&Syllabus->ParNumItem);
|
||||
Syl_PutParsSyllabus (Syllabus);
|
||||
HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"size=\"60\" class=\"INPUT_%s\" placeholder=\"%s\"%s",
|
||||
|
@ -876,13 +851,18 @@ static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/***** Write parameter with the number of an item in a syllabus form *********/
|
||||
/******************* Write parameters related to syllabus ********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Syl_PutParNumItem (void *ParNumItem)
|
||||
static void Syl_PutParsSyllabus (void *Syllabus)
|
||||
{
|
||||
if (ParNumItem)
|
||||
Par_PutParUnsigned (NULL,"NumI",*((unsigned *) ParNumItem));
|
||||
if (Syllabus)
|
||||
{
|
||||
if (((struct Syl_Syllabus *) Syllabus)->WhichSyllabus != Syl_NONE)
|
||||
Par_PutParUnsigned (NULL,"WhichSyllabus",
|
||||
(unsigned) ((struct Syl_Syllabus *) Syllabus)->WhichSyllabus);
|
||||
Par_PutParUnsigned (NULL,"NumI",((struct Syl_Syllabus *) Syllabus)->ParNumItem);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -932,8 +912,10 @@ void Syl_RemoveItemSyllabus (void)
|
|||
/***** Reset syllabus context *****/
|
||||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Set syllabus type depending on current action *****/
|
||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
@ -966,7 +948,7 @@ void Syl_RemoveItemSyllabus (void)
|
|||
|
||||
/***** Show the updated syllabus to continue editing it *****/
|
||||
Syl_FreeListItemsSyllabus ();
|
||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1009,8 +991,10 @@ static void Syl_ChangePlaceItemSyllabus (Syl_ChangePosItem_t UpOrDownPos)
|
|||
/***** Reset syllabus context *****/
|
||||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Set syllabus type depending on current action *****/
|
||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
@ -1069,7 +1053,7 @@ static void Syl_ChangePlaceItemSyllabus (Syl_ChangePosItem_t UpOrDownPos)
|
|||
|
||||
/***** Show the updated syllabus to continue editing it *****/
|
||||
Syl_FreeListItemsSyllabus ();
|
||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1195,8 +1179,10 @@ static void Syl_ChangeLevelItemSyllabus (Syl_ChangeLevelItem_t IncreaseOrDecreas
|
|||
/***** Reset syllabus context *****/
|
||||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Set syllabus type depending on current action *****/
|
||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
@ -1238,7 +1224,7 @@ static void Syl_ChangeLevelItemSyllabus (Syl_ChangeLevelItem_t IncreaseOrDecreas
|
|||
|
||||
/***** Show the updated syllabus to continue editing it *****/
|
||||
Syl_FreeListItemsSyllabus ();
|
||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1258,8 +1244,10 @@ void Syl_InsertItemSyllabus (void)
|
|||
/***** Reset syllabus context *****/
|
||||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Set syllabus type depending on current action *****/
|
||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
@ -1309,7 +1297,7 @@ void Syl_InsertItemSyllabus (void)
|
|||
|
||||
/***** Show the updated syllabus to continue editing it *****/
|
||||
Syl_FreeListItemsSyllabus ();
|
||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1327,8 +1315,10 @@ void Syl_ModifyItemSyllabus (void)
|
|||
/***** Reset syllabus context *****/
|
||||
Syl_ResetSyllabus (&Syllabus);
|
||||
|
||||
/***** Set syllabus type depending on current action *****/
|
||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
||||
/***** Get syllabus type *****/
|
||||
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||
Inf_PRACTICALS);
|
||||
|
||||
/***** Load syllabus from XML file to memory *****/
|
||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||
|
@ -1361,7 +1351,7 @@ void Syl_ModifyItemSyllabus (void)
|
|||
|
||||
/***** Show the updated syllabus to continue editing it *****/
|
||||
Syl_FreeListItemsSyllabus ();
|
||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
||||
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -33,11 +33,12 @@
|
|||
/************************ Public constants and types *************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Syl_NUM_WHICH_SYLLABUS 2
|
||||
#define Syl_NUM_WHICH_SYLLABUS 3
|
||||
typedef enum
|
||||
{
|
||||
Syl_LECTURES = 0,
|
||||
Syl_PRACTICALS = 1,
|
||||
Syl_NONE = 0,
|
||||
Syl_LECTURES = 1,
|
||||
Syl_PRACTICALS = 2,
|
||||
} Syl_WhichSyllabus_t; // Which syllabus I want to see
|
||||
#define Syl_DEFAULT_WHICH_SYLLABUS Syl_LECTURES
|
||||
|
||||
|
@ -88,9 +89,11 @@ struct Syl_Syllabus
|
|||
void Syl_ResetSyllabus (struct Syl_Syllabus *Syllabus);
|
||||
|
||||
Syl_WhichSyllabus_t Syl_GetParWhichSyllabus (void);
|
||||
void Syl_PutParWhichSyllabus (void *SyllabusSelected);
|
||||
void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t WhichSyllabus);
|
||||
|
||||
bool Syl_CheckSyllabus (struct Syl_Syllabus *Syllabus,long CrsCod);
|
||||
bool Syl_CheckAndEditSyllabus (struct Syl_Syllabus *Syllabus);
|
||||
bool Syl_CheckAndShowSyllabus (struct Syl_Syllabus *Syllabus);
|
||||
void Syl_EditSyllabus (void);
|
||||
|
||||
void Syl_LoadListItemsSyllabusIntoMemory (struct Syl_Syllabus *Syllabus,
|
||||
|
|
117
swad_text.c
117
swad_text.c
|
@ -20200,22 +20200,6 @@ const char *Txt_MENU_NAMES[Mnu_NUM_MENUS] =
|
|||
|
||||
const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||
{
|
||||
[TabUnk] =
|
||||
{
|
||||
NULL, // 0
|
||||
NULL, // 1
|
||||
NULL, // 2
|
||||
NULL, // 3
|
||||
NULL, // 4
|
||||
NULL, // 5
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabStr] =
|
||||
{
|
||||
// 0: ActFrmLogIn
|
||||
|
@ -20355,14 +20339,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Bildirimler"
|
||||
#endif
|
||||
,
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabSys] =
|
||||
{
|
||||
|
@ -20503,14 +20479,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Bakım onarım"
|
||||
#endif
|
||||
,
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabCty] =
|
||||
{
|
||||
|
@ -20559,18 +20527,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Kurumlar"
|
||||
#endif
|
||||
,
|
||||
NULL, // 2
|
||||
NULL, // 3
|
||||
NULL, // 4
|
||||
NULL, // 5
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabIns] =
|
||||
{
|
||||
|
@ -20688,15 +20644,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Bayram"
|
||||
#endif
|
||||
,
|
||||
NULL, // 5
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabCtr] =
|
||||
{
|
||||
|
@ -20791,16 +20738,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Odalar"
|
||||
#endif
|
||||
,
|
||||
NULL, // 4
|
||||
NULL, // 5
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabDeg] =
|
||||
{
|
||||
|
@ -20849,18 +20786,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Dersler"
|
||||
#endif
|
||||
,
|
||||
NULL, // 2
|
||||
NULL, // 3
|
||||
NULL, // 4
|
||||
NULL, // 5
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabCrs] =
|
||||
{
|
||||
|
@ -21070,11 +20995,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Programı"
|
||||
#endif
|
||||
,
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabAss] =
|
||||
{
|
||||
|
@ -21261,12 +21181,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Değerlendirme"
|
||||
#endif
|
||||
,
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabFil] =
|
||||
{
|
||||
|
@ -21754,12 +21668,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Bağlı"
|
||||
#endif
|
||||
,
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabMsg] =
|
||||
{
|
||||
|
@ -21900,14 +21808,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"E-posta"
|
||||
#endif
|
||||
,
|
||||
NULL, // 6
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabAna] =
|
||||
{
|
||||
|
@ -22071,13 +21971,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Sık"
|
||||
#endif
|
||||
,
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
},
|
||||
[TabPrf] =
|
||||
{
|
||||
|
@ -22241,13 +22134,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
|||
#elif L==10 // tr
|
||||
"Ayarlar"
|
||||
#endif
|
||||
,
|
||||
NULL, // 7
|
||||
NULL, // 8
|
||||
NULL, // 9
|
||||
NULL, // 10
|
||||
NULL, // 11
|
||||
NULL, // 12
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -45641,6 +45527,9 @@ const char *Txt_Syllabus_of_the_course =
|
|||
|
||||
const char *Txt_SYLLABUS_WHICH_SYLLABUS[Syl_NUM_WHICH_SYLLABUS] =
|
||||
{
|
||||
[Syl_NONE] =
|
||||
""
|
||||
,
|
||||
[Syl_LECTURES] =
|
||||
#if L==1 // ca
|
||||
"Teoria"
|
||||
|
|
Loading…
Reference in New Issue