From d632e6504f5e151c3a80c73fb8041074144f75a5 Mon Sep 17 00:00:00 2001 From: acanas Date: Thu, 23 Mar 2023 22:47:23 +0100 Subject: [PATCH] Version 22.78.15: Mar 23, 2023 Changes in rubric criteria. --- css/{swad22.57.1.css => swad22.78.15.css} | 19 +++++++---- swad_banner.c | 2 +- swad_center.c | 8 ++--- swad_changelog.h | 5 +-- swad_degree.c | 2 +- swad_department.c | 2 +- swad_holiday.c | 2 +- swad_institution.c | 4 +-- swad_mail.c | 2 +- swad_place.c | 2 +- swad_rubric_criteria.c | 41 +++++++++++++++++++---- swad_text.c | 23 +++++++++++++ 12 files changed, 84 insertions(+), 28 deletions(-) rename css/{swad22.57.1.css => swad22.78.15.css} (99%) diff --git a/css/swad22.57.1.css b/css/swad22.78.15.css similarity index 99% rename from css/swad22.57.1.css rename to css/swad22.78.15.css index 7f0338a9..60ee37ce 100644 --- a/css/swad22.57.1.css +++ b/css/swad22.78.15.css @@ -50,13 +50,6 @@ textarea font-size:13pt; font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; } -.INPUT_WHITE, -.INPUT_GREY, -.INPUT_PURPLE, -.INPUT_BLUE, -.INPUT_YELLOW, -.INPUT_PINK {} -.INPUT_DARK {border-color:#505050;background-color:#1f1f1f;color:white;} table { @@ -4976,6 +4969,11 @@ button.PAG_DARK:hover, .PAG_CUR_DARK {background-color:#707070;} box-sizing:border-box; width:60px; } +.INPUT_FLOAT + { + box-sizing:border-box; + width:90px; + } .INPUT_WWW_NARROW { box-sizing:border-box; @@ -5001,6 +4999,13 @@ button.PAG_DARK:hover, .PAG_CUR_DARK {background-color:#707070;} box-sizing:border-box; width:90px; } +.INPUT_WHITE, +.INPUT_GREY, +.INPUT_PURPLE, +.INPUT_BLUE, +.INPUT_YELLOW, +.INPUT_PINK {} +.INPUT_DARK {border-color:#505050;background-color:#1f1f1f;color:white;} /******************************** Last clicks ********************************/ .LC_CLK {text-align:right; vertical-align:top; min-width:60px;} diff --git a/swad_banner.c b/swad_banner.c index be32e938..4fe4590f 100644 --- a/swad_banner.c +++ b/swad_banner.c @@ -286,7 +286,7 @@ static void Ban_GetListBanners (struct Ban_Banners *Banners, for (NumBan = 0; NumBan < Banners->Num; NumBan++) - Ban_GetBannerDataFromRow (*mysql_res,&(Banners->Lst[NumBan])); + Ban_GetBannerDataFromRow (*mysql_res,&Banners->Lst[NumBan]); } /***** Free structure that stores the query result *****/ diff --git a/swad_center.c b/swad_center.c index 2eea42ee..9fa17e73 100644 --- a/swad_center.c +++ b/swad_center.c @@ -535,7 +535,7 @@ void Ctr_GetBasicListOfCenters (long InsCod) NumCtr < Gbl.Hierarchy.Ctrs.Num; NumCtr++) /* Get center data */ - Ctr_GetCenterDataFromRow (mysql_res,&(Gbl.Hierarchy.Ctrs.Lst[NumCtr]), + Ctr_GetCenterDataFromRow (mysql_res,&Gbl.Hierarchy.Ctrs.Lst[NumCtr], false); // Don't get number of users who claim to belong to this center } @@ -568,8 +568,8 @@ void Ctr_GetFullListOfCenters (long InsCod,Ctr_Order_t SelectedOrder) NumCtr < Gbl.Hierarchy.Ctrs.Num; NumCtr++) /* Get center data */ - Ctr_GetCenterDataFromRow (mysql_res,&(Gbl.Hierarchy.Ctrs.Lst[NumCtr]), - true); // Get number of users who claim to belong to this center + Ctr_GetCenterDataFromRow (mysql_res,&Gbl.Hierarchy.Ctrs.Lst[NumCtr], + true); // Get number of users who claim to belong to this center } /***** Free structure that stores the query result *****/ @@ -603,7 +603,7 @@ bool Ctr_GetCenterDataByCod (struct Ctr_Center *Ctr) { /* Get center data */ Ctr_GetCenterDataFromRow (mysql_res,Ctr, - false); // Don't get number of users who claim to belong to this center + false); // Don't get number of users who claim to belong to this center /* Set return value */ CtrFound = true; diff --git a/swad_changelog.h b/swad_changelog.h index 2dbae29d..c3a66fc0 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -629,10 +629,11 @@ TODO: Emilce Barrera Mesa: Podr TODO: Emilce Barrera Mesa: Mis estudiantes presentan muchas dificultades a la hora de poner la foto porque la plataforma es muy exigente respecto al fondo de la imagen. */ -#define Log_PLATFORM_VERSION "SWAD 22.78.14 (2023-03-23)" -#define CSS_FILE "swad22.57.1.css" +#define Log_PLATFORM_VERSION "SWAD 22.78.15 (2023-03-23)" +#define CSS_FILE "swad22.78.15.css" #define JS_FILE "swad22.49.js" /* + Version 22.78.15: Mar 23, 2023 Changes in rubric criteria. (337686 lines) Version 22.78.14: Mar 23, 2023 Code refactoring in timeline. (337634 lines) Version 22.78.13: Mar 23, 2023 Code refactoring in rooms. (337641 lines) Version 22.78.12: Mar 23, 2023 Code refactoring in plugins. (337651 lines) diff --git a/swad_degree.c b/swad_degree.c index eae7ab61..77349198 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -987,7 +987,7 @@ void Deg_GetListAllDegsWithStds (struct ListDegrees *Degs) for (NumDeg = 0; NumDeg < Degs->Num; NumDeg++) - Deg_GetDegreeDataFromRow (mysql_res,&(Degs->Lst[NumDeg])); + Deg_GetDegreeDataFromRow (mysql_res,&Degs->Lst[NumDeg]); } else Degs->Lst = NULL; diff --git a/swad_department.c b/swad_department.c index ea86f5b2..198b392a 100644 --- a/swad_department.c +++ b/swad_department.c @@ -349,7 +349,7 @@ static void Dpt_GetListDepartments (struct Dpt_Departments *Departments,long Ins for (NumDpt = 0; NumDpt < Departments->Num; NumDpt++) - Dpt_GetDepartmentDataFromRow (mysql_res,&(Departments->Lst[NumDpt])); + Dpt_GetDepartmentDataFromRow (mysql_res,&Departments->Lst[NumDpt]); } /***** Free structure that stores the query result *****/ diff --git a/swad_holiday.c b/swad_holiday.c index e5a4bec3..0259eed6 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -333,7 +333,7 @@ void Hld_GetListHolidays (struct Hld_Holidays *Holidays) for (NumHld = 0; NumHld < Holidays->Num; NumHld++) - Hld_GetHolidayDataFromRow (mysql_res,&(Holidays->Lst[NumHld])); + Hld_GetHolidayDataFromRow (mysql_res,&Holidays->Lst[NumHld]); } /***** Free structure that stores the query result *****/ diff --git a/swad_institution.c b/swad_institution.c index 360549d6..92ed9d04 100644 --- a/swad_institution.c +++ b/swad_institution.c @@ -622,7 +622,7 @@ void Ins_GetBasicListOfInstitutions (long CtyCod) NumIns < Gbl.Hierarchy.Inss.Num; NumIns++) /* Get institution data */ - Ins_GetInstitDataFromRow (mysql_res,&(Gbl.Hierarchy.Inss.Lst[NumIns]), + Ins_GetInstitDataFromRow (mysql_res,&Gbl.Hierarchy.Inss.Lst[NumIns], false); // Don't get number of users who claim to belong to this institution } else @@ -655,7 +655,7 @@ void Ins_GetFullListOfInstitutions (long CtyCod) NumIns < Gbl.Hierarchy.Inss.Num; NumIns++) /* Get institution data */ - Ins_GetInstitDataFromRow (mysql_res,&(Gbl.Hierarchy.Inss.Lst[NumIns]), + Ins_GetInstitDataFromRow (mysql_res,&Gbl.Hierarchy.Inss.Lst[NumIns], true); // Get number of users who claim to belong to this institution } else diff --git a/swad_mail.c b/swad_mail.c index f3e067f7..0a06b98f 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -292,7 +292,7 @@ static void Mai_GetListMailDomainsAllowedForNotif (struct Mai_Mails *Mails) for (NumMai = 0; NumMai < Mails->Num; NumMai++) - Mai_GetMailDomainDataFromRow (mysql_res,&(Mails->Lst[NumMai]), + Mai_GetMailDomainDataFromRow (mysql_res,&Mails->Lst[NumMai], true); // Get number of users } diff --git a/swad_place.c b/swad_place.c index 4131bead..e9576739 100644 --- a/swad_place.c +++ b/swad_place.c @@ -367,7 +367,7 @@ void Plc_GetListPlaces (struct Plc_Places *Places) for (NumPlc = 0; NumPlc < Places->Num; NumPlc++) - Plc_GetPlaceDataFromRow (mysql_res,&(Places->Lst[NumPlc])); + Plc_GetPlaceDataFromRow (mysql_res,&Places->Lst[NumPlc]); } /***** Free structure that stores the query result *****/ diff --git a/swad_rubric_criteria.c b/swad_rubric_criteria.c index 4945e33b..65db91cf 100644 --- a/swad_rubric_criteria.c +++ b/swad_rubric_criteria.c @@ -178,6 +178,16 @@ static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics, The_GetSuffix ()); HTM_TD_End (); + /***** Source *****/ + HTM_TD_Begin ("class=\"LM %s\"",The_GetColorRows ()); + HTM_SELECT_Begin (HTM_DONT_SUBMIT_ON_CHANGE, + "id=\"deg\" name=\"Source\" class=\"INPUT_%s\"", + The_GetSuffix ()); + HTM_OPTION (HTM_Type_STRING,"Y",true,false, + "%s","Fuente"); + HTM_SELECT_End (); + HTM_TD_End (); + /***** Minimum and maximum values of the criterion *****/ for (ValueRange = (RubCri_ValueRange_t) 0; ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1); @@ -186,16 +196,16 @@ static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics, HTM_TD_Begin ("class=\"RM\""); HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],0.0,DBL_MAX,0.1, Criterion->Values[ValueRange],false, - " class=\"INPUT_%s\" required=\"required\"", + " class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"", The_GetSuffix ()); HTM_TD_End (); } - /***** Weight of the criterion *****/ + /***** Weight *****/ HTM_TD_Begin ("class=\"RM\""); HTM_INPUT_FLOAT ("Weight",0.0,1.0,0.01, Criterion->Weight,false, - " class=\"INPUT_%s\" required=\"required\"", + " class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"", The_GetSuffix ()); HTM_TD_End (); @@ -623,6 +633,16 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics, HTM_ARTICLE_End (); HTM_TD_End (); + /***** Source *****/ + HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ()); + HTM_SELECT_Begin (HTM_SUBMIT_ON_CHANGE, + "id=\"deg\" name=\"Source\" class=\"INPUT_%s\"", + The_GetSuffix ()); + HTM_OPTION (HTM_Type_STRING,"Y",true,false, + "%s","Fuente"); + HTM_SELECT_End (); + HTM_TD_End (); + /***** Minimum and maximum values of criterion *****/ for (ValueRange = (RubCri_ValueRange_t) 0; ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1); @@ -635,7 +655,8 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics, RubCri_PutParsOneCriterion (Rubrics); HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],0.0,DBL_MAX,0.1, Criterion.Values[ValueRange],false, - " class=\"INPUT_%s\" required=\"required\"", + " class=\"INPUT_FLOAT INPUT_%s\"" + " required=\"required\"", The_GetSuffix ()); Frm_EndForm (); } @@ -656,7 +677,8 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics, RubCri_PutParsOneCriterion (Rubrics); HTM_INPUT_FLOAT ("Weight",0.0,1.0,0.01, Criterion.Weight,false, - " class=\"INPUT_%s\" required=\"required\"", + " class=\"INPUT_FLOAT INPUT_%s\"" + " required=\"required\"", The_GetSuffix ()); Frm_EndForm (); } @@ -675,9 +697,11 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics, HTM_TR_Begin (NULL); /***** Questions *****/ - HTM_TD_Begin ("colspan=\"3\" class=\"LT %s\"", + HTM_TD_Begin ("colspan=\"5\" class=\"LT %s\"", The_GetColorRows ()); + // Description here + HTM_TD_End (); /***** End second row *****/ @@ -735,7 +759,8 @@ static void RubCri_GetCriterionDataFromRow (MYSQL_RES *mysql_res, Criterion->Weight = Str_GetDoubleFromStr (row[5 + RubCri_NUM_VALUES]); /***** Get the title of the criterion (row[8]) *****/ - Str_Copy (Criterion->Title,row[5 + RubCri_NUM_VALUES + 1],sizeof (Criterion->Title) - 1); + Str_Copy (Criterion->Title,row[5 + RubCri_NUM_VALUES + 1], + sizeof (Criterion->Title) - 1); } /*****************************************************************************/ @@ -783,6 +808,7 @@ static void RubCri_PutTableHeadingForCriteria (void) { extern const char *Txt_No_INDEX; extern const char *Txt_Criterion; + extern const char *Txt_Source; extern const char *Txt_Minimum; extern const char *Txt_Maximum; extern const char *Txt_Weight; @@ -794,6 +820,7 @@ static void RubCri_PutTableHeadingForCriteria (void) HTM_TH_Empty (1); HTM_TH (Txt_No_INDEX ,HTM_HEAD_RIGHT); HTM_TH (Txt_Criterion,HTM_HEAD_LEFT ); + HTM_TH (Txt_Source ,HTM_HEAD_LEFT ); HTM_TH (Txt_Minimum ,HTM_HEAD_RIGHT); HTM_TH (Txt_Maximum ,HTM_HEAD_RIGHT); HTM_TH (Txt_Weight ,HTM_HEAD_RIGHT); diff --git a/swad_text.c b/swad_text.c index d5c9c126..1d7e4c2f 100644 --- a/swad_text.c +++ b/swad_text.c @@ -44937,6 +44937,29 @@ const char *Txt_Sort_degrees_by = "Sort degrees by"; // Çeviri lazim! #endif +const char *Txt_Source = +#if L==1 // ca + "Font"; +#elif L==2 // de + "Quelle"; +#elif L==3 // en + "Source"; +#elif L==4 // es + "Fuente"; +#elif L==5 // fr + "Source"; +#elif L==6 // gn + "Fuente"; // Okoteve traducción +#elif L==7 // it + "Fonte"; +#elif L==8 // pl + "Źródło"; +#elif L==9 // pt + "Fonte"; +#elif L==10 // tr + "Source"; // Çeviri lazim! +#endif + const char *Txt_Source_of_information = #if L==1 // ca "Font d'informació";