From b093e1b9bffad95752ad3400620fbbad424a41b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Mon, 7 Oct 2019 15:15:55 +0200 Subject: [PATCH] Version19.31.13 --- swad_ID.c | 18 +- swad_changelog.h | 3 +- swad_file_browser.c | 154 ++++++----- swad_forum.c | 64 +++-- swad_game.c | 46 ++-- swad_group.c | 136 ++++++---- swad_help.c | 4 +- swad_hierarchy.c | 45 ++-- swad_holiday.c | 37 +-- swad_indicator.c | 641 +++++++++++++++++++++++--------------------- 10 files changed, 635 insertions(+), 513 deletions(-) diff --git a/swad_ID.c b/swad_ID.c index fe1bcfc1d..fdcce443d 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -607,10 +607,11 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, fprintf (Gbl.F.Out,"" "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_ID); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); } else // NumID >= 1 fprintf (Gbl.F.Out,"
"); @@ -674,20 +675,24 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, { /***** Write help text *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,""); Ale_ShowAlert (Ale_INFO,Txt_The_ID_is_used_in_order_to_facilitate_); Tbl_EndCell (); + Tbl_EndRow (); /***** Form to enter new user's ID *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme], UsrDat->IDs.Num ? Txt_Another_ID : // A new user's ID Txt_ID); // The first user's ID + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (ItsMe) Frm_StartFormAnchor (ActChgMyID,ID_ID_SECTION_ID); else @@ -717,6 +722,7 @@ static void ID_ShowFormChangeUsrID (const struct UsrData *UsrDat, Btn_PutCreateButtonInline (Txt_Add_this_ID); Frm_EndForm (); Tbl_EndCell (); + Tbl_EndRow (); } diff --git a/swad_changelog.h b/swad_changelog.h index 3697c732d..1fdf54ed3 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -487,7 +487,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.31.12 (2019-10-07)" +#define Log_PLATFORM_VERSION "SWAD 19.31.13 (2019-10-07)" #define CSS_FILE "swad19.29.css" #define JS_FILE "swad19.30.js" /* @@ -495,6 +495,7 @@ ps2pdf source.ps destination.pdf // TODO: Un TFG preasignado sin estudiante tiene que salir un triángulo amarillo // TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.) + Version 19.31.13: Oct 07, 2019 Code refactoring in HTML tables. (247135 lines) Version 19.31.12: Oct 07, 2019 Code refactoring in HTML tables. (247121 lines) Version 19.31.11: Oct 07, 2019 Code refactoring in HTML tables. (247111 lines) Version 19.31.10: Oct 07, 2019 Code refactoring in HTML tables. (247106 lines) diff --git a/swad_file_browser.c b/swad_file_browser.c index 49d0c7aba..21e145b8e 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -5870,13 +5870,15 @@ static void Brw_IndentDependingOnLevel (unsigned Level) for (i = 1; i < Level; i++) + { fprintf (Gbl.F.Out,"" "\"\"" - "", + " class=\"ICO20x20\" />", Gbl.RowEvenOdd, Cfg_URL_ICON_PUBLIC); + Tbl_EndCell (); + } } /*****************************************************************************/ @@ -6127,11 +6129,11 @@ static void Brw_PutIconNewFileOrFolder (void) fprintf (Gbl.F.Out,"" "\"%s\"" - "", + " class=\"ICO20x20\" />", Gbl.RowEvenOdd,Cfg_URL_ICON_PUBLIC, Txt_New_FILE_OR_FOLDER, Txt_New_FILE_OR_FOLDER); + Tbl_EndCell (); } /*****************************************************************************/ @@ -6314,8 +6316,8 @@ static void Brw_WriteFileName (unsigned Level,bool IsPublic) Ico_PutIconOff ("unlock.svg", Txt_Public_open_educational_resource_OER_for_everyone); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); } } @@ -6433,10 +6435,10 @@ static void Brw_WriteFileSizeAndDate (struct FileMetadata *FileMetadata) else FileSizeStr[0] = '\0'; fprintf (Gbl.F.Out,"" - " %s" - "", + " %s", Gbl.FileBrowser.TxtStyle,Gbl.RowEvenOdd, FileSizeStr); + Tbl_EndCell (); /***** Write the date *****/ fprintf (Gbl.F.Out,"" @@ -8511,16 +8513,16 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) fprintf (Gbl.F.Out,"" "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_URL); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_URL, + " required=\"required\" />", PATH_MAX); + Tbl_EndCell (); Tbl_EndRow (); /***** Link name *****/ @@ -8528,15 +8530,15 @@ static void Brw_PutFormToCreateALink (const char *FileNameToShow) fprintf (Gbl.F.Out,"" "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Save_as,Txt_optional); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Save_as,Txt_optional, + " size=\"30\" maxlength=\"%u\" value=\"\" />", Brw_MAX_CHARS_FOLDER); + Tbl_EndCell (); Tbl_EndRow (); Tbl_EndTable (); @@ -9504,10 +9506,10 @@ void Brw_ShowFileMetadata (void) /***** Filename *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Filename); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); Brw_WriteSmallLinkToDownloadFile (URL,&FileMetadata,FileNameToShow); Tbl_EndCell (); Tbl_EndRow (); @@ -9515,10 +9517,10 @@ void Brw_ShowFileMetadata (void) /***** Publisher's data *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Uploaded_by); + Tbl_EndCell (); + fprintf (Gbl.F.Out,""); if (FileHasPublisher) { /* Show photo */ @@ -9545,42 +9547,44 @@ void Brw_ShowFileMetadata (void) Fil_WriteFileSizeFull ((double) FileMetadata.Size,FileSizeStr); Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%s" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_File_size, + Txt_File_size); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", FileSizeStr); + Tbl_EndCell (); Tbl_EndRow (); /***** Write the date *****/ Tbl_StartRow (); fprintf (Gbl.F.Out,"" - "%s:" - "" - "" + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Date_of_creation); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Date_of_creation, + "", (long) FileMetadata.Time, (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); Tbl_EndRow (); /***** Private or public? *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Availability); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); if (ICanChangePublic) // I can change file to public { fprintf (Gbl.F.Out,""); @@ -9629,48 +9636,58 @@ void Brw_ShowFileMetadata (void) else // I can not edit file properties fprintf (Gbl.F.Out,"%s",Txt_LICENSES[FileMetadata.License]); Tbl_EndCell (); + Tbl_EndRow (); /***** Write my number of views *****/ if (Gbl.Usrs.Me.Logged) { Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_My_views, + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_My_views); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", FileMetadata.NumMyViews); + Tbl_EndCell (); + Tbl_EndRow (); } /***** Write number of identificated views *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u (%u %s)" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Identified_views, + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Identified_views); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u (%u %s)", FileMetadata.NumViewsFromLoggedUsrs, FileMetadata.NumLoggedUsrs, (FileMetadata.NumLoggedUsrs == 1) ? Txt_user[Usr_SEX_UNKNOWN] : Txt_users[Usr_SEX_UNKNOWN]); + Tbl_EndCell (); + Tbl_EndRow (); /***** Write number of public views *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "" - "%u" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Public_views, + "%s:", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Public_views); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", FileMetadata.NumPublicViews); + Tbl_EndCell (); + Tbl_EndRow (); /***** End box *****/ @@ -11919,12 +11936,13 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) CrsCod == Gbl.Hierarchy.Crs.CrsCod) ? "LIGHT_BLUE" : Gbl.ColorRows[Gbl.RowEvenOdd]; - /***** Write number of document in this search *****/ Tbl_StartRow (); + + /***** Write number of document in this search *****/ fprintf (Gbl.F.Out,"" - "%lu" - "", + "%lu", BgColor,++(*NumDocsNotHidden)); + Tbl_EndCell (); /***** Write institution logo, institution short name *****/ fprintf (Gbl.F.Out,"", @@ -12038,9 +12056,9 @@ static void Brw_WriteRowDocData (unsigned long *NumDocsNotHidden,MYSQL_ROW row) break; } fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", BgColor,Title); + Tbl_EndCell (); /***** Get the name of the file to show *****/ Brw_GetFileNameToShow (FileMetadata.FilFolLnk.Type, diff --git a/swad_forum.c b/swad_forum.c index 0a408f2ff..42d3ccaff 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -1174,13 +1174,13 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Str_Copy (LastSubject,Subject, Cns_MAX_BYTES_SUBJECT); - /***** Put an icon with post status *****/ Tbl_StartRow (); + + /***** Put an icon with post status *****/ fprintf (Gbl.F.Out,"" "\"%s\"" - "", + " class=\"ICO16x16\" />", NewPst ? "MSG_TIT_BG_NEW" : "MSG_TIT_BG", Cfg_URL_ICON_PUBLIC, @@ -1190,6 +1190,7 @@ static void For_ShowAForumPost (unsigned PstNum,long PstCod, Txt_MSG_Open, NewPst ? Txt_MSG_New : Txt_MSG_Open); + Tbl_EndCell (); /***** Write post number *****/ Msg_WriteMsgNumber ((unsigned long) PstNum,NewPst); @@ -3514,48 +3515,51 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE], "" - "", + "", UniqueId,Style,BgColor, UniqueId,(long) TimeUTC, (unsigned) Gbl.Prefs.DateFormat,Txt_Today); + Tbl_EndCell (); } else for (Column = 1; Column <= 2; Column++) - fprintf (Gbl.F.Out,"" - "", + { + fprintf (Gbl.F.Out,"", Style,BgColor); + Tbl_EndCell (); + } } /***** Write number of posts in this thread *****/ fprintf (Gbl.F.Out,"" - "%u " - "", + "%u ", Style,BgColor, Thr.NumPosts); + Tbl_EndCell (); /***** Write number of new posts in this thread *****/ fprintf (Gbl.F.Out,"" - "%u " - "", + "%u ", Style,BgColor, Thr.NumUnreadPosts); + Tbl_EndCell (); /***** Write number of users who have write posts in this thread *****/ fprintf (Gbl.F.Out,"" - "%u " - "", + "%u ", Style,BgColor, Thr.NumWriters); + Tbl_EndCell (); /***** Write number of users who have read this thread *****/ fprintf (Gbl.F.Out,"" - "%u " - "", + "%u ", Style,BgColor, Thr.NumReaders); + Tbl_EndCell (); + Tbl_EndRow (); } @@ -3963,33 +3967,39 @@ static void For_WriteFormForumPst (bool IsReply,const char *Subject) // If writing a reply to a message of an existing thread ==> write subject /* Subject */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_MSG_Subject); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_MSG_Subject, + " required=\"required\" />", Cns_MAX_CHARS_SUBJECT, IsReply ? Subject : ""); + Tbl_EndCell (); + Tbl_EndRow (); /* Content */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme],Txt_MSG_Content); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme],Txt_MSG_Content); + ""); + Tbl_EndCell (); + Tbl_EndRow (); Tbl_EndTable (); diff --git a/swad_game.c b/swad_game.c index a59544bc5..183d9c79f 100644 --- a/swad_game.c +++ b/swad_game.c @@ -507,11 +507,11 @@ void Gam_ShowOneGame (long GamCod, Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML, Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML Str_InsertLinks (Txt,Cns_MAX_BYTES_TEXT,60); // Insert links - fprintf (Gbl.F.Out,"
%s
" - "", + fprintf (Gbl.F.Out,"
%s
", Game.Hidden ? "DAT_LIGHT" : "DAT", Txt); + Tbl_EndCell (); /***** End 2nd row of this game *****/ Tbl_EndRow (); @@ -1136,33 +1136,39 @@ static void Gam_PutFormsEditionGame (struct Game *Game,bool ItsANewGame) /***** Game title *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "" + "", + The_ClassFormInBox[Gbl.Prefs.Theme], + Txt_Title); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" - "", - The_ClassFormInBox[Gbl.Prefs.Theme], - Txt_Title, + " required=\"required\" />", Gam_MAX_CHARS_TITLE,Game->Title); + Tbl_EndCell (); + Tbl_EndRow (); /***** Game text *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "" - "" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); + Tbl_EndRow (); /***** End table, send button and end box *****/ @@ -1740,15 +1746,15 @@ static void Gam_ListOneOrMoreQuestionsForEdition (long GamCod,unsigned NumQsts, /* Write answer type (row[2]) */ Gbl.Test.AnswerType = Tst_ConvertFromStrAnsTypDBToAnsTyp (row[2]); - fprintf (Gbl.F.Out,"
%s
" - "", + fprintf (Gbl.F.Out,"
%s
", Txt_TST_STR_ANSWER_TYPES[Gbl.Test.AnswerType]); + Tbl_EndCell (); /* Write question code */ fprintf (Gbl.F.Out,"" - "%ld " - "", + "%ld ", Gbl.RowEvenOdd,Gbl.Test.QstCod); + Tbl_EndCell (); /* Write the question tags */ fprintf (Gbl.F.Out,"", diff --git a/swad_group.c b/swad_group.c index 1b255d2c3..c3c93f199 100644 --- a/swad_group.c +++ b/swad_group.c @@ -1365,19 +1365,21 @@ static void Grp_ListGroupTypesForEdition (void) Grp_PutParamGrpTypCod (Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].GrpTypCod); Tbl_StartTableCenterPadding (2); Tbl_StartRow (); + fprintf (Gbl.F.Out,"" "\"%s\"" - "" - "", + " class=\"%sCONTEXT_ICO_16x16\" />", Cfg_URL_ICON_PUBLIC, Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? Txt_The_groups_will_automatically_open : - Txt_The_groups_will_not_automatically_open, + Txt_The_groups_will_not_automatically_open, Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? Txt_The_groups_will_automatically_open : - Txt_The_groups_will_not_automatically_open, + Txt_The_groups_will_not_automatically_open, Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].MustBeOpened ? "" : - "ICO_HIDDEN "); + "ICO_HIDDEN "); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); snprintf (Id,sizeof (Id), "open_time_%u", UniqueId); @@ -1390,6 +1392,7 @@ static void Grp_ListGroupTypesForEdition (void) Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second true); // Submit on change Tbl_EndCell (); + Tbl_EndRow (); Tbl_EndTable (); Frm_EndForm (); @@ -1397,9 +1400,10 @@ static void Grp_ListGroupTypesForEdition (void) /* Number of groups of this type */ fprintf (Gbl.F.Out,"" - "%u" - "", + "%u", Gbl.Crs.Grps.GrpTypes.LstGrpTypes[NumGrpTyp].NumGrps); + Tbl_EndCell (); + Tbl_EndRow (); } @@ -1632,10 +1636,12 @@ static void Grp_ListGroupsForEdition (void) for (Role = Rol_TCH; Role >= Rol_STD; Role--) + { fprintf (Gbl.F.Out,"" - "%d" - "", + "%d", Grp->NumUsrs[Role]); + Tbl_EndCell (); + } /***** Maximum number of students of the group (row[3]) *****/ fprintf (Gbl.F.Out,""); @@ -1762,8 +1768,8 @@ void Grp_ListGrpsToEditAsgAttSvyMch (struct GroupType *GrpTyp,long Cod, if (!(IBelongToThisGroup || Gbl.Usrs.Me.Role.Logged == Rol_SYS_ADM)) fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," onclick=\"uncheckParent(this,'WholeCrs')\" />" - ""); + fprintf (Gbl.F.Out," onclick=\"uncheckParent(this,'WholeCrs')\" />"); + Tbl_EndCell (); Grp_WriteRowGrp (Grp,IBelongToThisGroup); @@ -2067,8 +2073,8 @@ static bool Grp_ListGrpsForChangeMySelection (struct GroupType *GrpTyp, fprintf (Gbl.F.Out,IBelongToThisGroup ? " readonly" : // I can not unregister (disabled does not work because the value is not submitted) " disabled=\"disabled\""); // I can not register - fprintf (Gbl.F.Out," />" - ""); + fprintf (Gbl.F.Out," />"); + Tbl_EndCell (); Grp_WriteRowGrp (Grp,IBelongToThisGroup); @@ -2260,7 +2266,8 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp, fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllGroups')\""); else fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," />"); + fprintf (Gbl.F.Out," />"); + Tbl_EndCell (); Grp_WriteRowGrp (Grp,IBelongToThisGroup); @@ -2297,31 +2304,33 @@ static void Grp_ListGrpsForMultipleSelection (struct GroupType *GrpTyp, } else fprintf (Gbl.F.Out," disabled=\"disabled\""); - fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllGroups')\" />" - ""); + fprintf (Gbl.F.Out," onclick=\"checkParent(this,'AllGroups')\" />"); + Tbl_EndCell (); /* Column closed/open */ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Group name = students with no group */ fprintf (Gbl.F.Out,"" - "" - "", + "", -(GrpTyp->GrpTypCod),Txt_users_with_no_group); + Tbl_EndCell (); /* Classroom */ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /* Number of students who don't belong to any group of this type */ for (Role = Rol_TCH; Role >= Rol_STD; Role--) + { fprintf (Gbl.F.Out,"" - "%lu" - "", + "%lu", Grp_CountNumUsrsInNoGrpsOfType (Role,GrpTyp->GrpTypCod)); + Tbl_EndCell (); + } /* Last empty columns for max. students and vacants */ Tbl_PutEmptyCells (2); @@ -2428,19 +2437,19 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) fprintf (Gbl.F.Out,"\">" "" - "", + "", Grp->GrpCod, Grp->GrpName); + Tbl_EndCell (); /***** Classroom *****/ fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Grp->Classroom.ShrtName); + Tbl_EndCell (); /***** Current number of users in this group *****/ for (Role = Rol_TCH; @@ -2451,9 +2460,9 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) if (Highlight) fprintf (Gbl.F.Out," LIGHT_BLUE"); fprintf (Gbl.F.Out,"\">" - "%d" - "", + "%d", Grp->NumUsrs[Role]); + Tbl_EndCell (); } /***** Max. number of students in this group *****/ @@ -2462,8 +2471,8 @@ static void Grp_WriteRowGrp (struct Group *Grp,bool Highlight) fprintf (Gbl.F.Out," LIGHT_BLUE"); fprintf (Gbl.F.Out,"\">"); Grp_WriteMaxStds (Grp->MaxStudents); - fprintf (Gbl.F.Out," " - ""); + fprintf (Gbl.F.Out," "); + Tbl_EndCell (); /***** Vacants in this group *****/ fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Name of group type *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Grp_MAX_CHARS_GROUP_TYPE_NAME,Gbl.Crs.Grps.GrpTyp.GrpTypName); + Tbl_EndCell (); /***** Is it mandatory to register in any groups of this type? *****/ fprintf (Gbl.F.Out,"" @@ -2531,9 +2541,9 @@ static void Grp_PutFormToCreateGroupType (void) if (Gbl.Crs.Grps.GrpTyp.MandatoryEnrolment) fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out,">%s" - "" - "", + "", Txt_It_is_mandatory_to_choose_a_group); + Tbl_EndCell (); /***** Is it possible to register in multiple groups of this type? *****/ fprintf (Gbl.F.Out,"" @@ -2548,27 +2558,29 @@ static void Grp_PutFormToCreateGroupType (void) if (Gbl.Crs.Grps.GrpTyp.MultipleEnrolment) fprintf (Gbl.F.Out," selected=\"selected\""); fprintf (Gbl.F.Out,">%s" - "" - "", + "", Txt_A_student_can_belong_to_several_groups); + Tbl_EndCell (); /***** Open time *****/ fprintf (Gbl.F.Out,""); Tbl_StartTablePadding (2); Tbl_StartRow (); + fprintf (Gbl.F.Out,"" "\"%s\"" - "" - "", + " class=\"%sCONTEXT_ICO_16x16\" />", Cfg_URL_ICON_PUBLIC, Gbl.Crs.Grps.GrpTyp.MustBeOpened ? Txt_The_groups_will_automatically_open : - Txt_The_groups_will_not_automatically_open, + Txt_The_groups_will_not_automatically_open, Gbl.Crs.Grps.GrpTyp.MustBeOpened ? Txt_The_groups_will_automatically_open : - Txt_The_groups_will_not_automatically_open, + Txt_The_groups_will_not_automatically_open, Gbl.Crs.Grps.GrpTyp.MustBeOpened ? "" : - "ICO_HIDDEN "); + "ICO_HIDDEN "); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Dat_WriteFormClientLocalDateTimeFromTimeUTC ("open_time", "Open", Gbl.Crs.Grps.GrpTyp.OpenTimeUTC, @@ -2578,14 +2590,16 @@ static void Grp_PutFormToCreateGroupType (void) Dat_HMS_DO_NOT_SET, // Don't set hour, minute and second false); // Don't submit on change Tbl_EndCell (); + Tbl_EndRow (); Tbl_EndTable (); Tbl_EndCell (); /***** Number of groups of this type *****/ fprintf (Gbl.F.Out,"" - "0" // It's a new group type ==> 0 groups - ""); + "0"); // It's a new group type ==> 0 groups + Tbl_EndCell (); + Tbl_EndRow (); /***** End table, send button and end box *****/ @@ -2625,7 +2639,8 @@ static void Grp_PutFormToCreateGroup (void) /***** Empty column to remove *****/ Tbl_StartRow (); - fprintf (Gbl.F.Out,""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Disabled icon to open group *****/ fprintf (Gbl.F.Out,""); @@ -2657,16 +2672,16 @@ static void Grp_PutFormToCreateGroup (void) } /* End selector */ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Group name *****/ fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Grp_MAX_CHARS_GROUP_NAME,Gbl.Crs.Grps.GrpName); + Tbl_EndCell (); /***** Classroom *****/ /* Start selector */ @@ -2701,24 +2716,27 @@ static void Grp_PutFormToCreateGroup (void) } /* End selector */ - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Current number of users in this group *****/ for (Role = Rol_TCH; Role >= Rol_STD; Role--) + { fprintf (Gbl.F.Out,"" - "0" - ""); + "0"); + Tbl_EndCell (); + } /***** Maximum number of students *****/ fprintf (Gbl.F.Out,"" "" - ""); + fprintf (Gbl.F.Out,"\" />"); + Tbl_EndCell (); + Tbl_EndRow (); /***** End table, send button and end box *****/ diff --git a/swad_help.c b/swad_help.c index b8424cd9b..c33e6c45b 100644 --- a/swad_help.c +++ b/swad_help.c @@ -274,9 +274,9 @@ static void Hlp_ShowRowHelpWhatWouldYouLikeToDo (const char *Description, /***** Description *****/ fprintf (Gbl.F.Out,"" - "%s:" - "", + "%s:", Description); + Tbl_EndCell (); /***** Button *****/ fprintf (Gbl.F.Out,""); diff --git a/swad_hierarchy.c b/swad_hierarchy.c index 744b16820..8a6051535 100644 --- a/swad_hierarchy.c +++ b/swad_hierarchy.c @@ -104,13 +104,16 @@ void Hie_WriteMenuHierarchy (void) /***** Write a 1st selector with all the countries *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Country); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Cty_WriteSelectorOfCountry (); Tbl_EndCell (); + Tbl_EndRow (); if (Gbl.Hierarchy.Cty.CtyCod > 0) @@ -118,13 +121,16 @@ void Hie_WriteMenuHierarchy (void) /***** Write a 2nd selector with the institutions of selected country *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Institution); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Ins_WriteSelectorOfInstitution (); Tbl_EndCell (); + Tbl_EndRow (); if (Gbl.Hierarchy.Ins.InsCod > 0) @@ -132,13 +138,16 @@ void Hie_WriteMenuHierarchy (void) /***** Write a 3rd selector with all the centres of selected institution *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Centre); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Ctr_WriteSelectorOfCentre (); Tbl_EndCell (); + Tbl_EndRow (); if (Gbl.Hierarchy.Ctr.CtrCod > 0) @@ -146,13 +155,16 @@ void Hie_WriteMenuHierarchy (void) /***** Write a 4th selector with all the degrees of selected centre *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Degree); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Deg_WriteSelectorOfDegree (); Tbl_EndCell (); + Tbl_EndRow (); if (Gbl.Hierarchy.Deg.DegCod > 0) @@ -160,13 +172,16 @@ void Hie_WriteMenuHierarchy (void) /***** Write a 5th selector with all the courses of selected degree *****/ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Course); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Crs_WriteSelectorOfCourse (); Tbl_EndCell (); + Tbl_EndRow (); } } diff --git a/swad_holiday.c b/swad_holiday.c index a5c1e8d45..6a1a3d32a 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -150,16 +150,19 @@ void Hld_SeeHolidays (void) { /* Write data of this holiday */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s" - "", + "%s", Gbl.Hlds.Lst[NumHld].PlcCod <= 0 ? Txt_All_places : Gbl.Hlds.Lst[NumHld].PlaceFullName); + Tbl_EndCell (); + Dat_ConvDateToDateStr (&Gbl.Hlds.Lst[NumHld].StartDate,StrDate); fprintf (Gbl.F.Out,"" - " %s" - "", + " %s", StrDate); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" " "); switch (Gbl.Hlds.Lst[NumHld].HldTyp) @@ -171,11 +174,13 @@ void Hld_SeeHolidays (void) fprintf (Gbl.F.Out,"%s",StrDate); break; } - fprintf (Gbl.F.Out,"" - "" - " %s" - "", + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + " %s", Gbl.Hlds.Lst[NumHld].Name); + Tbl_EndCell (); + Tbl_EndRow (); } Tbl_EndTable (); @@ -572,9 +577,9 @@ static void Hld_ListHolidaysForEdition (void) /* Holiday code */ fprintf (Gbl.F.Out,"" - "%ld " - "", + "%ld ", Hld->HldCod); + Tbl_EndCell (); /* Holiday place */ fprintf (Gbl.F.Out,""); @@ -1009,8 +1014,8 @@ static void Hld_PutFormToCreateHoliday (void) Gbl.Plcs.Lst[NumPlc].PlcCod == Hld_EditingHld->PlcCod ? " selected=\"selected\"" : "", Gbl.Plcs.Lst[NumPlc].ShrtName); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Holiday type *****/ fprintf (Gbl.F.Out,"" @@ -1023,8 +1028,8 @@ static void Hld_PutFormToCreateHoliday (void) HolidayType == Hld_EditingHld->HldTyp ? " selected=\"selected\"" : "", Txt_HOLIDAY_TYPES[HolidayType]); - fprintf (Gbl.F.Out,"" - ""); + fprintf (Gbl.F.Out,""); + Tbl_EndCell (); /***** Holiday date / Non school period start date *****/ fprintf (Gbl.F.Out,""); @@ -1048,9 +1053,9 @@ static void Hld_PutFormToCreateHoliday (void) fprintf (Gbl.F.Out,"" "" - "", + " required=\"required\" />", Hld_MAX_CHARS_HOLIDAY_NAME,Hld_EditingHld->Name); + Tbl_EndCell (); Tbl_PutEmptyCells (1); diff --git a/swad_indicator.c b/swad_indicator.c index 0b943ecdf..ba1b030e5 100644 --- a/swad_indicator.c +++ b/swad_indicator.c @@ -121,37 +121,46 @@ void Ind_ReqIndicatorsCourses (void) /* Scope */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Scope); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Sco_PutSelectorScope ("ScopeInd",true); Tbl_EndCell (); + Tbl_EndRow (); /* Compute stats for a type of degree */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Types_of_degree); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); DT_WriteSelectorDegreeTypes (); fprintf (Gbl.F.Out," ("); fprintf (Gbl.F.Out,Txt_only_if_the_scope_is_X, Cfg_PLATFORM_SHORT_NAME); - fprintf (Gbl.F.Out,")"); + fprintf (Gbl.F.Out,")"); + Tbl_EndCell (); + Tbl_EndRow (); /* Compute stats for courses with teachers belonging to any department or to a particular departament? */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "" - "" - "", + "", Dpt_PARAM_DPT_COD_NAME, The_ClassFormInBox[Gbl.Prefs.Theme],Txt_Department); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Dpt_WriteSelectorDepartment (Gbl.Hierarchy.Ins.InsCod, // Departments in current insitution Gbl.Stat.DptCod, // Selected department "INDICATORS_INPUT", // Selector class @@ -159,6 +168,7 @@ void Ind_ReqIndicatorsCourses (void) Txt_Any_department, // Text when no department selected true); // Submit on change Tbl_EndCell (); + Tbl_EndRow (); /***** Get courses from database *****/ @@ -174,14 +184,17 @@ void Ind_ReqIndicatorsCourses (void) /* Selection of the number of indicators */ Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s:" - "" - "", + "%s:", The_ClassFormInBox[Gbl.Prefs.Theme], Txt_No_of_indicators); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,""); Ind_ShowNumCoursesWithIndicators (NumCrssWithIndicatorYes,NumCrss,true); Tbl_EndCell (); + Tbl_EndRow (); /* End table and form */ @@ -651,6 +664,7 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1 Class = Gbl.Stat.IndicatorsSelected[Ind] ? ClassHighlight : ClassNormal; Tbl_StartRow (); + if (PutForm) { fprintf (Gbl.F.Out,"" @@ -660,46 +674,54 @@ static void Ind_ShowNumCoursesWithIndicators (unsigned NumCrssWithIndicatorYes[1 Class,Ind,Ind); if (Gbl.Stat.IndicatorsSelected[Ind]) fprintf (Gbl.F.Out," checked=\"checked\""); - fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\" />" - "", + fprintf (Gbl.F.Out," onchange=\"document.getElementById('%s').submit();\" />", Gbl.Form.Id); + Tbl_EndCell (); } + fprintf (Gbl.F.Out,"" - "" - "" - "" - "%u" - "" - "" - "(%.1f%%)" - "", + "", Class, - Ind,Ind, + Ind,Ind); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", Class, - NumCrssWithIndicatorYes[Ind], + NumCrssWithIndicatorYes[Ind]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "(%.1f%%)", Class, NumCrss ? (float) NumCrssWithIndicatorYes[Ind] * 100.0 / (float) NumCrss : 0.0); + Tbl_EndCell (); + Tbl_EndRow (); } /***** Write total of courses *****/ Tbl_StartRow (); + if (PutForm) - fprintf (Gbl.F.Out,"" - ""); + Tbl_PutEmptyCells (1); + fprintf (Gbl.F.Out,"" - "%s" - "" - "" - "%u" - "" - "" - "(%.1f%%)" - "", - Txt_Total, - NumCrss, + "%s", + Txt_Total); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + NumCrss); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "(%.1f%%)", 100.0); + Tbl_EndCell (); + Tbl_EndRow (); Tbl_EndTable (); @@ -1040,117 +1062,121 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat { case Ind_INDICATORS_BRIEF: Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - "" + "%s", + Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : + (Indicators.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + Gbl.RowEvenOdd, + row[0]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : + (Indicators.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + Gbl.RowEvenOdd, + row[1]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : + (Indicators.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + Gbl.RowEvenOdd, + row[3]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" "%s/?crs=%ld&act=%ld" - "" - "" - - "" - "%u" - "" - - "" - "%s" - "" - "" - "%s" - "" - - "" - "%s" - "" - "" - "%s" - "" - - "" - "%s" - "" - "" - "%s" - "" - - "" - "%s" - "" - "" - "%s" - "" - - "" - "%s" - "" - "" - "%s" - "", - Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : - (Indicators.CoursePartiallyOK ? "DAT_SMALL" : - "DAT_SMALL_RED"), - Gbl.RowEvenOdd, - row[0], - Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : - (Indicators.CoursePartiallyOK ? "DAT_SMALL" : - "DAT_SMALL_RED"), - Gbl.RowEvenOdd, - row[1], - Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : - (Indicators.CoursePartiallyOK ? "DAT_SMALL" : - "DAT_SMALL_RED"), - Gbl.RowEvenOdd, - row[3], + "", Gbl.RowEvenOdd,Cfg_URL_SWAD_CGI,CrsCod,ActCod, - Cfg_URL_SWAD_CGI,CrsCod,ActCod, + Cfg_URL_SWAD_CGI,CrsCod,ActCod); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%u", Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd, - Indicators.NumIndicators, + Indicators.NumIndicators); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsSyllabus ? Txt_YES : - "", + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsSyllabus ? "" : - Txt_NO, + Txt_NO); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereAreAssignments ? Txt_YES : - "", + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereAreAssignments ? "" : - Txt_NO, + Txt_NO); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsOnlineTutoring ? Txt_YES : - "", + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsOnlineTutoring ? "" : - Txt_NO, + Txt_NO); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereAreMaterials ? Txt_YES : - "", + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereAreMaterials ? "" : - Txt_NO, + Txt_NO); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsAssessment ? Txt_YES : - "", + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsAssessment ? "" : Txt_NO); + Tbl_EndCell (); + Tbl_EndRow (); break; case Ind_INDICATORS_FULL: @@ -1160,224 +1186,241 @@ static void Ind_ShowTableOfCoursesWithIndicators (Ind_IndicatorsLayout_t Indicat Usr_GetNumUsrsInCrs (Rol_TCH,CrsCod); // Teachers Tbl_StartRow (); + fprintf (Gbl.F.Out,"" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - "" + "%s", + Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : + (Indicators.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + Gbl.RowEvenOdd, + row[0]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : + (Indicators.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + Gbl.RowEvenOdd, + row[1]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : + (Indicators.CoursePartiallyOK ? "DAT_SMALL" : + "DAT_SMALL_RED"), + Gbl.RowEvenOdd, + row[3]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" "" "%s/?crs=%ld&act=%ld" - "" - "" - - "" - "%u" - "" - "" - "%u" - "" - - "" - "%u" - "" - - "" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - - "" - "%s" - "" - "" - "%s" - "" - "" - "%u" - "" - "" - "%lu" - "" - "" - "%lu" - "" - - "" - "%s" - "" - "" - "%s" - "" - "" - "%u" - "" - "" - "%u" - "" - "" - "%u" - "" - - "" - "%s" - "" - "" - "%s" - "" - "" - "%lu" - "" - "" - "%lu" - "" - - "" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "" - "" - "%s" - "", - Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : - (Indicators.CoursePartiallyOK ? "DAT_SMALL" : - "DAT_SMALL_RED"), - Gbl.RowEvenOdd, - row[0], - Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : - (Indicators.CoursePartiallyOK ? "DAT_SMALL" : - "DAT_SMALL_RED"), - Gbl.RowEvenOdd, - row[1], - Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : - (Indicators.CoursePartiallyOK ? "DAT_SMALL" : - "DAT_SMALL_RED"), - Gbl.RowEvenOdd, - row[3], + "", Gbl.RowEvenOdd,Cfg_URL_SWAD_CGI,CrsCod,ActCod, - Cfg_URL_SWAD_CGI,CrsCod,ActCod, + Cfg_URL_SWAD_CGI,CrsCod,ActCod); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%u", NumTchs != 0 ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd, - NumTchs, + NumTchs); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", NumStds != 0 ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd, - NumStds, + NumStds); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%u", Indicators.CourseAllOK ? "DAT_SMALL_GREEN" : (Indicators.CoursePartiallyOK ? "DAT_SMALL" : "DAT_SMALL_RED"), Gbl.RowEvenOdd, - Indicators.NumIndicators, + Indicators.NumIndicators); + Tbl_EndCell (); + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_GREEN",Gbl.RowEvenOdd, Indicators.ThereIsSyllabus ? Txt_YES : - "", + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", "DAT_SMALL_RED",Gbl.RowEvenOdd, Indicators.ThereIsSyllabus ? "" : - Txt_NO, + Txt_NO); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", (Indicators.SyllabusLecSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd, - Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusLecSrc], + Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusLecSrc]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", (Indicators.SyllabusPraSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd, - Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusPraSrc], - (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc], + Txt_INFO_SRC_SHORT_TEXT[Indicators.SyllabusPraSrc]); + Tbl_EndCell (); - "DAT_SMALL_GREEN",Gbl.RowEvenOdd, - Indicators.ThereAreAssignments ? Txt_YES : - "", - "DAT_SMALL_RED",Gbl.RowEvenOdd, - Indicators.ThereAreAssignments ? "" : - Txt_NO, - (Indicators.NumAssignments != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumAssignments, - (Indicators.NumFilesAssignments != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumFilesAssignments, - (Indicators.NumFilesWorks != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumFilesWorks, - - "DAT_SMALL_GREEN",Gbl.RowEvenOdd, - Indicators.ThereIsOnlineTutoring ? Txt_YES : - "", - "DAT_SMALL_RED",Gbl.RowEvenOdd, - Indicators.ThereIsOnlineTutoring ? "" : - Txt_NO, - (Indicators.NumThreads != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumThreads, - (Indicators.NumPosts != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumPosts, - (Indicators.NumMsgsSentByTchs != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumMsgsSentByTchs, - - "DAT_SMALL_GREEN",Gbl.RowEvenOdd, - Indicators.ThereAreMaterials ? Txt_YES : - "", - "DAT_SMALL_RED",Gbl.RowEvenOdd, - Indicators.ThereAreMaterials ? "" : - Txt_NO, - (Indicators.NumFilesInDocumentZones != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumFilesInDocumentZones, - (Indicators.NumFilesInSharedZones != 0) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Indicators.NumFilesInSharedZones, - - "DAT_SMALL_GREEN",Gbl.RowEvenOdd, - Indicators.ThereIsAssessment ? Txt_YES : - "", - "DAT_SMALL_RED",Gbl.RowEvenOdd, - Indicators.ThereIsAssessment ? "" : - Txt_NO, - (Indicators.AssessmentSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : - "DAT_SMALL_RED", - Gbl.RowEvenOdd, - Txt_INFO_SRC_SHORT_TEXT[Indicators.AssessmentSrc], + fprintf (Gbl.F.Out,"" + "%s", (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : "DAT_SMALL_RED", Gbl.RowEvenOdd, Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, + Indicators.ThereAreAssignments ? Txt_YES : + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_RED",Gbl.RowEvenOdd, + Indicators.ThereAreAssignments ? "" : + Txt_NO); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + (Indicators.NumAssignments != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumAssignments); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%lu", + (Indicators.NumFilesAssignments != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumFilesAssignments); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%lu", + (Indicators.NumFilesWorks != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumFilesWorks); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, + Indicators.ThereIsOnlineTutoring ? Txt_YES : + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_RED",Gbl.RowEvenOdd, + Indicators.ThereIsOnlineTutoring ? "" : + Txt_NO); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + (Indicators.NumThreads != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumThreads); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + (Indicators.NumPosts != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumPosts); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%u", + (Indicators.NumMsgsSentByTchs != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumMsgsSentByTchs); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, + Indicators.ThereAreMaterials ? Txt_YES : + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_RED",Gbl.RowEvenOdd, + Indicators.ThereAreMaterials ? "" : + Txt_NO); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%lu", + (Indicators.NumFilesInDocumentZones != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumFilesInDocumentZones); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%lu", + (Indicators.NumFilesInSharedZones != 0) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Indicators.NumFilesInSharedZones); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_GREEN",Gbl.RowEvenOdd, + Indicators.ThereIsAssessment ? Txt_YES : + ""); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + "DAT_SMALL_RED",Gbl.RowEvenOdd, + Indicators.ThereIsAssessment ? "" : + Txt_NO); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + (Indicators.AssessmentSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Txt_INFO_SRC_SHORT_TEXT[Indicators.AssessmentSrc]); + Tbl_EndCell (); + + fprintf (Gbl.F.Out,"" + "%s", + (Indicators.TeachingGuideSrc != Inf_INFO_SRC_NONE) ? "DAT_SMALL_GREEN" : + "DAT_SMALL_RED", + Gbl.RowEvenOdd, + Txt_INFO_SRC_SHORT_TEXT[Indicators.TeachingGuideSrc]); + Tbl_EndCell (); + Tbl_EndRow (); break; }