mirror of https://github.com/acanas/swad-core.git
Version 23.9.2: Sep 19, 2023 Code refactoring in hierarchy.
This commit is contained in:
parent
95df356512
commit
1735b451dc
42
swad_API.c
42
swad_API.c
|
@ -1561,7 +1561,7 @@ int swad__getUsers (struct soap *soap,
|
||||||
API_Set_gSOAP_RuntimeEnv (soap);
|
API_Set_gSOAP_RuntimeEnv (soap);
|
||||||
Gbl.WebService.Function = API_getUsers;
|
Gbl.WebService.Function = API_getUsers;
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod = (courseCode > 0) ? (long) courseCode :
|
Gbl.Hierarchy.Node[HieLvl_CRS].Cod = (courseCode > 0) ? (long) courseCode :
|
||||||
-1L;
|
-1L;
|
||||||
|
|
||||||
/***** Check web service key *****/
|
/***** Check web service key *****/
|
||||||
if ((ReturnCode = API_CheckAPIKey (wsKey)) != SOAP_OK)
|
if ((ReturnCode = API_CheckAPIKey (wsKey)) != SOAP_OK)
|
||||||
|
@ -1642,7 +1642,7 @@ int swad__findUsers (struct soap *soap,
|
||||||
API_Set_gSOAP_RuntimeEnv (soap);
|
API_Set_gSOAP_RuntimeEnv (soap);
|
||||||
Gbl.WebService.Function = API_findUsers;
|
Gbl.WebService.Function = API_findUsers;
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod = (courseCode > 0) ? (long) courseCode :
|
Gbl.Hierarchy.Node[HieLvl_CRS].Cod = (courseCode > 0) ? (long) courseCode :
|
||||||
-1L;
|
-1L;
|
||||||
|
|
||||||
/***** Check web service key *****/
|
/***** Check web service key *****/
|
||||||
if ((ReturnCode = API_CheckAPIKey (wsKey)) != SOAP_OK)
|
if ((ReturnCode = API_CheckAPIKey (wsKey)) != SOAP_OK)
|
||||||
|
@ -2862,7 +2862,7 @@ int swad__getNotifications (struct soap *soap,
|
||||||
Ntf_NotifyEvent_t NotifyEvent;
|
Ntf_NotifyEvent_t NotifyEvent;
|
||||||
long EventTime;
|
long EventTime;
|
||||||
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
char PhotoURL[Cns_MAX_BYTES_WWW + 1];
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
long Cod;
|
long Cod;
|
||||||
struct For_Forum ForumSelected;
|
struct For_Forum ForumSelected;
|
||||||
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
||||||
|
@ -2929,13 +2929,13 @@ int swad__getNotifications (struct soap *soap,
|
||||||
getNotificationsOut->notificationsArray.__ptr[NumNotif].eventTime = EventTime;
|
getNotificationsOut->notificationsArray.__ptr[NumNotif].eventTime = EventTime;
|
||||||
|
|
||||||
/* Get course (row[7]) */
|
/* Get course (row[7]) */
|
||||||
Hie.Crs.Cod = Str_ConvertStrCodToLongCod (row[7]);
|
Hie[HieLvl_CRS].Cod = Str_ConvertStrCodToLongCod (row[7]);
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
|
|
||||||
/* Get user's code of the user who caused the event (row[3]) */
|
/* Get user's code of the user who caused the event (row[3]) */
|
||||||
Gbl.Usrs.Other.UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[3]);
|
Gbl.Usrs.Other.UsrDat.UsrCod = Str_ConvertStrCodToLongCod (row[3]);
|
||||||
|
|
||||||
if (API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,Hie.Crs.Cod)) // Get some user's data from database
|
if (API_GetSomeUsrDataFromUsrCod (&Gbl.Usrs.Other.UsrDat,Hie[HieLvl_CRS].Cod)) // Get some user's data from database
|
||||||
{
|
{
|
||||||
getNotificationsOut->notificationsArray.__ptr[NumNotif].userNickname =
|
getNotificationsOut->notificationsArray.__ptr[NumNotif].userNickname =
|
||||||
soap_malloc (soap,Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1);
|
soap_malloc (soap,Nck_MAX_BYTES_NICK_WITHOUT_ARROBA + 1);
|
||||||
|
@ -2977,16 +2977,16 @@ int swad__getNotifications (struct soap *soap,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get institution (row[4]) */
|
/* Get institution (row[4]) */
|
||||||
Hie.Ins.Cod = Str_ConvertStrCodToLongCod (row[4]);
|
Hie[HieLvl_INS].Cod = Str_ConvertStrCodToLongCod (row[4]);
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
|
|
||||||
/* Get center (row[5]) */
|
/* Get center (row[5]) */
|
||||||
Hie.Ctr.Cod = Str_ConvertStrCodToLongCod (row[5]);
|
Hie[HieLvl_CTR].Cod = Str_ConvertStrCodToLongCod (row[5]);
|
||||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
|
|
||||||
/* Get degree (row[6]) */
|
/* Get degree (row[6]) */
|
||||||
Hie.Deg.Cod = Str_ConvertStrCodToLongCod (row[6]);
|
Hie[HieLvl_DEG].Cod = Str_ConvertStrCodToLongCod (row[6]);
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
|
|
||||||
/* Get message/post/... code (row[8]) */
|
/* Get message/post/... code (row[8]) */
|
||||||
Cod = Str_ConvertStrCodToLongCod (row[8]);
|
Cod = Str_ConvertStrCodToLongCod (row[8]);
|
||||||
|
@ -3005,18 +3005,18 @@ int swad__getNotifications (struct soap *soap,
|
||||||
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
||||||
Txt_Forum,ForumName);
|
Txt_Forum,ForumName);
|
||||||
}
|
}
|
||||||
else if (Hie.Crs.Cod > 0)
|
else if (Hie[HieLvl_CRS].Cod > 0)
|
||||||
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
||||||
Txt_Course,Hie.Crs.ShrtName);
|
Txt_Course,Hie[HieLvl_CRS].ShrtName);
|
||||||
else if (Hie.Deg.Cod > 0)
|
else if (Hie[HieLvl_DEG].Cod > 0)
|
||||||
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
||||||
Txt_Degree,Hie.Deg.ShrtName);
|
Txt_Degree,Hie[HieLvl_DEG].ShrtName);
|
||||||
else if (Hie.Ctr.Cod > 0)
|
else if (Hie[HieLvl_CTR].Cod > 0)
|
||||||
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
||||||
Txt_Center,Hie.Ctr.ShrtName);
|
Txt_Center,Hie[HieLvl_CTR].ShrtName);
|
||||||
else if (Hie.Ins.Cod > 0)
|
else if (Hie[HieLvl_INS].Cod > 0)
|
||||||
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
sprintf (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"%s: %s",
|
||||||
Txt_Institution,Hie.Ins.ShrtName);
|
Txt_Institution,Hie[HieLvl_INS].ShrtName);
|
||||||
else
|
else
|
||||||
Str_Copy (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"-",
|
Str_Copy (getNotificationsOut->notificationsArray.__ptr[NumNotif].location,"-",
|
||||||
Ntf_MAX_BYTES_NOTIFY_LOCATION);
|
Ntf_MAX_BYTES_NOTIFY_LOCATION);
|
||||||
|
@ -3029,7 +3029,7 @@ int swad__getNotifications (struct soap *soap,
|
||||||
/* Get summary and content */
|
/* Get summary and content */
|
||||||
ContentStr = NULL;
|
ContentStr = NULL;
|
||||||
Ntf_GetNotifSummaryAndContent (SummaryStr,&ContentStr,NotifyEvent,
|
Ntf_GetNotifSummaryAndContent (SummaryStr,&ContentStr,NotifyEvent,
|
||||||
Cod,Hie.Crs.Cod,Gbl.Usrs.Me.UsrDat.UsrCod,
|
Cod,Hie[HieLvl_CRS].Cod,Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
Length = strlen (SummaryStr);
|
Length = strlen (SummaryStr);
|
||||||
|
|
|
@ -143,12 +143,12 @@ void Adm_DB_RemUsrAsAdmin (long UsrCod)
|
||||||
/********* Remove administrators of an institution, center or degree *********/
|
/********* Remove administrators of an institution, center or degree *********/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Adm_DB_RemAdmins (HieLvl_Level_t Level)
|
void Adm_DB_RemAdmins (HieLvl_Level_t Level,long Cod)
|
||||||
{
|
{
|
||||||
DB_QueryDELETE ("can not remove administrators",
|
DB_QueryDELETE ("can not remove administrators",
|
||||||
"DELETE FROM usr_admins"
|
"DELETE FROM usr_admins"
|
||||||
" WHERE Scope='%s'"
|
" WHERE Scope='%s'"
|
||||||
" AND Cod=%ld",
|
" AND Cod=%ld",
|
||||||
Hie_GetDBStrFromLevel (Level),
|
Hie_GetDBStrFromLevel (Level),
|
||||||
Gbl.Hierarchy.Node[Level].Cod);
|
Cod);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,6 @@ bool Adm_DB_CheckIfUsrIsSuperuser (long UsrCod);
|
||||||
|
|
||||||
void Adm_DB_RemAdmin (long UsrCod,HieLvl_Level_t Level);
|
void Adm_DB_RemAdmin (long UsrCod,HieLvl_Level_t Level);
|
||||||
void Adm_DB_RemUsrAsAdmin (long UsrCod);
|
void Adm_DB_RemUsrAsAdmin (long UsrCod);
|
||||||
void Adm_DB_RemAdmins (HieLvl_Level_t Level);
|
void Adm_DB_RemAdmins (HieLvl_Level_t Level,long Cod);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
187
swad_browser.c
187
swad_browser.c
|
@ -5408,7 +5408,7 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
extern const char *Txt_folder;
|
extern const char *Txt_folder;
|
||||||
extern const char *Txt_link;
|
extern const char *Txt_link;
|
||||||
extern const char *Txt_all_files_inside_the_root_folder;
|
extern const char *Txt_all_files_inside_the_root_folder;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
struct GroupData GrpDat;
|
struct GroupData GrpDat;
|
||||||
struct Prj_Project Prj;
|
struct Prj_Project Prj;
|
||||||
struct Usr_Data UsrDat;
|
struct Usr_Data UsrDat;
|
||||||
|
@ -5430,131 +5430,131 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
switch (Gbl.FileBrowser.Clipboard.FileBrowser)
|
switch (Gbl.FileBrowser.Clipboard.FileBrowser)
|
||||||
{
|
{
|
||||||
case Brw_ADMI_DOC_INS:
|
case Brw_ADMI_DOC_INS:
|
||||||
Hie.Ins.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_INS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_documents_management_area,
|
Txt_documents_management_area,
|
||||||
Txt_institution,Hie.Ins.ShrtName);
|
Txt_institution,Hie[HieLvl_INS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_SHR_INS:
|
case Brw_ADMI_SHR_INS:
|
||||||
Hie.Ins.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_INS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_shared_files_area,
|
Txt_shared_files_area,
|
||||||
Txt_institution,Hie.Ins.ShrtName);
|
Txt_institution,Hie[HieLvl_INS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_DOC_CTR:
|
case Brw_ADMI_DOC_CTR:
|
||||||
Hie.Ctr.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CTR].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_documents_management_area,
|
Txt_documents_management_area,
|
||||||
Txt_center,Hie.Ctr.ShrtName);
|
Txt_center,Hie[HieLvl_CTR].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_SHR_CTR:
|
case Brw_ADMI_SHR_CTR:
|
||||||
Hie.Ctr.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CTR].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_shared_files_area,
|
Txt_shared_files_area,
|
||||||
Txt_center,Hie.Ctr.ShrtName);
|
Txt_center,Hie[HieLvl_CTR].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_DOC_DEG:
|
case Brw_ADMI_DOC_DEG:
|
||||||
Hie.Deg.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_DEG].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_documents_management_area,
|
Txt_documents_management_area,
|
||||||
Txt_degree,Hie.Deg.ShrtName);
|
Txt_degree,Hie[HieLvl_DEG].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_SHR_DEG:
|
case Brw_ADMI_SHR_DEG:
|
||||||
Hie.Deg.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_DEG].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_shared_files_area,
|
Txt_shared_files_area,
|
||||||
Txt_degree,Hie.Deg.ShrtName);
|
Txt_degree,Hie[HieLvl_DEG].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_DOC_CRS:
|
case Brw_ADMI_DOC_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_documents_management_area,
|
Txt_documents_management_area,
|
||||||
Txt_course,Hie.Crs.ShrtName);
|
Txt_course,Hie[HieLvl_CRS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_DOC_GRP:
|
case Brw_ADMI_DOC_GRP:
|
||||||
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Grp_GetGroupDataByCod (&GrpDat);
|
Grp_GetGroupDataByCod (&GrpDat);
|
||||||
Hie.Crs.Cod = GrpDat.CrsCod;
|
Hie[HieLvl_CRS].Cod = GrpDat.CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
||||||
Txt_documents_management_area,
|
Txt_documents_management_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_TCH_CRS:
|
case Brw_ADMI_TCH_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_teachers_files_area,
|
Txt_teachers_files_area,
|
||||||
Txt_course,Hie.Crs.ShrtName);
|
Txt_course,Hie[HieLvl_CRS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_TCH_GRP:
|
case Brw_ADMI_TCH_GRP:
|
||||||
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Grp_GetGroupDataByCod (&GrpDat);
|
Grp_GetGroupDataByCod (&GrpDat);
|
||||||
Hie.Crs.Cod = GrpDat.CrsCod;
|
Hie[HieLvl_CRS].Cod = GrpDat.CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
||||||
Txt_teachers_files_area,
|
Txt_teachers_files_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_SHR_CRS:
|
case Brw_ADMI_SHR_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_shared_files_area,
|
Txt_shared_files_area,
|
||||||
Txt_course,Hie.Crs.ShrtName);
|
Txt_course,Hie[HieLvl_CRS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_SHR_GRP:
|
case Brw_ADMI_SHR_GRP:
|
||||||
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Grp_GetGroupDataByCod (&GrpDat);
|
Grp_GetGroupDataByCod (&GrpDat);
|
||||||
Hie.Crs.Cod = GrpDat.CrsCod;
|
Hie[HieLvl_CRS].Cod = GrpDat.CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
||||||
Txt_shared_files_area,
|
Txt_shared_files_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_ASG_USR:
|
case Brw_ADMI_ASG_USR:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
||||||
Txt_assignments_area,
|
Txt_assignments_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_user[Gbl.Usrs.Me.UsrDat.Sex],Gbl.Usrs.Me.UsrDat.FullName);
|
Txt_user[Gbl.Usrs.Me.UsrDat.Sex],Gbl.Usrs.Me.UsrDat.FullName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_WRK_USR:
|
case Brw_ADMI_WRK_USR:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
||||||
Txt_works_area,
|
Txt_works_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_user[Gbl.Usrs.Me.UsrDat.Sex],Gbl.Usrs.Me.UsrDat.FullName);
|
Txt_user[Gbl.Usrs.Me.UsrDat.Sex],Gbl.Usrs.Me.UsrDat.FullName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_ASG_CRS:
|
case Brw_ADMI_ASG_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
UsrDat.UsrCod = Gbl.FileBrowser.Clipboard.WorksUsrCod;
|
UsrDat.UsrCod = Gbl.FileBrowser.Clipboard.WorksUsrCod;
|
||||||
Usr_GetAllUsrDataFromUsrCod (&UsrDat,
|
Usr_GetAllUsrDataFromUsrCod (&UsrDat,
|
||||||
|
@ -5563,13 +5563,13 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
||||||
Txt_assignments_area,
|
Txt_assignments_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_user[UsrDat.Sex],UsrDat.FullName);
|
Txt_user[UsrDat.Sex],UsrDat.FullName);
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_WRK_CRS:
|
case Brw_ADMI_WRK_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
UsrDat.UsrCod = Gbl.FileBrowser.Clipboard.WorksUsrCod;
|
UsrDat.UsrCod = Gbl.FileBrowser.Clipboard.WorksUsrCod;
|
||||||
Usr_GetAllUsrDataFromUsrCod (&UsrDat,
|
Usr_GetAllUsrDataFromUsrCod (&UsrDat,
|
||||||
|
@ -5578,7 +5578,7 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
||||||
Txt_works_area,
|
Txt_works_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_user[UsrDat.Sex],UsrDat.FullName);
|
Txt_user[UsrDat.Sex],UsrDat.FullName);
|
||||||
Usr_UsrDataDestructor (&UsrDat);
|
Usr_UsrDataDestructor (&UsrDat);
|
||||||
break;
|
break;
|
||||||
|
@ -5587,33 +5587,33 @@ static void Brw_WriteCurrentClipboard (void)
|
||||||
Prj_AllocMemProject (&Prj);
|
Prj_AllocMemProject (&Prj);
|
||||||
Prj.PrjCod = Gbl.FileBrowser.Clipboard.Cod;
|
Prj.PrjCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Prj_GetProjectDataByCod (&Prj);
|
Prj_GetProjectDataByCod (&Prj);
|
||||||
Hie.Crs.Cod = Prj.CrsCod;
|
Hie[HieLvl_CRS].Cod = Prj.CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s</strong>",
|
||||||
Gbl.FileBrowser.Clipboard.FileBrowser == Brw_ADMI_DOC_PRJ ? Txt_project_documents :
|
Gbl.FileBrowser.Clipboard.FileBrowser == Brw_ADMI_DOC_PRJ ? Txt_project_documents :
|
||||||
Txt_project_assessment,
|
Txt_project_assessment,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_project,Prj.Title);
|
Txt_project,Prj.Title);
|
||||||
Prj_FreeMemProject (&Prj);
|
Prj_FreeMemProject (&Prj);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_MRK_CRS:
|
case Brw_ADMI_MRK_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>",
|
"%s, %s <strong>%s</strong>",
|
||||||
Txt_marks_management_area,
|
Txt_marks_management_area,
|
||||||
Txt_course,Hie.Crs.ShrtName);
|
Txt_course,Hie[HieLvl_CRS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_MRK_GRP:
|
case Brw_ADMI_MRK_GRP:
|
||||||
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Grp_GetGroupDataByCod (&GrpDat);
|
Grp_GetGroupDataByCod (&GrpDat);
|
||||||
Hie.Crs.Cod = GrpDat.CrsCod;
|
Hie[HieLvl_CRS].Cod = GrpDat.CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
snprintf (TxtClipboardZone,sizeof (TxtClipboardZone),
|
||||||
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
"%s, %s <strong>%s</strong>, %s <strong>%s %s</strong>",
|
||||||
Txt_marks_management_area,
|
Txt_marks_management_area,
|
||||||
Txt_course,Hie.Crs.ShrtName,
|
Txt_course,Hie[HieLvl_CRS].ShrtName,
|
||||||
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
Txt_group,GrpDat.GrpTypName,GrpDat.GrpName);
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_BRF_USR:
|
case Brw_ADMI_BRF_USR:
|
||||||
|
@ -5966,7 +5966,7 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
extern const char *Txt_Links_copied;
|
extern const char *Txt_Links_copied;
|
||||||
extern const char *Txt_Folders_copied;
|
extern const char *Txt_Folders_copied;
|
||||||
extern const char *Txt_You_can_not_paste_file_or_folder_here;
|
extern const char *Txt_You_can_not_paste_file_or_folder_here;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
struct GroupData GrpDat;
|
struct GroupData GrpDat;
|
||||||
struct Usr_Data UsrDat;
|
struct Usr_Data UsrDat;
|
||||||
long PrjCod;
|
long PrjCod;
|
||||||
|
@ -5987,36 +5987,36 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
{
|
{
|
||||||
case Brw_ADMI_DOC_INS:
|
case Brw_ADMI_DOC_INS:
|
||||||
case Brw_ADMI_SHR_INS:
|
case Brw_ADMI_SHR_INS:
|
||||||
Hie.Ins.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_INS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Ins_GetInstitDataByCod (&Hie.Ins))
|
if (Ins_GetInstitDataByCod (&Hie[HieLvl_INS]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%02u/%u/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%02u/%u/%s",
|
||||||
Cfg_PATH_INS_PRIVATE,
|
Cfg_PATH_INS_PRIVATE,
|
||||||
(unsigned) (Hie.Ins.Cod % 100),
|
(unsigned) (Hie[HieLvl_INS].Cod % 100),
|
||||||
(unsigned) Hie.Ins.Cod,
|
(unsigned) Hie[HieLvl_INS].Cod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
else
|
else
|
||||||
Err_WrongCopySrcExit ();
|
Err_WrongCopySrcExit ();
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_DOC_CTR:
|
case Brw_ADMI_DOC_CTR:
|
||||||
case Brw_ADMI_SHR_CTR:
|
case Brw_ADMI_SHR_CTR:
|
||||||
Hie.Ctr.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CTR].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Ctr_GetCenterDataByCod (&Hie.Ctr))
|
if (Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%02u/%u/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%02u/%u/%s",
|
||||||
Cfg_PATH_CTR_PRIVATE,
|
Cfg_PATH_CTR_PRIVATE,
|
||||||
(unsigned) (Hie.Ctr.Cod % 100),
|
(unsigned) (Hie[HieLvl_CTR].Cod % 100),
|
||||||
(unsigned) Hie.Ctr.Cod,
|
(unsigned) Hie[HieLvl_CTR].Cod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
else
|
else
|
||||||
Err_WrongCopySrcExit ();
|
Err_WrongCopySrcExit ();
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_DOC_DEG:
|
case Brw_ADMI_DOC_DEG:
|
||||||
case Brw_ADMI_SHR_DEG:
|
case Brw_ADMI_SHR_DEG:
|
||||||
Hie.Deg.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_DEG].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Deg_GetDegreeDataByCod (&Hie.Deg))
|
if (Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%02u/%u/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%02u/%u/%s",
|
||||||
Cfg_PATH_DEG_PRIVATE,
|
Cfg_PATH_DEG_PRIVATE,
|
||||||
(unsigned) (Hie.Deg.Cod % 100),
|
(unsigned) (Hie[HieLvl_DEG].Cod % 100),
|
||||||
(unsigned) Hie.Deg.Cod,
|
(unsigned) Hie[HieLvl_DEG].Cod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
else
|
else
|
||||||
Err_WrongCopySrcExit ();
|
Err_WrongCopySrcExit ();
|
||||||
|
@ -6025,10 +6025,10 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
case Brw_ADMI_TCH_CRS:
|
case Brw_ADMI_TCH_CRS:
|
||||||
case Brw_ADMI_SHR_CRS:
|
case Brw_ADMI_SHR_CRS:
|
||||||
case Brw_ADMI_MRK_CRS:
|
case Brw_ADMI_MRK_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Crs_GetCourseDataByCod (&Hie.Crs))
|
if (Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s",
|
||||||
Cfg_PATH_CRS_PRIVATE,Hie.Crs.Cod,
|
Cfg_PATH_CRS_PRIVATE,Hie[HieLvl_CRS].Cod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
else
|
else
|
||||||
Err_WrongCopySrcExit ();
|
Err_WrongCopySrcExit ();
|
||||||
|
@ -6039,10 +6039,10 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
case Brw_ADMI_MRK_GRP:
|
case Brw_ADMI_MRK_GRP:
|
||||||
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
GrpDat.GrpCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Grp_GetGroupDataByCod (&GrpDat);
|
Grp_GetGroupDataByCod (&GrpDat);
|
||||||
Hie.Crs.Cod = GrpDat.CrsCod;
|
Hie[HieLvl_CRS].Cod = GrpDat.CrsCod;
|
||||||
if (Crs_GetCourseDataByCod (&Hie.Crs))
|
if (Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%ld/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%ld/%s",
|
||||||
Cfg_PATH_CRS_PRIVATE,Hie.Crs.Cod,Cfg_FOLDER_GRP,
|
Cfg_PATH_CRS_PRIVATE,Hie[HieLvl_CRS].Cod,Cfg_FOLDER_GRP,
|
||||||
GrpDat.GrpCod,
|
GrpDat.GrpCod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
else
|
else
|
||||||
|
@ -6050,8 +6050,8 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_ASG_CRS:
|
case Brw_ADMI_ASG_CRS:
|
||||||
case Brw_ADMI_WRK_CRS:
|
case Brw_ADMI_WRK_CRS:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Crs_GetCourseDataByCod (&Hie.Crs))
|
if (Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
{
|
{
|
||||||
Usr_UsrDataConstructor (&UsrDat);
|
Usr_UsrDataConstructor (&UsrDat);
|
||||||
if (Usr_DB_ChkIfUsrCodExists (Gbl.FileBrowser.Clipboard.WorksUsrCod))
|
if (Usr_DB_ChkIfUsrCodExists (Gbl.FileBrowser.Clipboard.WorksUsrCod))
|
||||||
|
@ -6061,7 +6061,7 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
Usr_DONT_GET_PREFS,
|
Usr_DONT_GET_PREFS,
|
||||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); // Check that user exists
|
Usr_DONT_GET_ROLE_IN_CURRENT_CRS); // Check that user exists
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%02u/%ld/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%02u/%ld/%s",
|
||||||
Cfg_PATH_CRS_PRIVATE,Hie.Crs.Cod,Cfg_FOLDER_USR,
|
Cfg_PATH_CRS_PRIVATE,Hie[HieLvl_CRS].Cod,Cfg_FOLDER_USR,
|
||||||
(unsigned) (Gbl.FileBrowser.Clipboard.WorksUsrCod % 100),
|
(unsigned) (Gbl.FileBrowser.Clipboard.WorksUsrCod % 100),
|
||||||
Gbl.FileBrowser.Clipboard.WorksUsrCod,
|
Gbl.FileBrowser.Clipboard.WorksUsrCod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
|
@ -6072,10 +6072,10 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
break;
|
break;
|
||||||
case Brw_ADMI_ASG_USR:
|
case Brw_ADMI_ASG_USR:
|
||||||
case Brw_ADMI_WRK_USR:
|
case Brw_ADMI_WRK_USR:
|
||||||
Hie.Crs.Cod = Gbl.FileBrowser.Clipboard.Cod;
|
Hie[HieLvl_CRS].Cod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
if (Crs_GetCourseDataByCod (&Hie.Crs))
|
if (Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%02u/%ld/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%02u/%ld/%s",
|
||||||
Cfg_PATH_CRS_PRIVATE,Hie.Crs.Cod,Cfg_FOLDER_USR,
|
Cfg_PATH_CRS_PRIVATE,Hie[HieLvl_CRS].Cod,Cfg_FOLDER_USR,
|
||||||
(unsigned) (Gbl.Usrs.Me.UsrDat.UsrCod % 100),
|
(unsigned) (Gbl.Usrs.Me.UsrDat.UsrCod % 100),
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
|
@ -6085,10 +6085,10 @@ static void Brw_PasteClipboard (struct BrwSiz_BrowserSize *Size)
|
||||||
case Brw_ADMI_DOC_PRJ:
|
case Brw_ADMI_DOC_PRJ:
|
||||||
case Brw_ADMI_ASS_PRJ:
|
case Brw_ADMI_ASS_PRJ:
|
||||||
PrjCod = Gbl.FileBrowser.Clipboard.Cod;
|
PrjCod = Gbl.FileBrowser.Clipboard.Cod;
|
||||||
Hie.Crs.Cod = Prj_DB_GetCrsOfPrj (PrjCod);
|
Hie[HieLvl_CRS].Cod = Prj_DB_GetCrsOfPrj (PrjCod);
|
||||||
if (Crs_GetCourseDataByCod (&Hie.Crs))
|
if (Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%02u/%ld/%s",
|
snprintf (PathOrg,sizeof (PathOrg),"%s/%ld/%s/%02u/%ld/%s",
|
||||||
Cfg_PATH_CRS_PRIVATE,Hie.Crs.Cod,Cfg_FOLDER_PRJ,
|
Cfg_PATH_CRS_PRIVATE,Hie[HieLvl_CRS].Cod,Cfg_FOLDER_PRJ,
|
||||||
(unsigned) (PrjCod % 100),
|
(unsigned) (PrjCod % 100),
|
||||||
PrjCod,
|
PrjCod,
|
||||||
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
Gbl.FileBrowser.Clipboard.FilFolLnk.Full);
|
||||||
|
@ -9542,7 +9542,10 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
||||||
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (InsShortName),
|
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (InsShortName),
|
||||||
"class=\"LT BT_LINK\"");
|
"class=\"LT BT_LINK\"");
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
Lgo_DrawLogo (HieLvl_INS,InsCod,InsShortName,20,"BT_LINK LT");
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
InsCod,
|
||||||
|
InsShortName,
|
||||||
|
20,"BT_LINK LT");
|
||||||
HTM_TxtF (" %s",InsShortName);
|
HTM_TxtF (" %s",InsShortName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -9559,7 +9562,10 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
||||||
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (CtrShortName),
|
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (CtrShortName),
|
||||||
"class=\"LT BT_LINK\"");
|
"class=\"LT BT_LINK\"");
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
Lgo_DrawLogo (HieLvl_CTR,CtrCod,CtrShortName,20,"LT");
|
Lgo_DrawLogo (HieLvl_CTR,
|
||||||
|
CtrCod,
|
||||||
|
CtrShortName,
|
||||||
|
20,"LT");
|
||||||
HTM_TxtF (" %s",CtrShortName);
|
HTM_TxtF (" %s",CtrShortName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
@ -9576,7 +9582,10 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
|
||||||
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (DegShortName),
|
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (DegShortName),
|
||||||
"class=\"LT BT_LINK\"");
|
"class=\"LT BT_LINK\"");
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
Lgo_DrawLogo (HieLvl_DEG,DegCod,DegShortName,20,"LT");
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
DegCod,
|
||||||
|
DegShortName,
|
||||||
|
20,"LT");
|
||||||
HTM_TxtF (" %s",DegShortName);
|
HTM_TxtF (" %s",DegShortName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
|
@ -956,7 +956,10 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
|
||||||
if (TypeViewCallForExam == Cfe_NORMAL_VIEW)
|
if (TypeViewCallForExam == Cfe_NORMAL_VIEW)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"EXAM_TIT_%s\"",
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\" class=\"EXAM_TIT_%s\"",
|
||||||
Ins.WWW,The_GetSuffix ());
|
Ins.WWW,The_GetSuffix ());
|
||||||
Lgo_DrawLogo (HieLvl_INS,Ins.Cod,Ins.FullName,64,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Ins.Cod,
|
||||||
|
Ins.FullName,
|
||||||
|
64,NULL);
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
HTM_Txt (Ins.FullName);
|
HTM_Txt (Ins.FullName);
|
||||||
if (TypeViewCallForExam == Cfe_NORMAL_VIEW)
|
if (TypeViewCallForExam == Cfe_NORMAL_VIEW)
|
||||||
|
@ -1609,20 +1612,20 @@ static void Cfe_GetNotifContentCallForExam (const struct Cfe_CallsForExams *Call
|
||||||
extern const char *Txt_CALL_FOR_EXAM_Material_allowed;
|
extern const char *Txt_CALL_FOR_EXAM_Material_allowed;
|
||||||
extern const char *Txt_CALL_FOR_EXAM_Other_information;
|
extern const char *Txt_CALL_FOR_EXAM_Other_information;
|
||||||
extern const char *Txt_hours_ABBREVIATION;
|
extern const char *Txt_hours_ABBREVIATION;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
char StrExamDate[Cns_MAX_BYTES_DATE + 1];
|
char StrExamDate[Cns_MAX_BYTES_DATE + 1];
|
||||||
|
|
||||||
/***** Get data of course *****/
|
/***** Get data of course *****/
|
||||||
Hie.Crs.Cod = CallsForExams->CallForExam.CrsCod;
|
Hie[HieLvl_CRS].Cod = CallsForExams->CallForExam.CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
|
|
||||||
/***** Get data of degree *****/
|
/***** Get data of degree *****/
|
||||||
Hie.Deg.Cod = Hie.Crs.PrtCod;
|
Hie[HieLvl_DEG].Cod = Hie[HieLvl_CRS].PrtCod;
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Hie.Ins.Cod = Deg_DB_GetInsCodOfDegreeByCod (Hie.Deg.Cod);
|
Hie[HieLvl_INS].Cod = Deg_DB_GetInsCodOfDegreeByCod (Hie[HieLvl_DEG].Cod);
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
|
|
||||||
/***** Convert struct date to a date string *****/
|
/***** Convert struct date to a date string *****/
|
||||||
Dat_ConvDateToDateStr (&CallsForExams->CallForExam.ExamDate,StrExamDate);
|
Dat_ConvDateToDateStr (&CallsForExams->CallForExam.ExamDate,StrExamDate);
|
||||||
|
@ -1643,8 +1646,8 @@ static void Cfe_GetNotifContentCallForExam (const struct Cfe_CallsForExams *Call
|
||||||
"%s: %s<br />"
|
"%s: %s<br />"
|
||||||
"%s: %s<br />"
|
"%s: %s<br />"
|
||||||
"%s: %s",
|
"%s: %s",
|
||||||
Txt_Institution,Hie.Ins.FullName,
|
Txt_Institution,Hie[HieLvl_INS].FullName,
|
||||||
Txt_Degree,Hie.Deg.FullName,
|
Txt_Degree,Hie[HieLvl_DEG].FullName,
|
||||||
Txt_CALL_FOR_EXAM_Course,CallsForExams->CallForExam.CrsFullName,
|
Txt_CALL_FOR_EXAM_Course,CallsForExams->CallForExam.CrsFullName,
|
||||||
Txt_CALL_FOR_EXAM_Year_or_semester,Txt_YEAR_OF_DEGREE[CallsForExams->CallForExam.Year],
|
Txt_CALL_FOR_EXAM_Year_or_semester,Txt_YEAR_OF_DEGREE[CallsForExams->CallForExam.Year],
|
||||||
Txt_CALL_FOR_EXAM_Session,CallsForExams->CallForExam.Session,
|
Txt_CALL_FOR_EXAM_Session,CallsForExams->CallForExam.Session,
|
||||||
|
|
|
@ -201,7 +201,10 @@ void Ctr_DrawCenterLogoAndNameWithLink (struct Hie_Node *Ctr,Act_Action_t Action
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
|
|
||||||
/***** Center logo and name *****/
|
/***** Center logo and name *****/
|
||||||
Lgo_DrawLogo (HieLvl_CTR,Ctr->Cod,Ctr->ShrtName,16,ClassLogo);
|
Lgo_DrawLogo (HieLvl_CTR,
|
||||||
|
Ctr->Cod,
|
||||||
|
Ctr->ShrtName,
|
||||||
|
16,ClassLogo);
|
||||||
HTM_TxtF (" %s",Ctr->FullName);
|
HTM_TxtF (" %s",Ctr->FullName);
|
||||||
|
|
||||||
/***** End link *****/
|
/***** End link *****/
|
||||||
|
@ -797,7 +800,10 @@ static void Ctr_ListCentersForEdition (const struct Plc_Places *Places)
|
||||||
|
|
||||||
/* Center logo */
|
/* Center logo */
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr->FullName);
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr->FullName);
|
||||||
Lgo_DrawLogo (HieLvl_CTR,Ctr->Cod,Ctr->ShrtName,20,NULL);
|
Lgo_DrawLogo (HieLvl_CTR,
|
||||||
|
Ctr->Cod,
|
||||||
|
Ctr->ShrtName,
|
||||||
|
20,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Place */
|
/* Place */
|
||||||
|
@ -1295,7 +1301,10 @@ static void Ctr_PutFormToCreateCenter (const struct Plc_Places *Places)
|
||||||
|
|
||||||
/***** Center logo *****/
|
/***** Center logo *****/
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr_EditingCtr->FullName);
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ctr_EditingCtr->FullName);
|
||||||
Lgo_DrawLogo (HieLvl_CTR,-1L,"",20,NULL);
|
Lgo_DrawLogo (HieLvl_CTR,
|
||||||
|
-1L,
|
||||||
|
"",
|
||||||
|
20,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Place *****/
|
/***** Place *****/
|
||||||
|
|
|
@ -632,10 +632,11 @@ TODO: Francisco Javier Fern
|
||||||
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
Me sale este error, no sé si por no recordar yo la sintaxis apropiada para mandar a varios destinatarios. ¿No era así?
|
||||||
"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.9.1 (2023-09-19)"
|
#define Log_PLATFORM_VERSION "SWAD 23.9.2 (2023-09-19)"
|
||||||
#define CSS_FILE "swad22.120.4.css"
|
#define CSS_FILE "swad22.120.4.css"
|
||||||
#define JS_FILE "swad22.49.js"
|
#define JS_FILE "swad22.49.js"
|
||||||
/*
|
/*
|
||||||
|
Version 23.9.2: Sep 19, 2023 Code refactoring in hierarchy. (337600 lines)
|
||||||
Version 23.9.1: Sep 19, 2023 Code refactoring in hierarchy and admins. (337521 lines)
|
Version 23.9.1: Sep 19, 2023 Code refactoring in hierarchy and admins. (337521 lines)
|
||||||
Version 23.9: Sep 19, 2023 Code refactoring in hierarchy. (337589 lines)
|
Version 23.9: Sep 19, 2023 Code refactoring in hierarchy. (337589 lines)
|
||||||
Version 23.8: Sep 18, 2023 Code refactoring in hierarchy. (337625 lines)
|
Version 23.8: Sep 18, 2023 Code refactoring in hierarchy. (337625 lines)
|
||||||
|
|
|
@ -187,7 +187,10 @@ void Cht_ShowListOfAvailableChatRooms (void)
|
||||||
snprintf (ThisRoomFullName,sizeof (ThisRoomFullName),"%s %s",
|
snprintf (ThisRoomFullName,sizeof (ThisRoomFullName),"%s %s",
|
||||||
Txt_Degree,Deg.ShrtName);
|
Txt_Degree,Deg.ShrtName);
|
||||||
Cht_WriteLinkToChat1 (ThisRoomCode,ThisRoomShrtName,ThisRoomFullName,1,IsLastItemInLevel);
|
Cht_WriteLinkToChat1 (ThisRoomCode,ThisRoomShrtName,ThisRoomFullName,1,IsLastItemInLevel);
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Deg.Cod,Deg.ShrtName,16,NULL);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
Deg.Cod,
|
||||||
|
Deg.ShrtName,
|
||||||
|
16,NULL);
|
||||||
Cht_WriteLinkToChat2 (ThisRoomCode,ThisRoomFullName);
|
Cht_WriteLinkToChat2 (ThisRoomCode,ThisRoomFullName);
|
||||||
|
|
||||||
/* Get my courses in this degree from database */
|
/* Get my courses in this degree from database */
|
||||||
|
|
|
@ -153,7 +153,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
extern const char *Hlp_PROFILE_Courses;
|
extern const char *Hlp_PROFILE_Courses;
|
||||||
extern const char *Txt_My_courses;
|
extern const char *Txt_My_courses;
|
||||||
extern const char *Txt_System;
|
extern const char *Txt_System;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
bool IsLastItemInLevel[1 + 6];
|
bool IsLastItemInLevel[1 + 6];
|
||||||
bool Highlight; // Highlight because degree, course, etc. is selected
|
bool Highlight; // Highlight because degree, course, etc. is selected
|
||||||
MYSQL_RES *mysql_resCty;
|
MYSQL_RES *mysql_resCty;
|
||||||
|
@ -208,24 +208,24 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
row = mysql_fetch_row (mysql_resCty);
|
row = mysql_fetch_row (mysql_resCty);
|
||||||
|
|
||||||
/***** Get data of this institution *****/
|
/***** Get data of this institution *****/
|
||||||
Hie.Cty.Cod = Str_ConvertStrCodToLongCod (row[0]);
|
Hie[HieLvl_CTY].Cod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Cty_GetBasicCountryDataByCod (&Hie.Cty))
|
if (!Cty_GetBasicCountryDataByCod (&Hie[HieLvl_CTY]))
|
||||||
Err_WrongCountrExit ();
|
Err_WrongCountrExit ();
|
||||||
|
|
||||||
/***** Write link to country *****/
|
/***** Write link to country *****/
|
||||||
Highlight = (Gbl.Hierarchy.Node[HieLvl_INS].Cod <= 0 &&
|
Highlight = (Gbl.Hierarchy.Node[HieLvl_INS].Cod <= 0 &&
|
||||||
Gbl.Hierarchy.Node[HieLvl_CTY].Cod == Hie.Cty.Cod);
|
Gbl.Hierarchy.Node[HieLvl_CTY].Cod == Hie[HieLvl_CTY].Cod);
|
||||||
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
||||||
NULL);
|
NULL);
|
||||||
IsLastItemInLevel[2] = (NumCty == NumCtys - 1);
|
IsLastItemInLevel[2] = (NumCty == NumCtys - 1);
|
||||||
Lay_IndentDependingOnLevel (2,IsLastItemInLevel);
|
Lay_IndentDependingOnLevel (2,IsLastItemInLevel);
|
||||||
Frm_BeginForm (ActMyCrs);
|
Frm_BeginForm (ActMyCrs);
|
||||||
ParCod_PutPar (ParCod_Cty,Hie.Cty.Cod);
|
ParCod_PutPar (ParCod_Cty,Hie[HieLvl_CTY].Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtyInf),
|
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtyInf),
|
||||||
"class=\"BT_LINK FORM_IN_%s\"",
|
"class=\"BT_LINK FORM_IN_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Cty_DrawCountryMap (&Hie.Cty,"ICO16x16");
|
Cty_DrawCountryMap (&Hie[HieLvl_CTY],"ICO16x16");
|
||||||
HTM_TxtF (" %s",Hie.Cty.FullName);
|
HTM_TxtF (" %s",Hie[HieLvl_CTY].FullName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
|
@ -233,7 +233,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
/***** Get my institutions in this country *****/
|
/***** Get my institutions in this country *****/
|
||||||
NumInss = Ins_DB_GetInssFromUsr (&mysql_resIns,
|
NumInss = Ins_DB_GetInssFromUsr (&mysql_resIns,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
Hie.Cty.Cod);
|
Hie[HieLvl_CTY].Cod);
|
||||||
for (NumIns = 0;
|
for (NumIns = 0;
|
||||||
NumIns < NumInss;
|
NumIns < NumInss;
|
||||||
NumIns++)
|
NumIns++)
|
||||||
|
@ -242,24 +242,27 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
row = mysql_fetch_row (mysql_resIns);
|
row = mysql_fetch_row (mysql_resIns);
|
||||||
|
|
||||||
/***** Get data of this institution *****/
|
/***** Get data of this institution *****/
|
||||||
Hie.Ins.Cod = Str_ConvertStrCodToLongCod (row[0]);
|
Hie[HieLvl_INS].Cod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Ins_GetInstitDataByCod (&Hie.Ins))
|
if (!Ins_GetInstitDataByCod (&Hie[HieLvl_INS]))
|
||||||
Err_WrongInstitExit ();
|
Err_WrongInstitExit ();
|
||||||
|
|
||||||
/***** Write link to institution *****/
|
/***** Write link to institution *****/
|
||||||
Highlight = (Gbl.Hierarchy.Node[HieLvl_CTR].Cod <= 0 &&
|
Highlight = (Gbl.Hierarchy.Node[HieLvl_CTR].Cod <= 0 &&
|
||||||
Gbl.Hierarchy.Node[HieLvl_INS].Cod == Hie.Ins.Cod);
|
Gbl.Hierarchy.Node[HieLvl_INS].Cod == Hie[HieLvl_INS].Cod);
|
||||||
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
||||||
NULL);
|
NULL);
|
||||||
IsLastItemInLevel[3] = (NumIns == NumInss - 1);
|
IsLastItemInLevel[3] = (NumIns == NumInss - 1);
|
||||||
Lay_IndentDependingOnLevel (3,IsLastItemInLevel);
|
Lay_IndentDependingOnLevel (3,IsLastItemInLevel);
|
||||||
Frm_BeginForm (ActMyCrs);
|
Frm_BeginForm (ActMyCrs);
|
||||||
ParCod_PutPar (ParCod_Ins,Hie.Ins.Cod);
|
ParCod_PutPar (ParCod_Ins,Hie[HieLvl_INS].Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeInsInf),
|
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeInsInf),
|
||||||
"class=\"BT_LINK FORM_IN_%s\"",
|
"class=\"BT_LINK FORM_IN_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Lgo_DrawLogo (HieLvl_INS,Hie.Ins.Cod,Hie.Ins.ShrtName,16,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
HTM_TxtF (" %s",Hie.Ins.ShrtName);
|
Hie[HieLvl_INS].Cod,
|
||||||
|
Hie[HieLvl_INS].ShrtName,
|
||||||
|
16,NULL);
|
||||||
|
HTM_TxtF (" %s",Hie[HieLvl_INS].ShrtName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
|
@ -267,7 +270,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
/***** Get my centers in this institution *****/
|
/***** Get my centers in this institution *****/
|
||||||
NumCtrs = Ctr_DB_GetCtrsFromUsr (&mysql_resCtr,
|
NumCtrs = Ctr_DB_GetCtrsFromUsr (&mysql_resCtr,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
Hie.Ins.Cod);
|
Hie[HieLvl_INS].Cod);
|
||||||
for (NumCtr = 0;
|
for (NumCtr = 0;
|
||||||
NumCtr < NumCtrs;
|
NumCtr < NumCtrs;
|
||||||
NumCtr++)
|
NumCtr++)
|
||||||
|
@ -276,24 +279,27 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
row = mysql_fetch_row (mysql_resCtr);
|
row = mysql_fetch_row (mysql_resCtr);
|
||||||
|
|
||||||
/***** Get data of this center *****/
|
/***** Get data of this center *****/
|
||||||
Hie.Ctr.Cod = Str_ConvertStrCodToLongCod (row[0]);
|
Hie[HieLvl_CTR].Cod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Ctr_GetCenterDataByCod (&Hie.Ctr))
|
if (!Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]))
|
||||||
Err_WrongCenterExit ();
|
Err_WrongCenterExit ();
|
||||||
|
|
||||||
/***** Write link to center *****/
|
/***** Write link to center *****/
|
||||||
Highlight = (Gbl.Hierarchy.Level == HieLvl_CTR &&
|
Highlight = (Gbl.Hierarchy.Level == HieLvl_CTR &&
|
||||||
Gbl.Hierarchy.Node[HieLvl_CTR].Cod == Hie.Ctr.Cod);
|
Gbl.Hierarchy.Node[HieLvl_CTR].Cod == Hie[HieLvl_CTR].Cod);
|
||||||
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
||||||
NULL);
|
NULL);
|
||||||
IsLastItemInLevel[4] = (NumCtr == NumCtrs - 1);
|
IsLastItemInLevel[4] = (NumCtr == NumCtrs - 1);
|
||||||
Lay_IndentDependingOnLevel (4,IsLastItemInLevel);
|
Lay_IndentDependingOnLevel (4,IsLastItemInLevel);
|
||||||
Frm_BeginForm (ActMyCrs);
|
Frm_BeginForm (ActMyCrs);
|
||||||
ParCod_PutPar (ParCod_Ctr,Hie.Ctr.Cod);
|
ParCod_PutPar (ParCod_Ctr,Hie[HieLvl_CTR].Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtrInf),
|
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtrInf),
|
||||||
"class=\"BT_LINK FORM_IN_%s\"",
|
"class=\"BT_LINK FORM_IN_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Lgo_DrawLogo (HieLvl_CTR,Hie.Ctr.Cod,Hie.Ctr.ShrtName,16,NULL);
|
Lgo_DrawLogo (HieLvl_CTR,
|
||||||
HTM_TxtF (" %s",Hie.Ctr.ShrtName);
|
Hie[HieLvl_CTR].Cod,
|
||||||
|
Hie[HieLvl_CTR].ShrtName,
|
||||||
|
16,NULL);
|
||||||
|
HTM_TxtF (" %s",Hie[HieLvl_CTR].ShrtName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
|
@ -301,7 +307,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
/***** Get my degrees in this center *****/
|
/***** Get my degrees in this center *****/
|
||||||
NumDegs = Deg_DB_GetDegsFromUsr (&mysql_resDeg,
|
NumDegs = Deg_DB_GetDegsFromUsr (&mysql_resDeg,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
Hie.Ctr.Cod);
|
Hie[HieLvl_CTR].Cod);
|
||||||
for (NumDeg = 0;
|
for (NumDeg = 0;
|
||||||
NumDeg < NumDegs;
|
NumDeg < NumDegs;
|
||||||
NumDeg++)
|
NumDeg++)
|
||||||
|
@ -310,24 +316,27 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
row = mysql_fetch_row (mysql_resDeg);
|
row = mysql_fetch_row (mysql_resDeg);
|
||||||
|
|
||||||
/***** Get data of this degree *****/
|
/***** Get data of this degree *****/
|
||||||
Hie.Deg.Cod = Str_ConvertStrCodToLongCod (row[0]);
|
Hie[HieLvl_DEG].Cod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Deg_GetDegreeDataByCod (&Hie.Deg))
|
if (!Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]))
|
||||||
Err_WrongDegreeExit ();
|
Err_WrongDegreeExit ();
|
||||||
|
|
||||||
/***** Write link to degree *****/
|
/***** Write link to degree *****/
|
||||||
Highlight = (Gbl.Hierarchy.Level == HieLvl_DEG &&
|
Highlight = (Gbl.Hierarchy.Level == HieLvl_DEG &&
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].Cod == Hie.Deg.Cod);
|
Gbl.Hierarchy.Node[HieLvl_DEG].Cod == Hie[HieLvl_DEG].Cod);
|
||||||
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
||||||
NULL);
|
NULL);
|
||||||
IsLastItemInLevel[5] = (NumDeg == NumDegs - 1);
|
IsLastItemInLevel[5] = (NumDeg == NumDegs - 1);
|
||||||
Lay_IndentDependingOnLevel (5,IsLastItemInLevel);
|
Lay_IndentDependingOnLevel (5,IsLastItemInLevel);
|
||||||
Frm_BeginForm (ActMyCrs);
|
Frm_BeginForm (ActMyCrs);
|
||||||
ParCod_PutPar (ParCod_Deg,Hie.Deg.Cod);
|
ParCod_PutPar (ParCod_Deg,Hie[HieLvl_DEG].Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeDegInf),
|
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeDegInf),
|
||||||
"class=\"BT_LINK FORM_IN_%s\"",
|
"class=\"BT_LINK FORM_IN_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Hie.Deg.Cod,Hie.Deg.ShrtName,16,NULL);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
HTM_TxtF (" %s",Hie.Deg.ShrtName);
|
Hie[HieLvl_DEG].Cod,
|
||||||
|
Hie[HieLvl_DEG].ShrtName,
|
||||||
|
16,NULL);
|
||||||
|
HTM_TxtF (" %s",Hie[HieLvl_DEG].ShrtName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
|
@ -335,7 +344,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
/***** Get my courses in this degree *****/
|
/***** Get my courses in this degree *****/
|
||||||
NumCrss = Crs_DB_GetCrssFromUsr (&mysql_resCrs,
|
NumCrss = Crs_DB_GetCrssFromUsr (&mysql_resCrs,
|
||||||
Gbl.Usrs.Me.UsrDat.UsrCod,
|
Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
Hie.Deg.Cod);
|
Hie[HieLvl_DEG].Cod);
|
||||||
for (NumCrs = 0;
|
for (NumCrs = 0;
|
||||||
NumCrs < NumCrss;
|
NumCrs < NumCrss;
|
||||||
NumCrs++)
|
NumCrs++)
|
||||||
|
@ -344,30 +353,30 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
|
||||||
row = mysql_fetch_row (mysql_resCrs);
|
row = mysql_fetch_row (mysql_resCrs);
|
||||||
|
|
||||||
/***** Get data of this course *****/
|
/***** Get data of this course *****/
|
||||||
Hie.Crs.Cod = Str_ConvertStrCodToLongCod (row[0]);
|
Hie[HieLvl_CRS].Cod = Str_ConvertStrCodToLongCod (row[0]);
|
||||||
if (!Crs_GetCourseDataByCod (&Hie.Crs))
|
if (!Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
Err_WrongCourseExit ();
|
Err_WrongCourseExit ();
|
||||||
|
|
||||||
/***** Write link to course *****/
|
/***** Write link to course *****/
|
||||||
Highlight = (Gbl.Hierarchy.Level == HieLvl_CRS &&
|
Highlight = (Gbl.Hierarchy.Level == HieLvl_CRS &&
|
||||||
Gbl.Hierarchy.Node[HieLvl_CRS].Cod == Hie.Crs.Cod);
|
Gbl.Hierarchy.Node[HieLvl_CRS].Cod == Hie[HieLvl_CRS].Cod);
|
||||||
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
|
||||||
NULL);
|
NULL);
|
||||||
IsLastItemInLevel[6] = (NumCrs == NumCrss - 1);
|
IsLastItemInLevel[6] = (NumCrs == NumCrss - 1);
|
||||||
Lay_IndentDependingOnLevel (6,IsLastItemInLevel);
|
Lay_IndentDependingOnLevel (6,IsLastItemInLevel);
|
||||||
Frm_BeginForm (ActMyCrs);
|
Frm_BeginForm (ActMyCrs);
|
||||||
ParCod_PutPar (ParCod_Crs,Hie.Crs.Cod);
|
ParCod_PutPar (ParCod_Crs,Hie[HieLvl_CRS].Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Hie.Crs.ShrtName),
|
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Hie[HieLvl_CRS].ShrtName),
|
||||||
"class=\"BT_LINK FORM_IN_%s\"",
|
"class=\"BT_LINK FORM_IN_%s\"",
|
||||||
The_GetSuffix ());
|
The_GetSuffix ());
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
Ico_PutIcon ("chalkboard-teacher.svg",Ico_BLACK,Hie.Crs.FullName,"ICO16x16");
|
Ico_PutIcon ("chalkboard-teacher.svg",Ico_BLACK,Hie[HieLvl_CRS].FullName,"ICO16x16");
|
||||||
HTM_TxtF (" %s",Hie.Crs.ShrtName);
|
HTM_TxtF (" %s",Hie[HieLvl_CRS].ShrtName);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
||||||
/***** Put link to register students *****/
|
/***** Put link to register students *****/
|
||||||
Enr_PutButtonInlineToRegisterStds (Hie.Crs.Cod);
|
Enr_PutButtonInlineToRegisterStds (Hie[HieLvl_CRS].Cod);
|
||||||
|
|
||||||
HTM_LI_End ();
|
HTM_LI_End ();
|
||||||
}
|
}
|
||||||
|
@ -2419,7 +2428,10 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
|
||||||
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (row[2]),
|
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (row[2]),
|
||||||
"class=\"LT BT_LINK\"");
|
"class=\"LT BT_LINK\"");
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Deg.Cod,Deg.ShrtName,20,"CT");
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
Deg.Cod,
|
||||||
|
Deg.ShrtName,
|
||||||
|
20,"CT");
|
||||||
HTM_TxtF (" %s (%s)",row[2],row[6]);
|
HTM_TxtF (" %s (%s)",row[2],row[6]);
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
Frm_EndForm ();
|
Frm_EndForm ();
|
||||||
|
|
|
@ -203,7 +203,10 @@ void Deg_DrawDegreeLogoAndNameWithLink (struct Hie_Node *Deg,Act_Action_t Action
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
|
|
||||||
/***** Degree logo and name *****/
|
/***** Degree logo and name *****/
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Deg->Cod,Deg->ShrtName,16,ClassLogo);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
Deg->Cod,
|
||||||
|
Deg->ShrtName,
|
||||||
|
16,ClassLogo);
|
||||||
HTM_TxtF (" %s",Deg->FullName);
|
HTM_TxtF (" %s",Deg->FullName);
|
||||||
|
|
||||||
/***** End link *****/
|
/***** End link *****/
|
||||||
|
@ -367,7 +370,10 @@ static void Deg_ListDegreesForEdition (const struct DegTyp_DegTypes *DegTypes)
|
||||||
|
|
||||||
/* Degree logo */
|
/* Degree logo */
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",DegInLst->FullName);
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",DegInLst->FullName);
|
||||||
Lgo_DrawLogo (HieLvl_DEG,DegInLst->Cod,DegInLst->ShrtName,20,NULL);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
DegInLst->Cod,
|
||||||
|
DegInLst->ShrtName
|
||||||
|
,20,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Degree short name */
|
/* Degree short name */
|
||||||
|
@ -546,7 +552,10 @@ static void Deg_PutFormToCreateDegree (const struct DegTyp_DegTypes *DegTypes)
|
||||||
|
|
||||||
/***** Degree logo *****/
|
/***** Degree logo *****/
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Deg_EditingDeg->FullName);
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Deg_EditingDeg->FullName);
|
||||||
Lgo_DrawLogo (HieLvl_DEG,-1L,"",20,NULL);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
-1L,
|
||||||
|
"",
|
||||||
|
20,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Degree short name *****/
|
/***** Degree short name *****/
|
||||||
|
|
65
swad_forum.c
65
swad_forum.c
|
@ -1775,15 +1775,24 @@ static void For_WriteLinkToForum (const struct For_Forums *Forums,
|
||||||
break;
|
break;
|
||||||
case For_FORUM_INSTIT_USRS:
|
case For_FORUM_INSTIT_USRS:
|
||||||
case For_FORUM_INSTIT_TCHS:
|
case For_FORUM_INSTIT_TCHS:
|
||||||
Lgo_DrawLogo (HieLvl_INS,Forum->HieCod,ForumName,16,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Forum->HieCod,
|
||||||
|
ForumName,
|
||||||
|
16,NULL);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_CENTER_USRS:
|
case For_FORUM_CENTER_USRS:
|
||||||
case For_FORUM_CENTER_TCHS:
|
case For_FORUM_CENTER_TCHS:
|
||||||
Lgo_DrawLogo (HieLvl_CTR,Forum->HieCod,ForumName,16,NULL);
|
Lgo_DrawLogo (HieLvl_CTR,
|
||||||
|
Forum->HieCod,
|
||||||
|
ForumName,
|
||||||
|
16,NULL);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_DEGREE_USRS:
|
case For_FORUM_DEGREE_USRS:
|
||||||
case For_FORUM_DEGREE_TCHS:
|
case For_FORUM_DEGREE_TCHS:
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Forum->HieCod,ForumName,16,NULL);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
Forum->HieCod,
|
||||||
|
ForumName,
|
||||||
|
16,NULL);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_COURSE_USRS:
|
case For_FORUM_COURSE_USRS:
|
||||||
case For_FORUM_COURSE_TCHS:
|
case For_FORUM_COURSE_TCHS:
|
||||||
|
@ -1823,7 +1832,7 @@ void For_SetForumName (const struct For_Forum *Forum,
|
||||||
extern const char *Txt_only_teachers;
|
extern const char *Txt_only_teachers;
|
||||||
extern const char *Txt_only_teachers_NO_HTML[1 + Lan_NUM_LANGUAGES];
|
extern const char *Txt_only_teachers_NO_HTML[1 + Lan_NUM_LANGUAGES];
|
||||||
extern const char *Txt_Unknown_FORUM;
|
extern const char *Txt_Unknown_FORUM;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
|
|
||||||
switch (Forum->Type)
|
switch (Forum->Type)
|
||||||
{
|
{
|
||||||
|
@ -1849,62 +1858,62 @@ void For_SetForumName (const struct For_Forum *Forum,
|
||||||
Txt_only_teachers_NO_HTML[Language]);
|
Txt_only_teachers_NO_HTML[Language]);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_INSTIT_USRS:
|
case For_FORUM_INSTIT_USRS:
|
||||||
Hie.Ins.Cod = Forum->HieCod;
|
Hie[HieLvl_INS].Cod = Forum->HieCod;
|
||||||
if (!Ins_GetInstitDataByCod (&Hie.Ins))
|
if (!Ins_GetInstitDataByCod (&Hie[HieLvl_INS]))
|
||||||
Err_WrongInstitExit ();
|
Err_WrongInstitExit ();
|
||||||
Str_Copy (ForumName,Hie.Ins.ShrtName,For_MAX_BYTES_FORUM_NAME);
|
Str_Copy (ForumName,Hie[HieLvl_INS].ShrtName,For_MAX_BYTES_FORUM_NAME);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_INSTIT_TCHS:
|
case For_FORUM_INSTIT_TCHS:
|
||||||
Hie.Ins.Cod = Forum->HieCod;
|
Hie[HieLvl_INS].Cod = Forum->HieCod;
|
||||||
if (!Ins_GetInstitDataByCod (&Hie.Ins))
|
if (!Ins_GetInstitDataByCod (&Hie[HieLvl_INS]))
|
||||||
Err_WrongInstitExit ();
|
Err_WrongInstitExit ();
|
||||||
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
||||||
Hie.Ins.ShrtName,
|
Hie[HieLvl_INS].ShrtName,
|
||||||
UseHTMLEntities ? Txt_only_teachers :
|
UseHTMLEntities ? Txt_only_teachers :
|
||||||
Txt_only_teachers_NO_HTML[Language]);
|
Txt_only_teachers_NO_HTML[Language]);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_CENTER_USRS:
|
case For_FORUM_CENTER_USRS:
|
||||||
Hie.Ctr.Cod = Forum->HieCod;
|
Hie[HieLvl_CTR].Cod = Forum->HieCod;
|
||||||
if (!Ctr_GetCenterDataByCod (&Hie.Ctr))
|
if (!Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]))
|
||||||
Err_WrongCenterExit ();
|
Err_WrongCenterExit ();
|
||||||
Str_Copy (ForumName,Hie.Ctr.ShrtName,For_MAX_BYTES_FORUM_NAME);
|
Str_Copy (ForumName,Hie[HieLvl_CTR].ShrtName,For_MAX_BYTES_FORUM_NAME);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_CENTER_TCHS:
|
case For_FORUM_CENTER_TCHS:
|
||||||
Hie.Ctr.Cod = Forum->HieCod;
|
Hie[HieLvl_CTR].Cod = Forum->HieCod;
|
||||||
if (!Ctr_GetCenterDataByCod (&Hie.Ctr))
|
if (!Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]))
|
||||||
Err_WrongCenterExit ();
|
Err_WrongCenterExit ();
|
||||||
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
||||||
Hie.Ctr.ShrtName,
|
Hie[HieLvl_CTR].ShrtName,
|
||||||
UseHTMLEntities ? Txt_only_teachers :
|
UseHTMLEntities ? Txt_only_teachers :
|
||||||
Txt_only_teachers_NO_HTML[Language]);
|
Txt_only_teachers_NO_HTML[Language]);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_DEGREE_USRS:
|
case For_FORUM_DEGREE_USRS:
|
||||||
Hie.Deg.Cod = Forum->HieCod;
|
Hie[HieLvl_DEG].Cod = Forum->HieCod;
|
||||||
if (!Deg_GetDegreeDataByCod (&Hie.Deg))
|
if (!Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]))
|
||||||
Err_WrongDegreeExit ();
|
Err_WrongDegreeExit ();
|
||||||
Str_Copy (ForumName,Hie.Deg.ShrtName,For_MAX_BYTES_FORUM_NAME);
|
Str_Copy (ForumName,Hie[HieLvl_DEG].ShrtName,For_MAX_BYTES_FORUM_NAME);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_DEGREE_TCHS:
|
case For_FORUM_DEGREE_TCHS:
|
||||||
Hie.Deg.Cod = Forum->HieCod;
|
Hie[HieLvl_DEG].Cod = Forum->HieCod;
|
||||||
if (!Deg_GetDegreeDataByCod (&Hie.Deg))
|
if (!Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]))
|
||||||
Err_WrongDegreeExit ();
|
Err_WrongDegreeExit ();
|
||||||
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
||||||
Hie.Deg.ShrtName,
|
Hie[HieLvl_DEG].ShrtName,
|
||||||
UseHTMLEntities ? Txt_only_teachers :
|
UseHTMLEntities ? Txt_only_teachers :
|
||||||
Txt_only_teachers_NO_HTML[Language]);
|
Txt_only_teachers_NO_HTML[Language]);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_COURSE_USRS:
|
case For_FORUM_COURSE_USRS:
|
||||||
Hie.Crs.Cod = Forum->HieCod;
|
Hie[HieLvl_CRS].Cod = Forum->HieCod;
|
||||||
if (!Crs_GetCourseDataByCod (&Hie.Crs))
|
if (!Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
Err_WrongCourseExit ();
|
Err_WrongCourseExit ();
|
||||||
Str_Copy (ForumName,Hie.Crs.ShrtName,For_MAX_BYTES_FORUM_NAME);
|
Str_Copy (ForumName,Hie[HieLvl_CRS].ShrtName,For_MAX_BYTES_FORUM_NAME);
|
||||||
break;
|
break;
|
||||||
case For_FORUM_COURSE_TCHS:
|
case For_FORUM_COURSE_TCHS:
|
||||||
Hie.Crs.Cod = Forum->HieCod;
|
Hie[HieLvl_CRS].Cod = Forum->HieCod;
|
||||||
if (!Crs_GetCourseDataByCod (&Hie.Crs))
|
if (!Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]))
|
||||||
Err_WrongCourseExit ();
|
Err_WrongCourseExit ();
|
||||||
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
snprintf (ForumName,For_MAX_BYTES_FORUM_NAME + 1,"%s%s",
|
||||||
Hie.Crs.ShrtName,
|
Hie[HieLvl_CRS].ShrtName,
|
||||||
UseHTMLEntities ? Txt_only_teachers :
|
UseHTMLEntities ? Txt_only_teachers :
|
||||||
Txt_only_teachers_NO_HTML[Language]);
|
Txt_only_teachers_NO_HTML[Language]);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -508,7 +508,8 @@ static void Hie_DrawLogo (const char *ShrtText)
|
||||||
default:
|
default:
|
||||||
Lgo_DrawLogo (LogoScope[Gbl.Hierarchy.Level],
|
Lgo_DrawLogo (LogoScope[Gbl.Hierarchy.Level],
|
||||||
*LogoCode[Gbl.Hierarchy.Level],
|
*LogoCode[Gbl.Hierarchy.Level],
|
||||||
ShrtText,40,"TOP_LOGO");
|
ShrtText,
|
||||||
|
40,"TOP_LOGO");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -676,7 +677,7 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan)
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
unsigned NumRow;
|
unsigned NumRow;
|
||||||
unsigned NumRows;
|
unsigned NumRows;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
|
|
||||||
/***** Get institutions, centers, degrees admin by user from database *****/
|
/***** Get institutions, centers, degrees admin by user from database *****/
|
||||||
NumRows = Hie_DB_GetInsCtrDegAdminBy (&mysql_res,UsrCod);
|
NumRows = Hie_DB_GetInsCtrDegAdminBy (&mysql_res,UsrCod);
|
||||||
|
@ -713,33 +714,33 @@ void Hie_GetAndWriteInsCtrDegAdminBy (long UsrCod,unsigned ColSpan)
|
||||||
HTM_TxtF (" %s",Txt_all_degrees);
|
HTM_TxtF (" %s",Txt_all_degrees);
|
||||||
break;
|
break;
|
||||||
case HieLvl_INS: // Institution
|
case HieLvl_INS: // Institution
|
||||||
if ((Hie.Ins.Cod = Str_ConvertStrCodToLongCod (row[1])) > 0)
|
if ((Hie[HieLvl_INS].Cod = Str_ConvertStrCodToLongCod (row[1])) > 0)
|
||||||
{
|
{
|
||||||
/* Get data of institution */
|
/* Get data of institution */
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
|
|
||||||
/* Write institution logo and name */
|
/* Write institution logo and name */
|
||||||
Ins_DrawInstitLogoAndNameWithLink (&Hie.Ins,ActSeeInsInf,"LT");
|
Ins_DrawInstitLogoAndNameWithLink (&Hie[HieLvl_INS],ActSeeInsInf,"LT");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HieLvl_CTR: // Center
|
case HieLvl_CTR: // Center
|
||||||
if ((Hie.Ctr.Cod = Str_ConvertStrCodToLongCod (row[1])) > 0)
|
if ((Hie[HieLvl_CTR].Cod = Str_ConvertStrCodToLongCod (row[1])) > 0)
|
||||||
{
|
{
|
||||||
/* Get data of center */
|
/* Get data of center */
|
||||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
|
|
||||||
/* Write center logo and name */
|
/* Write center logo and name */
|
||||||
Ctr_DrawCenterLogoAndNameWithLink (&Hie.Ctr,ActSeeCtrInf,"LT");
|
Ctr_DrawCenterLogoAndNameWithLink (&Hie[HieLvl_CTR],ActSeeCtrInf,"LT");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case HieLvl_DEG: // Degree
|
case HieLvl_DEG: // Degree
|
||||||
if ((Hie.Deg.Cod = Str_ConvertStrCodToLongCod (row[1])) > 0)
|
if ((Hie[HieLvl_DEG].Cod = Str_ConvertStrCodToLongCod (row[1])) > 0)
|
||||||
{
|
{
|
||||||
/* Get data of degree */
|
/* Get data of degree */
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
|
|
||||||
/* Write degree logo and name */
|
/* Write degree logo and name */
|
||||||
Deg_DrawDegreeLogoAndNameWithLink (&Hie.Deg,ActSeeDegInf,"LT");
|
Deg_DrawDegreeLogoAndNameWithLink (&Hie[HieLvl_DEG],ActSeeDegInf,"LT");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: // There are no administrators in other scopes
|
default: // There are no administrators in other scopes
|
||||||
|
|
|
@ -33,19 +33,6 @@
|
||||||
#include "swad_degree.h"
|
#include "swad_degree.h"
|
||||||
#include "swad_institution.h"
|
#include "swad_institution.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/******************************* Public types ********************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
struct Hie_Hierarchy
|
|
||||||
{
|
|
||||||
struct Hie_Node Cty;
|
|
||||||
struct Hie_Node Ins;
|
|
||||||
struct Hie_Node Ctr;
|
|
||||||
struct Hie_Node Deg;
|
|
||||||
struct Hie_Node Crs;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -67,7 +67,10 @@ void HieCfg_Title (bool PutLink,
|
||||||
LogoWWW,LogoFullName,The_GetSuffix ());
|
LogoWWW,LogoFullName,The_GetSuffix ());
|
||||||
|
|
||||||
/* Logo and name */
|
/* Logo and name */
|
||||||
Lgo_DrawLogo (LogoScope,LogoCod,LogoShrtName,64,NULL);
|
Lgo_DrawLogo (LogoScope,
|
||||||
|
LogoCod,
|
||||||
|
LogoShrtName,
|
||||||
|
64,NULL);
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
HTM_Txt (TextFullName);
|
HTM_Txt (TextFullName);
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,10 @@ void Ins_DrawInstitutionLogoWithLink (struct Hie_Node *Ins,unsigned Size)
|
||||||
ParCod_PutPar (ParCod_Ins,Ins->Cod);
|
ParCod_PutPar (ParCod_Ins,Ins->Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
|
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
|
||||||
}
|
}
|
||||||
Lgo_DrawLogo (HieLvl_INS,Ins->Cod,Ins->FullName,Size,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Ins->Cod,
|
||||||
|
Ins->FullName,
|
||||||
|
Size,NULL);
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
{
|
{
|
||||||
HTM_BUTTON_End ();
|
HTM_BUTTON_End ();
|
||||||
|
@ -240,7 +243,10 @@ void Ins_DrawInstitLogoAndNameWithLink (struct Hie_Node *Ins,Act_Action_t Action
|
||||||
Str_FreeGoToTitle ();
|
Str_FreeGoToTitle ();
|
||||||
|
|
||||||
/***** Institution logo and name *****/
|
/***** Institution logo and name *****/
|
||||||
Lgo_DrawLogo (HieLvl_INS,Ins->Cod,Ins->ShrtName,16,ClassLogo);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Ins->Cod,
|
||||||
|
Ins->ShrtName,
|
||||||
|
16,ClassLogo);
|
||||||
HTM_TxtF (" %s",Ins->FullName);
|
HTM_TxtF (" %s",Ins->FullName);
|
||||||
|
|
||||||
/***** End link *****/
|
/***** End link *****/
|
||||||
|
@ -935,7 +941,10 @@ static void Ins_ListInstitutionsForEdition (void)
|
||||||
|
|
||||||
/* Institution logo */
|
/* Institution logo */
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins->FullName);
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins->FullName);
|
||||||
Lgo_DrawLogo (HieLvl_INS,Ins->Cod,Ins->ShrtName,20,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Ins->Cod,
|
||||||
|
Ins->ShrtName,
|
||||||
|
20,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/* Institution short name */
|
/* Institution short name */
|
||||||
|
@ -1380,7 +1389,10 @@ static void Ins_PutFormToCreateInstitution (void)
|
||||||
|
|
||||||
/***** Institution logo *****/
|
/***** Institution logo *****/
|
||||||
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins_EditingIns->FullName);
|
HTM_TD_Begin ("title=\"%s\" class=\"HIE_LOGO\"",Ins_EditingIns->FullName);
|
||||||
Lgo_DrawLogo (HieLvl_INS,-1L,"",20,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
-1L,
|
||||||
|
"",
|
||||||
|
20,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
/***** Institution short name *****/
|
/***** Institution short name *****/
|
||||||
|
@ -2253,7 +2265,9 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
|
||||||
"class=\"LM BT_LINK\"");
|
"class=\"LM BT_LINK\"");
|
||||||
if (Gbl.Usrs.Listing.WithPhotos)
|
if (Gbl.Usrs.Listing.WithPhotos)
|
||||||
{
|
{
|
||||||
Lgo_DrawLogo (HieLvl_INS,Ins.Cod,Ins.ShrtName,
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Ins.Cod,
|
||||||
|
Ins.ShrtName,
|
||||||
40,NULL);
|
40,NULL);
|
||||||
HTM_NBSP ();
|
HTM_NBSP ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1466,19 +1466,19 @@ static void Lay_WriteFootFromHTMLFile (void)
|
||||||
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
long InsCod,long DegCod,long CrsCod)
|
long InsCod,long DegCod,long CrsCod)
|
||||||
{
|
{
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
|
|
||||||
/***** Get data of institution *****/
|
/***** Get data of institution *****/
|
||||||
Hie.Ins.Cod = InsCod;
|
Hie[HieLvl_INS].Cod = InsCod;
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
|
|
||||||
/***** Get data of degree *****/
|
/***** Get data of degree *****/
|
||||||
Hie.Deg.Cod = DegCod;
|
Hie[HieLvl_DEG].Cod = DegCod;
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
|
|
||||||
/***** Get data of course *****/
|
/***** Get data of course *****/
|
||||||
Hie.Crs.Cod = CrsCod;
|
Hie[HieLvl_CRS].Cod = CrsCod;
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
|
|
||||||
/***** Begin table *****/
|
/***** Begin table *****/
|
||||||
HTM_TABLE_BeginWidePadding (10);
|
HTM_TABLE_BeginWidePadding (10);
|
||||||
|
@ -1490,8 +1490,11 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
if (InsCod > 0)
|
if (InsCod > 0)
|
||||||
{
|
{
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Hie.Ins.WWW);
|
HTM_A_Begin ("href=\"%s\" target=\"_blank\"",Hie[HieLvl_INS].WWW);
|
||||||
Lgo_DrawLogo (HieLvl_INS,Hie.Ins.Cod,Hie.Ins.ShrtName,40,NULL);
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Hie[HieLvl_INS].Cod,
|
||||||
|
Hie[HieLvl_INS].ShrtName,
|
||||||
|
40,NULL);
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
|
@ -1505,27 +1508,27 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
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.Ins.WWW,The_GetSuffix ());
|
Hie[HieLvl_INS].WWW,The_GetSuffix ());
|
||||||
HTM_Txt (Hie.Ins.FullName);
|
HTM_Txt (Hie[HieLvl_INS].FullName);
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
if (DegCod > 0)
|
if (DegCod > 0)
|
||||||
{
|
{
|
||||||
if (Hie.Ins.Cod > 0)
|
if (Hie[HieLvl_INS].Cod > 0)
|
||||||
HTM_Txt (" - ");
|
HTM_Txt (" - ");
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
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.Deg.WWW,The_GetSuffix ());
|
Hie[HieLvl_DEG].WWW,The_GetSuffix ());
|
||||||
HTM_Txt (Hie.Deg.FullName);
|
HTM_Txt (Hie[HieLvl_DEG].FullName);
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
if (CrsCod > 0)
|
if (CrsCod > 0)
|
||||||
{
|
{
|
||||||
HTM_Txt (Hie.Crs.FullName);
|
HTM_Txt (Hie[HieLvl_CRS].FullName);
|
||||||
if (DrawingClassPhoto && !Gbl.Usrs.ClassPhoto.AllGroups)
|
if (DrawingClassPhoto && !Gbl.Usrs.ClassPhoto.AllGroups)
|
||||||
{
|
{
|
||||||
HTM_BR ();
|
HTM_BR ();
|
||||||
|
@ -1541,8 +1544,11 @@ void Lay_WriteHeaderClassPhoto (bool PrintView,bool DrawingClassPhoto,
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
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.Deg.WWW,The_GetSuffix ());
|
Hie[HieLvl_DEG].WWW,The_GetSuffix ());
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Hie.Deg.Cod,Hie.Deg.ShrtName,40,NULL);
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
Hie[HieLvl_DEG].Cod,
|
||||||
|
Hie[HieLvl_DEG].ShrtName,
|
||||||
|
40,NULL);
|
||||||
if (!PrintView)
|
if (!PrintView)
|
||||||
HTM_A_End ();
|
HTM_A_End ();
|
||||||
}
|
}
|
||||||
|
|
28
swad_log.c
28
swad_log.c
|
@ -204,7 +204,7 @@ void Log_GetAndShowLastClicks (void)
|
||||||
Act_Action_t Action;
|
Act_Action_t Action;
|
||||||
const char *ClassRow;
|
const char *ClassRow;
|
||||||
time_t TimeDiff;
|
time_t TimeDiff;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
|
|
||||||
/***** Get last clicks from database *****/
|
/***** Get last clicks from database *****/
|
||||||
NumClicks = Log_DB_GetLastClicks (&mysql_res);
|
NumClicks = Log_DB_GetLastClicks (&mysql_res);
|
||||||
|
@ -247,19 +247,19 @@ void Log_GetAndShowLastClicks (void)
|
||||||
TimeDiff = (time_t) 0;
|
TimeDiff = (time_t) 0;
|
||||||
|
|
||||||
/* Get country code (row[4]) */
|
/* Get country code (row[4]) */
|
||||||
Hie.Cty.Cod = Str_ConvertStrCodToLongCod (row[4]);
|
Hie[HieLvl_CTY].Cod = Str_ConvertStrCodToLongCod (row[4]);
|
||||||
Cty_GetCountryNameInLanguage (Hie.Cty.Cod,Gbl.Prefs.Language,
|
Cty_GetCountryNameInLanguage (Hie[HieLvl_CTY].Cod,Gbl.Prefs.Language,
|
||||||
Hie.Cty.FullName);
|
Hie[HieLvl_CTY].FullName);
|
||||||
|
|
||||||
/* Get institution code (row[5]),
|
/* Get institution code (row[5]),
|
||||||
center code (row[6])
|
center code (row[6])
|
||||||
and degree code (row[7]) */
|
and degree code (row[7]) */
|
||||||
Hie.Ins.Cod = Str_ConvertStrCodToLongCod (row[5]);
|
Hie[HieLvl_INS].Cod = Str_ConvertStrCodToLongCod (row[5]);
|
||||||
Hie.Ctr.Cod = Str_ConvertStrCodToLongCod (row[6]);
|
Hie[HieLvl_CTR].Cod = Str_ConvertStrCodToLongCod (row[6]);
|
||||||
Hie.Deg.Cod = Str_ConvertStrCodToLongCod (row[7]);
|
Hie[HieLvl_DEG].Cod = Str_ConvertStrCodToLongCod (row[7]);
|
||||||
Ins_DB_GetInsShrtName (Hie.Ins.Cod,Hie.Ins.ShrtName);
|
Ins_DB_GetInsShrtName (Hie[HieLvl_INS].Cod,Hie[HieLvl_INS].ShrtName);
|
||||||
Ctr_DB_GetShortNameOfCenterByCod (Hie.Ctr.Cod,Hie.Ctr.ShrtName);
|
Ctr_DB_GetShortNameOfCenterByCod (Hie[HieLvl_CTR].Cod,Hie[HieLvl_CTR].ShrtName);
|
||||||
Deg_DB_GetShortNameOfDegreeByCod (Hie.Deg.Cod,Hie.Deg.ShrtName);
|
Deg_DB_GetShortNameOfDegreeByCod (Hie[HieLvl_DEG].Cod,Hie[HieLvl_DEG].ShrtName);
|
||||||
|
|
||||||
/* Print table row */
|
/* Print table row */
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
@ -281,22 +281,22 @@ void Log_GetAndShowLastClicks (void)
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LC_CTY %s_%s\"",
|
HTM_TD_Begin ("class=\"LC_CTY %s_%s\"",
|
||||||
ClassRow,The_GetSuffix ());
|
ClassRow,The_GetSuffix ());
|
||||||
HTM_Txt (Hie.Cty.FullName); // Country
|
HTM_Txt (Hie[HieLvl_CTY].FullName); // Country
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LC_INS %s_%s\"",
|
HTM_TD_Begin ("class=\"LC_INS %s_%s\"",
|
||||||
ClassRow,The_GetSuffix ());
|
ClassRow,The_GetSuffix ());
|
||||||
HTM_Txt (Hie.Ins.ShrtName); // Institution
|
HTM_Txt (Hie[HieLvl_INS].ShrtName); // Institution
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LC_CTR %s_%s\"",
|
HTM_TD_Begin ("class=\"LC_CTR %s_%s\"",
|
||||||
ClassRow,The_GetSuffix ());
|
ClassRow,The_GetSuffix ());
|
||||||
HTM_Txt (Hie.Ctr.ShrtName); // Center
|
HTM_Txt (Hie[HieLvl_CTR].ShrtName); // Center
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LC_DEG %s_%s\"",
|
HTM_TD_Begin ("class=\"LC_DEG %s_%s\"",
|
||||||
ClassRow,The_GetSuffix ());
|
ClassRow,The_GetSuffix ());
|
||||||
HTM_Txt (Hie.Deg.ShrtName); // Degree
|
HTM_Txt (Hie[HieLvl_DEG].ShrtName); // Degree
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LC_ACT %s_%s\"",
|
HTM_TD_Begin ("class=\"LC_ACT %s_%s\"",
|
||||||
|
|
|
@ -62,7 +62,9 @@ static void Lgo_PutIconToRemoveLogo (Act_Action_t ActionRem);
|
||||||
/***************** Draw institution, center or degree logo *******************/
|
/***************** Draw institution, center or degree logo *******************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Lgo_DrawLogo (HieLvl_Level_t Level,long HieCod,const char *AltText,
|
void Lgo_DrawLogo (HieLvl_Level_t Level,
|
||||||
|
long HieCod,
|
||||||
|
const char *AltText,
|
||||||
unsigned Size,const char *Class)
|
unsigned Size,const char *Class)
|
||||||
{
|
{
|
||||||
static const char *HieIcon[HieLvl_NUM_LEVELS] =
|
static const char *HieIcon[HieLvl_NUM_LEVELS] =
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
/***************************** Public prototypes *****************************/
|
/***************************** Public prototypes *****************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
void Lgo_DrawLogo (HieLvl_Level_t Level,long HieCod,const char *AltText,
|
void Lgo_DrawLogo (HieLvl_Level_t Level,
|
||||||
|
long HieCod,
|
||||||
|
const char *AltText,
|
||||||
unsigned Size,const char *Class);
|
unsigned Size,const char *Class);
|
||||||
void Lgo_PutIconToChangeLogo (HieLvl_Level_t Level);
|
void Lgo_PutIconToChangeLogo (HieLvl_Level_t Level);
|
||||||
void Lgo_RequestLogo (HieLvl_Level_t Level);
|
void Lgo_RequestLogo (HieLvl_Level_t Level);
|
||||||
|
|
|
@ -340,7 +340,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
bool AllNotifications;
|
bool AllNotifications;
|
||||||
Ntf_NotifyEvent_t NotifyEvent = (Ntf_NotifyEvent_t) 0; // Initialized to avoid warning
|
Ntf_NotifyEvent_t NotifyEvent = (Ntf_NotifyEvent_t) 0; // Initialized to avoid warning
|
||||||
struct Usr_Data UsrDat;
|
struct Usr_Data UsrDat;
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
long Cod;
|
long Cod;
|
||||||
struct For_Forums Forums;
|
struct For_Forums Forums;
|
||||||
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
||||||
|
@ -419,20 +419,20 @@ void Ntf_ShowMyNotifications (void)
|
||||||
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
|
Usr_DONT_GET_ROLE_IN_CURRENT_CRS);
|
||||||
|
|
||||||
/* Get institution code (row[2]) */
|
/* Get institution code (row[2]) */
|
||||||
Hie.Ins.Cod = Str_ConvertStrCodToLongCod (row[2]);
|
Hie[HieLvl_INS].Cod = Str_ConvertStrCodToLongCod (row[2]);
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
|
|
||||||
/* Get center code (row[3]) */
|
/* Get center code (row[3]) */
|
||||||
Hie.Ctr.Cod = Str_ConvertStrCodToLongCod (row[3]);
|
Hie[HieLvl_CTR].Cod = Str_ConvertStrCodToLongCod (row[3]);
|
||||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
|
|
||||||
/* Get degree code (row[4]) */
|
/* Get degree code (row[4]) */
|
||||||
Hie.Deg.Cod = Str_ConvertStrCodToLongCod (row[4]);
|
Hie[HieLvl_DEG].Cod = Str_ConvertStrCodToLongCod (row[4]);
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
|
|
||||||
/* Get course code (row[5]) */
|
/* Get course code (row[5]) */
|
||||||
Hie.Crs.Cod = Str_ConvertStrCodToLongCod (row[5]);
|
Hie[HieLvl_CRS].Cod = Str_ConvertStrCodToLongCod (row[5]);
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
|
|
||||||
/* Get message/post/... code (row[6]) */
|
/* Get message/post/... code (row[6]) */
|
||||||
Cod = Str_ConvertStrCodToLongCod (row[6]);
|
Cod = Str_ConvertStrCodToLongCod (row[6]);
|
||||||
|
@ -488,7 +488,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
ClassBg,The_GetSuffix ());
|
ClassBg,The_GetSuffix ());
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
{
|
{
|
||||||
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.Cod,&UsrDat,Cod,&Forums);
|
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie[HieLvl_CRS].Cod,&UsrDat,Cod,&Forums);
|
||||||
PutLink = Frm_CheckIfInside ();
|
PutLink = Frm_CheckIfInside ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
HTM_TD_Begin ("class=\"LT %s_%s\"",ClassBg,The_GetSuffix ());
|
HTM_TD_Begin ("class=\"LT %s_%s\"",ClassBg,The_GetSuffix ());
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
{
|
{
|
||||||
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.Cod,&UsrDat,Cod,&Forums);
|
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie[HieLvl_CRS].Cod,&UsrDat,Cod,&Forums);
|
||||||
PutLink = Frm_CheckIfInside ();
|
PutLink = Frm_CheckIfInside ();
|
||||||
|
|
||||||
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
|
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
|
||||||
|
@ -539,7 +539,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
{
|
{
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
{
|
{
|
||||||
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.Cod,&UsrDat,Cod,&Forums);
|
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie[HieLvl_CRS].Cod,&UsrDat,Cod,&Forums);
|
||||||
PutLink = Frm_CheckIfInside ();
|
PutLink = Frm_CheckIfInside ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,7 +563,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
{
|
{
|
||||||
if (PutLink)
|
if (PutLink)
|
||||||
{
|
{
|
||||||
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie.Crs.Cod,&UsrDat,Cod,&Forums);
|
Action = Ntf_StartFormGoToAction (NotifyEvent,Hie[HieLvl_CRS].Cod,&UsrDat,Cod,&Forums);
|
||||||
PutLink = Frm_CheckIfInside ();
|
PutLink = Frm_CheckIfInside ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,14 +575,14 @@ void Ntf_ShowMyNotifications (void)
|
||||||
HTM_SPAN_Begin ("class=\"%s_%s\"",
|
HTM_SPAN_Begin ("class=\"%s_%s\"",
|
||||||
ClassTxt,The_GetSuffix ());
|
ClassTxt,The_GetSuffix ());
|
||||||
|
|
||||||
if (Hie.Crs.Cod > 0)
|
if (Hie[HieLvl_CRS].Cod > 0)
|
||||||
HTM_TxtF ("%s: %s",Txt_Course,Hie.Crs.ShrtName);
|
HTM_TxtF ("%s: %s",Txt_Course,Hie[HieLvl_CRS].ShrtName);
|
||||||
else if (Hie.Deg.Cod > 0)
|
else if (Hie[HieLvl_DEG].Cod > 0)
|
||||||
HTM_TxtF ("%s: %s",Txt_Degree,Hie.Deg.ShrtName);
|
HTM_TxtF ("%s: %s",Txt_Degree,Hie[HieLvl_DEG].ShrtName);
|
||||||
else if (Hie.Ctr.Cod > 0)
|
else if (Hie[HieLvl_CTR].Cod > 0)
|
||||||
HTM_TxtF ("%s: %s",Txt_Center,Hie.Ctr.ShrtName);
|
HTM_TxtF ("%s: %s",Txt_Center,Hie[HieLvl_CTR].ShrtName);
|
||||||
else if (Hie.Ins.Cod > 0)
|
else if (Hie[HieLvl_INS].Cod > 0)
|
||||||
HTM_TxtF ("%s: %s",Txt_Institution,Hie.Ins.ShrtName);
|
HTM_TxtF ("%s: %s",Txt_Institution,Hie[HieLvl_INS].ShrtName);
|
||||||
else
|
else
|
||||||
HTM_Hyphen ();
|
HTM_Hyphen ();
|
||||||
|
|
||||||
|
@ -614,7 +614,7 @@ void Ntf_ShowMyNotifications (void)
|
||||||
ContentStr = NULL;
|
ContentStr = NULL;
|
||||||
|
|
||||||
Ntf_GetNotifSummaryAndContent (SummaryStr,&ContentStr,NotifyEvent,
|
Ntf_GetNotifSummaryAndContent (SummaryStr,&ContentStr,NotifyEvent,
|
||||||
Cod,Hie.Crs.Cod,Gbl.Usrs.Me.UsrDat.UsrCod,
|
Cod,Hie[HieLvl_CRS].Cod,Gbl.Usrs.Me.UsrDat.UsrCod,
|
||||||
false);
|
false);
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
|
@ -1272,7 +1272,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (const struct Usr_Data *ToUsrDat
|
||||||
Lan_Language_t ToUsrLanguage;
|
Lan_Language_t ToUsrLanguage;
|
||||||
struct Usr_Data FromUsrDat;
|
struct Usr_Data FromUsrDat;
|
||||||
Ntf_NotifyEvent_t NotifyEvent = (Ntf_NotifyEvent_t) 0; // Initialized to avoid warning
|
Ntf_NotifyEvent_t NotifyEvent = (Ntf_NotifyEvent_t) 0; // Initialized to avoid warning
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
long Cod;
|
long Cod;
|
||||||
struct For_Forum ForumSelected;
|
struct For_Forum ForumSelected;
|
||||||
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
||||||
|
@ -1339,16 +1339,16 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (const struct Usr_Data *ToUsrDat
|
||||||
center code (row[3]),
|
center code (row[3]),
|
||||||
degree code (row[4]),
|
degree code (row[4]),
|
||||||
course code (row[5]) */
|
course code (row[5]) */
|
||||||
Hie.Ins.Cod = Str_ConvertStrCodToLongCod (row[2]);
|
Hie[HieLvl_INS].Cod = Str_ConvertStrCodToLongCod (row[2]);
|
||||||
Hie.Ctr.Cod = Str_ConvertStrCodToLongCod (row[3]);
|
Hie[HieLvl_CTR].Cod = Str_ConvertStrCodToLongCod (row[3]);
|
||||||
Hie.Deg.Cod = Str_ConvertStrCodToLongCod (row[4]);
|
Hie[HieLvl_DEG].Cod = Str_ConvertStrCodToLongCod (row[4]);
|
||||||
Hie.Crs.Cod = Str_ConvertStrCodToLongCod (row[5]);
|
Hie[HieLvl_CRS].Cod = Str_ConvertStrCodToLongCod (row[5]);
|
||||||
|
|
||||||
/* Get data of institution, center, degree and course */
|
/* Get data of institution, center, degree and course */
|
||||||
Ins_GetInstitDataByCod (&Hie.Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
Ctr_GetCenterDataByCod (&Hie.Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
Deg_GetDegreeDataByCod (&Hie.Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
Crs_GetCourseDataByCod (&Hie.Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
|
|
||||||
/* Get message/post/... code (row[6]) */
|
/* Get message/post/... code (row[6]) */
|
||||||
Cod = Str_ConvertStrCodToLongCod (row[6]);
|
Cod = Str_ConvertStrCodToLongCod (row[6]);
|
||||||
|
@ -1386,10 +1386,10 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (const struct Usr_Data *ToUsrDat
|
||||||
case Ntf_EVENT_NOTICE:
|
case Ntf_EVENT_NOTICE:
|
||||||
case Ntf_EVENT_MESSAGE:
|
case Ntf_EVENT_MESSAGE:
|
||||||
case Ntf_EVENT_SURVEY:
|
case Ntf_EVENT_SURVEY:
|
||||||
if (Hie.Crs.Cod > 0)
|
if (Hie[HieLvl_CRS].Cod > 0)
|
||||||
fprintf (FileMail,"%s: %s\n",
|
fprintf (FileMail,"%s: %s\n",
|
||||||
Txt_Course_NO_HTML[ToUsrLanguage],
|
Txt_Course_NO_HTML[ToUsrLanguage],
|
||||||
Hie.Crs.FullName);
|
Hie[HieLvl_CRS].FullName);
|
||||||
break;
|
break;
|
||||||
case Ntf_EVENT_FORUM_POST_COURSE:
|
case Ntf_EVENT_FORUM_POST_COURSE:
|
||||||
case Ntf_EVENT_FORUM_REPLY:
|
case Ntf_EVENT_FORUM_REPLY:
|
||||||
|
@ -1440,7 +1440,7 @@ static void Ntf_SendPendingNotifByEMailToOneUsr (const struct Usr_Data *ToUsrDat
|
||||||
*NumMails = 1;
|
*NumMails = 1;
|
||||||
|
|
||||||
/* Update statistics about notifications */
|
/* Update statistics about notifications */
|
||||||
Ntf_UpdateNumNotifSent (Hie.Deg.Cod,Hie.Crs.Cod,NotifyEvent,
|
Ntf_UpdateNumNotifSent (Hie[HieLvl_DEG].Cod,Hie[HieLvl_CRS].Cod,NotifyEvent,
|
||||||
*NumNotif,*NumMails);
|
*NumNotif,*NumMails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2261,7 +2261,10 @@ static void Pho_ShowOrPrintListDegrees (struct Pho_DegPhotos *DegPhotos,
|
||||||
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,"CT");
|
Deg_DrawDegreeLogoAndNameWithLink (&Deg,ActSeeDegInf,"CT");
|
||||||
else // Pho_DEGREES_PRINT
|
else // Pho_DEGREES_PRINT
|
||||||
{
|
{
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Deg.Cod,Deg.ShrtName,20,"CT");
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
|
Deg.Cod,
|
||||||
|
Deg.ShrtName,
|
||||||
|
20,"CT");
|
||||||
HTM_TxtF (" %s",Deg.FullName);
|
HTM_TxtF (" %s",Deg.FullName);
|
||||||
}
|
}
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
|
@ -1655,8 +1655,10 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
|
||||||
HTM_TR_Begin (NULL);
|
HTM_TR_Begin (NULL);
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"LM\" style=\"width:%upx;\"",Rec_DEGREE_LOGO_SIZE);
|
HTM_TD_Begin ("class=\"LM\" style=\"width:%upx;\"",Rec_DEGREE_LOGO_SIZE);
|
||||||
Lgo_DrawLogo (HieLvl_DEG,Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
Lgo_DrawLogo (HieLvl_DEG,
|
||||||
Gbl.Hierarchy.Node[HieLvl_DEG].ShrtName,Rec_DEGREE_LOGO_SIZE,NULL);
|
Gbl.Hierarchy.Node[HieLvl_DEG].Cod,
|
||||||
|
Gbl.Hierarchy.Node[HieLvl_DEG].ShrtName,
|
||||||
|
Rec_DEGREE_LOGO_SIZE,NULL);
|
||||||
HTM_TD_End ();
|
HTM_TD_End ();
|
||||||
|
|
||||||
HTM_TD_Begin ("class=\"REC_HEAD CM\"");
|
HTM_TD_Begin ("class=\"REC_HEAD CM\"");
|
||||||
|
@ -2535,7 +2537,9 @@ static void Rec_ShowInstitutionInHead (struct Hie_Node *Ins,bool PutFormLinks)
|
||||||
ParCod_PutPar (ParCod_Ins,Ins->Cod);
|
ParCod_PutPar (ParCod_Ins,Ins->Cod);
|
||||||
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
|
HTM_BUTTON_Submit_Begin (Ins->FullName,"class=\"BT_LINK\"");
|
||||||
}
|
}
|
||||||
Lgo_DrawLogo (HieLvl_INS,Ins->Cod,Ins->ShrtName,
|
Lgo_DrawLogo (HieLvl_INS,
|
||||||
|
Ins->Cod,
|
||||||
|
Ins->ShrtName,
|
||||||
Rec_INSTITUTION_LOGO_SIZE,NULL);
|
Rec_INSTITUTION_LOGO_SIZE,NULL);
|
||||||
if (PutFormLinks)
|
if (PutFormLinks)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,11 +85,11 @@ static void TmlNot_WriteAuthorTimeAndContent (const struct TmlNot_Note *Not,
|
||||||
static void TmlNot_WriteContent (const struct TmlNot_Note *Not);
|
static void TmlNot_WriteContent (const struct TmlNot_Note *Not);
|
||||||
static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not);
|
static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not);
|
||||||
static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
|
static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
struct Hie_Hierarchy *Hie,
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS],
|
||||||
struct For_Forum *Forum,
|
struct For_Forum *Forum,
|
||||||
char ForumName[For_MAX_BYTES_FORUM_NAME + 1]);
|
char ForumName[For_MAX_BYTES_FORUM_NAME + 1]);
|
||||||
static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
|
static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
const struct Hie_Hierarchy *Hie,
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS],
|
||||||
const char ForumName[For_MAX_BYTES_FORUM_NAME + 1]);
|
const char ForumName[For_MAX_BYTES_FORUM_NAME + 1]);
|
||||||
|
|
||||||
static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
static void TmlNot_PutFormGoToAction (const struct TmlNot_Note *Not,
|
||||||
|
@ -390,7 +390,7 @@ static void TmlNot_WriteContent (const struct TmlNot_Note *Not)
|
||||||
|
|
||||||
static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not)
|
static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not)
|
||||||
{
|
{
|
||||||
struct Hie_Hierarchy Hie;
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS];
|
||||||
struct For_Forums Forums;
|
struct For_Forums Forums;
|
||||||
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
char ForumName[For_MAX_BYTES_FORUM_NAME + 1];
|
||||||
char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1];
|
char SummaryStr[Ntf_MAX_BYTES_SUMMARY + 1];
|
||||||
|
@ -400,14 +400,14 @@ static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not)
|
||||||
|
|
||||||
/***** Get location in hierarchy *****/
|
/***** Get location in hierarchy *****/
|
||||||
if (!Not->Unavailable)
|
if (!Not->Unavailable)
|
||||||
TmlNot_GetLocationInHierarchy (Not,&Hie,&Forums.Forum,ForumName);
|
TmlNot_GetLocationInHierarchy (Not,Hie,&Forums.Forum,ForumName);
|
||||||
|
|
||||||
/***** Write note type *****/
|
/***** Write note type *****/
|
||||||
TmlNot_PutFormGoToAction (Not,&Forums);
|
TmlNot_PutFormGoToAction (Not,&Forums);
|
||||||
|
|
||||||
/***** Write location in hierarchy *****/
|
/***** Write location in hierarchy *****/
|
||||||
if (!Not->Unavailable)
|
if (!Not->Unavailable)
|
||||||
TmlNot_WriteLocationInHierarchy (Not,&Hie,ForumName);
|
TmlNot_WriteLocationInHierarchy (Not,Hie,ForumName);
|
||||||
|
|
||||||
/***** Get and write note summary *****/
|
/***** Get and write note summary *****/
|
||||||
/* Get note summary */
|
/* Get note summary */
|
||||||
|
@ -424,16 +424,16 @@ static void TmlNot_GetAndWriteNoPost (const struct TmlNot_Note *Not)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
|
static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
struct Hie_Hierarchy *Hie,
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS],
|
||||||
struct For_Forum *Forum,
|
struct For_Forum *Forum,
|
||||||
char ForumName[For_MAX_BYTES_FORUM_NAME + 1])
|
char ForumName[For_MAX_BYTES_FORUM_NAME + 1])
|
||||||
{
|
{
|
||||||
/***** Initialize location in hierarchy *****/
|
/***** Initialize location in hierarchy *****/
|
||||||
Hie->Cty.Cod =
|
Hie[HieLvl_CTY].Cod =
|
||||||
Hie->Ins.Cod =
|
Hie[HieLvl_INS].Cod =
|
||||||
Hie->Ctr.Cod =
|
Hie[HieLvl_CTR].Cod =
|
||||||
Hie->Deg.Cod =
|
Hie[HieLvl_DEG].Cod =
|
||||||
Hie->Crs.Cod = -1L;
|
Hie[HieLvl_CRS].Cod = -1L;
|
||||||
|
|
||||||
/***** Get location in hierarchy *****/
|
/***** Get location in hierarchy *****/
|
||||||
switch (Not->Type)
|
switch (Not->Type)
|
||||||
|
@ -441,28 +441,28 @@ static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
case TmlNot_INS_DOC_PUB_FILE:
|
case TmlNot_INS_DOC_PUB_FILE:
|
||||||
case TmlNot_INS_SHA_PUB_FILE:
|
case TmlNot_INS_SHA_PUB_FILE:
|
||||||
/* Get institution data */
|
/* Get institution data */
|
||||||
Hie->Ins.Cod = Not->HieCod;
|
Hie[HieLvl_INS].Cod = Not->HieCod;
|
||||||
Ins_GetInstitDataByCod (&Hie->Ins);
|
Ins_GetInstitDataByCod (&Hie[HieLvl_INS]);
|
||||||
break;
|
break;
|
||||||
case TmlNot_CTR_DOC_PUB_FILE:
|
case TmlNot_CTR_DOC_PUB_FILE:
|
||||||
case TmlNot_CTR_SHA_PUB_FILE:
|
case TmlNot_CTR_SHA_PUB_FILE:
|
||||||
/* Get center data */
|
/* Get center data */
|
||||||
Hie->Ctr.Cod = Not->HieCod;
|
Hie[HieLvl_CTR].Cod = Not->HieCod;
|
||||||
Ctr_GetCenterDataByCod (&Hie->Ctr);
|
Ctr_GetCenterDataByCod (&Hie[HieLvl_CTR]);
|
||||||
break;
|
break;
|
||||||
case TmlNot_DEG_DOC_PUB_FILE:
|
case TmlNot_DEG_DOC_PUB_FILE:
|
||||||
case TmlNot_DEG_SHA_PUB_FILE:
|
case TmlNot_DEG_SHA_PUB_FILE:
|
||||||
/* Get degree data */
|
/* Get degree data */
|
||||||
Hie->Deg.Cod = Not->HieCod;
|
Hie[HieLvl_DEG].Cod = Not->HieCod;
|
||||||
Deg_GetDegreeDataByCod (&Hie->Deg);
|
Deg_GetDegreeDataByCod (&Hie[HieLvl_DEG]);
|
||||||
break;
|
break;
|
||||||
case TmlNot_CRS_DOC_PUB_FILE:
|
case TmlNot_CRS_DOC_PUB_FILE:
|
||||||
case TmlNot_CRS_SHA_PUB_FILE:
|
case TmlNot_CRS_SHA_PUB_FILE:
|
||||||
case TmlNot_CALL_FOR_EXAM:
|
case TmlNot_CALL_FOR_EXAM:
|
||||||
case TmlNot_NOTICE:
|
case TmlNot_NOTICE:
|
||||||
/* Get course data */
|
/* Get course data */
|
||||||
Hie->Crs.Cod = Not->HieCod;
|
Hie[HieLvl_CRS].Cod = Not->HieCod;
|
||||||
Crs_GetCourseDataByCod (&Hie->Crs);
|
Crs_GetCourseDataByCod (&Hie[HieLvl_CRS]);
|
||||||
break;
|
break;
|
||||||
case TmlNot_FORUM_POST:
|
case TmlNot_FORUM_POST:
|
||||||
/* Get forum type of the post */
|
/* Get forum type of the post */
|
||||||
|
@ -481,7 +481,7 @@ static void TmlNot_GetLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
|
static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
const struct Hie_Hierarchy *Hie,
|
struct Hie_Node Hie[HieLvl_NUM_LEVELS],
|
||||||
const char ForumName[For_MAX_BYTES_FORUM_NAME + 1])
|
const char ForumName[For_MAX_BYTES_FORUM_NAME + 1])
|
||||||
{
|
{
|
||||||
extern const char *Txt_Institution;
|
extern const char *Txt_Institution;
|
||||||
|
@ -501,21 +501,21 @@ static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
/* Write location (institution) in hierarchy */
|
/* Write location (institution) in hierarchy */
|
||||||
HTM_TxtF ("%s: %s",
|
HTM_TxtF ("%s: %s",
|
||||||
Txt_Institution,
|
Txt_Institution,
|
||||||
Hie->Ins.ShrtName);
|
Hie[HieLvl_INS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case TmlNot_CTR_DOC_PUB_FILE:
|
case TmlNot_CTR_DOC_PUB_FILE:
|
||||||
case TmlNot_CTR_SHA_PUB_FILE:
|
case TmlNot_CTR_SHA_PUB_FILE:
|
||||||
/* Write location (center) in hierarchy */
|
/* Write location (center) in hierarchy */
|
||||||
HTM_TxtF ("%s: %s",
|
HTM_TxtF ("%s: %s",
|
||||||
Txt_Center,
|
Txt_Center,
|
||||||
Hie->Ctr.ShrtName);
|
Hie[HieLvl_CTR].ShrtName);
|
||||||
break;
|
break;
|
||||||
case TmlNot_DEG_DOC_PUB_FILE:
|
case TmlNot_DEG_DOC_PUB_FILE:
|
||||||
case TmlNot_DEG_SHA_PUB_FILE:
|
case TmlNot_DEG_SHA_PUB_FILE:
|
||||||
/* Write location (degree) in hierarchy */
|
/* Write location (degree) in hierarchy */
|
||||||
HTM_TxtF ("%s: %s",
|
HTM_TxtF ("%s: %s",
|
||||||
Txt_Degree,
|
Txt_Degree,
|
||||||
Hie->Deg.ShrtName);
|
Hie[HieLvl_DEG].ShrtName);
|
||||||
break;
|
break;
|
||||||
case TmlNot_CRS_DOC_PUB_FILE:
|
case TmlNot_CRS_DOC_PUB_FILE:
|
||||||
case TmlNot_CRS_SHA_PUB_FILE:
|
case TmlNot_CRS_SHA_PUB_FILE:
|
||||||
|
@ -524,7 +524,7 @@ static void TmlNot_WriteLocationInHierarchy (const struct TmlNot_Note *Not,
|
||||||
/* Write location (course) in hierarchy */
|
/* Write location (course) in hierarchy */
|
||||||
HTM_TxtF ("%s: %s",
|
HTM_TxtF ("%s: %s",
|
||||||
Txt_Course,
|
Txt_Course,
|
||||||
Hie->Crs.ShrtName);
|
Hie[HieLvl_CRS].ShrtName);
|
||||||
break;
|
break;
|
||||||
case TmlNot_FORUM_POST:
|
case TmlNot_FORUM_POST:
|
||||||
/* Write forum name */
|
/* Write forum name */
|
||||||
|
|
Loading…
Reference in New Issue