Version 21.116.2: Sep 08, 2022 Fixed bug in timetable.

This commit is contained in:
acanas 2022-09-09 12:50:53 +02:00
parent abdf4cdce1
commit 4554c2c4e9
19 changed files with 50 additions and 57 deletions

View File

@ -5261,7 +5261,7 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic)
HTM_BUTTON_Submit_Begin ((Gbl.FileBrowser.Type == Brw_SHOW_MRK_CRS ||
Gbl.FileBrowser.Type == Brw_SHOW_MRK_GRP) ? Txt_Check_marks_in_the_file :
Txt_Download,
"class=\"BT_LINK FILENAME\"");
"class=\"LM BT_LINK FILENAME\"");
HTM_Txt (FileNameToShow);
HTM_BUTTON_End ();
@ -9936,7 +9936,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Frm_BeginFormGoTo (ActSeeInsInf);
Deg_PutParamDegCod (InsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (InsShortName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
Lgo_DrawLogo (HieLvl_INS,InsCod,InsShortName,20,"BT_LINK LT",true);
HTM_TxtF (" %s",InsShortName);
@ -9953,7 +9953,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Frm_BeginFormGoTo (ActSeeCtrInf);
Deg_PutParamDegCod (CtrCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (CtrShortName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
Lgo_DrawLogo (HieLvl_CTR,CtrCod,CtrShortName,20,"LT",true);
HTM_TxtF (" %s",CtrShortName);
@ -9970,7 +9970,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Frm_BeginFormGoTo (ActSeeDegInf);
Deg_PutParamDegCod (DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (DegShortName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
Lgo_DrawLogo (HieLvl_DEG,DegCod,DegShortName,20,"LT",true);
HTM_TxtF (" %s",DegShortName);
@ -9987,7 +9987,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
Frm_BeginFormGoTo (ActSeeCrsInf);
Crs_PutParamCrsCod (CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (CrsShortName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
HTM_Txt (CrsShortName);
HTM_BUTTON_End ();
@ -10092,7 +10092,7 @@ static void Brw_WriteRowDocData (unsigned *NumDocsNotHidden,MYSQL_ROW row)
FileMetadata.FilCod);
/* File or folder icon */
HTM_BUTTON_Submit_Begin (FileNameToShow,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (FileNameToShow,"class=\"LT BT_LINK\"");
switch (FileMetadata.FilFolLnk.Type)
{
case Brw_IS_FILE:

View File

@ -580,7 +580,7 @@ static void CtrCfg_Institution (bool PrintView,bool PutForm)
Frm_BeginFormGoTo (ActSeeInsInf);
Ins_PutParamInsCod (Gbl.Hierarchy.Ins.InsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Ins.ShrtName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
}
@ -755,7 +755,7 @@ static void CtrCfg_NumDegs (void)
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
if (asprintf (&Title,Txt_Degrees_of_CENTER_X,Gbl.Hierarchy.Ctr.ShrtName) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (Title,"class=\"LB BT_LINK\"");
free (Title);
HTM_Unsigned (Deg_GetCachedNumDegsInCtr (Gbl.Hierarchy.Ctr.CtrCod));
HTM_BUTTON_End ();

View File

@ -606,10 +606,14 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
#define Log_PLATFORM_VERSION "SWAD 21.116.1 (2022-09-08)"
#define Log_PLATFORM_VERSION "SWAD 21.116.2 (2022-09-08)"
#define CSS_FILE "swad21.107.1.css"
#define JS_FILE "swad21.100.js"
/*
Version 21.116.2: Sep 08, 2022 Fixed bug in timetable. Reported by Javier Fernández Baldomero and José Luis Bernier Villamor. (329208 lines)
If you want to use MyISAM:
ALTER TABLE prg_resources ENGINE=MyISAM;
Version 21.116.1: Sep 08, 2022 Fixed bug updating institution status. (329215 lines)
Version 21.116: Sep 02, 2022 Code refactoring in edition of program items. (329214 lines)
Version 21.115: Sep 01, 2022 Code refactoring in edition of program items. (329212 lines)

View File

@ -614,7 +614,7 @@ static void Con_WriteRowConnectedUsrOnRightColumn (Rol_Role_t Role)
HTM_DIV_Begin ("class=\"CON_NAME_NARROW\""); // Limited width
HTM_BUTTON_Submit_Begin (Txt_View_record_for_this_course,
"class=\"BT_LINK LT\"");
"class=\"LT BT_LINK\"");
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_BUTTON_End ();
HTM_DIV_End ();
@ -724,7 +724,7 @@ static void Con_ShowConnectedUsrsCurrentLocationOneByOneOnMainZone (Rol_Role_t R
if (PutLinkToRecord)
HTM_BUTTON_Submit_Begin (UsrDat.FullName,
"class=\"BT_LINK LT\"");
"class=\"LT BT_LINK\"");
Usr_WriteFirstNameBRSurnames (&UsrDat);
if (PutLinkToRecord)
HTM_BUTTON_End ();

View File

@ -373,7 +373,7 @@ static void CtyCfg_Platform (bool PrintView)
{
Frm_BeginFormGoTo (ActSeeSysInf);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Cfg_PLATFORM_SHORT_NAME),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
}
Ico_PutIcon ("swad64x64.png",Ico_UNCHANGED,Cfg_PLATFORM_FULL_NAME,"ICO20x20");
@ -480,7 +480,7 @@ static void CtyCfg_NumInss (void)
if (asprintf (&Title,Txt_Institutions_of_COUNTRY_X,
Gbl.Hierarchy.Cty.Name[Gbl.Prefs.Language]) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (Title,"class=\"LT BT_LINK\"");
free (Title);
HTM_Unsigned (Ins_GetCachedNumInssInCty (Gbl.Hierarchy.Cty.CtyCod));
HTM_BUTTON_End ();

View File

@ -993,7 +993,7 @@ static bool Crs_ListCoursesOfAYearForSeeing (unsigned Year)
Frm_BeginFormGoTo (ActSeeCrsInf);
Crs_PutParamCrsCod (Crs->CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs->FullName),
"class=\"BT_LINK\"");
"class=\"LM BT_LINK\"");
Str_FreeGoToTitle ();
HTM_Txt (Crs->FullName);
HTM_BUTTON_End ();
@ -2453,7 +2453,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
Frm_BeginFormGoTo (ActSeeDegInf);
Deg_PutParamDegCod (Deg.DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (row[2]),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
Lgo_DrawLogo (HieLvl_DEG,Deg.DegCod,Deg.ShrtName,20,"CT",true);
HTM_TxtF ("&nbsp;%s&nbsp;(%s)",row[2],row[6]);
@ -2473,7 +2473,7 @@ static void Crs_WriteRowCrsData (unsigned NumCrs,MYSQL_ROW row,bool WriteColumnA
Frm_BeginFormGoTo (ActSeeCrsInf);
Crs_PutParamCrsCod (CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (row[5]),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
HTM_Txt (row[5]);
HTM_BUTTON_End ();

View File

@ -250,7 +250,7 @@ static void CrsCfg_Degree (bool PrintView,bool PutForm)
Frm_BeginFormGoTo (ActSeeDegInf);
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Deg.ShrtName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
}
Lgo_DrawLogo (HieLvl_DEG,Gbl.Hierarchy.Deg.DegCod,Gbl.Hierarchy.Deg.ShrtName,
@ -440,7 +440,7 @@ static void CrsCfg_Indicators (void)
IndicatorsCrs.NumIndicators,
Txt_of_PART_OF_A_TOTAL,Ind_NUM_INDICATORS) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (Title,"class=\"LB BT_LINK\"");
HTM_TxtF ("%s&nbsp;",Title);
if (IndicatorsCrs.NumIndicators == Ind_NUM_INDICATORS)
Ico_PutIcon ("check-circle.svg",Ico_GREEN,

View File

@ -245,7 +245,7 @@ static void DegCfg_Center (bool PrintView,bool PutForm)
Frm_BeginFormGoTo (ActSeeCtrInf);
Ctr_PutParamCtrCod (Gbl.Hierarchy.Ctr.CtrCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Gbl.Hierarchy.Ctr.ShrtName),
"class=\"BT_LINK\"");
"class=\"LB BT_LINK\"");
Str_FreeGoToTitle ();
}
Lgo_DrawLogo (HieLvl_CTR,Gbl.Hierarchy.Ctr.CtrCod,Gbl.Hierarchy.Ctr.ShrtName,
@ -334,7 +334,7 @@ static void DegCfg_NumCrss (void)
Deg_PutParamDegCod (Gbl.Hierarchy.Deg.DegCod);
if (asprintf (&Title,Txt_Courses_of_DEGREE_X,Gbl.Hierarchy.Deg.ShrtName) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (Title,"class=\"LB BT_LINK\"");
free (Title);
HTM_Unsigned (Crs_GetCachedNumCrssInDeg (Gbl.Hierarchy.Deg.DegCod));
HTM_BUTTON_End ();

View File

@ -2226,7 +2226,7 @@ static void Enr_ShowEnrolmentRequestsGivenRoles (unsigned RolesSelected)
Frm_BeginFormGoTo (ActSeeCrsInf);
Crs_PutParamCrsCod (Crs.CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs.FullName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
HTM_TxtF ("%s &gt; %s",Deg.ShrtName,Crs.ShrtName);
HTM_BUTTON_End ();

View File

@ -687,7 +687,7 @@ static void Fol_WriteRowUsrToFollowOnRightColumn (struct UsrData *UsrDat)
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_DIV_Begin ("class=\"CON_NAME_FOLLOW CON_CRS LT\""); // Limited width
HTM_BUTTON_Submit_Begin (Txt_Another_user_s_profile,
"class=\"BT_LINK LT\"");
"class=\"LT BT_LINK\"");
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_BUTTON_End ();
HTM_DIV_End ();

View File

@ -266,7 +266,7 @@ void HieCfg_NumCtrs (unsigned NumCtrs,bool PutForm)
if (asprintf (&Title,Txt_Centers_of_INSTITUTION_X,
Gbl.Hierarchy.Ins.ShrtName) < 0)
Err_NotEnoughMemoryExit ();
HTM_BUTTON_Submit_Begin (Title,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (Title,"class=\"LB BT_LINK\"");
free (Title);
}
HTM_Unsigned (NumCtrs);

View File

@ -2333,7 +2333,7 @@ static void Ins_ShowInss (MYSQL_RES **mysql_res,unsigned NumInss,
Frm_BeginForm (ActSeeInsInf);
Ins_PutParamInsCod (Ins.InsCod);
HTM_BUTTON_Submit_Begin (Ins.ShrtName,
"class=\"BT_LINK\"");
"class=\"LM BT_LINK\"");
if (Gbl.Usrs.Listing.WithPhotos)
{
Lgo_DrawLogo (HieLvl_INS,Ins.InsCod,Ins.ShrtName,

View File

@ -2662,7 +2662,7 @@ static void Msg_WriteMsgTo (struct Msg_Messages *Messages,long MsgCod)
Msg_PutHiddenParamsOneMsg (Messages);
Par_PutHiddenParamChar ("SeeAllRcpts",'Y');
HTM_BUTTON_Submit_Begin (Txt_View_all_recipients,
"class=\"BT_LINK\"");
"class=\"LM BT_LINK\"");
HTM_TxtF (Txt_and_X_other_recipients,
NumRecipients.Known - NumRecipients.ToShow);
HTM_BUTTON_End ();

View File

@ -507,7 +507,7 @@ void Ntf_ShowMyNotifications (void)
PutLink = Gbl.Form.Inside;
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
"class=\"%s_%s\"",
"class=\"LT %s_%s\"",
ClassLink,The_GetSuffix ());
HTM_Txt (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent]);
HTM_BUTTON_End ();
@ -542,7 +542,7 @@ void Ntf_ShowMyNotifications (void)
if (PutLink)
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
"class=\"%s_%s\"",
"class=\"LT %s_%s\"",
ClassLink,The_GetSuffix ());
else
HTM_SPAN_Begin ("class=\"%s_%s\"",
@ -566,7 +566,7 @@ void Ntf_ShowMyNotifications (void)
if (PutLink)
HTM_BUTTON_Submit_Begin (Txt_NOTIFY_EVENTS_SINGULAR[NotifyEvent],
"class=\"%s_%s\"",
"class=\"LT %s_%s\"",
ClassLink,The_GetSuffix ());
else
HTM_SPAN_Begin ("class=\"%s_%s\"",

View File

@ -1344,7 +1344,7 @@ static void Prf_ShowUsrInRanking (struct UsrData *UsrDat,unsigned Rank,bool ItsM
Frm_BeginForm (ActSeeOthPubPrf);
Usr_PutParamUsrCodEncrypted (UsrDat->EnUsrCod);
HTM_BUTTON_Submit_Begin (Txt_Another_user_s_profile,
"class=\"BT_LINK\"");
"class=\"LM BT_LINK\"");
Usr_WriteFirstNameBRSurnames (UsrDat);
HTM_BUTTON_End ();
Frm_EndForm ();

View File

@ -3341,7 +3341,7 @@ static void Sta_ShowNumHitsPerCourse (Sta_CountType_t CountType,
Frm_BeginFormGoTo (ActSeeCrsInf);
Crs_PutParamCrsCod (Crs.CrsCod);
HTM_BUTTON_Submit_Begin (Str_BuildGoToTitle (Crs.FullName),
"class=\"BT_LINK\"");
"class=\"LT BT_LINK\"");
Str_FreeGoToTitle ();
HTM_Txt (Crs.ShrtName);
HTM_BUTTON_End ();

View File

@ -303,7 +303,7 @@ static void SysCfg_NumCtys (void)
/* Data */
HTM_TD_Begin ("class=\"LB DAT_%s\"",The_GetSuffix ());
Frm_BeginFormGoTo (ActSeeCty);
HTM_BUTTON_Submit_Begin (Txt_Countries,"class=\"BT_LINK\"");
HTM_BUTTON_Submit_Begin (Txt_Countries,"class=\"LB BT_LINK\"");
HTM_Unsigned (Cty_GetCachedNumCtysInSys ());
HTM_BUTTON_End ();
Frm_EndForm ();

View File

@ -54797,23 +54797,23 @@ const char *Txt_TIMETABLE_TYPES[Tmt_NUM_TIMETABLE_TYPES] =
#if L==1 // ca
"Horari de classes de l'assignatura"
#elif L==2 // de
"Stundenplan"
"Stundenplan des Kurses"
#elif L==3 // en
"Class timetable"
"Class timetable of the course"
#elif L==4 // es
"Horario de clases de la asignatura"
#elif L==5 // fr
"Horaire"
"Horaire de classe de la mati&egrave;re"
#elif L==6 // gn
"Horario de clases de la asignatura" // Okoteve traducción
#elif L==7 // it
"Orario del corso"
"Orario delle lezioni del corso"
#elif L==8 // pl
"Harmonogram klasy"
"Plan zaj&eogon;&cacute; kursu"
#elif L==9 // pt
"Hor&aacute;rio"
"Hor&aacute;rio das aulas da disciplina"
#elif L==10 // tr
"Class timetable" // Çeviri lazim!
"Dersin ders program&inodot;"
#endif
,
[Tmt_MY_TIMETABLE] =

View File

@ -1340,17 +1340,6 @@ static void Tmt_TimeTableDrawCell (const struct Tmt_Timetable *Timetable,
if (RowSpan == 0)
return;
/***** If group code > 0, a group is selected ==> get group data *****/
if (IntervalType == Tmt_FIRST_INTERVAL &&
(Timetable->View == Tmt_CRS_VIEW ||
Timetable->View == Tmt_CRS_EDIT) &&
GrpCod > 0)
{
/* Get group data */
GrpDat.GrpCod = GrpCod;
Grp_GetDataOfGroupByCod (&GrpDat);
}
/***** Cell start *****/
/* Create rowspan, colspan and class strings */
if (RowSpan > 1)
@ -1437,17 +1426,15 @@ static void Tmt_TimeTableDrawCellView (const struct Tmt_Timetable *Timetable,
HTM_DIV_Begin ("class=\"Tmt_TXT\"");
/***** Course name *****/
if (Timetable->Type == Tmt_MY_TIMETABLE)
if (Timetable->Type == Tmt_MY_TIMETABLE &&
(ClassType == Tmt_LECTURE ||
ClassType == Tmt_PRACTICAL))
{
Crs.CrsCod = CrsCod;
Crs_GetDataOfCourseByCod (&Crs);
if (ClassType == Tmt_LECTURE ||
ClassType == Tmt_PRACTICAL)
{
HTM_Txt (Crs.ShrtName[0] ? Crs.ShrtName :
Txt_unknown_removed_course);
HTM_BR ();
}
HTM_Txt (Crs.ShrtName[0] ? Crs.ShrtName :
Txt_unknown_removed_course);
HTM_BR ();
}
/***** Type of class and duration *****/
@ -1461,6 +1448,8 @@ static void Tmt_TimeTableDrawCellView (const struct Tmt_Timetable *Timetable,
if (Timetable->View == Tmt_CRS_VIEW &&
GrpCod > 0)
{
GrpDat.GrpCod = GrpCod;
Grp_GetDataOfGroupByCod (&GrpDat);
HTM_BR ();
HTM_Txt (GrpDat.GrpTypName);
HTM_BR ();