mirror of https://github.com/acanas/swad-core.git
Version 23.41: Oct 29, 2023 Code refactoring in view/edit/print.
This commit is contained in:
parent
e1135c77b7
commit
362c522791
|
@ -67,8 +67,7 @@ extern struct Globals Gbl;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
||||||
bool OnlyOneAssignment,
|
bool OnlyOneAssignment,Vie_ViewType_t ViewType);
|
||||||
bool PrintView);
|
|
||||||
static bool Asg_CheckIfICanCreateAssignments (void);
|
static bool Asg_CheckIfICanCreateAssignments (void);
|
||||||
static void Asg_PutIconsListAssignments (void *Assignments);
|
static void Asg_PutIconsListAssignments (void *Assignments);
|
||||||
static void Asg_PutIconToCreateNewAsg (void *Assignments);
|
static void Asg_PutIconToCreateNewAsg (void *Assignments);
|
||||||
|
@ -76,9 +75,10 @@ static void Asg_ParsWhichGroupsToShow (void *Assignments);
|
||||||
static void Asg_PutIconsOneAsg (void *Assignments);
|
static void Asg_PutIconsOneAsg (void *Assignments);
|
||||||
static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
bool OnlyOneAssignment,
|
bool OnlyOneAssignment,
|
||||||
bool PrintView);
|
Vie_ViewType_t ViewType);
|
||||||
static void Asg_WriteAsgAuthor (struct Asg_Assignment *Asg);
|
static void Asg_WriteAsgAuthor (struct Asg_Assignment *Asg);
|
||||||
static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView);
|
static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,
|
||||||
|
Vie_ViewType_t ViewType);
|
||||||
|
|
||||||
static void Asg_PutIconsToRemEditOneAsg (struct Asg_Assignments *Assignments,
|
static void Asg_PutIconsToRemEditOneAsg (struct Asg_Assignments *Assignments,
|
||||||
const char *Anchor);
|
const char *Anchor);
|
||||||
|
@ -179,7 +179,7 @@ void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
|
||||||
/***** Table head *****/
|
/***** Table head *****/
|
||||||
Asg_PutHead (Assignments,
|
Asg_PutHead (Assignments,
|
||||||
false, // Not only this assignment in table
|
false, // Not only this assignment in table
|
||||||
false); // Not print view
|
Vie_VIEW); // Not print view
|
||||||
|
|
||||||
/***** Write all assignments *****/
|
/***** Write all assignments *****/
|
||||||
for (NumAsg = Pagination.FirstItemVisible, The_ResetRowColor ();
|
for (NumAsg = Pagination.FirstItemVisible, The_ResetRowColor ();
|
||||||
|
@ -189,8 +189,8 @@ void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
|
||||||
Assignments->Asg.AsgCod = Assignments->LstAsgCods[NumAsg - 1];
|
Assignments->Asg.AsgCod = Assignments->LstAsgCods[NumAsg - 1];
|
||||||
Asg_GetAssignmentDataByCod (&Assignments->Asg);
|
Asg_GetAssignmentDataByCod (&Assignments->Asg);
|
||||||
Asg_ShowAssignmentRow (Assignments,
|
Asg_ShowAssignmentRow (Assignments,
|
||||||
false, // Not only this assignment in table
|
false, // Not only this assignment in table
|
||||||
false); // Not print view
|
Vie_VIEW); // Not print view
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -215,8 +215,7 @@ void Asg_ShowAllAssignments (struct Asg_Assignments *Assignments)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
||||||
bool OnlyOneAssignment,
|
bool OnlyOneAssignment,Vie_ViewType_t ViewType)
|
||||||
bool PrintView)
|
|
||||||
{
|
{
|
||||||
extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME];
|
extern const char *Txt_START_END_TIME_HELP[Dat_NUM_START_END_TIME];
|
||||||
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
|
extern const char *Txt_START_END_TIME[Dat_NUM_START_END_TIME];
|
||||||
|
@ -237,7 +236,7 @@ static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
||||||
/* Begin head cell */
|
/* Begin head cell */
|
||||||
HTM_TH_Begin (HTM_HEAD_LEFT);
|
HTM_TH_Begin (HTM_HEAD_LEFT);
|
||||||
|
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
/* Begin form */
|
/* Begin form */
|
||||||
Frm_BeginForm (ActSeeAllAsg);
|
Frm_BeginForm (ActSeeAllAsg);
|
||||||
|
@ -256,7 +255,7 @@ static void Asg_PutHead (struct Asg_Assignments *Assignments,
|
||||||
/* Start / end text */
|
/* Start / end text */
|
||||||
HTM_Txt (Txt_START_END_TIME[Order]);
|
HTM_Txt (Txt_START_END_TIME[Order]);
|
||||||
|
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
/* End link to select order */
|
/* End link to select order */
|
||||||
if (Order == Assignments->SelectedOrder)
|
if (Order == Assignments->SelectedOrder)
|
||||||
|
@ -388,7 +387,7 @@ void Asg_PrintOneAssignment (void)
|
||||||
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
Asg_GetAssignmentDataByCod (&Assignments.Asg);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,false);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT,false);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
@ -396,12 +395,12 @@ void Asg_PrintOneAssignment (void)
|
||||||
/***** Table head *****/
|
/***** Table head *****/
|
||||||
Asg_PutHead (&Assignments,
|
Asg_PutHead (&Assignments,
|
||||||
true, // Only this assignment in table
|
true, // Only this assignment in table
|
||||||
true); // Print view
|
Vie_PRINT); // Print view
|
||||||
|
|
||||||
/***** Write assignment *****/
|
/***** Write assignment *****/
|
||||||
Asg_ShowAssignmentRow (&Assignments,
|
Asg_ShowAssignmentRow (&Assignments,
|
||||||
true, // Only this assignment in table
|
true, // Only this assignment in table
|
||||||
true); // Print view
|
Vie_PRINT); // Print view
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
@ -425,12 +424,12 @@ void Asg_ShowOneAssignmentInBox (struct Asg_Assignments *Assignments)
|
||||||
/***** Table head *****/
|
/***** Table head *****/
|
||||||
Asg_PutHead (Assignments,
|
Asg_PutHead (Assignments,
|
||||||
true, // Only this assignment in table
|
true, // Only this assignment in table
|
||||||
false); // Not print view
|
Vie_VIEW); // Not print view
|
||||||
|
|
||||||
/***** Write assignment *****/
|
/***** Write assignment *****/
|
||||||
Asg_ShowAssignmentRow (Assignments,
|
Asg_ShowAssignmentRow (Assignments,
|
||||||
true, // Only this assignment in table
|
true, // Only this assignment in table
|
||||||
false); // Not print view
|
Vie_VIEW); // Not print view
|
||||||
|
|
||||||
/***** End table and end box *****/
|
/***** End table and end box *****/
|
||||||
Box_BoxTableEnd ();
|
Box_BoxTableEnd ();
|
||||||
|
@ -463,7 +462,7 @@ static void Asg_PutIconsOneAsg (void *Assignments)
|
||||||
|
|
||||||
static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
bool OnlyOneAssignment,
|
bool OnlyOneAssignment,
|
||||||
bool PrintView)
|
Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
extern const char *Txt_Actions[ActLst_NUM_ACTIONS];
|
||||||
extern const char *HidVis_DateGreenClass[HidVis_NUM_HIDDEN_VISIBLE];
|
extern const char *HidVis_DateGreenClass[HidVis_NUM_HIDDEN_VISIBLE];
|
||||||
|
@ -500,19 +499,27 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
{
|
{
|
||||||
if (asprintf (&Id,"asg_date_%u_%u",(unsigned) StartEndTime,UniqueId) < 0)
|
if (asprintf (&Id,"asg_date_%u_%u",(unsigned) StartEndTime,UniqueId) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s\"",
|
{
|
||||||
Id,
|
case Vie_VIEW:
|
||||||
Assignments->Asg.Open ? HidVis_DateGreenClass[Assignments->Asg.HiddenOrVisible] :
|
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s %s\"",
|
||||||
HidVis_DateRedClass[Assignments->Asg.HiddenOrVisible],
|
Id,
|
||||||
The_GetSuffix ());
|
Assignments->Asg.Open ? HidVis_DateGreenClass[Assignments->Asg.HiddenOrVisible] :
|
||||||
else
|
HidVis_DateRedClass[Assignments->Asg.HiddenOrVisible],
|
||||||
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s %s\"",
|
The_GetSuffix (),
|
||||||
Id,
|
The_GetColorRows ());
|
||||||
Assignments->Asg.Open ? HidVis_DateGreenClass[Assignments->Asg.HiddenOrVisible] :
|
break;
|
||||||
HidVis_DateRedClass[Assignments->Asg.HiddenOrVisible],
|
case Vie_PRINT:
|
||||||
The_GetSuffix (),
|
HTM_TD_Begin ("id=\"%s\" class=\"LT %s_%s\"",
|
||||||
The_GetColorRows ());
|
Id,
|
||||||
|
Assignments->Asg.Open ? HidVis_DateGreenClass[Assignments->Asg.HiddenOrVisible] :
|
||||||
|
HidVis_DateRedClass[Assignments->Asg.HiddenOrVisible],
|
||||||
|
The_GetSuffix ());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
Dat_WriteLocalDateHMSFromUTC (Id,Assignments->Asg.TimeUTC[StartEndTime],
|
Dat_WriteLocalDateHMSFromUTC (Id,Assignments->Asg.TimeUTC[StartEndTime],
|
||||||
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
Gbl.Prefs.DateFormat,Dat_SEPARATOR_BREAK,
|
||||||
true,true,true,0x7);
|
true,true,true,0x7);
|
||||||
|
@ -521,10 +528,18 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Assignment title */
|
/* Assignment title */
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
HTM_TD_Begin ("class=\"LT\"");
|
{
|
||||||
else
|
case Vie_VIEW:
|
||||||
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
|
||||||
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
HTM_TD_Begin ("class=\"LT\"");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
HTM_ARTICLE_Begin (Anchor);
|
HTM_ARTICLE_Begin (Anchor);
|
||||||
Frm_BeginForm (ActSeeOneAsg);
|
Frm_BeginForm (ActSeeOneAsg);
|
||||||
|
@ -541,14 +556,23 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Assignment folder */
|
/* Assignment folder */
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",
|
{
|
||||||
The_GetSuffix ());
|
case Vie_VIEW:
|
||||||
else
|
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
The_GetSuffix (),The_GetColorRows ());
|
||||||
The_GetSuffix (),The_GetColorRows ());
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
HTM_TD_Begin ("class=\"LT DAT_%s\"",
|
||||||
|
The_GetSuffix ());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (Assignments->Asg.SendWork == Asg_SEND_WORK)
|
if (Assignments->Asg.SendWork == Asg_SEND_WORK)
|
||||||
Asg_WriteAssignmentFolder (&Assignments->Asg,PrintView);
|
Asg_WriteAssignmentFolder (&Assignments->Asg,ViewType);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TR_End ();
|
HTM_TR_End ();
|
||||||
|
@ -557,10 +581,18 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
/* Author of the assignment */
|
/* Author of the assignment */
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
|
{
|
||||||
else
|
case Vie_VIEW:
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
||||||
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
Asg_WriteAsgAuthor (&Assignments->Asg);
|
Asg_WriteAsgAuthor (&Assignments->Asg);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
@ -569,10 +601,18 @@ static void Asg_ShowAssignmentRow (struct Asg_Assignments *Assignments,
|
||||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||||
Txt,Cns_MAX_BYTES_TEXT,Str_DONT_REMOVE_SPACES);
|
Txt,Cns_MAX_BYTES_TEXT,Str_DONT_REMOVE_SPACES);
|
||||||
ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
ALn_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
|
{
|
||||||
else
|
case Vie_VIEW:
|
||||||
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
HTM_TD_Begin ("colspan=\"2\" class=\"LT %s\"",The_GetColorRows ());
|
||||||
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
HTM_TD_Begin ("colspan=\"2\" class=\"LT\"");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (Gbl.Crs.Grps.NumGrps)
|
if (Gbl.Crs.Grps.NumGrps)
|
||||||
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Assignments->Asg);
|
Asg_GetAndWriteNamesOfGrpsAssociatedToAsg (&Assignments->Asg);
|
||||||
|
|
||||||
|
@ -606,17 +646,18 @@ static void Asg_WriteAsgAuthor (struct Asg_Assignment *Asg)
|
||||||
/********************* Write the folder of an assignment *********************/
|
/********************* Write the folder of an assignment *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,bool PrintView)
|
static void Asg_WriteAssignmentFolder (struct Asg_Assignment *Asg,
|
||||||
|
Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Txt_Folder;
|
extern const char *Txt_Folder;
|
||||||
Act_Action_t NextAction;
|
Act_Action_t NextAction;
|
||||||
bool ICanSendFiles = Asg->HiddenOrVisible == HidVis_VISIBLE && // It's visible (not hidden)
|
bool ICanSendFiles = Asg->HiddenOrVisible == HidVis_VISIBLE && // It's visible (not hidden)
|
||||||
Asg->Open && // It's open (inside dates)
|
Asg->Open && // It's open (inside dates)
|
||||||
Asg->IBelongToCrsOrGrps; // I belong to course or groups
|
Asg->IBelongToCrsOrGrps; // I belong to course or groups
|
||||||
|
|
||||||
/***** Folder icon *****/
|
/***** Folder icon *****/
|
||||||
if (!PrintView && // Not print view
|
if (ViewType == Vie_VIEW && // Not print view
|
||||||
ICanSendFiles) // I can send files to this assignment folder
|
ICanSendFiles) // I can send files to this assignment folder
|
||||||
{
|
{
|
||||||
/* Form to create a new file or folder */
|
/* Form to create a new file or folder */
|
||||||
Gbl.FileBrowser.FullTree = true; // By default, show all files
|
Gbl.FileBrowser.FullTree = true; // By default, show all files
|
||||||
|
|
|
@ -78,7 +78,7 @@ static unsigned Cal_GetParFirstDayOfWeek (void);
|
||||||
static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
||||||
Act_Action_t ActionChangeCalendar1stDay,
|
Act_Action_t ActionChangeCalendar1stDay,
|
||||||
void (*FunctionToDrawContextualIcons) (void *Args),void *Args,
|
void (*FunctionToDrawContextualIcons) (void *Args),void *Args,
|
||||||
bool PrintView);
|
Vie_ViewType_t ViewType);
|
||||||
static void Cal_PutIconsCalendar (__attribute__((unused)) void *Args);
|
static void Cal_PutIconsCalendar (__attribute__((unused)) void *Args);
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -235,36 +235,42 @@ void Cal_ShowCalendar (void)
|
||||||
{
|
{
|
||||||
Cal_DrawCalendar (ActSeeCal,ActChgCal1stDay,
|
Cal_DrawCalendar (ActSeeCal,ActChgCal1stDay,
|
||||||
Cal_PutIconsCalendar,NULL,
|
Cal_PutIconsCalendar,NULL,
|
||||||
false);
|
Vie_VIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cal_PrintCalendar (void)
|
void Cal_PrintCalendar (void)
|
||||||
{
|
{
|
||||||
Cal_DrawCalendar (ActUnk,ActUnk,
|
Cal_DrawCalendar (ActUnk,ActUnk,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
true);
|
Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
||||||
Act_Action_t ActionChangeCalendar1stDay,
|
Act_Action_t ActionChangeCalendar1stDay,
|
||||||
void (*FunctionToDrawContextualIcons) (void *Args),void *Args,
|
void (*FunctionToDrawContextualIcons) (void *Args),void *Args,
|
||||||
bool PrintView)
|
Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_START_Calendar;
|
extern const char *Hlp_START_Calendar;
|
||||||
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
extern const char *Lan_STR_LANG_ID[1 + Lan_NUM_LANGUAGES];
|
||||||
char ParsStr[Frm_MAX_BYTES_PARAMS_STR + 1];
|
char ParsStr[Frm_MAX_BYTES_PARAMS_STR + 1];
|
||||||
|
static const char *Print[Vie_NUM_VIEW_TYPES] =
|
||||||
|
{
|
||||||
|
[Vie_VIEW ] = "false",
|
||||||
|
[Vie_PRINT] = "true",
|
||||||
|
};
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,NULL,
|
Box_BoxBegin (NULL,NULL,
|
||||||
FunctionToDrawContextualIcons,Args,
|
FunctionToDrawContextualIcons,Args,
|
||||||
PrintView ? NULL :
|
ViewType == Vie_VIEW ? Hlp_START_Calendar :
|
||||||
Hlp_START_Calendar,Box_NOT_CLOSABLE);
|
NULL,
|
||||||
|
Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (PrintView,false);
|
Lay_WriteHeaderClassPhoto (ViewType,false);
|
||||||
|
|
||||||
/***** Preference selector to change first day of week *****/
|
/***** Preference selector to change first day of week *****/
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
Set_BeginSettingsHead ();
|
Set_BeginSettingsHead ();
|
||||||
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,
|
Cal_ShowFormToSelFirstDayOfWeek (ActionChangeCalendar1stDay,
|
||||||
|
@ -284,8 +290,7 @@ static void Cal_DrawCalendar (Act_Action_t ActionSeeCalendar,
|
||||||
Gbl.Prefs.FirstDayOfWeek,
|
Gbl.Prefs.FirstDayOfWeek,
|
||||||
(long) Dat_GetStartExecutionTimeUTC (),
|
(long) Dat_GetStartExecutionTimeUTC (),
|
||||||
Gbl.Hierarchy.Node[Hie_CTR].Specific.PlcCod,
|
Gbl.Hierarchy.Node[Hie_CTR].Specific.PlcCod,
|
||||||
PrintView ? "true" :
|
Print[ViewType],
|
||||||
"false",
|
|
||||||
The_GetSuffix (),
|
The_GetSuffix (),
|
||||||
Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language]);
|
Cfg_URL_SWAD_CGI,Lan_STR_LANG_ID[Gbl.Prefs.Language]);
|
||||||
Frm_SetParsForm (ParsStr,ActionSeeCalendar,true);
|
Frm_SetParsForm (ParsStr,ActionSeeCalendar,true);
|
||||||
|
|
|
@ -75,23 +75,23 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtrCfg_Configuration (bool PrintView);
|
static void CtrCfg_Configuration (Vie_ViewType_t ViewType);
|
||||||
static void CtrCfg_PutIconsCtrConfig (__attribute__((unused)) void *Args);
|
static void CtrCfg_PutIconsCtrConfig (__attribute__((unused)) void *Args);
|
||||||
static void CtrCfg_PutIconToChangePhoto (void);
|
static void CtrCfg_PutIconToChangePhoto (void);
|
||||||
static void CtrCfg_Map (const struct Map_Coordinates *Coord);
|
static void CtrCfg_Map (const struct Map_Coordinates *Coord);
|
||||||
static void CtrCfg_Latitude (double Latitude);
|
static void CtrCfg_Latitude (double Latitude);
|
||||||
static void CtrCfg_Longitude (double Longitude);
|
static void CtrCfg_Longitude (double Longitude);
|
||||||
static void CtrCfg_Altitude (double Altitude);
|
static void CtrCfg_Altitude (double Altitude);
|
||||||
static void CtrCfg_Photo (bool PrintView,bool PutForm,bool PutLink,
|
static void CtrCfg_Photo (Vie_ViewType_t ViewType,bool PutForm,bool PutLink,
|
||||||
const char PathPhoto[PATH_MAX + 1]);
|
const char PathPhoto[PATH_MAX + 1]);
|
||||||
static void CtrCfg_GetPhotoAttr (long CtrCod,char **PhotoAttribution);
|
static void CtrCfg_GetPhotoAttr (long CtrCod,char **PhotoAttribution);
|
||||||
static void CtrCfg_FreePhotoAttr (char **PhotoAttribution);
|
static void CtrCfg_FreePhotoAttr (char **PhotoAttribution);
|
||||||
static void CtrCfg_Institution (bool PrintView,bool PutForm);
|
static void CtrCfg_Institution (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void CtrCfg_FullName (bool PutForm);
|
static void CtrCfg_FullName (bool PutForm);
|
||||||
static void CtrCfg_ShrtName (bool PutForm);
|
static void CtrCfg_ShrtName (bool PutForm);
|
||||||
static void CtrCfg_Place (bool PutForm);
|
static void CtrCfg_Place (bool PutForm);
|
||||||
static void CtrCfg_WWW (bool PrintView,bool PutForm);
|
static void CtrCfg_WWW (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void CtrCfg_Shortcut (bool PrintView);
|
static void CtrCfg_Shortcut (Vie_ViewType_t ViewType);
|
||||||
static void CtrCfg_QR (void);
|
static void CtrCfg_QR (void);
|
||||||
static void CtrCfg_NumUsrs (void);
|
static void CtrCfg_NumUsrs (void);
|
||||||
static void CtrCfg_NumDegs (void);
|
static void CtrCfg_NumDegs (void);
|
||||||
|
@ -103,7 +103,7 @@ static void CtrCfg_NumCrss (void);
|
||||||
|
|
||||||
void CtrCfg_ShowConfiguration (void)
|
void CtrCfg_ShowConfiguration (void)
|
||||||
{
|
{
|
||||||
CtrCfg_Configuration (false);
|
CtrCfg_Configuration (Vie_VIEW);
|
||||||
|
|
||||||
/***** Show help to enrol me *****/
|
/***** Show help to enrol me *****/
|
||||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||||
|
@ -115,14 +115,14 @@ void CtrCfg_ShowConfiguration (void)
|
||||||
|
|
||||||
void CtrCfg_PrintConfiguration (void)
|
void CtrCfg_PrintConfiguration (void)
|
||||||
{
|
{
|
||||||
CtrCfg_Configuration (true);
|
CtrCfg_Configuration (Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************* Information of the current center ***********************/
|
/******************* Information of the current center ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtrCfg_Configuration (bool PrintView)
|
static void CtrCfg_Configuration (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_CENTER_Information;
|
extern const char *Hlp_CENTER_Information;
|
||||||
struct Map_Coordinates Coord;
|
struct Map_Coordinates Coord;
|
||||||
|
@ -145,108 +145,111 @@ static void CtrCfg_Configuration (bool PrintView)
|
||||||
Ctr_GetCoordByCod (Gbl.Hierarchy.Node[Hie_CTR].HieCod,&Coord);
|
Ctr_GetCoordByCod (Gbl.Hierarchy.Node[Hie_CTR].HieCod,&Coord);
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
PutLink = !PrintView && Gbl.Hierarchy.Node[Hie_CTR].WWW[0];
|
PutLink = ViewType == Vie_VIEW && Gbl.Hierarchy.Node[Hie_CTR].WWW[0];
|
||||||
PutFormIns = !PrintView && Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
PutFormIns = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
||||||
PutFormName = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
PutFormName = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
||||||
PutFormPlc =
|
PutFormPlc =
|
||||||
PutFormCoor =
|
PutFormCoor =
|
||||||
PutFormWWW =
|
PutFormWWW =
|
||||||
PutFormPhoto = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM;
|
PutFormPhoto = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (PrintView)
|
Box_BoxBegin (NULL,NULL,
|
||||||
Box_BoxBegin (NULL,NULL,
|
ViewType == Vie_VIEW ? CtrCfg_PutIconsCtrConfig :
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
ViewType == Vie_VIEW ? Hlp_CENTER_Information :
|
||||||
else
|
NULL,Box_NOT_CLOSABLE);
|
||||||
Box_BoxBegin (NULL,NULL,
|
|
||||||
CtrCfg_PutIconsCtrConfig,NULL,
|
|
||||||
Hlp_CENTER_Information,Box_NOT_CLOSABLE);
|
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Title *****/
|
||||||
HieCfg_Title (PutLink,Hie_CTR);
|
HieCfg_Title (PutLink,Hie_CTR);
|
||||||
|
|
||||||
/**************************** Left part ***********************************/
|
/**************************** Left part ***********************************/
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
/***** Institution *****/
|
/***** Institution *****/
|
||||||
CtrCfg_Institution (PrintView,PutFormIns);
|
CtrCfg_Institution (ViewType,PutFormIns);
|
||||||
|
|
||||||
/***** Center name *****/
|
/***** Center name *****/
|
||||||
CtrCfg_FullName (PutFormName);
|
CtrCfg_FullName (PutFormName);
|
||||||
CtrCfg_ShrtName (PutFormName);
|
CtrCfg_ShrtName (PutFormName);
|
||||||
|
|
||||||
/***** Place *****/
|
/***** Place *****/
|
||||||
CtrCfg_Place (PutFormPlc);
|
CtrCfg_Place (PutFormPlc);
|
||||||
|
|
||||||
/***** Coordinates *****/
|
/***** Coordinates *****/
|
||||||
if (PutFormCoor)
|
if (PutFormCoor)
|
||||||
{
|
{
|
||||||
CtrCfg_Latitude (Coord.Latitude );
|
CtrCfg_Latitude (Coord.Latitude );
|
||||||
CtrCfg_Longitude (Coord.Longitude);
|
CtrCfg_Longitude (Coord.Longitude);
|
||||||
CtrCfg_Altitude (Coord.Altitude );
|
CtrCfg_Altitude (Coord.Altitude );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Center WWW *****/
|
/***** Center WWW *****/
|
||||||
CtrCfg_WWW (PrintView,PutFormWWW);
|
CtrCfg_WWW (ViewType,PutFormWWW);
|
||||||
|
|
||||||
/***** Shortcut to the center *****/
|
/***** Shortcut to the center *****/
|
||||||
CtrCfg_Shortcut (PrintView);
|
CtrCfg_Shortcut (ViewType);
|
||||||
|
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
/***** QR code with link to the center *****/
|
{
|
||||||
CtrCfg_QR ();
|
case Vie_VIEW:
|
||||||
else
|
/***** Number of users who claim to belong to this center,
|
||||||
{
|
number of degrees,
|
||||||
/***** Number of users who claim to belong to this center,
|
number of courses *****/
|
||||||
number of degrees,
|
CtrCfg_NumUsrs ();
|
||||||
number of courses *****/
|
CtrCfg_NumDegs ();
|
||||||
CtrCfg_NumUsrs ();
|
CtrCfg_NumCrss ();
|
||||||
CtrCfg_NumDegs ();
|
|
||||||
CtrCfg_NumCrss ();
|
|
||||||
|
|
||||||
/***** Number of users in courses of this center *****/
|
/***** Number of users in courses of this center *****/
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_TCH);
|
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_TCH);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_NET);
|
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_NET);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_STD);
|
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_STD);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_UNK);
|
HieCfg_NumUsrsInCrss (Hie_CTR,Gbl.Hierarchy.Node[Hie_CTR].HieCod,Rol_UNK);
|
||||||
}
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/***** QR code with link to the center *****/
|
||||||
|
CtrCfg_QR ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** End of left part *****/
|
|
||||||
HTM_DIV_End ();
|
|
||||||
|
|
||||||
/**************************** Right part **********************************/
|
|
||||||
/***** Check map *****/
|
|
||||||
MapIsAvailable = Map_CheckIfCoordAreAvailable (&Coord);
|
|
||||||
|
|
||||||
/***** Check photo *****/
|
|
||||||
snprintf (PathPhoto,sizeof (PathPhoto),"%s/%02u/%u/%u.jpg",
|
|
||||||
Cfg_PATH_CTR_PUBLIC,
|
|
||||||
(unsigned) (Gbl.Hierarchy.Node[Hie_CTR].HieCod % 100),
|
|
||||||
(unsigned) Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
|
||||||
(unsigned) Gbl.Hierarchy.Node[Hie_CTR].HieCod);
|
|
||||||
PhotoExists = Fil_CheckIfPathExists (PathPhoto);
|
|
||||||
|
|
||||||
if (MapIsAvailable || PhotoExists)
|
|
||||||
{
|
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
|
||||||
|
|
||||||
/***** Center map *****/
|
|
||||||
if (MapIsAvailable)
|
|
||||||
CtrCfg_Map (&Coord);
|
|
||||||
|
|
||||||
/***** Center photo *****/
|
|
||||||
if (PhotoExists)
|
|
||||||
CtrCfg_Photo (PrintView,PutFormPhoto,PutLink,PathPhoto);
|
|
||||||
|
|
||||||
|
/***** End of left part *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
|
||||||
|
/**************************** Right part **********************************/
|
||||||
|
/***** Check map *****/
|
||||||
|
MapIsAvailable = Map_CheckIfCoordAreAvailable (&Coord);
|
||||||
|
|
||||||
|
/***** Check photo *****/
|
||||||
|
snprintf (PathPhoto,sizeof (PathPhoto),"%s/%02u/%u/%u.jpg",
|
||||||
|
Cfg_PATH_CTR_PUBLIC,
|
||||||
|
(unsigned) (Gbl.Hierarchy.Node[Hie_CTR].HieCod % 100),
|
||||||
|
(unsigned) Gbl.Hierarchy.Node[Hie_CTR].HieCod,
|
||||||
|
(unsigned) Gbl.Hierarchy.Node[Hie_CTR].HieCod);
|
||||||
|
PhotoExists = Fil_CheckIfPathExists (PathPhoto);
|
||||||
|
|
||||||
|
if (MapIsAvailable || PhotoExists)
|
||||||
|
{
|
||||||
|
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
|
/***** Center map *****/
|
||||||
|
if (MapIsAvailable)
|
||||||
|
CtrCfg_Map (&Coord);
|
||||||
|
|
||||||
|
/***** Center photo *****/
|
||||||
|
if (PhotoExists)
|
||||||
|
CtrCfg_Photo (ViewType,PutFormPhoto,PutLink,PathPhoto);
|
||||||
|
|
||||||
|
HTM_DIV_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
Box_BoxEnd ();
|
Box_BoxEnd ();
|
||||||
|
@ -418,7 +421,7 @@ static void CtrCfg_Altitude (double Altitude)
|
||||||
/***************************** Draw center photo *****************************/
|
/***************************** Draw center photo *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtrCfg_Photo (bool PrintView,bool PutForm,bool PutLink,
|
static void CtrCfg_Photo (Vie_ViewType_t ViewType,bool PutForm,bool PutLink,
|
||||||
const char PathPhoto[PATH_MAX + 1])
|
const char PathPhoto[PATH_MAX + 1])
|
||||||
{
|
{
|
||||||
char *PhotoAttribution = NULL;
|
char *PhotoAttribution = NULL;
|
||||||
|
@ -448,8 +451,8 @@ static void CtrCfg_Photo (bool PrintView,bool PutForm,bool PutLink,
|
||||||
(unsigned) Gbl.Hierarchy.Node[Hie_CTR].HieCod) < 0)
|
(unsigned) Gbl.Hierarchy.Node[Hie_CTR].HieCod) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
HTM_IMG (URL,Icon,Gbl.Hierarchy.Node[Hie_CTR].FullName,
|
HTM_IMG (URL,Icon,Gbl.Hierarchy.Node[Hie_CTR].FullName,
|
||||||
"class=\"%s\"",PrintView ? "CENTER_PHOTO_PRINT CENTER_PHOTO_WIDTH" :
|
"class=\"%s\"",ViewType == Vie_VIEW ? "CENTER_PHOTO_SHOW CENTER_PHOTO_WIDTH" :
|
||||||
"CENTER_PHOTO_SHOW CENTER_PHOTO_WIDTH");
|
"CENTER_PHOTO_PRINT CENTER_PHOTO_WIDTH");
|
||||||
free (Icon);
|
free (Icon);
|
||||||
free (URL);
|
free (URL);
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
|
@ -531,7 +534,7 @@ static void CtrCfg_FreePhotoAttr (char **PhotoAttribution)
|
||||||
/***************** Show institution in center configuration ******************/
|
/***************** Show institution in center configuration ******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
static void CtrCfg_Institution (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Institution;
|
extern const char *Txt_Institution;
|
||||||
|
@ -578,7 +581,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
||||||
}
|
}
|
||||||
else // I can not move center to another institution
|
else // I can not move center to another institution
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
Frm_BeginFormGoTo (ActSeeInsInf);
|
Frm_BeginFormGoTo (ActSeeInsInf);
|
||||||
ParCod_PutPar (ParCod_Ins,Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
ParCod_PutPar (ParCod_Ins,Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
||||||
|
@ -594,7 +597,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
HTM_Txt (Gbl.Hierarchy.Node[Hie_INS].FullName);
|
HTM_Txt (Gbl.Hierarchy.Node[Hie_INS].FullName);
|
||||||
|
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -698,18 +701,18 @@ static void CtrCfg_Place (bool PutForm)
|
||||||
/***************** Show center WWW in center configuration *******************/
|
/***************** Show center WWW in center configuration *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtrCfg_WWW (bool PrintView,bool PutForm)
|
static void CtrCfg_WWW (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
HieCfg_WWW (PrintView,PutForm,ActChgCtrWWWCfg,Gbl.Hierarchy.Node[Hie_CTR].WWW);
|
HieCfg_WWW (ViewType,PutForm,ActChgCtrWWWCfg,Gbl.Hierarchy.Node[Hie_CTR].WWW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Show center shortcut in center configuration ****************/
|
/*************** Show center shortcut in center configuration ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtrCfg_Shortcut (bool PrintView)
|
static void CtrCfg_Shortcut (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
HieCfg_Shortcut (PrintView,ParCod_Ctr,Gbl.Hierarchy.Node[Hie_CTR].HieCod);
|
HieCfg_Shortcut (ViewType,ParCod_Ctr,Gbl.Hierarchy.Node[Hie_CTR].HieCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -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.40 (2023-10-28)"
|
#define Log_PLATFORM_VERSION "SWAD 23.41 (2023-10-29)"
|
||||||
#define CSS_FILE "swad23.35.1.css"
|
#define CSS_FILE "swad23.35.1.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.41: Oct 29, 2023 Code refactoring in view/edit/print. (335359 lines)
|
||||||
Version 23.40: Oct 28, 2023 Code refactoring in view/edit. (335273 lines)
|
Version 23.40: Oct 28, 2023 Code refactoring in view/edit. (335273 lines)
|
||||||
Version 23.39: Oct 27, 2023 Code refactoring in contracted/expanded and rubrics. (335209 lines)
|
Version 23.39: Oct 27, 2023 Code refactoring in contracted/expanded and rubrics. (335209 lines)
|
||||||
Version 23.38.3: Oct 27, 2023 When clicking on edition of a program item, expand it if contracted. (335155 lines)
|
Version 23.38.3: Oct 27, 2023 When clicking on edition of a program item, expand it if contracted. (335155 lines)
|
||||||
|
|
|
@ -58,14 +58,14 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtyCfg_Configuration (bool PrintView);
|
static void CtyCfg_Configuration (Vie_ViewType_t ViewType);
|
||||||
static void CtyCfg_PutIconToPrint (__attribute__((unused)) void *Args);
|
static void CtyCfg_PutIconToPrint (__attribute__((unused)) void *Args);
|
||||||
static void CtyCfg_Title (bool PutLink);
|
static void CtyCfg_Title (bool PutLink);
|
||||||
static void CtyCfg_Map (void);
|
static void CtyCfg_Map (void);
|
||||||
static void CtyCfg_MapImage (bool PrintView,bool PutLink);
|
static void CtyCfg_MapImage (Vie_ViewType_t ViewType,bool PutLink);
|
||||||
static void CtyCfg_Platform (bool PrintView);
|
static void CtyCfg_Platform (Vie_ViewType_t ViewType);
|
||||||
static void CtyCfg_Name (bool PutLink);
|
static void CtyCfg_Name (bool PutLink);
|
||||||
static void CtyCfg_Shortcut (bool PrintView);
|
static void CtyCfg_Shortcut (Vie_ViewType_t ViewType);
|
||||||
static void CtyCfg_QR (void);
|
static void CtyCfg_QR (void);
|
||||||
static void CtyCfg_NumUsrs (void);
|
static void CtyCfg_NumUsrs (void);
|
||||||
static void CtyCfg_NumInss (void);
|
static void CtyCfg_NumInss (void);
|
||||||
|
@ -81,7 +81,7 @@ static void CtyCfg_FreeMapAttr (char **MapAttribution);
|
||||||
|
|
||||||
void CtyCfg_ShowConfiguration (void)
|
void CtyCfg_ShowConfiguration (void)
|
||||||
{
|
{
|
||||||
CtyCfg_Configuration (false);
|
CtyCfg_Configuration (Vie_VIEW);
|
||||||
|
|
||||||
/***** Show help to enrol me *****/
|
/***** Show help to enrol me *****/
|
||||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||||
|
@ -93,14 +93,14 @@ void CtyCfg_ShowConfiguration (void)
|
||||||
|
|
||||||
void CtyCfg_PrintConfiguration (void)
|
void CtyCfg_PrintConfiguration (void)
|
||||||
{
|
{
|
||||||
CtyCfg_Configuration (true);
|
CtyCfg_Configuration (Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Information of the current country *********************/
|
/******************** Information of the current country *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtyCfg_Configuration (bool PrintView)
|
static void CtyCfg_Configuration (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_COUNTRY_Information;
|
extern const char *Hlp_COUNTRY_Information;
|
||||||
bool PutLink;
|
bool PutLink;
|
||||||
|
@ -113,92 +113,95 @@ static void CtyCfg_Configuration (bool PrintView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
PutLink = !PrintView && Gbl.Hierarchy.Node[Hie_CTY].WWW[0];
|
PutLink = ViewType == Vie_VIEW && Gbl.Hierarchy.Node[Hie_CTY].WWW[0];
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (PrintView)
|
Box_BoxBegin (NULL,NULL,
|
||||||
Box_BoxBegin (NULL,NULL,
|
ViewType == Vie_VIEW ? CtyCfg_PutIconToPrint :
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
ViewType == Vie_VIEW ? Hlp_COUNTRY_Information :
|
||||||
else
|
NULL,Box_NOT_CLOSABLE);
|
||||||
Box_BoxBegin (NULL,NULL,
|
|
||||||
CtyCfg_PutIconToPrint,NULL,
|
|
||||||
Hlp_COUNTRY_Information,Box_NOT_CLOSABLE);
|
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Title *****/
|
||||||
CtyCfg_Title (PutLink);
|
CtyCfg_Title (PutLink);
|
||||||
|
|
||||||
/**************************** Left part ***********************************/
|
/**************************** Left part ***********************************/
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
/* Begin table */
|
/* Begin table */
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
/* Platform */
|
/* Platform */
|
||||||
CtyCfg_Platform (PrintView);
|
CtyCfg_Platform (ViewType);
|
||||||
|
|
||||||
/* Country name (an link to WWW if exists) */
|
/* Country name (an link to WWW if exists) */
|
||||||
CtyCfg_Name (PutLink);
|
CtyCfg_Name (PutLink);
|
||||||
|
|
||||||
/* Shortcut to the country */
|
/* Shortcut to the country */
|
||||||
CtyCfg_Shortcut (PrintView);
|
CtyCfg_Shortcut (ViewType);
|
||||||
|
|
||||||
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInCty (Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInCty (Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
/* QR code with link to the country */
|
{
|
||||||
CtyCfg_QR ();
|
case Vie_VIEW:
|
||||||
else
|
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||||
{
|
Hie_CTY, // ...in country
|
||||||
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
||||||
Hie_CTY, // ...in country
|
|
||||||
Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
|
||||||
|
|
||||||
/* Number of users who claim to belong to this country,
|
/* Number of users who claim to belong to this country,
|
||||||
number of institutions,
|
number of institutions,
|
||||||
number of centers,
|
number of centers,
|
||||||
number of degrees,
|
number of degrees,
|
||||||
number of courses */
|
number of courses */
|
||||||
CtyCfg_NumUsrs ();
|
CtyCfg_NumUsrs ();
|
||||||
CtyCfg_NumInss ();
|
CtyCfg_NumInss ();
|
||||||
HieCfg_NumCtrs (NumCtrs,
|
HieCfg_NumCtrs (NumCtrs,
|
||||||
false); // Don't put form
|
false); // Don't put form
|
||||||
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
|
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
|
||||||
CtyCfg_NumDegs ();
|
CtyCfg_NumDegs ();
|
||||||
CtyCfg_NumCrss ();
|
CtyCfg_NumCrss ();
|
||||||
|
|
||||||
/* Number of users in courses of this country */
|
/* Number of users in courses of this country */
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_TCH);
|
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_TCH);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_NET);
|
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_NET);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_STD);
|
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_STD);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_UNK);
|
HieCfg_NumUsrsInCrss (Hie_CTY,Gbl.Hierarchy.Node[Hie_CTY].HieCod,Rol_UNK);
|
||||||
}
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/* QR code with link to the country */
|
||||||
|
CtyCfg_QR ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* End table */
|
/* End table */
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/* End of left part */
|
/* End of left part */
|
||||||
HTM_DIV_End ();
|
|
||||||
|
|
||||||
/**************************** Right part **********************************/
|
|
||||||
/* Check country map */
|
|
||||||
MapImageExists = Cty_CheckIfCountryPhotoExists (&Gbl.Hierarchy.Node[Hie_CTY]);
|
|
||||||
|
|
||||||
if (NumCtrsWithMap || MapImageExists)
|
|
||||||
{
|
|
||||||
/* Begin container */
|
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
|
||||||
|
|
||||||
/* Country map */
|
|
||||||
if (NumCtrsWithMap)
|
|
||||||
CtyCfg_Map ();
|
|
||||||
|
|
||||||
/* Country map image */
|
|
||||||
if (MapImageExists)
|
|
||||||
CtyCfg_MapImage (PrintView,PutLink);
|
|
||||||
|
|
||||||
/* End container */
|
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
|
||||||
|
/**************************** Right part **********************************/
|
||||||
|
/* Check country map */
|
||||||
|
MapImageExists = Cty_CheckIfCountryPhotoExists (&Gbl.Hierarchy.Node[Hie_CTY]);
|
||||||
|
|
||||||
|
if (NumCtrsWithMap || MapImageExists)
|
||||||
|
{
|
||||||
|
/* Begin container */
|
||||||
|
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
|
/* Country map */
|
||||||
|
if (NumCtrsWithMap)
|
||||||
|
CtyCfg_Map ();
|
||||||
|
|
||||||
|
/* Country map image */
|
||||||
|
if (MapImageExists)
|
||||||
|
CtyCfg_MapImage (ViewType,PutLink);
|
||||||
|
|
||||||
|
/* End container */
|
||||||
|
HTM_DIV_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
Box_BoxEnd ();
|
Box_BoxEnd ();
|
||||||
|
@ -319,7 +322,7 @@ static void CtyCfg_Map (void)
|
||||||
/************* Show country map image in country configuration ***************/
|
/************* Show country map image in country configuration ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtyCfg_MapImage (bool PrintView,bool PutLink)
|
static void CtyCfg_MapImage (Vie_ViewType_t ViewType,bool PutLink)
|
||||||
{
|
{
|
||||||
char *MapAttribution = NULL;
|
char *MapAttribution = NULL;
|
||||||
|
|
||||||
|
@ -332,18 +335,19 @@ static void CtyCfg_MapImage (bool PrintView,bool PutLink)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",
|
||||||
Gbl.Hierarchy.Node[Hie_CTY].WWW);
|
Gbl.Hierarchy.Node[Hie_CTY].WWW);
|
||||||
Cty_DrawCountryMap (&Gbl.Hierarchy.Node[Hie_CTY],
|
Cty_DrawCountryMap (&Gbl.Hierarchy.Node[Hie_CTY],
|
||||||
PrintView ? "COUNTRY_MAP_PRINT" :
|
ViewType == Vie_VIEW ? "COUNTRY_MAP_SHOW" :
|
||||||
"COUNTRY_MAP_SHOW");
|
"COUNTRY_MAP_PRINT");
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Map attribution *****/
|
/***** Map attribution *****/
|
||||||
if (!PrintView && Cty_CheckIfICanEditCountries ())
|
if (ViewType == Vie_VIEW && Cty_CheckIfICanEditCountries ())
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
Frm_BeginForm (ActChgCtyMapAtt);
|
Frm_BeginForm (ActChgCtyMapAtt);
|
||||||
HTM_TEXTAREA_Begin ("id=\"AttributionArea\" name=\"Attribution\" rows=\"3\""
|
HTM_TEXTAREA_Begin ("id=\"AttributionArea\" name=\"Attribution\""
|
||||||
|
" rows=\"3\""
|
||||||
" onchange=\"this.form.submit();return false;\"");
|
" onchange=\"this.form.submit();return false;\"");
|
||||||
if (MapAttribution)
|
if (MapAttribution)
|
||||||
HTM_Txt (MapAttribution);
|
HTM_Txt (MapAttribution);
|
||||||
|
@ -366,7 +370,7 @@ static void CtyCfg_MapImage (bool PrintView,bool PutLink)
|
||||||
/****************** Show platform in country configuration *******************/
|
/****************** Show platform in country configuration *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtyCfg_Platform (bool PrintView)
|
static void CtyCfg_Platform (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Txt_System;
|
extern const char *Txt_System;
|
||||||
|
|
||||||
|
@ -378,7 +382,7 @@ static void CtyCfg_Platform (bool PrintView)
|
||||||
|
|
||||||
/* Data */
|
/* Data */
|
||||||
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LT DAT_%s\"",The_GetSuffix ());
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
Frm_BeginFormGoTo (ActSeeSysInf);
|
Frm_BeginFormGoTo (ActSeeSysInf);
|
||||||
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Cfg_PLATFORM_SHORT_NAME),
|
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Cfg_PLATFORM_SHORT_NAME),
|
||||||
|
@ -388,7 +392,7 @@ static void CtyCfg_Platform (bool PrintView)
|
||||||
Ico_PutIcon ("swad64x64.png",Ico_UNCHANGED,Cfg_PLATFORM_FULL_NAME,"ICO20x20");
|
Ico_PutIcon ("swad64x64.png",Ico_UNCHANGED,Cfg_PLATFORM_FULL_NAME,"ICO20x20");
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
HTM_Txt (Cfg_PLATFORM_SHORT_NAME);
|
HTM_Txt (Cfg_PLATFORM_SHORT_NAME);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -430,9 +434,9 @@ static void CtyCfg_Name (bool PutLink)
|
||||||
/************** Show country shortcut in country configuration ***************/
|
/************** Show country shortcut in country configuration ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CtyCfg_Shortcut (bool PrintView)
|
static void CtyCfg_Shortcut (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
HieCfg_Shortcut (PrintView,ParCod_Cty,Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
HieCfg_Shortcut (ViewType,ParCod_Cty,Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -132,7 +132,7 @@ void Crs_ShowIntroduction (void)
|
||||||
{
|
{
|
||||||
/***** Course configuration *****/
|
/***** Course configuration *****/
|
||||||
HTM_DIV_Begin ("class=\"CM\"");
|
HTM_DIV_Begin ("class=\"CM\"");
|
||||||
CrsCfg_Configuration (false);
|
CrsCfg_Configuration (Vie_VIEW);
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** Course introduction *****/
|
/***** Course introduction *****/
|
||||||
|
|
|
@ -60,13 +60,13 @@ extern struct Globals Gbl;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CrsCfg_PutIconToPrint (__attribute__((unused)) void *Args);
|
static void CrsCfg_PutIconToPrint (__attribute__((unused)) void *Args);
|
||||||
static void CrsCfg_Degree (bool PrintView,bool PutForm);
|
static void CrsCfg_Degree (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void CrsCfg_FullName (bool PutForm);
|
static void CrsCfg_FullName (bool PutForm);
|
||||||
static void CrsCfg_ShrtName (bool PutForm);
|
static void CrsCfg_ShrtName (bool PutForm);
|
||||||
static void CrsCfg_Year (bool PutForm);
|
static void CrsCfg_Year (bool PutForm);
|
||||||
static void CrsCfg_InstitutionalCode (bool PutForm);
|
static void CrsCfg_InstitutionalCode (bool PutForm);
|
||||||
static void CrsCfg_InternalCode (void);
|
static void CrsCfg_InternalCode (void);
|
||||||
static void CrsCfg_Shortcut (bool PrintView);
|
static void CrsCfg_Shortcut (Vie_ViewType_t ViewType);
|
||||||
static void CrsCfg_QR (void);
|
static void CrsCfg_QR (void);
|
||||||
static void CrsCfg_Indicators (void);
|
static void CrsCfg_Indicators (void);
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ static void CrsCfg_Indicators (void);
|
||||||
/***************** Configuration of the current course ***********************/
|
/***************** Configuration of the current course ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void CrsCfg_Configuration (bool PrintView)
|
void CrsCfg_Configuration (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_COURSE_Information;
|
extern const char *Hlp_COURSE_Information;
|
||||||
bool PutLink;
|
bool PutLink;
|
||||||
|
@ -88,83 +88,86 @@ void CrsCfg_Configuration (bool PrintView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
PutLink = !PrintView && Gbl.Hierarchy.Node[Hie_DEG].WWW[0];
|
PutLink = ViewType == Vie_VIEW && Gbl.Hierarchy.Node[Hie_DEG].WWW[0];
|
||||||
PutFormDeg = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM;
|
PutFormDeg = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM;
|
||||||
PutFormName = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM;
|
PutFormName = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM;
|
||||||
PutFormYear =
|
PutFormYear =
|
||||||
PutFormInsCod = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_TCH;
|
PutFormInsCod = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_TCH;
|
||||||
|
|
||||||
/***** Contextual menu *****/
|
/***** Contextual menu *****/
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW &&
|
||||||
if (Gbl.Usrs.Me.Role.Logged == Rol_GST ||
|
(Gbl.Usrs.Me.Role.Logged == Rol_GST ||
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_USR)
|
Gbl.Usrs.Me.Role.Logged == Rol_USR))
|
||||||
{
|
{
|
||||||
Mnu_ContextMenuBegin ();
|
Mnu_ContextMenuBegin ();
|
||||||
Enr_PutLinkToRequestSignUp (); // Request enrolment in the current course
|
Enr_PutLinkToRequestSignUp (); // Request enrolment in the current course
|
||||||
Mnu_ContextMenuEnd ();
|
Mnu_ContextMenuEnd ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (PrintView)
|
Box_BoxBegin (NULL,NULL,
|
||||||
Box_BoxBegin (NULL,NULL,
|
ViewType == Vie_VIEW ? CrsCfg_PutIconToPrint :
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
ViewType == Vie_VIEW ? Hlp_COURSE_Information :
|
||||||
else
|
NULL,Box_NOT_CLOSABLE);
|
||||||
Box_BoxBegin (NULL,NULL,
|
|
||||||
CrsCfg_PutIconToPrint,NULL,
|
|
||||||
Hlp_COURSE_Information,Box_NOT_CLOSABLE);
|
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Title *****/
|
||||||
HieCfg_Title (PutLink,Hie_CRS);
|
HieCfg_Title (PutLink,Hie_CRS);
|
||||||
|
|
||||||
/**************************** Left part ***********************************/
|
/**************************** Left part ***********************************/
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
/***** Degree *****/
|
/***** Degree *****/
|
||||||
CrsCfg_Degree (PrintView,PutFormDeg);
|
CrsCfg_Degree (ViewType,PutFormDeg);
|
||||||
|
|
||||||
/***** Course name *****/
|
/***** Course name *****/
|
||||||
CrsCfg_FullName (PutFormName);
|
CrsCfg_FullName (PutFormName);
|
||||||
CrsCfg_ShrtName (PutFormName);
|
CrsCfg_ShrtName (PutFormName);
|
||||||
|
|
||||||
/***** Course year *****/
|
/***** Course year *****/
|
||||||
CrsCfg_Year (PutFormYear);
|
CrsCfg_Year (PutFormYear);
|
||||||
|
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
/***** Institutional code of the course *****/
|
/***** Institutional code of the course *****/
|
||||||
CrsCfg_InstitutionalCode (PutFormInsCod);
|
CrsCfg_InstitutionalCode (PutFormInsCod);
|
||||||
|
|
||||||
/***** Internal code of the course *****/
|
/***** Internal code of the course *****/
|
||||||
CrsCfg_InternalCode ();
|
CrsCfg_InternalCode ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Shortcut to the couse *****/
|
/***** Shortcut to the couse *****/
|
||||||
CrsCfg_Shortcut (PrintView);
|
CrsCfg_Shortcut (ViewType);
|
||||||
|
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
/***** QR code with link to the course *****/
|
{
|
||||||
CrsCfg_QR ();
|
case Vie_VIEW:
|
||||||
else
|
/***** Number of users *****/
|
||||||
{
|
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_TCH);
|
||||||
/***** Number of users *****/
|
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_NET);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_TCH);
|
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_STD);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_NET);
|
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_UNK);
|
||||||
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_STD);
|
|
||||||
HieCfg_NumUsrsInCrss (Hie_CRS,Gbl.Hierarchy.Node[Hie_CRS].HieCod,Rol_UNK);
|
|
||||||
|
|
||||||
/***** Indicators *****/
|
/***** Indicators *****/
|
||||||
CrsCfg_Indicators ();
|
CrsCfg_Indicators ();
|
||||||
}
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/***** QR code with link to the course *****/
|
||||||
|
CrsCfg_QR ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** End of left part *****/
|
/***** End of left part *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
Box_BoxEnd ();
|
Box_BoxEnd ();
|
||||||
|
@ -186,14 +189,14 @@ static void CrsCfg_PutIconToPrint (__attribute__((unused)) void *Args)
|
||||||
|
|
||||||
void CrsCfg_PrintConfiguration (void)
|
void CrsCfg_PrintConfiguration (void)
|
||||||
{
|
{
|
||||||
CrsCfg_Configuration (true);
|
CrsCfg_Configuration (Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Show degree in course configuration ********************/
|
/******************** Show degree in course configuration ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
static void CrsCfg_Degree (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Degree;
|
extern const char *Txt_Degree;
|
||||||
|
@ -240,7 +243,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
||||||
}
|
}
|
||||||
else // I can not move course to another degree
|
else // I can not move course to another degree
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
Frm_BeginFormGoTo (ActSeeDegInf);
|
Frm_BeginFormGoTo (ActSeeDegInf);
|
||||||
ParCod_PutPar (ParCod_Deg,Gbl.Hierarchy.Node[Hie_DEG].HieCod);
|
ParCod_PutPar (ParCod_Deg,Gbl.Hierarchy.Node[Hie_DEG].HieCod);
|
||||||
|
@ -254,7 +257,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
|
||||||
20,"LM");
|
20,"LM");
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
HTM_Txt (Gbl.Hierarchy.Node[Hie_DEG].FullName);
|
HTM_Txt (Gbl.Hierarchy.Node[Hie_DEG].FullName);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -393,9 +396,9 @@ static void CrsCfg_InternalCode (void)
|
||||||
/*************** Show course shortcut in course configuration ****************/
|
/*************** Show course shortcut in course configuration ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void CrsCfg_Shortcut (bool PrintView)
|
static void CrsCfg_Shortcut (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
HieCfg_Shortcut (PrintView,ParCod_Crs,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
HieCfg_Shortcut (ViewType,ParCod_Crs,Gbl.Hierarchy.Node[Hie_CRS].HieCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void CrsCfg_Configuration (bool PrintView);
|
void CrsCfg_Configuration (Vie_ViewType_t ViewType);
|
||||||
void CrsCfg_PrintConfiguration (void);
|
void CrsCfg_PrintConfiguration (void);
|
||||||
|
|
||||||
void CrsCfg_ChangeCrsDeg (void);
|
void CrsCfg_ChangeCrsDeg (void);
|
||||||
|
|
|
@ -57,13 +57,13 @@ extern struct Globals Gbl;
|
||||||
/**************************** Private prototypes *****************************/
|
/**************************** Private prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void DegCfg_Configuration (bool PrintView);
|
static void DegCfg_Configuration (Vie_ViewType_t ViewType);
|
||||||
static void DegCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args);
|
static void DegCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args);
|
||||||
static void DegCfg_Center (bool PrintView,bool PutForm);
|
static void DegCfg_Center (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void DegCfg_FullName (bool PutForm);
|
static void DegCfg_FullName (bool PutForm);
|
||||||
static void DegCfg_ShrtName (bool PutForm);
|
static void DegCfg_ShrtName (bool PutForm);
|
||||||
static void DegCfg_WWW (bool PrintView,bool PutForm);
|
static void DegCfg_WWW (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void DegCfg_Shortcut (bool PrintView);
|
static void DegCfg_Shortcut (Vie_ViewType_t ViewType);
|
||||||
static void DegCfg_QR (void);
|
static void DegCfg_QR (void);
|
||||||
static void DegCfg_NumCrss (void);
|
static void DegCfg_NumCrss (void);
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ static void DegCfg_NumCrss (void);
|
||||||
|
|
||||||
void DegCfg_ShowConfiguration (void)
|
void DegCfg_ShowConfiguration (void)
|
||||||
{
|
{
|
||||||
DegCfg_Configuration (false);
|
DegCfg_Configuration (Vie_VIEW);
|
||||||
|
|
||||||
/***** Show help to enrol me *****/
|
/***** Show help to enrol me *****/
|
||||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||||
|
@ -85,14 +85,14 @@ void DegCfg_ShowConfiguration (void)
|
||||||
|
|
||||||
void DegCfg_PrintConfiguration (void)
|
void DegCfg_PrintConfiguration (void)
|
||||||
{
|
{
|
||||||
DegCfg_Configuration (true);
|
DegCfg_Configuration (Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************* Information of the current degree ***********************/
|
/******************* Information of the current degree ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void DegCfg_Configuration (bool PrintView)
|
static void DegCfg_Configuration (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_DEGREE_Information;
|
extern const char *Hlp_DEGREE_Information;
|
||||||
bool PutLink;
|
bool PutLink;
|
||||||
|
@ -105,23 +105,20 @@ static void DegCfg_Configuration (bool PrintView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
PutLink = !PrintView && Gbl.Hierarchy.Node[Hie_DEG].WWW[0];
|
PutLink = ViewType == Vie_VIEW && Gbl.Hierarchy.Node[Hie_DEG].WWW[0];
|
||||||
PutFormCtr = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
PutFormCtr = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
||||||
PutFormName = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM;
|
PutFormName = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_CTR_ADM;
|
||||||
PutFormWWW = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM;
|
PutFormWWW = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_DEG_ADM;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (PrintView)
|
Box_BoxBegin (NULL,NULL,
|
||||||
Box_BoxBegin (NULL,NULL,
|
ViewType == Vie_VIEW ? DegCfg_PutIconsToPrintAndUpload :
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
ViewType == Vie_VIEW ? Hlp_DEGREE_Information :
|
||||||
else
|
NULL,Box_NOT_CLOSABLE);
|
||||||
Box_BoxBegin (NULL,NULL,
|
|
||||||
DegCfg_PutIconsToPrintAndUpload,NULL,
|
|
||||||
Hlp_DEGREE_Information,Box_NOT_CLOSABLE);
|
|
||||||
|
|
||||||
/***** Title *****/
|
/***** Title *****/
|
||||||
HieCfg_Title (PutLink,Hie_DEG);
|
HieCfg_Title (PutLink,Hie_DEG);
|
||||||
|
|
||||||
/**************************** Left part ***********************************/
|
/**************************** Left part ***********************************/
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
||||||
|
@ -130,31 +127,36 @@ static void DegCfg_Configuration (bool PrintView)
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
/***** Center *****/
|
/***** Center *****/
|
||||||
DegCfg_Center (PrintView,PutFormCtr);
|
DegCfg_Center (ViewType,PutFormCtr);
|
||||||
|
|
||||||
/***** Degree name *****/
|
/***** Degree name *****/
|
||||||
DegCfg_FullName (PutFormName);
|
DegCfg_FullName (PutFormName);
|
||||||
DegCfg_ShrtName (PutFormName);
|
DegCfg_ShrtName (PutFormName);
|
||||||
|
|
||||||
/***** Degree WWW *****/
|
/***** Degree WWW *****/
|
||||||
DegCfg_WWW (PrintView,PutFormWWW);
|
DegCfg_WWW (ViewType,PutFormWWW);
|
||||||
|
|
||||||
/***** Shortcut to the degree *****/
|
/***** Shortcut to the degree *****/
|
||||||
DegCfg_Shortcut (PrintView);
|
DegCfg_Shortcut (ViewType);
|
||||||
|
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
/***** QR code with link to the degree *****/
|
|
||||||
DegCfg_QR ();
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/***** Number of courses *****/
|
case Vie_VIEW:
|
||||||
DegCfg_NumCrss ();
|
/***** Number of courses *****/
|
||||||
|
DegCfg_NumCrss ();
|
||||||
|
|
||||||
/***** Number of users *****/
|
/***** Number of users *****/
|
||||||
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_TCH);
|
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_TCH);
|
||||||
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_NET);
|
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_NET);
|
||||||
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_STD);
|
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_STD);
|
||||||
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_UNK);
|
HieCfg_NumUsrsInCrss (Hie_DEG,Gbl.Hierarchy.Node[Hie_DEG].HieCod,Rol_UNK);
|
||||||
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/***** QR code with link to the degree *****/
|
||||||
|
DegCfg_QR ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -188,7 +190,7 @@ static void DegCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args)
|
||||||
/******************** Show center in degree configuration ********************/
|
/******************** Show center in degree configuration ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void DegCfg_Center (bool PrintView,bool PutForm)
|
static void DegCfg_Center (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Center;
|
extern const char *Txt_Center;
|
||||||
|
@ -235,7 +237,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
|
||||||
}
|
}
|
||||||
else // I can not move degree to another center
|
else // I can not move degree to another center
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
Frm_BeginFormGoTo (ActSeeCtrInf);
|
Frm_BeginFormGoTo (ActSeeCtrInf);
|
||||||
ParCod_PutPar (ParCod_Ctr,Gbl.Hierarchy.Node[Hie_CTR].HieCod);
|
ParCod_PutPar (ParCod_Ctr,Gbl.Hierarchy.Node[Hie_CTR].HieCod);
|
||||||
|
@ -249,7 +251,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
|
||||||
20,"LM");
|
20,"LM");
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTR].FullName);
|
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTR].FullName);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -282,18 +284,18 @@ static void DegCfg_ShrtName (bool PutForm)
|
||||||
/***************** Show degree WWW in degree configuration *******************/
|
/***************** Show degree WWW in degree configuration *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void DegCfg_WWW (bool PrintView,bool PutForm)
|
static void DegCfg_WWW (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
HieCfg_WWW (PrintView,PutForm,ActChgDegWWWCfg,Gbl.Hierarchy.Node[Hie_DEG].WWW);
|
HieCfg_WWW (ViewType,PutForm,ActChgDegWWWCfg,Gbl.Hierarchy.Node[Hie_DEG].WWW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*************** Show degree shortcut in degree configuration ****************/
|
/*************** Show degree shortcut in degree configuration ****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void DegCfg_Shortcut (bool PrintView)
|
static void DegCfg_Shortcut (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
HieCfg_Shortcut (PrintView,ParCod_Deg,Gbl.Hierarchy.Node[Hie_DEG].HieCod);
|
HieCfg_Shortcut (ViewType,ParCod_Deg,Gbl.Hierarchy.Node[Hie_DEG].HieCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -581,7 +581,7 @@ static void ExaPrn_ShowExamPrintToFillIt (struct Exa_Exams *Exams,
|
||||||
|
|
||||||
/***** Heading *****/
|
/***** Heading *****/
|
||||||
/* Institution, degree and course */
|
/* Institution, degree and course */
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Show user and time *****/
|
/***** Show user and time *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -1348,7 +1348,7 @@ static void ExaRes_ShowExamResult (const struct Exa_Exam *Exam,
|
||||||
Hlp_ASSESSMENT_Exams_results,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Exams_results,Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/***** Header *****/
|
/***** Header *****/
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Check user data *****/
|
/***** Check user data *****/
|
||||||
/* Get data of the user who answered the exam print */
|
/* Get data of the user who answered the exam print */
|
||||||
|
|
|
@ -147,7 +147,7 @@ void HieCfg_Name (bool PutForm,Hie_Level_t Level,Nam_ShrtOrFullName_t ShrtOrFull
|
||||||
/************************* Show web in configuration *************************/
|
/************************* Show web in configuration *************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
|
void HieCfg_WWW (Vie_ViewType_t ViewType,bool PutForm,Act_Action_t NextAction,
|
||||||
const char WWW[Cns_MAX_BYTES_WWW + 1])
|
const char WWW[Cns_MAX_BYTES_WWW + 1])
|
||||||
{
|
{
|
||||||
extern const char *Txt_Web;
|
extern const char *Txt_Web;
|
||||||
|
@ -175,12 +175,12 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
|
||||||
else // I can not change web
|
else // I can not change web
|
||||||
{
|
{
|
||||||
HTM_DIV_Begin ("class=\"EXTERNAL_WWW_FULL\"");
|
HTM_DIV_Begin ("class=\"EXTERNAL_WWW_FULL\"");
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||||
" class=\"DAT_%s\"",
|
" class=\"DAT_%s\"",
|
||||||
WWW,The_GetSuffix ());
|
WWW,The_GetSuffix ());
|
||||||
HTM_Txt (WWW);
|
HTM_Txt (WWW);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
}
|
||||||
|
@ -193,7 +193,7 @@ void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
|
||||||
/********************** Show shortcut in configuration ***********************/
|
/********************** Show shortcut in configuration ***********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void HieCfg_Shortcut (bool PrintView,ParCod_Param_t ParCode,long HieCod)
|
void HieCfg_Shortcut (Vie_ViewType_t ViewType,ParCod_Param_t ParCode,long HieCod)
|
||||||
{
|
{
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Shortcut;
|
extern const char *Txt_Shortcut;
|
||||||
|
@ -206,7 +206,7 @@ void HieCfg_Shortcut (bool PrintView,ParCod_Param_t ParCode,long HieCod)
|
||||||
|
|
||||||
/* Data */
|
/* Data */
|
||||||
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
if (ParCode == ParCod_None)
|
if (ParCode == ParCod_None)
|
||||||
HTM_A_Begin ("href=\"%s/\" target=\"_blank\" class=\"DAT_%s\"",
|
HTM_A_Begin ("href=\"%s/\" target=\"_blank\" class=\"DAT_%s\"",
|
||||||
|
@ -226,7 +226,7 @@ void HieCfg_Shortcut (bool PrintView,ParCod_Param_t ParCode,long HieCod)
|
||||||
HTM_TxtF ("%s/?%s=%ld",
|
HTM_TxtF ("%s/?%s=%ld",
|
||||||
Cfg_URL_SWAD_CGI,
|
Cfg_URL_SWAD_CGI,
|
||||||
Par_CodeStr[ParCode],HieCod);
|
Par_CodeStr[ParCode],HieCod);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
|
|
||||||
void HieCfg_Title (bool PutLink,Hie_Level_t LogoScope);
|
void HieCfg_Title (bool PutLink,Hie_Level_t LogoScope);
|
||||||
void HieCfg_Name (bool PutForm,Hie_Level_t Level,Nam_ShrtOrFullName_t ShrtOrFull);
|
void HieCfg_Name (bool PutForm,Hie_Level_t Level,Nam_ShrtOrFullName_t ShrtOrFull);
|
||||||
void HieCfg_WWW (bool PrintView,bool PutForm,Act_Action_t NextAction,
|
void HieCfg_WWW (Vie_ViewType_t ViewType,bool PutForm,Act_Action_t NextAction,
|
||||||
const char WWW[Cns_MAX_BYTES_WWW + 1]);
|
const char WWW[Cns_MAX_BYTES_WWW + 1]);
|
||||||
void HieCfg_Shortcut (bool PrintView,ParCod_Param_t ParCode,long HieCod);
|
void HieCfg_Shortcut (Vie_ViewType_t ViewType,ParCod_Param_t ParCode,long HieCod);
|
||||||
void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm);
|
void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm);
|
||||||
void HieCfg_NumCtrsWithMap (unsigned NumCtrs,unsigned NumCtrsWithMap);
|
void HieCfg_NumCtrsWithMap (unsigned NumCtrs,unsigned NumCtrsWithMap);
|
||||||
void HieCfg_QR (ParCod_Param_t ParCode,long HieCod);
|
void HieCfg_QR (ParCod_Param_t ParCode,long HieCod);
|
||||||
|
|
|
@ -1441,7 +1441,7 @@ static bool Inf_CheckAndShowPlainTxt (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
HTM_DIV_Begin ("class=\"LM DAT_%s\"",The_GetSuffix ());
|
||||||
|
|
||||||
|
@ -1531,7 +1531,7 @@ static bool Inf_CheckAndShowRichTxt (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
HTM_DIV_Begin ("id=\"crs_info\" class=\"LM CRS_INFO_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
|
@ -1664,7 +1664,7 @@ void Inf_EditPlainTxtInfo (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Get info text from database *****/
|
/***** Get info text from database *****/
|
||||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||||
|
@ -1732,7 +1732,7 @@ void Inf_EditRichTxtInfo (void)
|
||||||
|
|
||||||
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
if (Gbl.Crs.Info.Type == Inf_INTRODUCTION ||
|
||||||
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
Gbl.Crs.Info.Type == Inf_TEACHING_GUIDE)
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Get info text from database *****/
|
/***** Get info text from database *****/
|
||||||
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
Inf_GetInfoTxtFromDB (Gbl.Hierarchy.Node[Hie_CRS].HieCod,Gbl.Crs.Info.Type,
|
||||||
|
|
|
@ -62,14 +62,14 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void InsCfg_Configuration (bool PrintView);
|
static void InsCfg_Configuration (Vie_ViewType_t ViewType);
|
||||||
static void InsCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args);
|
static void InsCfg_PutIconsToPrintAndUpload (__attribute__((unused)) void *Args);
|
||||||
static void InsCfg_Map (void);
|
static void InsCfg_Map (void);
|
||||||
static void InsCfg_Country (bool PrintView,bool PutForm);
|
static void InsCfg_Country (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void InsCfg_FullName (bool PutForm);
|
static void InsCfg_FullName (bool PutForm);
|
||||||
static void InsCfg_ShrtName (bool PutForm);
|
static void InsCfg_ShrtName (bool PutForm);
|
||||||
static void InsCfg_WWW (bool PrintView,bool PutForm);
|
static void InsCfg_WWW (Vie_ViewType_t ViewType,bool PutForm);
|
||||||
static void InsCfg_Shortcut (bool PrintView);
|
static void InsCfg_Shortcut (Vie_ViewType_t ViewType);
|
||||||
static void InsCfg_QR (void);
|
static void InsCfg_QR (void);
|
||||||
static void InsCfg_NumUsrs (void);
|
static void InsCfg_NumUsrs (void);
|
||||||
static void InsCfg_NumDegs (void);
|
static void InsCfg_NumDegs (void);
|
||||||
|
@ -82,7 +82,7 @@ static void InsCfg_NumDpts (void);
|
||||||
|
|
||||||
void InsCfg_ShowConfiguration (void)
|
void InsCfg_ShowConfiguration (void)
|
||||||
{
|
{
|
||||||
InsCfg_Configuration (false);
|
InsCfg_Configuration (Vie_VIEW);
|
||||||
|
|
||||||
/***** Show help to enrol me *****/
|
/***** Show help to enrol me *****/
|
||||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||||
|
@ -94,14 +94,14 @@ void InsCfg_ShowConfiguration (void)
|
||||||
|
|
||||||
void InsCfg_PrintConfiguration (void)
|
void InsCfg_PrintConfiguration (void)
|
||||||
{
|
{
|
||||||
InsCfg_Configuration (true);
|
InsCfg_Configuration (Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************** Information of the current institution ********************/
|
/***************** Information of the current institution ********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void InsCfg_Configuration (bool PrintView)
|
static void InsCfg_Configuration (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_INSTITUTION_Information;
|
extern const char *Hlp_INSTITUTION_Information;
|
||||||
bool PutLink;
|
bool PutLink;
|
||||||
|
@ -116,90 +116,93 @@ static void InsCfg_Configuration (bool PrintView)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
PutLink = !PrintView && Gbl.Hierarchy.Node[Hie_INS].WWW[0];
|
PutLink = ViewType == Vie_VIEW && Gbl.Hierarchy.Node[Hie_INS].WWW[0];
|
||||||
PutFormCty =
|
PutFormCty =
|
||||||
PutFormName = !PrintView && Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
PutFormName = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
||||||
PutFormWWW = !PrintView && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
PutFormWWW = ViewType == Vie_VIEW && Gbl.Usrs.Me.Role.Logged >= Rol_INS_ADM;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (PrintView)
|
Box_BoxBegin (NULL,NULL,
|
||||||
Box_BoxBegin (NULL,NULL,
|
ViewType == Vie_VIEW ? InsCfg_PutIconsToPrintAndUpload :
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
ViewType == Vie_VIEW ? Hlp_INSTITUTION_Information :
|
||||||
else
|
NULL,Box_NOT_CLOSABLE);
|
||||||
Box_BoxBegin (NULL,NULL,
|
|
||||||
InsCfg_PutIconsToPrintAndUpload,NULL,
|
|
||||||
Hlp_INSTITUTION_Information,Box_NOT_CLOSABLE);
|
|
||||||
|
|
||||||
|
/***** Title *****/
|
||||||
|
HieCfg_Title (PutLink,Hie_INS);
|
||||||
|
|
||||||
/***** Title *****/
|
/**************************** Left part ***********************************/
|
||||||
HieCfg_Title (PutLink,Hie_INS);
|
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
/**************************** Left part ***********************************/
|
/***** Begin table *****/
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Country *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
InsCfg_Country (ViewType,PutFormCty);
|
||||||
|
|
||||||
/***** Country *****/
|
/***** Institution name *****/
|
||||||
InsCfg_Country (PrintView,PutFormCty);
|
InsCfg_FullName (PutFormName);
|
||||||
|
InsCfg_ShrtName (PutFormName);
|
||||||
|
|
||||||
/***** Institution name *****/
|
/***** Institution WWW *****/
|
||||||
InsCfg_FullName (PutFormName);
|
InsCfg_WWW (ViewType,PutFormWWW);
|
||||||
InsCfg_ShrtName (PutFormName);
|
|
||||||
|
|
||||||
/***** Institution WWW *****/
|
/***** Shortcut to the institution *****/
|
||||||
InsCfg_WWW (PrintView,PutFormWWW);
|
InsCfg_Shortcut (ViewType);
|
||||||
|
|
||||||
/***** Shortcut to the institution *****/
|
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInIns (Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
||||||
InsCfg_Shortcut (PrintView);
|
|
||||||
|
|
||||||
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInIns (Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
switch (ViewType)
|
||||||
if (PrintView)
|
{
|
||||||
/***** QR code with link to the institution *****/
|
case Vie_VIEW:
|
||||||
InsCfg_QR ();
|
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||||
else
|
Hie_INS, // ...in institution
|
||||||
{
|
Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
||||||
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
|
||||||
Hie_INS, // ...in institution
|
|
||||||
Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
|
||||||
|
|
||||||
/***** Number of users who claim to belong to this institution,
|
/***** Number of users who claim to belong to this institution,
|
||||||
number of centers,
|
number of centers,
|
||||||
number of degrees,
|
number of degrees,
|
||||||
number of courses,
|
number of courses,
|
||||||
number of departments *****/
|
number of departments *****/
|
||||||
InsCfg_NumUsrs ();
|
InsCfg_NumUsrs ();
|
||||||
HieCfg_NumCtrs (NumCtrs,
|
HieCfg_NumCtrs (NumCtrs,
|
||||||
true); // Put form
|
true); // Put form
|
||||||
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
|
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
|
||||||
InsCfg_NumDegs ();
|
InsCfg_NumDegs ();
|
||||||
InsCfg_NumCrss ();
|
InsCfg_NumCrss ();
|
||||||
InsCfg_NumDpts ();
|
InsCfg_NumDpts ();
|
||||||
|
|
||||||
/***** Number of users in courses of this institution *****/
|
/***** Number of users in courses of this institution *****/
|
||||||
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_TCH);
|
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_TCH);
|
||||||
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_NET);
|
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_NET);
|
||||||
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_STD);
|
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_STD);
|
||||||
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_UNK);
|
HieCfg_NumUsrsInCrss (Hie_INS,Gbl.Hierarchy.Node[Hie_INS].HieCod,Rol_UNK);
|
||||||
}
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/***** QR code with link to the institution *****/
|
||||||
|
InsCfg_QR ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** End of left part *****/
|
|
||||||
HTM_DIV_End ();
|
|
||||||
|
|
||||||
/**************************** Right part **********************************/
|
|
||||||
if (NumCtrsWithMap)
|
|
||||||
{
|
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
|
||||||
|
|
||||||
/***** Institution map *****/
|
|
||||||
InsCfg_Map ();
|
|
||||||
|
|
||||||
|
/***** End of left part *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
|
||||||
|
/**************************** Right part **********************************/
|
||||||
|
if (NumCtrsWithMap)
|
||||||
|
{
|
||||||
|
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
|
/***** Institution map *****/
|
||||||
|
InsCfg_Map ();
|
||||||
|
|
||||||
|
HTM_DIV_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
Box_BoxEnd ();
|
Box_BoxEnd ();
|
||||||
|
@ -294,7 +297,7 @@ static void InsCfg_Map (void)
|
||||||
/***************** Show country in institution configuration *****************/
|
/***************** Show country in institution configuration *****************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void InsCfg_Country (bool PrintView,bool PutForm)
|
static void InsCfg_Country (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
extern const char *Par_CodeStr[];
|
extern const char *Par_CodeStr[];
|
||||||
extern const char *Txt_Country;
|
extern const char *Txt_Country;
|
||||||
|
@ -338,7 +341,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
|
||||||
}
|
}
|
||||||
else // I can not move institution to another country
|
else // I can not move institution to another country
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
Frm_BeginFormGoTo (ActSeeCtyInf);
|
Frm_BeginFormGoTo (ActSeeCtyInf);
|
||||||
ParCod_PutPar (ParCod_Cty,Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
ParCod_PutPar (ParCod_Cty,Gbl.Hierarchy.Node[Hie_CTY].HieCod);
|
||||||
|
@ -349,7 +352,7 @@ static void InsCfg_Country (bool PrintView,bool PutForm)
|
||||||
Cty_DrawCountryMap (&Gbl.Hierarchy.Node[Hie_CTY],"COUNTRY_MAP_TINY");
|
Cty_DrawCountryMap (&Gbl.Hierarchy.Node[Hie_CTY],"COUNTRY_MAP_TINY");
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTY].FullName);
|
HTM_Txt (Gbl.Hierarchy.Node[Hie_CTY].FullName);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
{
|
{
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -384,18 +387,18 @@ static void InsCfg_ShrtName (bool PutForm)
|
||||||
/************ Show institution WWW in institution configuration **************/
|
/************ Show institution WWW in institution configuration **************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void InsCfg_WWW (bool PrintView,bool PutForm)
|
static void InsCfg_WWW (Vie_ViewType_t ViewType,bool PutForm)
|
||||||
{
|
{
|
||||||
HieCfg_WWW (PrintView,PutForm,ActChgInsWWWCfg,Gbl.Hierarchy.Node[Hie_INS].WWW);
|
HieCfg_WWW (ViewType,PutForm,ActChgInsWWWCfg,Gbl.Hierarchy.Node[Hie_INS].WWW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/********** Show institution shortcut in institution configuration ***********/
|
/********** Show institution shortcut in institution configuration ***********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void InsCfg_Shortcut (bool PrintView)
|
static void InsCfg_Shortcut (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
HieCfg_Shortcut (PrintView,ParCod_Ins,Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
HieCfg_Shortcut (ViewType,ParCod_Ins,Gbl.Hierarchy.Node[Hie_INS].HieCod);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -1462,7 +1462,7 @@ static void Lay_WriteFootFromHTMLFile (void)
|
||||||
/****** Write header and footer of the class photo or academic calendar ******/
|
/****** Write header and footer of the class photo or academic calendar ******/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto)
|
void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType,bool DrawingClassPhoto)
|
||||||
{
|
{
|
||||||
struct Hie_Node Hie[Hie_NUM_LEVELS];
|
struct Hie_Node Hie[Hie_NUM_LEVELS];
|
||||||
|
|
||||||
|
@ -1492,13 +1492,13 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto)
|
||||||
HTM_TD_Begin ("class=\"LT\" style=\"width:60px;\"");
|
HTM_TD_Begin ("class=\"LT\" style=\"width:60px;\"");
|
||||||
if (Hie[Hie_INS].HieCod > 0)
|
if (Hie[Hie_INS].HieCod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Hie[Hie_INS].WWW);
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Hie[Hie_INS].WWW);
|
||||||
Lgo_DrawLogo (Hie_INS,
|
Lgo_DrawLogo (Hie_INS,
|
||||||
Hie[Hie_INS].HieCod,
|
Hie[Hie_INS].HieCod,
|
||||||
Hie[Hie_INS].ShrtName,
|
Hie[Hie_INS].ShrtName,
|
||||||
40,NULL);
|
40,NULL);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -1508,24 +1508,24 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto)
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
if (Hie[Hie_INS].HieCod > 0)
|
if (Hie[Hie_INS].HieCod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||||
" class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s\"",
|
" class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s\"",
|
||||||
Hie[Hie_INS].WWW,The_GetSuffix ());
|
Hie[Hie_INS].WWW,The_GetSuffix ());
|
||||||
HTM_Txt (Hie[Hie_INS].FullName);
|
HTM_Txt (Hie[Hie_INS].FullName);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
if (Hie[Hie_DEG].HieCod > 0)
|
if (Hie[Hie_DEG].HieCod > 0)
|
||||||
{
|
{
|
||||||
if (Hie[Hie_INS].HieCod > 0)
|
if (Hie[Hie_INS].HieCod > 0)
|
||||||
HTM_Txt (" - ");
|
HTM_Txt (" - ");
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||||
" class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s\"",
|
" class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s\"",
|
||||||
Hie[Hie_DEG].WWW,The_GetSuffix ());
|
Hie[Hie_DEG].WWW,The_GetSuffix ());
|
||||||
HTM_Txt (Hie[Hie_DEG].FullName);
|
HTM_Txt (Hie[Hie_DEG].FullName);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
|
@ -1544,7 +1544,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto)
|
||||||
HTM_TD_Begin ("class=\"RT\" style=\"width:60px;\"");
|
HTM_TD_Begin ("class=\"RT\" style=\"width:60px;\"");
|
||||||
if (Hie[Hie_DEG].HieCod > 0)
|
if (Hie[Hie_DEG].HieCod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\""
|
||||||
" class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s\"",
|
" class=\"CLASSPHOTO_TITLE CLASSPHOTO_%s\"",
|
||||||
Hie[Hie_DEG].WWW,The_GetSuffix ());
|
Hie[Hie_DEG].WWW,The_GetSuffix ());
|
||||||
|
@ -1552,7 +1552,7 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto)
|
||||||
Hie[Hie_DEG].HieCod,
|
Hie[Hie_DEG].HieCod,
|
||||||
Hie[Hie_DEG].ShrtName,
|
Hie[Hie_DEG].ShrtName,
|
||||||
40,NULL);
|
40,NULL);
|
||||||
if (!PrintView)
|
if (ViewType == Vie_VIEW)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
#include "swad_action.h"
|
#include "swad_action.h"
|
||||||
#include "swad_icon.h"
|
#include "swad_icon.h"
|
||||||
|
#include "swad_view_edit.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/****************************** Public constants *****************************/
|
/****************************** Public constants *****************************/
|
||||||
|
@ -67,7 +68,7 @@ void Lay_WriteAboutZone (void);
|
||||||
void Lay_RefreshNotifsAndConnected (void);
|
void Lay_RefreshNotifsAndConnected (void);
|
||||||
void Lay_RefreshLastClicks (void);
|
void Lay_RefreshLastClicks (void);
|
||||||
|
|
||||||
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto);
|
void Lay_WriteHeaderClassPhoto (Vie_ViewType_t ViewType,bool DrawingClassPhoto);
|
||||||
|
|
||||||
void Lay_AdvertisementMobile (void);
|
void Lay_AdvertisementMobile (void);
|
||||||
|
|
||||||
|
|
|
@ -1097,7 +1097,7 @@ void MchRes_ShowOneMchResult (void)
|
||||||
Box_BoxBegin (NULL,Match.Title,
|
Box_BoxBegin (NULL,Match.Title,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Games_results,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Games_results,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -130,7 +130,7 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
long SelectedRscCod);
|
long SelectedRscCod);
|
||||||
static void Prg_PutIconToContractOrExpandItem (struct Prg_Item *Item,
|
static void Prg_PutIconToContractOrExpandItem (struct Prg_Item *Item,
|
||||||
ConExp_ContractedOrExpanded_t ContractedOrExpanded,
|
ConExp_ContractedOrExpanded_t ContractedOrExpanded,
|
||||||
VieEdi_ViewOrEdit_t ViewingOrEditing);
|
Vie_ViewType_t ViewType);
|
||||||
static void Prg_WriteItemText (long ItmCod,HidVis_HiddenOrVisible_t HiddenOrVisible);
|
static void Prg_WriteItemText (long ItmCod,HidVis_HiddenOrVisible_t HiddenOrVisible);
|
||||||
static void Prg_WriteRowToCreateItem (long ParentItmCod,unsigned FormLevel);
|
static void Prg_WriteRowToCreateItem (long ParentItmCod,unsigned FormLevel);
|
||||||
static void Prg_SetTitleClass (char **TitleClass,unsigned Level);
|
static void Prg_SetTitleClass (char **TitleClass,unsigned Level);
|
||||||
|
@ -473,20 +473,20 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
{
|
{
|
||||||
extern const char *HidVis_PrgClass[HidVis_NUM_HIDDEN_VISIBLE];
|
extern const char *HidVis_PrgClass[HidVis_NUM_HIDDEN_VISIBLE];
|
||||||
static unsigned UniqueId = 0;
|
static unsigned UniqueId = 0;
|
||||||
static VieEdi_ViewOrEdit_t ViewingOrEditingProgram[Prg_NUM_LISTING_TYPES] =
|
static Vie_ViewType_t ViewingOrEditingProgram[Prg_NUM_LISTING_TYPES] =
|
||||||
{
|
{
|
||||||
[Prg_PRINT ] = VieEdi_VIEW,
|
[Prg_PRINT ] = Vie_VIEW,
|
||||||
[Prg_VIEW ] = VieEdi_VIEW,
|
[Prg_VIEW ] = Vie_VIEW,
|
||||||
[Prg_EDIT_ITEMS ] = VieEdi_EDIT,
|
[Prg_EDIT_ITEMS ] = Vie_EDIT,
|
||||||
[Prg_FORM_NEW_END_ITEM ] = VieEdi_EDIT,
|
[Prg_FORM_NEW_END_ITEM ] = Vie_EDIT,
|
||||||
[Prg_FORM_NEW_CHILD_ITEM ] = VieEdi_EDIT,
|
[Prg_FORM_NEW_CHILD_ITEM ] = Vie_EDIT,
|
||||||
[Prg_FORM_EDIT_ITEM ] = VieEdi_EDIT,
|
[Prg_FORM_EDIT_ITEM ] = Vie_EDIT,
|
||||||
[Prg_END_EDIT_ITEM ] = VieEdi_EDIT,
|
[Prg_END_EDIT_ITEM ] = Vie_EDIT,
|
||||||
[Prg_RECEIVE_ITEM ] = VieEdi_EDIT,
|
[Prg_RECEIVE_ITEM ] = Vie_EDIT,
|
||||||
[Prg_EDIT_RESOURCES ] = VieEdi_EDIT,
|
[Prg_EDIT_RESOURCES ] = Vie_EDIT,
|
||||||
[Prg_EDIT_RESOURCE_LINK ] = VieEdi_EDIT,
|
[Prg_EDIT_RESOURCE_LINK ] = Vie_EDIT,
|
||||||
[Prg_CHANGE_RESOURCE_LINK] = VieEdi_EDIT,
|
[Prg_CHANGE_RESOURCE_LINK] = Vie_EDIT,
|
||||||
[Prg_END_EDIT_RES ] = VieEdi_EDIT,
|
[Prg_END_EDIT_RES ] = Vie_EDIT,
|
||||||
};
|
};
|
||||||
static const char *RowSpan[ConExp_NUM_CONTRACTED_EXPANDED] =
|
static const char *RowSpan[ConExp_NUM_CONTRACTED_EXPANDED] =
|
||||||
{
|
{
|
||||||
|
@ -513,7 +513,7 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ViewingOrEditingProgram[ListingType] == VieEdi_EDIT ||
|
if (ViewingOrEditingProgram[ListingType] == Vie_EDIT ||
|
||||||
HiddenOrVisible == HidVis_VISIBLE)
|
HiddenOrVisible == HidVis_VISIBLE)
|
||||||
{
|
{
|
||||||
/***** Increase number in level *****/
|
/***** Increase number in level *****/
|
||||||
|
@ -548,7 +548,7 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Forms to remove/edit this program item */
|
/* Forms to remove/edit this program item */
|
||||||
if (ViewingOrEditingProgram[ListingType] == VieEdi_EDIT)
|
if (ViewingOrEditingProgram[ListingType] == Vie_EDIT)
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("class=\"PRG_COL1 LT %s\"%s",
|
HTM_TD_Begin ("class=\"PRG_COL1 LT %s\"%s",
|
||||||
The_GetColorRows (),RowSpan[ContractedOrExpanded]);
|
The_GetColorRows (),RowSpan[ContractedOrExpanded]);
|
||||||
|
@ -670,14 +670,14 @@ static void Prg_WriteRowItem (Prg_ListingType_t ListingType,
|
||||||
|
|
||||||
static void Prg_PutIconToContractOrExpandItem (struct Prg_Item *Item,
|
static void Prg_PutIconToContractOrExpandItem (struct Prg_Item *Item,
|
||||||
ConExp_ContractedOrExpanded_t ContractedOrExpanded,
|
ConExp_ContractedOrExpanded_t ContractedOrExpanded,
|
||||||
VieEdi_ViewOrEdit_t ViewingOrEditing)
|
Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
static const Act_Action_t NextAction[ConExp_NUM_CONTRACTED_EXPANDED][2] =
|
static const Act_Action_t NextAction[ConExp_NUM_CONTRACTED_EXPANDED][Vie_NUM_VIEW_TYPES] =
|
||||||
{
|
{
|
||||||
[ConExp_CONTRACTED][VieEdi_VIEW] = ActExpSeePrgItm, // Contracted, Not editing ==> action to expand
|
[ConExp_CONTRACTED][Vie_VIEW] = ActExpSeePrgItm, // Contracted, Not editing ==> action to expand
|
||||||
[ConExp_CONTRACTED][VieEdi_EDIT] = ActExpEdiPrgItm, // Contracted, Editing ==> action to expand
|
[ConExp_CONTRACTED][Vie_EDIT] = ActExpEdiPrgItm, // Contracted, Editing ==> action to expand
|
||||||
[ConExp_EXPANDED ][VieEdi_VIEW] = ActConSeePrgItm, // Expanded , Not editing ==> action to contract
|
[ConExp_EXPANDED ][Vie_VIEW] = ActConSeePrgItm, // Expanded , Not editing ==> action to contract
|
||||||
[ConExp_EXPANDED ][VieEdi_EDIT] = ActConEdiPrgItm, // Expanded , Editing ==> action to contract
|
[ConExp_EXPANDED ][Vie_EDIT] = ActConEdiPrgItm, // Expanded , Editing ==> action to contract
|
||||||
};
|
};
|
||||||
static void (*PutContextualIcon[ConExp_NUM_CONTRACTED_EXPANDED]) (const Act_Action_t NextAction,const char *Anchor,
|
static void (*PutContextualIcon[ConExp_NUM_CONTRACTED_EXPANDED]) (const Act_Action_t NextAction,const char *Anchor,
|
||||||
void (*FuncPars) (void *Args),void *Args) =
|
void (*FuncPars) (void *Args),void *Args) =
|
||||||
|
@ -687,7 +687,7 @@ static void Prg_PutIconToContractOrExpandItem (struct Prg_Item *Item,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Icon to hide/unhide program item *****/
|
/***** Icon to hide/unhide program item *****/
|
||||||
PutContextualIcon[ContractedOrExpanded] (NextAction[ContractedOrExpanded][ViewingOrEditing],
|
PutContextualIcon[ContractedOrExpanded] (NextAction[ContractedOrExpanded][ViewType],
|
||||||
Prg_HIGHLIGHTED_SECTION_ID,
|
Prg_HIGHLIGHTED_SECTION_ID,
|
||||||
Prg_PutParItmCod,&Item->Hierarchy.ItmCod);
|
Prg_PutParItmCod,&Item->Hierarchy.ItmCod);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,10 +81,10 @@ static void PrgRsc_WriteRowViewResource (unsigned NumRsc,
|
||||||
const struct Prg_Item *Item);
|
const struct Prg_Item *Item);
|
||||||
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||||
struct Prg_Item *Item,
|
struct Prg_Item *Item,
|
||||||
VieEdi_ViewOrEdit_t ViewOrEditLink);
|
Vie_ViewType_t LinkViewType);
|
||||||
static void PrgRsc_WriteRowNewResource (unsigned NumResources,
|
static void PrgRsc_WriteRowNewResource (unsigned NumResources,
|
||||||
struct Prg_Item *Item,
|
struct Prg_Item *Item,
|
||||||
VieEdi_ViewOrEdit_t ViewOrEditLink);
|
Vie_ViewType_t LinkViewType);
|
||||||
static void PrgRsc_PutFormsToRemEditOneResource (struct Prg_Item *Item,
|
static void PrgRsc_PutFormsToRemEditOneResource (struct Prg_Item *Item,
|
||||||
unsigned NumRsc,
|
unsigned NumRsc,
|
||||||
unsigned NumResources);
|
unsigned NumResources);
|
||||||
|
@ -155,42 +155,42 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,
|
||||||
MYSQL_RES *mysql_res;
|
MYSQL_RES *mysql_res;
|
||||||
unsigned NumRsc;
|
unsigned NumRsc;
|
||||||
unsigned NumResources;
|
unsigned NumResources;
|
||||||
VieEdi_ViewOrEdit_t ViewingOrEditingResourcesOfThisItem;
|
Vie_ViewType_t ViewingOrEditingResourcesOfThisItem;
|
||||||
char *Title;
|
char *Title;
|
||||||
static VieEdi_ViewOrEdit_t ViewingOrEditing[Prg_NUM_LISTING_TYPES] =
|
static Vie_ViewType_t ViewingOrEditing[Prg_NUM_LISTING_TYPES] =
|
||||||
{
|
{
|
||||||
[Prg_PRINT ] = VieEdi_VIEW,
|
[Prg_PRINT ] = Vie_VIEW,
|
||||||
[Prg_VIEW ] = VieEdi_VIEW,
|
[Prg_VIEW ] = Vie_VIEW,
|
||||||
[Prg_EDIT_ITEMS ] = VieEdi_EDIT,
|
[Prg_EDIT_ITEMS ] = Vie_EDIT,
|
||||||
[Prg_FORM_NEW_END_ITEM ] = VieEdi_EDIT,
|
[Prg_FORM_NEW_END_ITEM ] = Vie_EDIT,
|
||||||
[Prg_FORM_NEW_CHILD_ITEM ] = VieEdi_EDIT,
|
[Prg_FORM_NEW_CHILD_ITEM ] = Vie_EDIT,
|
||||||
[Prg_FORM_EDIT_ITEM ] = VieEdi_EDIT,
|
[Prg_FORM_EDIT_ITEM ] = Vie_EDIT,
|
||||||
[Prg_END_EDIT_ITEM ] = VieEdi_EDIT,
|
[Prg_END_EDIT_ITEM ] = Vie_EDIT,
|
||||||
[Prg_RECEIVE_ITEM ] = VieEdi_EDIT,
|
[Prg_RECEIVE_ITEM ] = Vie_EDIT,
|
||||||
[Prg_EDIT_RESOURCES ] = VieEdi_EDIT,
|
[Prg_EDIT_RESOURCES ] = Vie_EDIT,
|
||||||
[Prg_EDIT_RESOURCE_LINK ] = VieEdi_EDIT,
|
[Prg_EDIT_RESOURCE_LINK ] = Vie_EDIT,
|
||||||
[Prg_CHANGE_RESOURCE_LINK] = VieEdi_EDIT,
|
[Prg_CHANGE_RESOURCE_LINK] = Vie_EDIT,
|
||||||
[Prg_END_EDIT_RES ] = VieEdi_EDIT,
|
[Prg_END_EDIT_RES ] = Vie_EDIT,
|
||||||
};
|
};
|
||||||
static VieEdi_ViewOrEdit_t ViewingOrEditingResources[Prg_NUM_LISTING_TYPES] =
|
static Vie_ViewType_t ViewingOrEditingResources[Prg_NUM_LISTING_TYPES] =
|
||||||
{
|
{
|
||||||
[Prg_PRINT ] = VieEdi_VIEW,
|
[Prg_PRINT ] = Vie_VIEW,
|
||||||
[Prg_VIEW ] = VieEdi_VIEW,
|
[Prg_VIEW ] = Vie_VIEW,
|
||||||
[Prg_EDIT_ITEMS ] = VieEdi_VIEW,
|
[Prg_EDIT_ITEMS ] = Vie_VIEW,
|
||||||
[Prg_FORM_NEW_END_ITEM ] = VieEdi_VIEW,
|
[Prg_FORM_NEW_END_ITEM ] = Vie_VIEW,
|
||||||
[Prg_FORM_NEW_CHILD_ITEM ] = VieEdi_VIEW,
|
[Prg_FORM_NEW_CHILD_ITEM ] = Vie_VIEW,
|
||||||
[Prg_FORM_EDIT_ITEM ] = VieEdi_VIEW,
|
[Prg_FORM_EDIT_ITEM ] = Vie_VIEW,
|
||||||
[Prg_END_EDIT_ITEM ] = VieEdi_VIEW,
|
[Prg_END_EDIT_ITEM ] = Vie_VIEW,
|
||||||
[Prg_RECEIVE_ITEM ] = VieEdi_VIEW,
|
[Prg_RECEIVE_ITEM ] = Vie_VIEW,
|
||||||
[Prg_EDIT_RESOURCES ] = VieEdi_EDIT,
|
[Prg_EDIT_RESOURCES ] = Vie_EDIT,
|
||||||
[Prg_EDIT_RESOURCE_LINK ] = VieEdi_EDIT,
|
[Prg_EDIT_RESOURCE_LINK ] = Vie_EDIT,
|
||||||
[Prg_CHANGE_RESOURCE_LINK] = VieEdi_EDIT,
|
[Prg_CHANGE_RESOURCE_LINK] = Vie_EDIT,
|
||||||
[Prg_END_EDIT_RES ] = VieEdi_VIEW,
|
[Prg_END_EDIT_RES ] = Vie_VIEW,
|
||||||
};
|
};
|
||||||
static void (*PrgRsc_PutIconsResources[VieEdi_NUM_VIEW_EDIT]) (void *ItmCod) =
|
static void (*PrgRsc_PutIconsResources[Vie_NUM_VIEW_TYPES]) (void *ItmCod) =
|
||||||
{
|
{
|
||||||
PrgRsc_PutIconsViewResources,
|
[Vie_VIEW] = PrgRsc_PutIconsViewResources,
|
||||||
PrgRsc_PutIconsEditResources,
|
[Vie_EDIT] = PrgRsc_PutIconsEditResources,
|
||||||
};
|
};
|
||||||
|
|
||||||
/***** Trivial check *****/
|
/***** Trivial check *****/
|
||||||
|
@ -199,9 +199,9 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,
|
||||||
|
|
||||||
/***** Get list of item resources from database *****/
|
/***** Get list of item resources from database *****/
|
||||||
NumResources = Prg_DB_GetListResources (&mysql_res,Item->Hierarchy.ItmCod,
|
NumResources = Prg_DB_GetListResources (&mysql_res,Item->Hierarchy.ItmCod,
|
||||||
ViewingOrEditingResources[ListingType] == VieEdi_EDIT);
|
ViewingOrEditingResources[ListingType] == Vie_EDIT);
|
||||||
|
|
||||||
if (NumResources || ViewingOrEditing[ListingType] == VieEdi_EDIT)
|
if (NumResources || ViewingOrEditing[ListingType] == Vie_EDIT)
|
||||||
{
|
{
|
||||||
if (Item->Hierarchy.ItmCod == SelectedItmCod)
|
if (Item->Hierarchy.ItmCod == SelectedItmCod)
|
||||||
{
|
{
|
||||||
|
@ -219,18 +219,18 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
ViewingOrEditingResourcesOfThisItem = ViewingOrEditingResources[ListingType] == VieEdi_EDIT &&
|
ViewingOrEditingResourcesOfThisItem = ViewingOrEditingResources[ListingType] == Vie_EDIT &&
|
||||||
(Item->Hierarchy.ItmCod == SelectedItmCod) ? VieEdi_EDIT :
|
(Item->Hierarchy.ItmCod == SelectedItmCod) ? Vie_EDIT :
|
||||||
VieEdi_VIEW;
|
Vie_VIEW;
|
||||||
|
|
||||||
switch (ViewingOrEditing[ListingType])
|
switch (ViewingOrEditing[ListingType])
|
||||||
{
|
{
|
||||||
case VieEdi_VIEW:
|
case Vie_VIEW:
|
||||||
Box_BoxBegin ("100%",NULL,
|
Box_BoxBegin ("100%",NULL,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
NULL,Box_NOT_CLOSABLE);
|
||||||
break;
|
break;
|
||||||
case VieEdi_EDIT:
|
case Vie_EDIT:
|
||||||
if (asprintf (&Title,Txt_Resources_of_X,Item->Title) < 0)
|
if (asprintf (&Title,Txt_Resources_of_X,Item->Title) < 0)
|
||||||
Err_NotEnoughMemoryExit ();
|
Err_NotEnoughMemoryExit ();
|
||||||
Box_BoxBegin ("100%",Title,
|
Box_BoxBegin ("100%",Title,
|
||||||
|
@ -239,6 +239,9 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,
|
||||||
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
|
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
|
||||||
free (Title);
|
free (Title);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Table *****/
|
/***** Table *****/
|
||||||
|
@ -256,25 +259,29 @@ void PrgRsc_ListItemResources (Prg_ListingType_t ListingType,
|
||||||
/* Show item */
|
/* Show item */
|
||||||
switch (ViewingOrEditingResourcesOfThisItem)
|
switch (ViewingOrEditingResourcesOfThisItem)
|
||||||
{
|
{
|
||||||
case VieEdi_VIEW:
|
case Vie_VIEW:
|
||||||
PrgRsc_WriteRowViewResource (NumRsc,Item);
|
PrgRsc_WriteRowViewResource (NumRsc,Item);
|
||||||
break;
|
break;
|
||||||
case VieEdi_EDIT:
|
case Vie_EDIT:
|
||||||
PrgRsc_WriteRowEditResource (NumRsc,NumResources,Item,
|
PrgRsc_WriteRowEditResource (NumRsc,NumResources,Item,
|
||||||
(ListingType == Prg_EDIT_RESOURCE_LINK &&
|
(ListingType == Prg_EDIT_RESOURCE_LINK &&
|
||||||
Item->Resource.Hierarchy.RscCod == SelectedRscCod) ? VieEdi_EDIT :
|
Item->Resource.Hierarchy.RscCod == SelectedRscCod) ? Vie_EDIT :
|
||||||
VieEdi_VIEW);
|
Vie_VIEW);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Form to create a new resource *****/
|
/***** Form to create a new resource *****/
|
||||||
if (ViewingOrEditingResourcesOfThisItem == VieEdi_EDIT)
|
if (ViewingOrEditingResourcesOfThisItem == Vie_EDIT)
|
||||||
{
|
{
|
||||||
Prg_ResetResource (Item);
|
Prg_ResetResource (Item);
|
||||||
PrgRsc_WriteRowNewResource (NumResources,Item,
|
PrgRsc_WriteRowNewResource (NumResources,Item,
|
||||||
(ListingType == Prg_EDIT_RESOURCE_LINK &&
|
(ListingType == Prg_EDIT_RESOURCE_LINK &&
|
||||||
Item->Resource.Hierarchy.RscCod == SelectedRscCod) ? VieEdi_EDIT :
|
Item->Resource.Hierarchy.RscCod == SelectedRscCod) ? Vie_EDIT :
|
||||||
VieEdi_VIEW);
|
Vie_VIEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
|
@ -413,7 +420,7 @@ static void PrgRsc_WriteRowViewResource (unsigned NumRsc,
|
||||||
|
|
||||||
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||||
struct Prg_Item *Item,
|
struct Prg_Item *Item,
|
||||||
VieEdi_ViewOrEdit_t ViewOrEditLink)
|
Vie_ViewType_t LinkViewType)
|
||||||
{
|
{
|
||||||
/***** Begin row *****/
|
/***** Begin row *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -445,19 +452,22 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
|
|
||||||
/* Edit link showing clipboard / Show current link */
|
/* Edit link showing clipboard / Show current link */
|
||||||
switch (ViewOrEditLink)
|
switch (LinkViewType)
|
||||||
{
|
{
|
||||||
case VieEdi_VIEW:
|
case Vie_VIEW:
|
||||||
/* Show current link */
|
/* Show current link */
|
||||||
Rsc_WriteLinkName (&Item->Resource.Link,Frm_PUT_FORM_TO_GO);
|
Rsc_WriteLinkName (&Item->Resource.Link,Frm_PUT_FORM_TO_GO);
|
||||||
break;
|
break;
|
||||||
case VieEdi_EDIT:
|
case Vie_EDIT:
|
||||||
/* Show clipboard to change resource link */
|
/* Show clipboard to change resource link */
|
||||||
Frm_BeginFormAnchor (ActChgLnkPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
|
Frm_BeginFormAnchor (ActChgLnkPrgRsc,PrgRsc_RESOURCE_SECTION_ID);
|
||||||
ParCod_PutPar (ParCod_Rsc,Item->Resource.Hierarchy.RscCod);
|
ParCod_PutPar (ParCod_Rsc,Item->Resource.Hierarchy.RscCod);
|
||||||
Rsc_ShowClipboardToChangeLink (&Item->Resource.Link);
|
Rsc_ShowClipboardToChangeLink (&Item->Resource.Link);
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
@ -472,7 +482,7 @@ static void PrgRsc_WriteRowEditResource (unsigned NumRsc,unsigned NumResources,
|
||||||
|
|
||||||
static void PrgRsc_WriteRowNewResource (unsigned NumResources,
|
static void PrgRsc_WriteRowNewResource (unsigned NumResources,
|
||||||
struct Prg_Item *Item,
|
struct Prg_Item *Item,
|
||||||
VieEdi_ViewOrEdit_t ViewOrEditLink)
|
Vie_ViewType_t LinkViewType)
|
||||||
{
|
{
|
||||||
extern const char *Txt_New_resource;
|
extern const char *Txt_New_resource;
|
||||||
|
|
||||||
|
@ -505,7 +515,7 @@ static void PrgRsc_WriteRowNewResource (unsigned NumResources,
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
/* Edit link showing clipboard? */
|
/* Edit link showing clipboard? */
|
||||||
if (ViewOrEditLink == VieEdi_EDIT)
|
if (LinkViewType == Vie_EDIT)
|
||||||
{
|
{
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
|
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ void Prj_PrintOneProject (void)
|
||||||
Prj_GetProjectDataByCod (&Projects.Prj);
|
Prj_GetProjectDataByCod (&Projects.Prj);
|
||||||
|
|
||||||
/***** Write header *****/
|
/***** Write header *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,false);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT,false);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (2);
|
HTM_TABLE_BeginWideMarginPadding (2);
|
||||||
|
|
|
@ -136,7 +136,7 @@ void Syl_ResetSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
{
|
{
|
||||||
Syllabus->PathDir[0] = '\0';
|
Syllabus->PathDir[0] = '\0';
|
||||||
Syllabus->NumItem = 0;
|
Syllabus->NumItem = 0;
|
||||||
Syllabus->ViewingOrEditing = VieEdi_VIEW;
|
Syllabus->ViewType = Vie_VIEW;
|
||||||
Syllabus->WhichSyllabus = Syl_DEFAULT_WHICH_SYLLABUS;
|
Syllabus->WhichSyllabus = Syl_DEFAULT_WHICH_SYLLABUS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,14 +244,14 @@ bool Syl_CheckAndEditSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
case ActLftIteSylLec: case ActLftIteSylPra:
|
case ActLftIteSylLec: case ActLftIteSylPra:
|
||||||
case ActInsIteSylLec: case ActInsIteSylPra:
|
case ActInsIteSylLec: case ActInsIteSylPra:
|
||||||
case ActModIteSylLec: case ActModIteSylPra:
|
case ActModIteSylLec: case ActModIteSylPra:
|
||||||
Syllabus->ViewingOrEditing = VieEdi_EDIT;
|
Syllabus->ViewType = Vie_EDIT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Syllabus->ViewingOrEditing = VieEdi_VIEW;
|
Syllabus->ViewType = Vie_VIEW;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Syllabus->ViewingOrEditing == VieEdi_EDIT ||
|
if (Syllabus->ViewType == Vie_EDIT ||
|
||||||
Syl_LstItemsSyllabus.NumItems)
|
Syl_LstItemsSyllabus.NumItems)
|
||||||
{
|
{
|
||||||
/***** Write the current syllabus *****/
|
/***** Write the current syllabus *****/
|
||||||
|
@ -523,15 +523,15 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
extern const char *Txt_Done;
|
extern const char *Txt_Done;
|
||||||
unsigned NumItem;
|
unsigned NumItem;
|
||||||
int Col;
|
int Col;
|
||||||
static const char **HelpLink[VieEdi_NUM_VIEW_EDIT] =
|
static const char **HelpLink[Vie_NUM_VIEW_TYPES] =
|
||||||
{
|
{
|
||||||
[VieEdi_VIEW] = &Hlp_COURSE_Syllabus,
|
[Vie_VIEW] = &Hlp_COURSE_Syllabus,
|
||||||
[VieEdi_EDIT] = &Hlp_COURSE_Syllabus_edit,
|
[Vie_EDIT] = &Hlp_COURSE_Syllabus_edit,
|
||||||
};
|
};
|
||||||
static int NumButtons[VieEdi_NUM_VIEW_EDIT] =
|
static int NumButtons[Vie_NUM_VIEW_TYPES] =
|
||||||
{
|
{
|
||||||
[VieEdi_VIEW] = 0,
|
[Vie_VIEW] = 0,
|
||||||
[VieEdi_EDIT] = 5,
|
[Vie_EDIT] = 5,
|
||||||
};
|
};
|
||||||
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 ||
|
||||||
|
@ -539,7 +539,7 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
Gbl.Action.Act == ActLftIteSylLec || Gbl.Action.Act == ActLftIteSylPra);
|
Gbl.Action.Act == ActLftIteSylLec || Gbl.Action.Act == ActLftIteSylPra);
|
||||||
bool ICanEdit = Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
bool ICanEdit = Gbl.Usrs.Me.Role.Logged == Rol_TCH ||
|
||||||
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM;
|
||||||
bool PutIconToEdit = Syllabus->ViewingOrEditing == VieEdi_VIEW && ICanEdit;
|
bool PutIconToEdit = Syllabus->ViewType == Vie_VIEW && ICanEdit;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
Box_BoxBegin (NULL,Txt_INFO_TITLE[Gbl.Crs.Info.Type],
|
||||||
|
@ -547,7 +547,7 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
NULL,
|
NULL,
|
||||||
PutIconToEdit ? &Gbl.Crs.Info.Type :
|
PutIconToEdit ? &Gbl.Crs.Info.Type :
|
||||||
NULL,
|
NULL,
|
||||||
*HelpLink[Syllabus->ViewingOrEditing],Box_NOT_CLOSABLE);
|
*HelpLink[Syllabus->ViewType],Box_NOT_CLOSABLE);
|
||||||
|
|
||||||
/****** Form to select syllabus *****/
|
/****** Form to select syllabus *****/
|
||||||
Syl_PutFormWhichSyllabus (Syllabus->WhichSyllabus);
|
Syl_PutFormWhichSyllabus (Syllabus->WhichSyllabus);
|
||||||
|
@ -558,7 +558,7 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
/***** Set width of columns of the table *****/
|
/***** Set width of columns of the table *****/
|
||||||
HTM_Txt ("<colgroup>");
|
HTM_Txt ("<colgroup>");
|
||||||
for (Col = 0;
|
for (Col = 0;
|
||||||
Col < NumButtons[Syllabus->ViewingOrEditing];
|
Col < NumButtons[Syllabus->ViewType];
|
||||||
Col++)
|
Col++)
|
||||||
HTM_Txt ("<col width=\"12\" />");
|
HTM_Txt ("<col width=\"12\" />");
|
||||||
for (Col = 1;
|
for (Col = 1;
|
||||||
|
@ -584,7 +584,7 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
Syl_LstItemsSyllabus.Lst[NumItem].Level,NULL,
|
Syl_LstItemsSyllabus.Lst[NumItem].Level,NULL,
|
||||||
"",true);
|
"",true);
|
||||||
}
|
}
|
||||||
else if (Syllabus->ViewingOrEditing == VieEdi_EDIT)
|
else if (Syllabus->ViewType == Vie_EDIT)
|
||||||
/***** If the syllabus is empty ==>
|
/***** If the syllabus is empty ==>
|
||||||
show form to add a iten to the end *****/
|
show form to add a iten to the end *****/
|
||||||
Syl_ShowRowSyllabus (Syllabus,0,
|
Syl_ShowRowSyllabus (Syllabus,0,
|
||||||
|
@ -594,7 +594,7 @@ static void Syl_ShowSyllabus (struct Syl_Syllabus *Syllabus)
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** Button to view *****/
|
/***** Button to view *****/
|
||||||
if (Syllabus->ViewingOrEditing == VieEdi_EDIT)
|
if (Syllabus->ViewType == Vie_EDIT)
|
||||||
{
|
{
|
||||||
Frm_BeginForm (Inf_ActionsSeeInfo[Gbl.Crs.Info.Type]);
|
Frm_BeginForm (Inf_ActionsSeeInfo[Gbl.Crs.Info.Type]);
|
||||||
Btn_PutConfirmButton (Txt_Done);
|
Btn_PutConfirmButton (Txt_Done);
|
||||||
|
@ -629,9 +629,9 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
||||||
/***** Begin the row *****/
|
/***** Begin the row *****/
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
switch (Syllabus->ViewingOrEditing)
|
switch (Syllabus->ViewType)
|
||||||
{
|
{
|
||||||
case VieEdi_VIEW:
|
case Vie_VIEW:
|
||||||
/***** Indent depending on the level *****/
|
/***** Indent depending on the level *****/
|
||||||
if (Level > 1)
|
if (Level > 1)
|
||||||
{
|
{
|
||||||
|
@ -658,7 +658,7 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
||||||
HTM_Txt (Text);
|
HTM_Txt (Text);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
break;
|
break;
|
||||||
case VieEdi_EDIT:
|
case Vie_EDIT:
|
||||||
if (NewItem)
|
if (NewItem)
|
||||||
{
|
{
|
||||||
HTM_TD_Begin ("colspan=\"5\" class=\"%s\"",
|
HTM_TD_Begin ("colspan=\"5\" class=\"%s\"",
|
||||||
|
@ -737,6 +737,9 @@ static void Syl_ShowRowSyllabus (struct Syl_Syllabus *Syllabus,unsigned NumItem,
|
||||||
|
|
||||||
Syl_PutFormItemSyllabus (Syllabus,NewItem,NumItem,Level,CodItem,Text);
|
Syl_PutFormItemSyllabus (Syllabus,NewItem,NumItem,Level,CodItem,Text);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** End of the row *****/
|
/***** End of the row *****/
|
||||||
|
@ -935,7 +938,7 @@ void Syl_RemoveItemSyllabus (void)
|
||||||
/***** 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);
|
||||||
|
|
||||||
Syllabus.ViewingOrEditing = VieEdi_EDIT;
|
Syllabus.ViewType = Vie_EDIT;
|
||||||
|
|
||||||
/***** Get item number *****/
|
/***** Get item number *****/
|
||||||
Syllabus.NumItem = Syl_GetParItemNumber ();
|
Syllabus.NumItem = Syl_GetParItemNumber ();
|
||||||
|
@ -1012,7 +1015,7 @@ static void Syl_ChangePlaceItemSyllabus (Syl_ChangePosItem_t UpOrDownPos)
|
||||||
/***** 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);
|
||||||
|
|
||||||
Syllabus.ViewingOrEditing = VieEdi_EDIT;
|
Syllabus.ViewType = Vie_EDIT;
|
||||||
|
|
||||||
/***** Get item number *****/
|
/***** Get item number *****/
|
||||||
Syllabus.NumItem = Syl_GetParItemNumber ();
|
Syllabus.NumItem = Syl_GetParItemNumber ();
|
||||||
|
@ -1198,7 +1201,7 @@ static void Syl_ChangeLevelItemSyllabus (Syl_ChangeLevelItem_t IncreaseOrDecreas
|
||||||
/***** 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);
|
||||||
|
|
||||||
Syllabus.ViewingOrEditing = VieEdi_EDIT;
|
Syllabus.ViewType = Vie_EDIT;
|
||||||
|
|
||||||
/***** Get item number *****/
|
/***** Get item number *****/
|
||||||
Syllabus.NumItem = Syl_GetParItemNumber ();
|
Syllabus.NumItem = Syl_GetParItemNumber ();
|
||||||
|
@ -1261,7 +1264,7 @@ void Syl_InsertItemSyllabus (void)
|
||||||
/***** 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);
|
||||||
|
|
||||||
Syllabus.ViewingOrEditing = VieEdi_EDIT;
|
Syllabus.ViewType = Vie_EDIT;
|
||||||
|
|
||||||
/***** Get item number *****/
|
/***** Get item number *****/
|
||||||
Syllabus.NumItem = Syl_GetParItemNumber ();
|
Syllabus.NumItem = Syl_GetParItemNumber ();
|
||||||
|
@ -1330,7 +1333,7 @@ void Syl_ModifyItemSyllabus (void)
|
||||||
/***** 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);
|
||||||
|
|
||||||
Syllabus.ViewingOrEditing = VieEdi_EDIT;
|
Syllabus.ViewType = Vie_EDIT;
|
||||||
|
|
||||||
/***** Get item number *****/
|
/***** Get item number *****/
|
||||||
Syllabus.NumItem = Syl_GetParItemNumber ();
|
Syllabus.NumItem = Syl_GetParItemNumber ();
|
||||||
|
|
|
@ -77,7 +77,7 @@ struct Syl_Syllabus
|
||||||
char PathDir[PATH_MAX + 1];
|
char PathDir[PATH_MAX + 1];
|
||||||
unsigned NumItem; // Item being edited
|
unsigned NumItem; // Item being edited
|
||||||
unsigned ParNumItem; // Used as parameter in forms
|
unsigned ParNumItem; // Used as parameter in forms
|
||||||
VieEdi_ViewOrEdit_t ViewingOrEditing;
|
Vie_ViewType_t ViewType;
|
||||||
Syl_WhichSyllabus_t WhichSyllabus;
|
Syl_WhichSyllabus_t WhichSyllabus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -59,11 +59,11 @@ extern struct Globals Gbl;
|
||||||
/***************************** Private prototypes ****************************/
|
/***************************** Private prototypes ****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void SysCfg_Configuration (bool PrintView);
|
static void SysCfg_Configuration (Vie_ViewType_t ViewType);
|
||||||
static void SysCfg_PutIconToPrint (__attribute__((unused)) void *Args);
|
static void SysCfg_PutIconToPrint (__attribute__((unused)) void *Args);
|
||||||
static void SysCfg_Map (void);
|
static void SysCfg_Map (void);
|
||||||
static void SysCfg_Platform (void);
|
static void SysCfg_Platform (void);
|
||||||
static void SysCfg_Shortcut (bool PrintView);
|
static void SysCfg_Shortcut (Vie_ViewType_t ViewType);
|
||||||
static void SysCfg_QR (void);
|
static void SysCfg_QR (void);
|
||||||
static void SysCfg_NumCtys (void);
|
static void SysCfg_NumCtys (void);
|
||||||
static void SysCfg_NumInss (void);
|
static void SysCfg_NumInss (void);
|
||||||
|
@ -76,7 +76,7 @@ static void SysCfg_NumCrss (void);
|
||||||
|
|
||||||
void SysCfg_ShowConfiguration (void)
|
void SysCfg_ShowConfiguration (void)
|
||||||
{
|
{
|
||||||
SysCfg_Configuration (false);
|
SysCfg_Configuration (Vie_VIEW);
|
||||||
|
|
||||||
/***** Show help to enrol me *****/
|
/***** Show help to enrol me *****/
|
||||||
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
Hlp_ShowHelpWhatWouldYouLikeToDo ();
|
||||||
|
@ -88,90 +88,93 @@ void SysCfg_ShowConfiguration (void)
|
||||||
|
|
||||||
void SysCfg_PrintConfiguration (void)
|
void SysCfg_PrintConfiguration (void)
|
||||||
{
|
{
|
||||||
SysCfg_Configuration (true);
|
SysCfg_Configuration (Vie_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************** Information of the current country *********************/
|
/******************** Information of the current country *********************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void SysCfg_Configuration (bool PrintView)
|
static void SysCfg_Configuration (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
extern const char *Hlp_SYSTEM_Information;
|
extern const char *Hlp_SYSTEM_Information;
|
||||||
unsigned NumCtrs;
|
unsigned NumCtrs;
|
||||||
unsigned NumCtrsWithMap;
|
unsigned NumCtrsWithMap;
|
||||||
|
|
||||||
/***** Begin box *****/
|
/***** Begin box *****/
|
||||||
if (PrintView)
|
Box_BoxBegin (NULL,Cfg_PLATFORM_SHORT_NAME,
|
||||||
Box_BoxBegin (NULL,Cfg_PLATFORM_SHORT_NAME,
|
ViewType == Vie_VIEW ? SysCfg_PutIconToPrint :
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
NULL,Box_NOT_CLOSABLE);
|
ViewType == Vie_VIEW ? Hlp_SYSTEM_Information :
|
||||||
else
|
NULL,Box_NOT_CLOSABLE);
|
||||||
Box_BoxBegin (NULL,Cfg_PLATFORM_SHORT_NAME,
|
|
||||||
SysCfg_PutIconToPrint,NULL,
|
|
||||||
Hlp_SYSTEM_Information,Box_NOT_CLOSABLE);
|
|
||||||
|
|
||||||
/**************************** Left part ***********************************/
|
/**************************** Left part ***********************************/
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
HTM_DIV_Begin ("class=\"HIE_CFG_LEFT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (2);
|
HTM_TABLE_BeginWidePadding (2);
|
||||||
|
|
||||||
/***** Platform *****/
|
/***** Platform *****/
|
||||||
SysCfg_Platform ();
|
SysCfg_Platform ();
|
||||||
|
|
||||||
/***** Shortcut to the country *****/
|
/***** Shortcut to the country *****/
|
||||||
SysCfg_Shortcut (PrintView);
|
SysCfg_Shortcut (ViewType);
|
||||||
|
|
||||||
/***** Get number of centers with map *****/
|
/***** Get number of centers with map *****/
|
||||||
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInSys ();
|
NumCtrsWithMap = Ctr_GetCachedNumCtrsWithMapInSys ();
|
||||||
|
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
/***** QR code with link to the country *****/
|
{
|
||||||
SysCfg_QR ();
|
case Vie_VIEW:
|
||||||
else
|
/***** Get number of centers *****/
|
||||||
{
|
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
||||||
/***** Get number of centers *****/
|
Hie_SYS, // ...in system
|
||||||
NumCtrs = Hie_GetCachedNumNodesInHieLvl (Hie_CTR, // Number of centers...
|
Gbl.Hierarchy.Node[Hie_SYS].HieCod);
|
||||||
Hie_SYS, // ...in system
|
|
||||||
Gbl.Hierarchy.Node[Hie_SYS].HieCod);
|
|
||||||
|
|
||||||
/***** Number of countries,
|
/***** Number of countries,
|
||||||
number of institutions,
|
number of institutions,
|
||||||
number of centers,
|
number of centers,
|
||||||
number of degrees,
|
number of degrees,
|
||||||
number of courses *****/
|
number of courses *****/
|
||||||
SysCfg_NumCtys ();
|
SysCfg_NumCtys ();
|
||||||
SysCfg_NumInss ();
|
SysCfg_NumInss ();
|
||||||
HieCfg_NumCtrs (NumCtrs,
|
HieCfg_NumCtrs (NumCtrs,
|
||||||
false); // Don't put form
|
false); // Don't put form
|
||||||
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
|
HieCfg_NumCtrsWithMap (NumCtrs,NumCtrsWithMap);
|
||||||
SysCfg_NumDegs ();
|
SysCfg_NumDegs ();
|
||||||
SysCfg_NumCrss ();
|
SysCfg_NumCrss ();
|
||||||
|
|
||||||
/***** Number of users in courses of this country *****/
|
/***** Number of users in courses of this country *****/
|
||||||
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_TCH);
|
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_TCH);
|
||||||
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_NET);
|
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_NET);
|
||||||
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_STD);
|
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_STD);
|
||||||
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_UNK);
|
HieCfg_NumUsrsInCrss (Hie_SYS,-1L,Rol_UNK);
|
||||||
}
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/***** QR code with link to the country *****/
|
||||||
|
SysCfg_QR ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/***** End table *****/
|
/***** End table *****/
|
||||||
HTM_TABLE_End ();
|
HTM_TABLE_End ();
|
||||||
|
|
||||||
/***** End of left part *****/
|
|
||||||
HTM_DIV_End ();
|
|
||||||
|
|
||||||
/**************************** Right part **********************************/
|
|
||||||
if (NumCtrsWithMap)
|
|
||||||
{
|
|
||||||
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
|
||||||
|
|
||||||
/***** Country map *****/
|
|
||||||
SysCfg_Map ();
|
|
||||||
|
|
||||||
|
/***** End of left part *****/
|
||||||
HTM_DIV_End ();
|
HTM_DIV_End ();
|
||||||
}
|
|
||||||
|
/**************************** Right part **********************************/
|
||||||
|
if (NumCtrsWithMap)
|
||||||
|
{
|
||||||
|
HTM_DIV_Begin ("class=\"HIE_CFG_RIGHT HIE_CFG_WIDTH\"");
|
||||||
|
|
||||||
|
/***** Country map *****/
|
||||||
|
SysCfg_Map ();
|
||||||
|
|
||||||
|
HTM_DIV_End ();
|
||||||
|
}
|
||||||
|
|
||||||
/***** End box *****/
|
/***** End box *****/
|
||||||
Box_BoxEnd ();
|
Box_BoxEnd ();
|
||||||
|
@ -285,9 +288,9 @@ static void SysCfg_Platform (void)
|
||||||
/************** Show platform shortcut in system configuration ***************/
|
/************** Show platform shortcut in system configuration ***************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void SysCfg_Shortcut (bool PrintView)
|
static void SysCfg_Shortcut (Vie_ViewType_t ViewType)
|
||||||
{
|
{
|
||||||
HieCfg_Shortcut (PrintView,ParCod_None,-1L);
|
HieCfg_Shortcut (ViewType,ParCod_None,-1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -347,7 +347,7 @@ void Tst_AssessTest (void)
|
||||||
Box_BoxBegin (NULL,Txt_Result,
|
Box_BoxBegin (NULL,Txt_Result,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Header *****/
|
/***** Header *****/
|
||||||
if (Gbl.Usrs.Me.IBelongToCurrent[Hie_CRS])
|
if (Gbl.Usrs.Me.IBelongToCurrent[Hie_CRS])
|
||||||
|
|
|
@ -218,7 +218,7 @@ void TstPrn_ShowTestPrintToFillIt (struct TstPrn_Print *Print,
|
||||||
Box_BoxBegin (NULL,Txt_Test,
|
Box_BoxBegin (NULL,Txt_Test,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
if (Print->NumQsts.All)
|
if (Print->NumQsts.All)
|
||||||
{
|
{
|
||||||
|
@ -2236,7 +2236,7 @@ void TstPrn_ShowOnePrint (void)
|
||||||
Box_BoxBegin (NULL,Txt_Result,
|
Box_BoxBegin (NULL,Txt_Result,
|
||||||
NULL,NULL,
|
NULL,NULL,
|
||||||
Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE);
|
Hlp_ASSESSMENT_Tests_results,Box_NOT_CLOSABLE);
|
||||||
Lay_WriteHeaderClassPhoto (false,false);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,false);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWideMarginPadding (10);
|
HTM_TABLE_BeginWideMarginPadding (10);
|
||||||
|
|
|
@ -323,8 +323,9 @@ void Tmt_ShowClassTimeTable (void)
|
||||||
[Tmt_TUTORING_TIMETABLE] = ActUnk,
|
[Tmt_TUTORING_TIMETABLE] = ActUnk,
|
||||||
};
|
};
|
||||||
struct Tmt_Timetable Timetable;
|
struct Tmt_Timetable Timetable;
|
||||||
bool PrintView = (Gbl.Action.Act == ActPrnCrsTT ||
|
Vie_ViewType_t ViewType = (Gbl.Action.Act == ActPrnCrsTT ||
|
||||||
Gbl.Action.Act == ActPrnMyTT);
|
Gbl.Action.Act == ActPrnMyTT) ? Vie_PRINT :
|
||||||
|
Vie_VIEW;
|
||||||
Grp_WhichGroups_t WhichGroups;
|
Grp_WhichGroups_t WhichGroups;
|
||||||
|
|
||||||
/***** Initializations *****/
|
/***** Initializations *****/
|
||||||
|
@ -345,13 +346,13 @@ void Tmt_ShowClassTimeTable (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
Timetable.ContextualIcons.PutIconEditCrsTT = (Timetable.Type == Tmt_COURSE_TIMETABLE &&
|
Timetable.ContextualIcons.PutIconEditCrsTT = (Timetable.Type == Tmt_COURSE_TIMETABLE &&
|
||||||
!PrintView &&
|
ViewType == Vie_VIEW &&
|
||||||
Gbl.Usrs.Me.Role.Logged >= Rol_TCH);
|
Gbl.Usrs.Me.Role.Logged >= Rol_TCH);
|
||||||
Timetable.ContextualIcons.PutIconEditOfficeHours = (Timetable.Type == Tmt_MY_TIMETABLE &&
|
Timetable.ContextualIcons.PutIconEditOfficeHours = (Timetable.Type == Tmt_MY_TIMETABLE &&
|
||||||
!PrintView &&
|
ViewType == Vie_VIEW &&
|
||||||
(Gbl.Usrs.Me.Role.Available & (1 << Rol_TCH |
|
(Gbl.Usrs.Me.Role.Available & (1 << Rol_TCH |
|
||||||
1 << Rol_NET)));
|
1 << Rol_NET)));
|
||||||
Timetable.ContextualIcons.PutIconPrint = !PrintView;
|
Timetable.ContextualIcons.PutIconPrint = (ViewType == Vie_VIEW);
|
||||||
|
|
||||||
/***** Get whether to show only my groups or all groups *****/
|
/***** Get whether to show only my groups or all groups *****/
|
||||||
Grp_GetParWhichGroups ();
|
Grp_GetParWhichGroups ();
|
||||||
|
@ -370,28 +371,34 @@ void Tmt_ShowClassTimeTable (void)
|
||||||
|
|
||||||
/***** Begin time table drawing *****/
|
/***** Begin time table drawing *****/
|
||||||
if (Timetable.Type == Tmt_COURSE_TIMETABLE)
|
if (Timetable.Type == Tmt_COURSE_TIMETABLE)
|
||||||
Lay_WriteHeaderClassPhoto (PrintView,false);
|
Lay_WriteHeaderClassPhoto (ViewType,false);
|
||||||
|
|
||||||
if (PrintView)
|
switch (ViewType)
|
||||||
/***** Show whether only my groups or all groups are selected *****/
|
|
||||||
Tmt_ShowTimeTableGrpsSelected ();
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
/***** Setting selector *****/
|
case Vie_VIEW:
|
||||||
Set_BeginSettingsHead ();
|
/***** Setting selector *****/
|
||||||
|
Set_BeginSettingsHead ();
|
||||||
|
|
||||||
/* Select whether show only my groups or all groups */
|
/* Select whether show only my groups or all groups */
|
||||||
if ( Timetable.Type == Tmt_MY_TIMETABLE ||
|
if ( Timetable.Type == Tmt_MY_TIMETABLE ||
|
||||||
(Timetable.Type == Tmt_COURSE_TIMETABLE &&
|
(Timetable.Type == Tmt_COURSE_TIMETABLE &&
|
||||||
Gbl.Crs.Grps.NumGrps))
|
Gbl.Crs.Grps.NumGrps))
|
||||||
Tmt_PutFormToSelectWhichGroupsToShow (&Timetable);
|
Tmt_PutFormToSelectWhichGroupsToShow (&Timetable);
|
||||||
|
|
||||||
/* Show form to change first day of week */
|
/* Show form to change first day of week */
|
||||||
WhichGroups = Grp_GetParWhichGroups ();
|
WhichGroups = Grp_GetParWhichGroups ();
|
||||||
Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Timetable.Type],
|
Cal_ShowFormToSelFirstDayOfWeek (ActChgTT1stDay[Timetable.Type],
|
||||||
Grp_PutParWhichGroups,&WhichGroups);
|
Grp_PutParWhichGroups,&WhichGroups);
|
||||||
|
|
||||||
Set_EndSettingsHead ();
|
Set_EndSettingsHead ();
|
||||||
|
break;
|
||||||
|
case Vie_PRINT:
|
||||||
|
/***** Show whether only my groups or all groups are selected *****/
|
||||||
|
Tmt_ShowTimeTableGrpsSelected ();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Err_WrongTypeExit ();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***** Show the time table *****/
|
/***** Show the time table *****/
|
||||||
|
|
12
swad_user.c
12
swad_user.c
|
@ -5082,7 +5082,7 @@ void Usr_SeeGuests (void)
|
||||||
|
|
||||||
/***** Draw a class photo with guests *****/
|
/***** Draw a class photo with guests *****/
|
||||||
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
||||||
Lay_WriteHeaderClassPhoto (false,true);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,true);
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_GST,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_GST,ICanChooseOption);
|
||||||
|
@ -5232,7 +5232,7 @@ void Usr_SeeStudents (void)
|
||||||
|
|
||||||
/***** Draw a class photo with students of the course *****/
|
/***** Draw a class photo with students of the course *****/
|
||||||
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
||||||
Lay_WriteHeaderClassPhoto (false,true);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,true);
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_STD,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_STD,ICanChooseOption);
|
||||||
|
@ -5398,7 +5398,7 @@ void Usr_SeeTeachers (void)
|
||||||
|
|
||||||
/***** Draw a class photo with teachers of the course *****/
|
/***** Draw a class photo with teachers of the course *****/
|
||||||
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
if (Gbl.Usrs.Me.ListType == Set_USR_LIST_AS_CLASS_PHOTO)
|
||||||
Lay_WriteHeaderClassPhoto (false,true);
|
Lay_WriteHeaderClassPhoto (Vie_VIEW,true);
|
||||||
|
|
||||||
/* Set options allowed */
|
/* Set options allowed */
|
||||||
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_TCH,ICanChooseOption);
|
PutForm = Usr_SetOptionsListUsrsAllowed (Rol_TCH,ICanChooseOption);
|
||||||
|
@ -5928,7 +5928,7 @@ void Usr_SeeGstClassPhotoPrn (void)
|
||||||
if (Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs)
|
if (Gbl.Usrs.LstUsrs[Rol_GST].NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the guests' class photo *****/
|
/***** Draw the guests' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,true);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT,true);
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
||||||
Rol_GST,&Gbl.Usrs.Selected,false);
|
Rol_GST,&Gbl.Usrs.Selected,false);
|
||||||
|
@ -5966,7 +5966,7 @@ void Usr_SeeStdClassPhotoPrn (void)
|
||||||
if (Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs)
|
if (Gbl.Usrs.LstUsrs[Rol_STD].NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the students' class photo *****/
|
/***** Draw the students' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,true);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT,true);
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
Usr_DrawClassPhoto (Usr_CLASS_PHOTO_PRN,
|
||||||
Rol_STD,&Gbl.Usrs.Selected,false);
|
Rol_STD,&Gbl.Usrs.Selected,false);
|
||||||
|
@ -6028,7 +6028,7 @@ void Usr_SeeTchClassPhotoPrn (void)
|
||||||
if (NumUsrs)
|
if (NumUsrs)
|
||||||
{
|
{
|
||||||
/***** Draw the teachers' class photo *****/
|
/***** Draw the teachers' class photo *****/
|
||||||
Lay_WriteHeaderClassPhoto (true,true);
|
Lay_WriteHeaderClassPhoto (Vie_PRINT,true);
|
||||||
HTM_TABLE_BeginWide ();
|
HTM_TABLE_BeginWide ();
|
||||||
|
|
||||||
/* List teachers and non-editing teachers */
|
/* List teachers and non-editing teachers */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// swad_view_edit.h: types and constants related to view/edit
|
// swad_view.h: types and constants related to view/edit/print
|
||||||
|
|
||||||
#ifndef _SWAD_VIE_EDI
|
#ifndef _SWAD_VIEW
|
||||||
#define _SWAD_VIE_EDI
|
#define _SWAD_VIEW
|
||||||
/*
|
/*
|
||||||
SWAD (Shared Workspace At a Distance in Spanish),
|
SWAD (Shared Workspace At a Distance in Spanish),
|
||||||
is a web platform developed at the University of Granada (Spain),
|
is a web platform developed at the University of Granada (Spain),
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
/***************************** Public constants ******************************/
|
/***************************** Public constants ******************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
#define VieEdi_NUM_VIEW_EDIT 2
|
#define Vie_NUM_VIEW_TYPES 3
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/******************************* Public types ********************************/
|
/******************************* Public types ********************************/
|
||||||
|
@ -36,8 +36,9 @@
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
VieEdi_VIEW = 0,
|
Vie_VIEW = 0,
|
||||||
VieEdi_EDIT = 1,
|
Vie_EDIT = 1,
|
||||||
} VieEdi_ViewOrEdit_t;
|
Vie_PRINT = 2,
|
||||||
|
} Vie_ViewType_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue