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
15
swad_MFU.c
15
swad_MFU.c
|
@ -110,11 +110,10 @@ void MFU_GetMFUActions (struct MFU_ListMFUActions *ListMFUActions,unsigned MaxAc
|
||||||
{
|
{
|
||||||
/* Get action code */
|
/* Get action code */
|
||||||
ActCod = DB_GetNextCode (mysql_res);
|
ActCod = DB_GetNextCode (mysql_res);
|
||||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
if ((Action = Act_GetActionFromActCod (ActCod)) != ActUnk)
|
||||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
if (Act_GetIndexInMenu (Action) >= 0) // MFU actions must be only actions shown on menu (database could contain wrong action numbers)
|
||||||
if (Act_GetIndexInMenu (Action) >= 0) // MFU actions must be only actions shown on menu (database could contain wrong action numbers)
|
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||||
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
ListMFUActions->Actions[ListMFUActions->NumActions++] = Action;
|
||||||
ListMFUActions->Actions[ListMFUActions->NumActions++] = Action;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Free structure that stores the query result *****/
|
/***** Free structure that stores the query result *****/
|
||||||
|
@ -148,7 +147,7 @@ Act_Action_t MFU_GetMyLastActionInCurrentTab (void)
|
||||||
ActCod = DB_GetNextCode (mysql_res);
|
ActCod = DB_GetNextCode (mysql_res);
|
||||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
||||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
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))
|
if (Act_CheckIfIHavePermissionToExecuteAction (Action))
|
||||||
{
|
{
|
||||||
MoreRecentActionInCurrentTab = Action;
|
MoreRecentActionInCurrentTab = Action;
|
||||||
|
@ -213,7 +212,7 @@ void MFU_WriteBigMFUActions (struct MFU_ListMFUActions *ListMFUActions)
|
||||||
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
||||||
{
|
{
|
||||||
/* Action string */
|
/* Action string */
|
||||||
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action))),
|
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Action)),
|
||||||
sizeof (TabStr) - 1);
|
sizeof (TabStr) - 1);
|
||||||
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
||||||
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
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)
|
if ((Title = Act_GetTitleAction (Action)) != NULL)
|
||||||
{
|
{
|
||||||
/* Action string */
|
/* Action string */
|
||||||
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action))),
|
Str_Copy (TabStr,Tab_GetTxt (Act_GetTab (Action)),
|
||||||
sizeof (TabStr) - 1);
|
sizeof (TabStr) - 1);
|
||||||
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
Str_Copy (MenuStr,Title,sizeof (MenuStr) - 1);
|
||||||
snprintf (TabMenuStr,sizeof (TabMenuStr),"%s > %s",TabStr,MenuStr);
|
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];
|
extern Act_Action_t ActLst_FromActCodToAction[1 + ActLst_MAX_ACTION_COD];
|
||||||
|
|
||||||
if (ActCod >= 0 && ActCod <= ActLst_MAX_ACTION_COD)
|
if (ActCod < 0 || ActCod > ActLst_MAX_ACTION_COD)
|
||||||
return ActLst_FromActCodToAction[ActCod];
|
return ActUnk;
|
||||||
|
|
||||||
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)
|
const char *Act_GetTitleAction (Act_Action_t Action)
|
||||||
{
|
{
|
||||||
extern const char *Txt_MENU_TITLE[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];
|
||||||
|
Tab_Tab_t Tab;
|
||||||
|
signed int IndexInMenu;
|
||||||
|
|
||||||
if ((unsigned) Action >= ActLst_NUM_ACTIONS)
|
if ((unsigned) Action >= ActLst_NUM_ACTIONS)
|
||||||
return NULL;
|
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];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
3533
swad_action_list.h
3533
swad_action_list.h
File diff suppressed because it is too large
Load Diff
|
@ -633,10 +633,11 @@ Me sale este error, no s
|
||||||
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
|
"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 CSS_FILE "swad23.67.2.css"
|
||||||
#define JS_FILE "swad23.53.6.js"
|
#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.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.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)
|
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)
|
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)
|
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)
|
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)
|
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)
|
void Frm_BeginFormId (Act_Action_t NextAction,const char *Id)
|
||||||
|
|
287
swad_info.c
287
swad_info.c
|
@ -54,22 +54,6 @@
|
||||||
|
|
||||||
extern struct Globals Gbl;
|
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 *****************************/
|
/***************************** Private constants *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -237,14 +221,13 @@ void Inf_ShowInfo (void)
|
||||||
/***** Contextual menu *****/
|
/***** Contextual menu *****/
|
||||||
Mnu_ContextMenuBegin ();
|
Mnu_ContextMenuBegin ();
|
||||||
Inf_PutCheckboxConfirmIHaveReadInfo (); // Checkbox to confirm that...
|
Inf_PutCheckboxConfirmIHaveReadInfo (); // Checkbox to confirm that...
|
||||||
// ...I have read this couse info
|
// ...I have read this couse info
|
||||||
Mnu_ContextMenuEnd ();
|
Mnu_ContextMenuEnd ();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Rol_NET:
|
case Rol_NET:
|
||||||
case Rol_TCH:
|
case Rol_TCH:
|
||||||
case Rol_SYS_ADM:
|
case Rol_SYS_ADM:
|
||||||
/* Put */
|
|
||||||
if (FromDB.Src != Inf_NONE)
|
if (FromDB.Src != Inf_NONE)
|
||||||
{
|
{
|
||||||
/***** Contextual menu *****/
|
/***** Contextual menu *****/
|
||||||
|
@ -259,6 +242,9 @@ void Inf_ShowInfo (void)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****** Form to select syllabus *****/
|
||||||
|
Syl_PutFormWhichSyllabus (Syllabus.WhichSyllabus);
|
||||||
|
|
||||||
switch (FromDB.Src)
|
switch (FromDB.Src)
|
||||||
{
|
{
|
||||||
case Inf_NONE:
|
case Inf_NONE:
|
||||||
|
@ -269,7 +255,7 @@ void Inf_ShowInfo (void)
|
||||||
{
|
{
|
||||||
case Inf_LECTURES:
|
case Inf_LECTURES:
|
||||||
case Inf_PRACTICALS:
|
case Inf_PRACTICALS:
|
||||||
ShowWarningNoInfo = !Syl_CheckAndEditSyllabus (&Syllabus);
|
ShowWarningNoInfo = !Syl_CheckAndShowSyllabus (&Syllabus);
|
||||||
break;
|
break;
|
||||||
case Inf_INTRODUCTION:
|
case Inf_INTRODUCTION:
|
||||||
case Inf_TEACHING_GUIDE:
|
case Inf_TEACHING_GUIDE:
|
||||||
|
@ -316,28 +302,54 @@ void Inf_ShowInfo (void)
|
||||||
|
|
||||||
static void Inf_PutIconToViewInfo (void *Type)
|
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)
|
if (Type)
|
||||||
Ico_PutContextualIconToView (Inf_ActionsSeeInfo[*((Inf_Type_t *) Type)],NULL,
|
Ico_PutContextualIconToView (Inf_Actions[*((Inf_Type_t *) Type)].NextAction,NULL,
|
||||||
NULL,NULL);
|
Inf_Actions[*((Inf_Type_t *) Type)].FuncPars,
|
||||||
|
Inf_Actions[*((Inf_Type_t *) Type)].Args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Inf_PutIconToEditInfo (void *Type)
|
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,
|
const Act_Action_t NextAction;
|
||||||
[Inf_TEACHING_GUIDE] = ActEdiTchGui,
|
void (*FuncPars) (void *Args);
|
||||||
[Inf_LECTURES ] = ActEdiSylLec,
|
void *Args;
|
||||||
[Inf_PRACTICALS ] = ActEdiSylPra,
|
} Inf_Actions[Inf_NUM_TYPES] =
|
||||||
[Inf_BIBLIOGRAPHY ] = ActEdiBib,
|
{
|
||||||
[Inf_FAQ ] = ActEdiFAQ,
|
[Inf_INTRODUCTION ] = {ActEdiCrsInf,NULL,NULL},
|
||||||
[Inf_LINKS ] = ActEdiCrsLnk,
|
[Inf_TEACHING_GUIDE] = {ActEdiTchGui,NULL,NULL},
|
||||||
[Inf_ASSESSMENT ] = ActEdiAss,
|
[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)
|
if (Type)
|
||||||
Ico_PutContextualIconToEdit (Inf_ActionsEditInfo[*((Inf_Type_t *) Type)],NULL,
|
Ico_PutContextualIconToEdit (Inf_Actions[*((Inf_Type_t *) Type)].NextAction,NULL,
|
||||||
NULL,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)
|
void Inf_WriteMsgYouMustReadInfo (void)
|
||||||
{
|
{
|
||||||
|
extern Syl_WhichSyllabus_t Syl_WhichSyllabus[Syl_NUM_WHICH_SYLLABUS];
|
||||||
extern const char *Txt_Required_reading;
|
extern const char *Txt_Required_reading;
|
||||||
extern const char *Txt_You_should_read_the_following_information;
|
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;
|
Inf_Type_t InfoType;
|
||||||
|
const char *TitleAction;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (Txt_Required_reading,NULL,NULL,NULL,Box_CLOSABLE);
|
Box_BoxBegin (Txt_Required_reading,NULL,NULL,NULL,Box_CLOSABLE);
|
||||||
|
@ -460,11 +490,14 @@ void Inf_WriteMsgYouMustReadInfo (void)
|
||||||
if (Gbl.Crs.Info.MustBeRead[InfoType])
|
if (Gbl.Crs.Info.MustBeRead[InfoType])
|
||||||
{
|
{
|
||||||
HTM_LI_Begin (NULL);
|
HTM_LI_Begin (NULL);
|
||||||
Frm_BeginForm (Inf_ActionsSeeInfo[InfoType]);
|
Frm_BeginForm (Inf_Actions[InfoType].NextAction);
|
||||||
HTM_BUTTON_Submit_Begin (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]),
|
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\"",
|
"class=\"BT_LINK FORM_IN_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_Txt (Act_GetTitleAction (Inf_ActionsSeeInfo[InfoType]));
|
HTM_Txt (TitleAction);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
|
@ -828,7 +861,7 @@ void Inf_FormsToSelSendInfo (void)
|
||||||
[Inf_ASSESSMENT ] = ActSelInfSrcAss,
|
[Inf_ASSESSMENT ] = ActSelInfSrcAss,
|
||||||
};
|
};
|
||||||
/* Functions to write forms in course edition (FAQ, links, etc.) */
|
/* 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_NONE ] = NULL,
|
||||||
[Inf_EDITOR ] = Inf_FormToEnterIntegratedEditor,
|
[Inf_EDITOR ] = Inf_FormToEnterIntegratedEditor,
|
||||||
|
@ -895,6 +928,7 @@ void Inf_FormsToSelSendInfo (void)
|
||||||
InfoSrc == FromDB.Src ? " BG_HIGHLIGHT" :
|
InfoSrc == FromDB.Src ? " BG_HIGHLIGHT" :
|
||||||
"");
|
"");
|
||||||
Frm_BeginForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]);
|
Frm_BeginForm (Inf_ActionsSelecInfoSrc[Gbl.Crs.Info.Type]);
|
||||||
|
Syl_PutParWhichSyllabus (&Syllabus.WhichSyllabus);
|
||||||
HTM_INPUT_RADIO ("InfoSrc",InfoSrc != FromDB.Src &&
|
HTM_INPUT_RADIO ("InfoSrc",InfoSrc != FromDB.Src &&
|
||||||
(InfoSrc == Inf_NONE ||
|
(InfoSrc == Inf_NONE ||
|
||||||
InfoAvailable[InfoSrc]) ? HTM_SUBMIT_ON_CLICK :
|
InfoAvailable[InfoSrc]) ? HTM_SUBMIT_ON_CLICK :
|
||||||
|
@ -925,7 +959,7 @@ void Inf_FormsToSelSendInfo (void)
|
||||||
HTM_SPAN_End ();
|
HTM_SPAN_End ();
|
||||||
}
|
}
|
||||||
if (Inf_FormsForEditionTypes[InfoSrc])
|
if (Inf_FormsForEditionTypes[InfoSrc])
|
||||||
Inf_FormsForEditionTypes[InfoSrc] (InfoSrc);
|
Inf_FormsForEditionTypes[InfoSrc] (&Syllabus,InfoSrc);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -980,9 +1014,10 @@ static bool Inf_CheckIfInfoAvailable (struct Syl_Syllabus *Syllabus,
|
||||||
/****************** Form to enter in integrated editor ***********************/
|
/****************** 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]);
|
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||||
|
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||||
Btn_PutConfirmButton (Act_GetActionText (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]));
|
Btn_PutConfirmButton (Act_GetActionText (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]));
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -991,11 +1026,12 @@ void Inf_FormToEnterIntegratedEditor (Inf_Src_t InfoSrc)
|
||||||
/****************** Form to enter in plain text editor ***********************/
|
/****************** 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;
|
extern const char *Txt_Edit_plain_text;
|
||||||
|
|
||||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||||
|
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||||
Btn_PutConfirmButton (Txt_Edit_plain_text);
|
Btn_PutConfirmButton (Txt_Edit_plain_text);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -1004,11 +1040,12 @@ void Inf_FormToEnterPlainTextEditor (Inf_Src_t InfoSrc)
|
||||||
/******************* Form to enter in rich text editor ***********************/
|
/******************* 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;
|
extern const char *Txt_Edit_rich_text;
|
||||||
|
|
||||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||||
|
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||||
Btn_PutConfirmButton (Txt_Edit_rich_text);
|
Btn_PutConfirmButton (Txt_Edit_rich_text);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -1017,13 +1054,14 @@ void Inf_FormToEnterRichTextEditor (Inf_Src_t InfoSrc)
|
||||||
/******************* Form to upload a file with a page ***********************/
|
/******************* 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_File;
|
||||||
extern const char *Txt_Upload_file;
|
extern const char *Txt_Upload_file;
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form *****/
|
||||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||||
|
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||||
|
|
||||||
/***** File *****/
|
/***** File *****/
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
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 *********************/
|
/********************* 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_URL;
|
||||||
extern const char *Txt_Send_URL;
|
extern const char *Txt_Send_URL;
|
||||||
|
@ -1059,6 +1097,7 @@ void Inf_FormToSendURL (Inf_Src_t InfoSrc)
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form *****/
|
||||||
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
Frm_BeginForm (Inf_ActionsInfo[InfoSrc][Gbl.Crs.Info.Type]);
|
||||||
|
Syl_PutParWhichSyllabus (&Syllabus->WhichSyllabus);
|
||||||
|
|
||||||
/***** Link *****/
|
/***** Link *****/
|
||||||
if ((FileURL = fopen (PathFile,"rb")) != NULL)
|
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,
|
static void Inf_AsignInfoType (struct Inf_Info *Info,
|
||||||
struct Syl_Syllabus *Syllabus)
|
struct Syl_Syllabus *Syllabus)
|
||||||
{
|
{
|
||||||
switch (Gbl.Action.Act)
|
Syllabus->WhichSyllabus = Syl_NONE;
|
||||||
|
switch (Act_GetSuperAction (Gbl.Action.Act))
|
||||||
{
|
{
|
||||||
case ActSeeCrsInf:
|
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;
|
Info->Type = Inf_INTRODUCTION;
|
||||||
break;
|
break;
|
||||||
case ActSeeTchGui:
|
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;
|
Info->Type = Inf_TEACHING_GUIDE;
|
||||||
break;
|
break;
|
||||||
case ActSeeSyl:
|
case ActSeeSyl:
|
||||||
|
@ -1129,92 +1147,21 @@ static void Inf_AsignInfoType (struct Inf_Info *Info,
|
||||||
Info->Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
Info->Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
Inf_PRACTICALS);
|
Inf_PRACTICALS);
|
||||||
break;
|
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 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;
|
Info->Type = Inf_BIBLIOGRAPHY;
|
||||||
break;
|
break;
|
||||||
case ActSeeFAQ:
|
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;
|
Info->Type = Inf_FAQ;
|
||||||
break;
|
break;
|
||||||
case ActSeeCrsLnk:
|
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;
|
Info->Type = Inf_LINKS;
|
||||||
break;
|
break;
|
||||||
case ActSeeAss:
|
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;
|
Info->Type = Inf_ASSESSMENT;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongActionExit ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1228,9 +1175,9 @@ Inf_Src_t Inf_GetInfoSrcFromForm (void)
|
||||||
(introduction, teaching guide, bibliography, FAQ, links or assessment) *****/
|
(introduction, teaching guide, bibliography, FAQ, links or assessment) *****/
|
||||||
return (Inf_Src_t)
|
return (Inf_Src_t)
|
||||||
Par_GetParUnsignedLong ("InfoSrc",
|
Par_GetParUnsignedLong ("InfoSrc",
|
||||||
0,
|
0,
|
||||||
Inf_NUM_SOURCES - 1,
|
Inf_NUM_SOURCES - 1,
|
||||||
(unsigned long) Inf_NONE);
|
(unsigned long) Inf_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1615,20 +1562,26 @@ static bool Inf_CheckAndShowRichTxt (void)
|
||||||
|
|
||||||
void Inf_EditPlainTxtInfo (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_INFO_TITLE[Inf_NUM_TYPES];
|
||||||
extern const char *Txt_Save_changes;
|
extern const char *Txt_Save_changes;
|
||||||
struct Syl_Syllabus Syllabus;
|
struct Syl_Syllabus Syllabus;
|
||||||
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||||
static const Act_Action_t Inf_ActionsRcvPlaTxtInfo[Inf_NUM_TYPES] =
|
static struct
|
||||||
{
|
{
|
||||||
[Inf_INTRODUCTION ] = ActRcvPlaTxtCrsInf,
|
const Act_Action_t NextAction;
|
||||||
[Inf_TEACHING_GUIDE] = ActRcvPlaTxtTchGui,
|
void (*FuncPars) (void *Args);
|
||||||
[Inf_LECTURES ] = ActRcvPlaTxtSylLec,
|
void *Args;
|
||||||
[Inf_PRACTICALS ] = ActRcvPlaTxtSylPra,
|
} Inf_Actions[Inf_NUM_TYPES] =
|
||||||
[Inf_BIBLIOGRAPHY ] = ActRcvPlaTxtBib,
|
{
|
||||||
[Inf_FAQ ] = ActRcvPlaTxtFAQ,
|
[Inf_INTRODUCTION ] = {ActRcvPlaTxtCrsInf,NULL,NULL},
|
||||||
[Inf_LINKS ] = ActRcvPlaTxtCrsLnk,
|
[Inf_TEACHING_GUIDE] = {ActRcvPlaTxtTchGui,NULL,NULL},
|
||||||
[Inf_ASSESSMENT ] = ActRcvPlaTxtAss,
|
[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] =
|
const char *HelpEdit[Inf_NUM_TYPES] =
|
||||||
{
|
{
|
||||||
|
@ -1649,7 +1602,9 @@ void Inf_EditPlainTxtInfo (void)
|
||||||
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
||||||
|
|
||||||
/***** Begin form and box *****/
|
/***** 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,
|
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],NULL,NULL,
|
||||||
HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
|
@ -1682,20 +1637,26 @@ void Inf_EditPlainTxtInfo (void)
|
||||||
|
|
||||||
void Inf_EditRichTxtInfo (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_INFO_TITLE[Inf_NUM_TYPES];
|
||||||
extern const char *Txt_Save_changes;
|
extern const char *Txt_Save_changes;
|
||||||
struct Syl_Syllabus Syllabus;
|
struct Syl_Syllabus Syllabus;
|
||||||
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
char TxtHTML[Cns_MAX_BYTES_LONG_TEXT + 1];
|
||||||
static const Act_Action_t Inf_ActionsRcvRchTxtInfo[Inf_NUM_TYPES] =
|
static struct
|
||||||
{
|
{
|
||||||
[Inf_INTRODUCTION ] = ActRcvRchTxtCrsInf,
|
const Act_Action_t NextAction;
|
||||||
[Inf_TEACHING_GUIDE] = ActRcvRchTxtTchGui,
|
void (*FuncPars) (void *Args);
|
||||||
[Inf_LECTURES ] = ActRcvRchTxtSylLec,
|
void *Args;
|
||||||
[Inf_PRACTICALS ] = ActRcvRchTxtSylPra,
|
} Inf_Actions[Inf_NUM_TYPES] =
|
||||||
[Inf_BIBLIOGRAPHY ] = ActRcvRchTxtBib,
|
{
|
||||||
[Inf_FAQ ] = ActRcvRchTxtFAQ,
|
[Inf_INTRODUCTION ] = {ActRcvRchTxtCrsInf,NULL,NULL},
|
||||||
[Inf_LINKS ] = ActRcvRchTxtCrsLnk,
|
[Inf_TEACHING_GUIDE] = {ActRcvRchTxtTchGui,NULL,NULL},
|
||||||
[Inf_ASSESSMENT ] = ActRcvRchTxtAss,
|
[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] =
|
const char *HelpEdit[Inf_NUM_TYPES] =
|
||||||
{
|
{
|
||||||
|
@ -1716,7 +1677,9 @@ void Inf_EditRichTxtInfo (void)
|
||||||
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
Inf_AsignInfoType (&Gbl.Crs.Info,&Syllabus);
|
||||||
|
|
||||||
/***** Begin form and box *****/
|
/***** 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,
|
Box_BoxBegin (Txt_INFO_TITLE[Gbl.Crs.Info.Type],NULL,NULL,
|
||||||
HelpEdit[Gbl.Crs.Info.Type],Box_NOT_CLOSABLE);
|
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_WriteURLIntoTxtBuffer (char TxtBuffer[Cns_MAX_BYTES_WWW + 1]);
|
||||||
void Inf_SetInfoSrc (void);
|
void Inf_SetInfoSrc (void);
|
||||||
void Inf_FormsToSelSendInfo (void);
|
void Inf_FormsToSelSendInfo (void);
|
||||||
void Inf_FormToEnterIntegratedEditor (Inf_Src_t InfoSrc);
|
void Inf_FormToEnterIntegratedEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||||
void Inf_FormToEnterPlainTextEditor (Inf_Src_t InfoSrc);
|
void Inf_FormToEnterPlainTextEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||||
void Inf_FormToEnterRichTextEditor (Inf_Src_t InfoSrc);
|
void Inf_FormToEnterRichTextEditor (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||||
void Inf_FormToSendPage (Inf_Src_t InfoSrc);
|
void Inf_FormToSendPage (struct Syl_Syllabus *Syllabus,Inf_Src_t InfoSrc);
|
||||||
void Inf_FormToSendURL (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_GetInfoSrcFromForm (void);
|
||||||
Inf_Src_t Inf_GetInfoSrcFromDB (long CrsCod,Inf_Type_t InfoType);
|
Inf_Src_t Inf_GetInfoSrcFromDB (long CrsCod,Inf_Type_t InfoType);
|
||||||
void Inf_GetAndCheckInfoSrcFromDB (struct Syl_Syllabus *Syllabus,
|
void Inf_GetAndCheckInfoSrcFromDB (struct Syl_Syllabus *Syllabus,
|
||||||
|
|
|
@ -347,16 +347,11 @@ static void Mai_GetMailDomain (const char *Email,
|
||||||
void Mai_WriteWarningEmailNotifications (void)
|
void Mai_WriteWarningEmailNotifications (void)
|
||||||
{
|
{
|
||||||
extern const char *Txt_You_can_only_receive_email_notifications_if_;
|
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;
|
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_,
|
Ale_ShowAlert (Ale_WARNING,Txt_You_can_only_receive_email_notifications_if_,
|
||||||
Tab_GetTxt (TabMyAccount),
|
Tab_GetTxt (Act_GetTab (ActFrmMyAcc)),Act_GetTitleAction (ActFrmMyAcc),
|
||||||
Txt_MENU_TITLE[TabMyAccount ][Act_GetIndexInMenu (ActFrmMyAcc)],
|
Tab_GetTxt (Act_GetTab (ActSeeMai )),Act_GetTitleAction (ActSeeMai ),
|
||||||
Tab_GetTxt (TabMailDomains),
|
|
||||||
Txt_MENU_TITLE[TabMailDomains][Act_GetIndexInMenu (ActSeeMai )],
|
|
||||||
Txt_Domains);
|
Txt_Domains);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
swad_menu.c
17
swad_menu.c
|
@ -240,14 +240,13 @@ Act_Action_t Mnu_GetFirstActionAvailableInCurrentTab (void)
|
||||||
void Mnu_WriteMenuThisTab (void)
|
void Mnu_WriteMenuThisTab (void)
|
||||||
{
|
{
|
||||||
extern const char *Ico_IconSetId[Ico_NUM_ICON_SETS];
|
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] =
|
static const char *ClassIcoMenu[Ico_NUM_ICON_SETS] =
|
||||||
{
|
{
|
||||||
[Ico_ICON_SET_AWESOME] = "MENU_ICO",
|
[Ico_ICON_SET_AWESOME] = "MENU_ICO",
|
||||||
[Ico_ICON_SET_NUVOLA ] = NULL,
|
[Ico_ICON_SET_NUVOLA ] = NULL,
|
||||||
};
|
};
|
||||||
unsigned NumOptInMenu;
|
unsigned NumOptInMenu;
|
||||||
Act_Action_t NumAct;
|
Act_Action_t Action;
|
||||||
const char *Title;
|
const char *Title;
|
||||||
bool IsTheSelectedAction;
|
bool IsTheSelectedAction;
|
||||||
|
|
||||||
|
@ -262,14 +261,14 @@ void Mnu_WriteMenuThisTab (void)
|
||||||
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
NumOptInMenu < Act_MAX_OPTIONS_IN_MENU_PER_TAB;
|
||||||
NumOptInMenu++)
|
NumOptInMenu++)
|
||||||
{
|
{
|
||||||
NumAct = Mnu_Menu[Gbl.Action.Tab][NumOptInMenu].Action;
|
Action = 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
|
if (Action == 0) // At the end of each tab, actions are initialized to 0, so 0 marks the end of the menu
|
||||||
break;
|
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 *****/
|
/***** Begin option *****/
|
||||||
HTM_LI_Begin ("class=\"MENU_LIST_ITEM %s\"",
|
HTM_LI_Begin ("class=\"MENU_LIST_ITEM %s\"",
|
||||||
|
@ -277,7 +276,7 @@ void Mnu_WriteMenuThisTab (void)
|
||||||
"MENU_OPT_OFF");
|
"MENU_OPT_OFF");
|
||||||
|
|
||||||
/***** Begin form *****/
|
/***** Begin form *****/
|
||||||
Frm_BeginForm (NumAct);
|
Frm_BeginForm (Action);
|
||||||
|
|
||||||
/***** Begin link *****/
|
/***** Begin link *****/
|
||||||
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
|
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
|
||||||
|
@ -298,7 +297,7 @@ void Mnu_WriteMenuThisTab (void)
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
HTM_DIV_Begin ("class=\"MENU_TXT MENU_TXT_%s\"",
|
HTM_DIV_Begin ("class=\"MENU_TXT MENU_TXT_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
HTM_Txt (Txt_MENU_TITLE[Gbl.Action.Tab][NumOptInMenu]);
|
HTM_Txt (Act_GetTitleAction (Action));
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
|
|
|
@ -759,7 +759,7 @@ static void Rep_WriteSectionHitsPerAction (struct Rep_Report *Report)
|
||||||
{
|
{
|
||||||
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
if ((Action = Act_GetActionFromActCod (ActCod)) >= 0)
|
||||||
{
|
{
|
||||||
TabTxt = Tab_GetTxt (Act_GetTab (Act_GetSuperAction (Action)));
|
TabTxt = Tab_GetTxt (Act_GetTab (Action));
|
||||||
if (TabTxt)
|
if (TabTxt)
|
||||||
fprintf (Rep_File,"%s > ",TabTxt);
|
fprintf (Rep_File,"%s > ",TabTxt);
|
||||||
}
|
}
|
||||||
|
|
206
swad_syllabus.c
206
swad_syllabus.c
|
@ -50,6 +50,17 @@
|
||||||
#include "swad_string.h"
|
#include "swad_string.h"
|
||||||
#include "swad_xml.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 ****************/
|
/************** External global variables from others modules ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -106,17 +117,14 @@ struct LstItemsSyllabus Syl_LstItemsSyllabus;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected);
|
|
||||||
|
|
||||||
static unsigned Syl_GetParItemNumber (void);
|
static unsigned Syl_GetParItemNumber (void);
|
||||||
|
|
||||||
static void Syl_SetSyllabusTypeFromAction (struct Syl_Syllabus *Syllabus);
|
|
||||||
static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus);
|
static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus);
|
||||||
static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
||||||
int Level,int *CodItem,const char *Text,bool NewItem);
|
int Level,int *CodItem,const char *Text,bool NewItem);
|
||||||
static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
static void Syl_PutFormItemSyllabus (struct Syl_Syllabus *Syllabus,
|
||||||
bool NewItem,unsigned NumItem,int Level,int *CodItem,const char *Text);
|
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);
|
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);
|
(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 **********************/
|
/************************ 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];
|
extern const char *Txt_SYLLABUS_WHICH_SYLLABUS[Syl_NUM_WHICH_SYLLABUS];
|
||||||
Syl_WhichSyllabus_t WhichSyl;
|
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) *****/
|
/***** Form to select which syllabus I want to see (lectures/practicals) *****/
|
||||||
Frm_BeginForm (ActSeeSyl);
|
Frm_BeginForm (ActSeeSyl);
|
||||||
HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE DAT_%s\"",The_GetSuffix ());
|
HTM_DIV_Begin ("class=\"SEL_BELOW_TITLE DAT_%s\"",The_GetSuffix ());
|
||||||
HTM_UL_Begin (NULL);
|
HTM_UL_Begin (NULL);
|
||||||
|
|
||||||
for (WhichSyl = (Syl_WhichSyllabus_t) 0;
|
for (WhichSyl = (Syl_WhichSyllabus_t) 1;
|
||||||
WhichSyl <= (Syl_WhichSyllabus_t) (For_NUM_FORUM_SETS - 1);
|
WhichSyl <= (Syl_WhichSyllabus_t) (Syl_NUM_WHICH_SYLLABUS - 1);
|
||||||
WhichSyl++)
|
WhichSyl++)
|
||||||
{
|
{
|
||||||
HTM_LI_Begin (NULL);
|
HTM_LI_Begin (NULL);
|
||||||
|
@ -177,8 +207,8 @@ static void Syl_PutFormWhichSyllabus (Syl_WhichSyllabus_t SyllabusSelected)
|
||||||
HTM_INPUT_RADIO ("WhichSyllabus",HTM_SUBMIT_ON_CLICK,
|
HTM_INPUT_RADIO ("WhichSyllabus",HTM_SUBMIT_ON_CLICK,
|
||||||
"value=\"%u\"%s",
|
"value=\"%u\"%s",
|
||||||
(unsigned) WhichSyl,
|
(unsigned) WhichSyl,
|
||||||
WhichSyl == SyllabusSelected ? " checked=\"checked\"" :
|
WhichSyl == WhichSyllabus ? " checked=\"checked\"" :
|
||||||
"");
|
"");
|
||||||
HTM_Txt (Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyl]);
|
HTM_Txt (Txt_SYLLABUS_WHICH_SYLLABUS[WhichSyl]);
|
||||||
HTM_LABEL_End ();
|
HTM_LABEL_End ();
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
|
@ -226,10 +256,12 @@ bool Syl_CheckSyllabus (struct Syl_Syllabus *Syllabus,long CrsCod)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
// Return true if info available
|
// 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 *****/
|
/***** Get syllabus type *****/
|
||||||
Syl_SetSyllabusTypeFromAction (Syllabus);
|
Syllabus->WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||||
|
Gbl.Crs.Info.Type = (Syllabus->WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
|
Inf_PRACTICALS);
|
||||||
|
|
||||||
/***** Load syllabus from XML file to memory *****/
|
/***** Load syllabus from XML file to memory *****/
|
||||||
Syl_LoadListItemsSyllabusIntoMemory (Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
Syl_LoadListItemsSyllabusIntoMemory (Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||||
|
@ -275,72 +307,7 @@ void Syl_EditSyllabus (void)
|
||||||
Syl_ResetSyllabus (&Syllabus);
|
Syl_ResetSyllabus (&Syllabus);
|
||||||
|
|
||||||
/***** Edit syllabus *****/
|
/***** Edit syllabus *****/
|
||||||
Syl_CheckAndEditSyllabus (&Syllabus);
|
Syl_CheckAndShowSyllabus (&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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -516,7 +483,6 @@ int Syl_ReadLevelItemSyllabus (FILE *XML)
|
||||||
|
|
||||||
static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
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 *Txt_INFO_TITLE[Inf_NUM_TYPES];
|
||||||
extern const char *Hlp_COURSE_Syllabus_edit;
|
extern const char *Hlp_COURSE_Syllabus_edit;
|
||||||
extern const char *Hlp_COURSE_Syllabus;
|
extern const char *Hlp_COURSE_Syllabus;
|
||||||
|
@ -533,6 +499,17 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
[Vie_VIEW] = 0,
|
[Vie_VIEW] = 0,
|
||||||
[Vie_EDIT] = 5,
|
[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 ||
|
bool ShowRowInsertNewItem = (Gbl.Action.Act == ActInsIteSylLec || Gbl.Action.Act == ActInsIteSylPra ||
|
||||||
Gbl.Action.Act == ActModIteSylLec || Gbl.Action.Act == ActModIteSylPra ||
|
Gbl.Action.Act == ActModIteSylLec || Gbl.Action.Act == ActModIteSylPra ||
|
||||||
Gbl.Action.Act == ActRgtIteSylLec || Gbl.Action.Act == ActRgtIteSylPra ||
|
Gbl.Action.Act == ActRgtIteSylLec || Gbl.Action.Act == ActRgtIteSylPra ||
|
||||||
|
@ -549,9 +526,6 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
NULL,
|
NULL,
|
||||||
*HelpLink[Syllabus->ViewType],Box_NOT_CLOSABLE);
|
*HelpLink[Syllabus->ViewType],Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/****** Form to select syllabus *****/
|
|
||||||
Syl_PutFormWhichSyllabus (Syllabus->WhichSyllabus);
|
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
|
|
||||||
|
@ -596,7 +570,8 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
/***** Button to view *****/
|
/***** Button to view *****/
|
||||||
if (Syllabus->ViewType == Vie_EDIT)
|
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);
|
Btn_PutConfirmButton (Txt_Done);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
}
|
}
|
||||||
|
@ -674,7 +649,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
||||||
else
|
else
|
||||||
Ico_PutContextualIconToRemove (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
|
Ico_PutContextualIconToRemove (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec :
|
||||||
ActDelItmSylPra,NULL,
|
ActDelItmSylPra,NULL,
|
||||||
Syl_PutParNumItem,&Syllabus->ParNumItem);
|
Syl_PutParsSyllabus,Syllabus);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Icon to get up an item *****/
|
/***** 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 :
|
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActUp_IteSylLec :
|
||||||
ActUp_IteSylPra,
|
ActUp_IteSylPra,
|
||||||
NULL,
|
NULL,
|
||||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
Syl_PutParsSyllabus,Syllabus,
|
||||||
"arrow-up.svg",Ico_BLACK);
|
"arrow-up.svg",Ico_BLACK);
|
||||||
else
|
else
|
||||||
Ico_PutIconOff ("arrow-up.svg",Ico_BLACK,
|
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 :
|
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDwnIteSylLec :
|
||||||
ActDwnIteSylPra,
|
ActDwnIteSylPra,
|
||||||
NULL,
|
NULL,
|
||||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
Syl_PutParsSyllabus,Syllabus,
|
||||||
"arrow-down.svg",Ico_BLACK);
|
"arrow-down.svg",Ico_BLACK);
|
||||||
else
|
else
|
||||||
Ico_PutIconOff ("arrow-down.svg",Ico_BLACK,
|
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 :
|
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActRgtIteSylLec :
|
||||||
ActRgtIteSylPra,
|
ActRgtIteSylPra,
|
||||||
NULL,
|
NULL,
|
||||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
Syl_PutParsSyllabus,Syllabus,
|
||||||
"arrow-left.svg",Ico_BLACK);
|
"arrow-left.svg",Ico_BLACK);
|
||||||
else
|
else
|
||||||
Ico_PutIconOff ("arrow-left.svg",Ico_BLACK,
|
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 :
|
Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActLftIteSylLec :
|
||||||
ActLftIteSylPra,
|
ActLftIteSylPra,
|
||||||
NULL,
|
NULL,
|
||||||
Syl_PutParNumItem,&Syllabus->ParNumItem,
|
Syl_PutParsSyllabus,Syllabus,
|
||||||
"arrow-right.svg",Ico_BLACK);
|
"arrow-right.svg",Ico_BLACK);
|
||||||
else
|
else
|
||||||
Ico_PutIconOff ("arrow-right.svg",Ico_BLACK,
|
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 :
|
(Gbl.Crs.Info.Type == Inf_LECTURES ? ActModIteSylLec :
|
||||||
ActModIteSylPra));
|
ActModIteSylPra));
|
||||||
Syllabus->ParNumItem = NumItem;
|
Syllabus->ParNumItem = NumItem;
|
||||||
Syl_PutParNumItem (&Syllabus->ParNumItem);
|
Syl_PutParsSyllabus (Syllabus);
|
||||||
HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,
|
HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,
|
||||||
HTM_SUBMIT_ON_CHANGE,
|
HTM_SUBMIT_ON_CHANGE,
|
||||||
"size=\"60\" class=\"INPUT_%s\" placeholder=\"%s\"%s",
|
"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)
|
if (Syllabus)
|
||||||
Par_PutParUnsigned (NULL,"NumI",*((unsigned *) ParNumItem));
|
{
|
||||||
|
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 *****/
|
/***** Reset syllabus context *****/
|
||||||
Syl_ResetSyllabus (&Syllabus);
|
Syl_ResetSyllabus (&Syllabus);
|
||||||
|
|
||||||
/***** Set syllabus type depending on current action *****/
|
/***** Get syllabus type *****/
|
||||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||||
|
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
|
Inf_PRACTICALS);
|
||||||
|
|
||||||
/***** Load syllabus from XML file to memory *****/
|
/***** Load syllabus from XML file to memory *****/
|
||||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
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 *****/
|
/***** Show the updated syllabus to continue editing it *****/
|
||||||
Syl_FreeListItemsSyllabus ();
|
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 *****/
|
/***** Reset syllabus context *****/
|
||||||
Syl_ResetSyllabus (&Syllabus);
|
Syl_ResetSyllabus (&Syllabus);
|
||||||
|
|
||||||
/***** Set syllabus type depending on current action *****/
|
/***** Get syllabus type *****/
|
||||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||||
|
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
|
Inf_PRACTICALS);
|
||||||
|
|
||||||
/***** Load syllabus from XML file to memory *****/
|
/***** Load syllabus from XML file to memory *****/
|
||||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
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 *****/
|
/***** Show the updated syllabus to continue editing it *****/
|
||||||
Syl_FreeListItemsSyllabus ();
|
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 *****/
|
/***** Reset syllabus context *****/
|
||||||
Syl_ResetSyllabus (&Syllabus);
|
Syl_ResetSyllabus (&Syllabus);
|
||||||
|
|
||||||
/***** Set syllabus type depending on current action *****/
|
/***** Get syllabus type *****/
|
||||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||||
|
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
|
Inf_PRACTICALS);
|
||||||
|
|
||||||
/***** Load syllabus from XML file to memory *****/
|
/***** Load syllabus from XML file to memory *****/
|
||||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
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 *****/
|
/***** Show the updated syllabus to continue editing it *****/
|
||||||
Syl_FreeListItemsSyllabus ();
|
Syl_FreeListItemsSyllabus ();
|
||||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1258,8 +1244,10 @@ void Syl_InsertItemSyllabus (void)
|
||||||
/***** Reset syllabus context *****/
|
/***** Reset syllabus context *****/
|
||||||
Syl_ResetSyllabus (&Syllabus);
|
Syl_ResetSyllabus (&Syllabus);
|
||||||
|
|
||||||
/***** Set syllabus type depending on current action *****/
|
/***** Get syllabus type *****/
|
||||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||||
|
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
|
Inf_PRACTICALS);
|
||||||
|
|
||||||
/***** Load syllabus from XML file to memory *****/
|
/***** Load syllabus from XML file to memory *****/
|
||||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
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 *****/
|
/***** Show the updated syllabus to continue editing it *****/
|
||||||
Syl_FreeListItemsSyllabus ();
|
Syl_FreeListItemsSyllabus ();
|
||||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -1327,8 +1315,10 @@ void Syl_ModifyItemSyllabus (void)
|
||||||
/***** Reset syllabus context *****/
|
/***** Reset syllabus context *****/
|
||||||
Syl_ResetSyllabus (&Syllabus);
|
Syl_ResetSyllabus (&Syllabus);
|
||||||
|
|
||||||
/***** Set syllabus type depending on current action *****/
|
/***** Get syllabus type *****/
|
||||||
Syl_SetSyllabusTypeFromAction (&Syllabus);
|
Syllabus.WhichSyllabus = Syl_GetParWhichSyllabus ();
|
||||||
|
Gbl.Crs.Info.Type = (Syllabus.WhichSyllabus == Syl_LECTURES ? Inf_LECTURES :
|
||||||
|
Inf_PRACTICALS);
|
||||||
|
|
||||||
/***** Load syllabus from XML file to memory *****/
|
/***** Load syllabus from XML file to memory *****/
|
||||||
Syl_LoadListItemsSyllabusIntoMemory (&Syllabus,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
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 *****/
|
/***** Show the updated syllabus to continue editing it *****/
|
||||||
Syl_FreeListItemsSyllabus ();
|
Syl_FreeListItemsSyllabus ();
|
||||||
(void) Syl_CheckAndEditSyllabus (&Syllabus);
|
(void) Syl_CheckAndShowSyllabus (&Syllabus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -33,11 +33,12 @@
|
||||||
/************************ Public constants and types *************************/
|
/************************ Public constants and types *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define Syl_NUM_WHICH_SYLLABUS 2
|
#define Syl_NUM_WHICH_SYLLABUS 3
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
Syl_LECTURES = 0,
|
Syl_NONE = 0,
|
||||||
Syl_PRACTICALS = 1,
|
Syl_LECTURES = 1,
|
||||||
|
Syl_PRACTICALS = 2,
|
||||||
} Syl_WhichSyllabus_t; // Which syllabus I want to see
|
} Syl_WhichSyllabus_t; // Which syllabus I want to see
|
||||||
#define Syl_DEFAULT_WHICH_SYLLABUS Syl_LECTURES
|
#define Syl_DEFAULT_WHICH_SYLLABUS Syl_LECTURES
|
||||||
|
|
||||||
|
@ -88,9 +89,11 @@ struct Syl_Syllabus
|
||||||
void Syl_ResetSyllabus (struct Syl_Syllabus *Syllabus);
|
void Syl_ResetSyllabus (struct Syl_Syllabus *Syllabus);
|
||||||
|
|
||||||
Syl_WhichSyllabus_t Syl_GetParWhichSyllabus (void);
|
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_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_EditSyllabus (void);
|
||||||
|
|
||||||
void Syl_LoadListItemsSyllabusIntoMemory (struct Syl_Syllabus *Syllabus,
|
void Syl_LoadListItemsSyllabusIntoMemory (struct Syl_Syllabus *Syllabus,
|
||||||
|
|
|
@ -228,7 +228,7 @@ void Tab_SetCurrentTab (void)
|
||||||
{
|
{
|
||||||
if (Gbl.Hierarchy.Node[Hie_CTY].HieCod > 0) // Country selected, but no institution selected
|
if (Gbl.Hierarchy.Node[Hie_CTY].HieCod > 0) // Country selected, but no institution selected
|
||||||
Gbl.Action.Act = ActSeeIns;
|
Gbl.Action.Act = ActSeeIns;
|
||||||
else // No country selected
|
else // No country selected
|
||||||
Gbl.Action.Act = ActSeeCty;
|
Gbl.Action.Act = ActSeeCty;
|
||||||
Gbl.Action.Tab = Act_GetTab (Gbl.Action.Act);
|
Gbl.Action.Tab = Act_GetTab (Gbl.Action.Act);
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ void Tab_SetCurrentTab (void)
|
||||||
Gbl.Action.Act = ActSeeCtr;
|
Gbl.Action.Act = ActSeeCtr;
|
||||||
else if (Gbl.Hierarchy.Node[Hie_CTY].HieCod > 0) // Country selected, but no institution selected
|
else if (Gbl.Hierarchy.Node[Hie_CTY].HieCod > 0) // Country selected, but no institution selected
|
||||||
Gbl.Action.Act = ActSeeIns;
|
Gbl.Action.Act = ActSeeIns;
|
||||||
else // No country selected
|
else // No country selected
|
||||||
Gbl.Action.Act = ActSeeCty;
|
Gbl.Action.Act = ActSeeCty;
|
||||||
Gbl.Action.Tab = Act_GetTab (Gbl.Action.Act);
|
Gbl.Action.Tab = Act_GetTab (Gbl.Action.Act);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ void Tab_SetCurrentTab (void)
|
||||||
Gbl.Action.Act = ActSeeCtr;
|
Gbl.Action.Act = ActSeeCtr;
|
||||||
else if (Gbl.Hierarchy.Node[Hie_CTY].HieCod > 0) // Country selected, but no institution selected
|
else if (Gbl.Hierarchy.Node[Hie_CTY].HieCod > 0) // Country selected, but no institution selected
|
||||||
Gbl.Action.Act = ActSeeIns;
|
Gbl.Action.Act = ActSeeIns;
|
||||||
else // No country selected
|
else // No country selected
|
||||||
Gbl.Action.Act = ActSeeCty;
|
Gbl.Action.Act = ActSeeCty;
|
||||||
Gbl.Action.Tab = Act_GetTab (Gbl.Action.Act);
|
Gbl.Action.Tab = Act_GetTab (Gbl.Action.Act);
|
||||||
}
|
}
|
||||||
|
|
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] =
|
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] =
|
[TabStr] =
|
||||||
{
|
{
|
||||||
// 0: ActFrmLogIn
|
// 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
|
#elif L==10 // tr
|
||||||
"Bildirimler"
|
"Bildirimler"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabSys] =
|
[TabSys] =
|
||||||
{
|
{
|
||||||
|
@ -20503,14 +20479,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Bakım onarım"
|
"Bakım onarım"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabCty] =
|
[TabCty] =
|
||||||
{
|
{
|
||||||
|
@ -20559,18 +20527,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Kurumlar"
|
"Kurumlar"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 2
|
|
||||||
NULL, // 3
|
|
||||||
NULL, // 4
|
|
||||||
NULL, // 5
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabIns] =
|
[TabIns] =
|
||||||
{
|
{
|
||||||
|
@ -20688,15 +20644,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Bayram"
|
"Bayram"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 5
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabCtr] =
|
[TabCtr] =
|
||||||
{
|
{
|
||||||
|
@ -20791,16 +20738,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Odalar"
|
"Odalar"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 4
|
|
||||||
NULL, // 5
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabDeg] =
|
[TabDeg] =
|
||||||
{
|
{
|
||||||
|
@ -20849,18 +20786,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Dersler"
|
"Dersler"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 2
|
|
||||||
NULL, // 3
|
|
||||||
NULL, // 4
|
|
||||||
NULL, // 5
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabCrs] =
|
[TabCrs] =
|
||||||
{
|
{
|
||||||
|
@ -21070,11 +20995,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Programı"
|
"Programı"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabAss] =
|
[TabAss] =
|
||||||
{
|
{
|
||||||
|
@ -21261,12 +21181,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Değerlendirme"
|
"Değerlendirme"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabFil] =
|
[TabFil] =
|
||||||
{
|
{
|
||||||
|
@ -21754,12 +21668,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Bağlı"
|
"Bağlı"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabMsg] =
|
[TabMsg] =
|
||||||
{
|
{
|
||||||
|
@ -21900,14 +21808,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"E-posta"
|
"E-posta"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 6
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabAna] =
|
[TabAna] =
|
||||||
{
|
{
|
||||||
|
@ -22071,13 +21971,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Sık"
|
"Sık"
|
||||||
#endif
|
#endif
|
||||||
,
|
|
||||||
NULL, // 7
|
|
||||||
NULL, // 8
|
|
||||||
NULL, // 9
|
|
||||||
NULL, // 10
|
|
||||||
NULL, // 11
|
|
||||||
NULL, // 12
|
|
||||||
},
|
},
|
||||||
[TabPrf] =
|
[TabPrf] =
|
||||||
{
|
{
|
||||||
|
@ -22241,13 +22134,6 @@ const char *Txt_MENU_TITLE[Tab_NUM_TABS][Act_MAX_OPTIONS_IN_MENU_PER_TAB] =
|
||||||
#elif L==10 // tr
|
#elif L==10 // tr
|
||||||
"Ayarlar"
|
"Ayarlar"
|
||||||
#endif
|
#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] =
|
const char *Txt_SYLLABUS_WHICH_SYLLABUS[Syl_NUM_WHICH_SYLLABUS] =
|
||||||
{
|
{
|
||||||
|
[Syl_NONE] =
|
||||||
|
""
|
||||||
|
,
|
||||||
[Syl_LECTURES] =
|
[Syl_LECTURES] =
|
||||||
#if L==1 // ca
|
#if L==1 // ca
|
||||||
"Teoria"
|
"Teoria"
|
||||||
|
|
Loading…
Reference in New Issue