Version 21.93: Apr 21, 2022 Homogenization of lists in forums, chat and my courses.

This commit is contained in:
acanas 2022-04-21 09:11:27 +02:00
parent a283e2f272
commit c61bef9a97
4 changed files with 63 additions and 66 deletions

View File

@ -606,10 +606,11 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia. TODO: Attach pdf files in multimedia.
*/ */
#define Log_PLATFORM_VERSION "SWAD 21.92 (2022-04-20)" #define Log_PLATFORM_VERSION "SWAD 21.93 (2022-04-21)"
#define CSS_FILE "swad21.92.css" #define CSS_FILE "swad21.92.css"
#define JS_FILE "swad21.92.js" #define JS_FILE "swad21.92.js"
/* /*
Version 21.93: Apr 21, 2022 Homogenization of lists in forums, chat and my courses. (323245 lines)
Version 21.92: Apr 20, 2022 Default theme is white when printing. (323246 lines) Version 21.92: Apr 20, 2022 Default theme is white when printing. (323246 lines)
Version 21.91.6: Apr 07, 2022 Working on design of dark theme. (323347 lines) Version 21.91.6: Apr 07, 2022 Working on design of dark theme. (323347 lines)
Version 21.91.5: Apr 07, 2022 Working on design of dark theme. (323314 lines) Version 21.91.5: Apr 07, 2022 Working on design of dark theme. (323314 lines)

View File

@ -134,12 +134,6 @@ void Cht_ShowListOfAvailableChatRooms (void)
/***** Begin list *****/ /***** Begin list *****/
HTM_UL_Begin ("class=\"LIST_TREE\""); HTM_UL_Begin ("class=\"LIST_TREE\"");
/***** Title of top level *****/
HTM_LI_Begin ("class=\"DAT_%s\"",The_GetSuffix ());
Ico_PutIcon ("comments.svg",Ico_BLACK,Txt_Chat_rooms,"ICO16x16");
HTM_TxtF (" %s",Txt_Chat_rooms);
HTM_LI_End ();
/***** Link to chat available for all users *****/ /***** Link to chat available for all users *****/
IsLastItemInLevel[1] = (!Gbl.Usrs.Me.IBelongToCurrentCrs && IsLastItemInLevel[1] = (!Gbl.Usrs.Me.IBelongToCurrentCrs &&
!Gbl.Usrs.Me.MyDegs.Num); !Gbl.Usrs.Me.MyDegs.Num);

View File

@ -150,7 +150,7 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
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_Hierarchy Hie;
bool IsLastItemInLevel[1 + 5]; 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;
MYSQL_RES *mysql_resIns; MYSQL_RES *mysql_resIns;
@ -168,13 +168,6 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
unsigned NumDegs; unsigned NumDegs;
unsigned NumCrs; unsigned NumCrs;
unsigned NumCrss; unsigned NumCrss;
char ClassNormal[64];
char ClassHighlight[64];
snprintf (ClassNormal,sizeof (ClassNormal),"BT_LINK FORM_IN_%s",
The_GetSuffix ());
snprintf (ClassHighlight,sizeof (ClassHighlight),"BT_LINK FORM_IN_%s BOLD BG_HIGHLIGHT",
The_GetSuffix ());
/***** Begin box *****/ /***** Begin box *****/
Box_BoxBegin (NULL,Txt_My_courses, Box_BoxBegin (NULL,Txt_My_courses,
@ -186,11 +179,15 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Write link to platform *****/ /***** Write link to platform *****/
Highlight = (Gbl.Hierarchy.Cty.CtyCod <= 0); Highlight = (Gbl.Hierarchy.Cty.CtyCod <= 0);
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
ClassNormal); NULL);
IsLastItemInLevel[1] = true;
Lay_IndentDependingOnLevel (1,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs); Frm_BeginForm (ActMyCrs);
Cty_PutParamCtyCod (-1L); Cty_PutParamCtyCod (-1L);
HTM_BUTTON_Submit_Begin (Txt_System,"class=\"BT_LINK\""); HTM_BUTTON_Submit_Begin (Txt_System,
"class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
Ico_PutIcon ("sitemap.svg",Ico_BLACK,Txt_System,"ICO16x16"); Ico_PutIcon ("sitemap.svg",Ico_BLACK,Txt_System,"ICO16x16");
HTM_TxtF ("&nbsp;%s",Txt_System); HTM_TxtF ("&nbsp;%s",Txt_System);
HTM_BUTTON_End (); HTM_BUTTON_End ();
@ -214,14 +211,15 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Write link to country *****/ /***** Write link to country *****/
Highlight = (Gbl.Hierarchy.Ins.InsCod <= 0 && Highlight = (Gbl.Hierarchy.Ins.InsCod <= 0 &&
Gbl.Hierarchy.Cty.CtyCod == Hie.Cty.CtyCod); Gbl.Hierarchy.Cty.CtyCod == Hie.Cty.CtyCod);
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
ClassNormal); NULL);
IsLastItemInLevel[1] = (NumCty == NumCtys - 1); IsLastItemInLevel[2] = (NumCty == NumCtys - 1);
Lay_IndentDependingOnLevel (1,IsLastItemInLevel); Lay_IndentDependingOnLevel (2,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs); Frm_BeginForm (ActMyCrs);
Cty_PutParamCtyCod (Hie.Cty.CtyCod); Cty_PutParamCtyCod (Hie.Cty.CtyCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtyInf), HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtyInf),
"class=\"BT_LINK\""); "class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
Cty_DrawCountryMap (&Hie.Cty,"ICO16x16"); Cty_DrawCountryMap (&Hie.Cty,"ICO16x16");
HTM_TxtF ("&nbsp;%s",Hie.Cty.Name[Gbl.Prefs.Language]); HTM_TxtF ("&nbsp;%s",Hie.Cty.Name[Gbl.Prefs.Language]);
HTM_BUTTON_End (); HTM_BUTTON_End ();
@ -247,14 +245,15 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Write link to institution *****/ /***** Write link to institution *****/
Highlight = (Gbl.Hierarchy.Ctr.CtrCod <= 0 && Highlight = (Gbl.Hierarchy.Ctr.CtrCod <= 0 &&
Gbl.Hierarchy.Ins.InsCod == Hie.Ins.InsCod); Gbl.Hierarchy.Ins.InsCod == Hie.Ins.InsCod);
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
ClassNormal); NULL);
IsLastItemInLevel[2] = (NumIns == NumInss - 1); IsLastItemInLevel[3] = (NumIns == NumInss - 1);
Lay_IndentDependingOnLevel (2,IsLastItemInLevel); Lay_IndentDependingOnLevel (3,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs); Frm_BeginForm (ActMyCrs);
Ins_PutParamInsCod (Hie.Ins.InsCod); Ins_PutParamInsCod (Hie.Ins.InsCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeInsInf), HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeInsInf),
"class=\"BT_LINK\""); "class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
Lgo_DrawLogo (HieLvl_INS,Hie.Ins.InsCod,Hie.Ins.ShrtName,16,NULL,true); Lgo_DrawLogo (HieLvl_INS,Hie.Ins.InsCod,Hie.Ins.ShrtName,16,NULL,true);
HTM_TxtF ("&nbsp;%s",Hie.Ins.ShrtName); HTM_TxtF ("&nbsp;%s",Hie.Ins.ShrtName);
HTM_BUTTON_End (); HTM_BUTTON_End ();
@ -280,14 +279,15 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Write link to center *****/ /***** Write link to center *****/
Highlight = (Gbl.Hierarchy.Level == HieLvl_CTR && Highlight = (Gbl.Hierarchy.Level == HieLvl_CTR &&
Gbl.Hierarchy.Ctr.CtrCod == Hie.Ctr.CtrCod); Gbl.Hierarchy.Ctr.CtrCod == Hie.Ctr.CtrCod);
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
ClassNormal); NULL);
IsLastItemInLevel[3] = (NumCtr == NumCtrs - 1); IsLastItemInLevel[4] = (NumCtr == NumCtrs - 1);
Lay_IndentDependingOnLevel (3,IsLastItemInLevel); Lay_IndentDependingOnLevel (4,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs); Frm_BeginForm (ActMyCrs);
Ctr_PutParamCtrCod (Hie.Ctr.CtrCod); Ctr_PutParamCtrCod (Hie.Ctr.CtrCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtrInf), HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeCtrInf),
"class=\"BT_LINK\""); "class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
Lgo_DrawLogo (HieLvl_CTR,Hie.Ctr.CtrCod,Hie.Ctr.ShrtName,16,NULL,true); Lgo_DrawLogo (HieLvl_CTR,Hie.Ctr.CtrCod,Hie.Ctr.ShrtName,16,NULL,true);
HTM_TxtF ("&nbsp;%s",Hie.Ctr.ShrtName); HTM_TxtF ("&nbsp;%s",Hie.Ctr.ShrtName);
HTM_BUTTON_End (); HTM_BUTTON_End ();
@ -313,14 +313,15 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Write link to degree *****/ /***** Write link to degree *****/
Highlight = (Gbl.Hierarchy.Level == HieLvl_DEG && Highlight = (Gbl.Hierarchy.Level == HieLvl_DEG &&
Gbl.Hierarchy.Deg.DegCod == Hie.Deg.DegCod); Gbl.Hierarchy.Deg.DegCod == Hie.Deg.DegCod);
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
ClassNormal); NULL);
IsLastItemInLevel[4] = (NumDeg == NumDegs - 1); IsLastItemInLevel[5] = (NumDeg == NumDegs - 1);
Lay_IndentDependingOnLevel (4,IsLastItemInLevel); Lay_IndentDependingOnLevel (5,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs); Frm_BeginForm (ActMyCrs);
Deg_PutParamDegCod (Hie.Deg.DegCod); Deg_PutParamDegCod (Hie.Deg.DegCod);
HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeDegInf), HTM_BUTTON_Submit_Begin (Act_GetActionText (ActSeeDegInf),
"class=\"BT_LINK\""); "class=\"BT_LINK FORM_IN_%s\"",
The_GetSuffix ());
Lgo_DrawLogo (HieLvl_DEG,Hie.Deg.DegCod,Hie.Deg.ShrtName,16,NULL,true); Lgo_DrawLogo (HieLvl_DEG,Hie.Deg.DegCod,Hie.Deg.ShrtName,16,NULL,true);
HTM_TxtF ("&nbsp;%s",Hie.Deg.ShrtName); HTM_TxtF ("&nbsp;%s",Hie.Deg.ShrtName);
HTM_BUTTON_End (); HTM_BUTTON_End ();
@ -346,14 +347,15 @@ static void Crs_WriteListMyCoursesToSelectOne (void)
/***** Write link to course *****/ /***** Write link to course *****/
Highlight = (Gbl.Hierarchy.Level == HieLvl_CRS && Highlight = (Gbl.Hierarchy.Level == HieLvl_CRS &&
Gbl.Hierarchy.Crs.CrsCod == Hie.Crs.CrsCod); Gbl.Hierarchy.Crs.CrsCod == Hie.Crs.CrsCod);
HTM_LI_Begin ("class=\"%s\"",Highlight ? ClassHighlight : HTM_LI_Begin (Highlight ? "class=\"BG_HIGHLIGHT\"" :
ClassNormal); NULL);
IsLastItemInLevel[5] = (NumCrs == NumCrss - 1); IsLastItemInLevel[6] = (NumCrs == NumCrss - 1);
Lay_IndentDependingOnLevel (5,IsLastItemInLevel); Lay_IndentDependingOnLevel (6,IsLastItemInLevel);
Frm_BeginForm (ActMyCrs); Frm_BeginForm (ActMyCrs);
Crs_PutParamCrsCod (Hie.Crs.CrsCod); Crs_PutParamCrsCod (Hie.Crs.CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Hie.Crs.ShrtName), HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Hie.Crs.ShrtName),
"class=\"BT_LINK\""); "class=\"BT_LINK FORM_IN_%s\"",
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.Crs.FullName,"ICO16x16");
HTM_TxtF ("&nbsp;%s",Hie.Crs.ShrtName); HTM_TxtF ("&nbsp;%s",Hie.Crs.ShrtName);

View File

@ -262,7 +262,7 @@ const Act_Action_t For_ActionsDisPstFor[For_NUM_TYPES_FORUM] =
/*********************** Private constants and types *************************/ /*********************** Private constants and types *************************/
/*****************************************************************************/ /*****************************************************************************/
#define For_FORUM_MAX_LEVELS 4 #define For_FORUM_MAX_LEVELS 5
static const unsigned PermissionThreadDeletion[For_NUM_TYPES_FORUM] = static const unsigned PermissionThreadDeletion[For_NUM_TYPES_FORUM] =
{ {
@ -1258,7 +1258,7 @@ static void For_ShowForumList (struct For_Forums *Forums)
ICanSeeInsForum = false; ICanSeeInsForum = false;
/***** Links to forums about the platform *****/ /***** Links to forums about the platform *****/
For_WriteLinksToPlatformForums (Forums,!ICanSeeInsForum,IsLastItemInLevel); For_WriteLinksToPlatformForums (Forums,true,IsLastItemInLevel);
if (ICanSeeInsForum) if (ICanSeeInsForum)
{ {
@ -1301,7 +1301,7 @@ static void For_ShowForumList (struct For_Forums *Forums)
break; break;
case For_ALL_MY_FORUMS: case For_ALL_MY_FORUMS:
/***** Links to forums about the platform *****/ /***** Links to forums about the platform *****/
For_WriteLinksToPlatformForums (Forums,(Gbl.Usrs.Me.MyInss.Num == 0),IsLastItemInLevel); For_WriteLinksToPlatformForums (Forums,true,IsLastItemInLevel);
/***** Links to forums of users from my institutions, the degrees in each institution and the courses in each degree *****/ /***** Links to forums of users from my institutions, the degrees in each institution and the courses in each degree *****/
for (NumMyIns = 0; for (NumMyIns = 0;
@ -1466,7 +1466,7 @@ static void For_WriteLinksToGblForums (const struct For_Forums *Forums,
Forum.Location = -1L; Forum.Location = -1L;
Highlight = (Forums->Forum.Type == For_FORUM_GLOBAL_USRS); Highlight = (Forums->Forum.Type == For_FORUM_GLOBAL_USRS);
IsLastItemInLevel[1] = false; IsLastItemInLevel[1] = false;
For_WriteLinkToForum (Forums,&Forum,Highlight,0,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,1,IsLastItemInLevel);
/***** Link to forum of teachers global *****/ /***** Link to forum of teachers global *****/
Rol_GetRolesInAllCrss (&Gbl.Usrs.Me.UsrDat); Rol_GetRolesInAllCrss (&Gbl.Usrs.Me.UsrDat);
@ -1476,7 +1476,7 @@ static void For_WriteLinksToGblForums (const struct For_Forums *Forums,
Forum.Location = -1L; Forum.Location = -1L;
Highlight = (Forums->Forum.Type == For_FORUM_GLOBAL_TCHS); Highlight = (Forums->Forum.Type == For_FORUM_GLOBAL_TCHS);
IsLastItemInLevel[1] = false; IsLastItemInLevel[1] = false;
For_WriteLinkToForum (Forums,&Forum,Highlight,0,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,1,IsLastItemInLevel);
} }
} }
@ -1503,7 +1503,7 @@ static void For_WriteLinksToPlatformForums (const struct For_Forums *Forums,
Forum.Location = -1L; Forum.Location = -1L;
Highlight = (Forums->Forum.Type == For_FORUM__SWAD__USRS); Highlight = (Forums->Forum.Type == For_FORUM__SWAD__USRS);
IsLastItemInLevel[1] = (IsLastForum && !ICanSeeTeacherForum); IsLastItemInLevel[1] = (IsLastForum && !ICanSeeTeacherForum);
For_WriteLinkToForum (Forums,&Forum,Highlight,0,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,1,IsLastItemInLevel);
/***** Link to forum of teachers about the platform *****/ /***** Link to forum of teachers about the platform *****/
if (ICanSeeTeacherForum) if (ICanSeeTeacherForum)
@ -1512,7 +1512,7 @@ static void For_WriteLinksToPlatformForums (const struct For_Forums *Forums,
Forum.Location = -1L; Forum.Location = -1L;
Highlight = (Forums->Forum.Type == For_FORUM__SWAD__TCHS); Highlight = (Forums->Forum.Type == For_FORUM__SWAD__TCHS);
IsLastItemInLevel[1] = IsLastForum; IsLastItemInLevel[1] = IsLastForum;
For_WriteLinkToForum (Forums,&Forum,Highlight,0,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,1,IsLastItemInLevel);
} }
} }
@ -1542,8 +1542,8 @@ static long For_WriteLinksToInsForums (const struct For_Forums *Forums,
Forum.Location = InsCod; Forum.Location = InsCod;
Highlight = (Forums->Forum.Type == For_FORUM_INSTIT_USRS && Highlight = (Forums->Forum.Type == For_FORUM_INSTIT_USRS &&
Forums->Forum.Location == InsCod); Forums->Forum.Location == InsCod);
IsLastItemInLevel[1] = (IsLastIns && !ICanSeeTeacherForum); IsLastItemInLevel[2] = (IsLastIns && !ICanSeeTeacherForum);
For_WriteLinkToForum (Forums,&Forum,Highlight,1,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,2,IsLastItemInLevel);
/***** Link to forum of teachers from this institution *****/ /***** Link to forum of teachers from this institution *****/
if (ICanSeeTeacherForum) if (ICanSeeTeacherForum)
@ -1552,8 +1552,8 @@ static long For_WriteLinksToInsForums (const struct For_Forums *Forums,
Forum.Location = InsCod; Forum.Location = InsCod;
Highlight = (Forums->Forum.Type == For_FORUM_INSTIT_TCHS && Highlight = (Forums->Forum.Type == For_FORUM_INSTIT_TCHS &&
Forums->Forum.Location == InsCod); Forums->Forum.Location == InsCod);
IsLastItemInLevel[1] = IsLastIns; IsLastItemInLevel[2] = IsLastIns;
For_WriteLinkToForum (Forums,&Forum,Highlight,1,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,2,IsLastItemInLevel);
} }
} }
return InsCod; return InsCod;
@ -1585,8 +1585,8 @@ static long For_WriteLinksToCtrForums (const struct For_Forums *Forums,
Forum.Location = CtrCod; Forum.Location = CtrCod;
Highlight = (Forums->Forum.Type == For_FORUM_CENTER_USRS && Highlight = (Forums->Forum.Type == For_FORUM_CENTER_USRS &&
Forums->Forum.Location == CtrCod); Forums->Forum.Location == CtrCod);
IsLastItemInLevel[2] = (IsLastCtr && !ICanSeeTeacherForum); IsLastItemInLevel[3] = (IsLastCtr && !ICanSeeTeacherForum);
For_WriteLinkToForum (Forums,&Forum,Highlight,2,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,3,IsLastItemInLevel);
/***** Link to forum of teachers from this center *****/ /***** Link to forum of teachers from this center *****/
if (ICanSeeTeacherForum) if (ICanSeeTeacherForum)
@ -1595,8 +1595,8 @@ static long For_WriteLinksToCtrForums (const struct For_Forums *Forums,
Forum.Location = CtrCod; Forum.Location = CtrCod;
Highlight = (Forums->Forum.Type == For_FORUM_CENTER_TCHS && Highlight = (Forums->Forum.Type == For_FORUM_CENTER_TCHS &&
Forums->Forum.Location == CtrCod); Forums->Forum.Location == CtrCod);
IsLastItemInLevel[2] = IsLastCtr; IsLastItemInLevel[3] = IsLastCtr;
For_WriteLinkToForum (Forums,&Forum,Highlight,2,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,3,IsLastItemInLevel);
} }
} }
return CtrCod; return CtrCod;
@ -1628,8 +1628,8 @@ static long For_WriteLinksToDegForums (const struct For_Forums *Forums,
Forum.Location = DegCod; Forum.Location = DegCod;
Highlight = (Forums->Forum.Type == For_FORUM_DEGREE_USRS && Highlight = (Forums->Forum.Type == For_FORUM_DEGREE_USRS &&
Forums->Forum.Location == DegCod); Forums->Forum.Location == DegCod);
IsLastItemInLevel[3] = (IsLastDeg && !ICanSeeTeacherForum); IsLastItemInLevel[4] = (IsLastDeg && !ICanSeeTeacherForum);
For_WriteLinkToForum (Forums,&Forum,Highlight,3,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,4,IsLastItemInLevel);
/***** Link to forum of teachers from this degree *****/ /***** Link to forum of teachers from this degree *****/
if (ICanSeeTeacherForum) if (ICanSeeTeacherForum)
@ -1638,8 +1638,8 @@ static long For_WriteLinksToDegForums (const struct For_Forums *Forums,
Forum.Location = DegCod; Forum.Location = DegCod;
Highlight = (Forums->Forum.Type == For_FORUM_DEGREE_TCHS && Highlight = (Forums->Forum.Type == For_FORUM_DEGREE_TCHS &&
Forums->Forum.Location == DegCod); Forums->Forum.Location == DegCod);
IsLastItemInLevel[3] = IsLastDeg; IsLastItemInLevel[4] = IsLastDeg;
For_WriteLinkToForum (Forums,&Forum,Highlight,3,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,4,IsLastItemInLevel);
} }
} }
return DegCod; return DegCod;
@ -1671,8 +1671,8 @@ static long For_WriteLinksToCrsForums (const struct For_Forums *Forums,
Forum.Location = CrsCod; Forum.Location = CrsCod;
Highlight = (Forums->Forum.Type == For_FORUM_COURSE_USRS && Highlight = (Forums->Forum.Type == For_FORUM_COURSE_USRS &&
Forums->Forum.Location == CrsCod); Forums->Forum.Location == CrsCod);
IsLastItemInLevel[4] = (IsLastCrs && !ICanSeeTeacherForum); IsLastItemInLevel[5] = (IsLastCrs && !ICanSeeTeacherForum);
For_WriteLinkToForum (Forums,&Forum,Highlight,4,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,5,IsLastItemInLevel);
/***** Link to forum of teachers from this course *****/ /***** Link to forum of teachers from this course *****/
if (ICanSeeTeacherForum) if (ICanSeeTeacherForum)
@ -1681,8 +1681,8 @@ static long For_WriteLinksToCrsForums (const struct For_Forums *Forums,
Forum.Location = CrsCod; Forum.Location = CrsCod;
Highlight = (Forums->Forum.Type == For_FORUM_COURSE_TCHS && Highlight = (Forums->Forum.Type == For_FORUM_COURSE_TCHS &&
Forums->Forum.Location == CrsCod); Forums->Forum.Location == CrsCod);
IsLastItemInLevel[4] = IsLastCrs; IsLastItemInLevel[5] = IsLastCrs;
For_WriteLinkToForum (Forums,&Forum,Highlight,4,IsLastItemInLevel); For_WriteLinkToForum (Forums,&Forum,Highlight,5,IsLastItemInLevel);
} }
} }
return CrsCod; return CrsCod;