mirror of https://github.com/acanas/swad-core.git
Version 22.104.2: May 04, 2023 Rubrics in project. Changes in input numbers.
This commit is contained in:
parent
6a92148fa5
commit
6252a1018b
|
@ -1366,7 +1366,8 @@ void HTM_INPUT_LONG (const char *Name,long Min,long Max,long Value,
|
|||
|
||||
void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,
|
||||
double Step, // Use 0 for "any"
|
||||
double Value,bool Disabled,
|
||||
double Value,
|
||||
HTM_SubmitOnChange_t SubmitOnChange,bool Disabled,
|
||||
const char *fmt,...)
|
||||
{
|
||||
va_list ap;
|
||||
|
@ -1404,6 +1405,9 @@ void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,
|
|||
}
|
||||
}
|
||||
|
||||
if (SubmitOnChange == HTM_SUBMIT_ON_CHANGE)
|
||||
HTM_Txt (" onchange=\"this.form.submit();return false;\"");
|
||||
|
||||
HTM_Txt (" />");
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,10 @@ void HTM_INPUT_PASSWORD (const char *Name,const char *PlaceHolder,
|
|||
void HTM_INPUT_LONG (const char *Name,long Min,long Max,long Value,
|
||||
HTM_SubmitOnChange_t SubmitOnChange,bool Disabled,
|
||||
const char *fmt,...);
|
||||
void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,double Step,double Value,bool Disabled,
|
||||
void HTM_INPUT_FLOAT (const char *Name,double Min,double Max,
|
||||
double Step, // Use 0 for "any"
|
||||
double Value,
|
||||
HTM_SubmitOnChange_t SubmitOnChange,bool Disabled,
|
||||
const char *fmt,...);
|
||||
void HTM_INPUT_RADIO (const char *Name,HTM_SubmitOnClick_t SubmitOnClick,
|
||||
const char *fmt,...);
|
||||
|
|
|
@ -358,7 +358,8 @@ static void CtrCfg_Latitude (void)
|
|||
-90.0, // South Pole
|
||||
90.0, // North Pole
|
||||
0.0, // step="any"
|
||||
Gbl.Hierarchy.Ctr.Coord.Latitude,false,
|
||||
Gbl.Hierarchy.Ctr.Coord.Latitude,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_COORD INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -385,7 +386,8 @@ static void CtrCfg_Longitude (void)
|
|||
-180.0, // West
|
||||
180.0, // East
|
||||
0.0, // step="any"
|
||||
Gbl.Hierarchy.Ctr.Coord.Longitude,false,
|
||||
Gbl.Hierarchy.Ctr.Coord.Longitude,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_COORD INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -412,7 +414,8 @@ static void CtrCfg_Altitude (void)
|
|||
-413.0, // Dead Sea shore
|
||||
8848.0, // Mount Everest
|
||||
0.0, // step="any"
|
||||
Gbl.Hierarchy.Ctr.Coord.Altitude,false,
|
||||
Gbl.Hierarchy.Ctr.Coord.Altitude,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
"class=\"INPUT_COORD INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
|
|
|
@ -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.104.1 (2023-05-04)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.104.2 (2023-05-04)"
|
||||
#define CSS_FILE "swad22.103.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.104.2: May 04, 2023 Rubrics in project. Changes in input numbers. (338022 lines)
|
||||
Version 22.104.1: May 04, 2023 Rubrics in project. Code refactoring in file browsers. (338014 lines)
|
||||
Version 22.104: May 03, 2023 Rubrics in project. Not finished. (338000 lines)
|
||||
3 changes necessary in database:
|
||||
|
|
|
@ -1372,7 +1372,8 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Exams->Exam.MaxGrade,false,
|
||||
HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Exams->Exam.MaxGrade,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
|
|
@ -1367,7 +1367,8 @@ static void Gam_PutFormsEditionGame (struct Gam_Games *Games,
|
|||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Games->Game.MaxGrade,false,
|
||||
HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Games->Game.MaxGrade,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
|
|
@ -463,7 +463,7 @@ void Rub_ShowRubricInProject (struct Prj_Projects *Projects,
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Rubric title *****/
|
||||
HTM_TD_Begin ("class=\"LT ASG_TITLE_%s %s\"",
|
||||
HTM_TD_Begin ("colspan=\"8\" class=\"LT ASG_TITLE_%s %s\"",
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
HTM_TxtColonNBSP (WhichRubricTxt);
|
||||
HTM_Txt (Rubric->Title);
|
||||
|
@ -476,7 +476,7 @@ void Rub_ShowRubricInProject (struct Prj_Projects *Projects,
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Text of the rubric *****/
|
||||
HTM_TD_Begin ("class=\"LT PAR DAT_%s %s\"",
|
||||
HTM_TD_Begin ("colspan=\"8\" class=\"LT PAR DAT_%s %s\"",
|
||||
The_GetSuffix (),The_GetColorRows ());
|
||||
Str_ChangeFormat (Str_FROM_HTML,Str_TO_RIGOROUS_HTML,
|
||||
Rubric->Txt,Cns_MAX_BYTES_TEXT,false); // Convert from HTML to rigorous HTML
|
||||
|
@ -487,16 +487,8 @@ void Rub_ShowRubricInProject (struct Prj_Projects *Projects,
|
|||
/***** End 2nd row of this rubric *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Begin 4rd row of this rubric *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Write criteria of this rubric *****/
|
||||
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
|
||||
RubCri_ListCriteriaInProject (Projects,Rubric->RubCod,ICanFill);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End 3rd row of this rubric *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Change color for next rubric *****/
|
||||
The_ChangeRowColor ();
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include "swad_global.h"
|
||||
#include "swad_parameter.h"
|
||||
#include "swad_parameter_code.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_project_database.h"
|
||||
#include "swad_resource_database.h"
|
||||
#include "swad_rubric.h"
|
||||
|
@ -218,7 +219,8 @@ static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
|
|||
HTM_TD_Begin ("class=\"RT\"");
|
||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],
|
||||
0.0,DBL_MAX,RubCri_SCORE_STEP,
|
||||
Rubrics->Criterion.Values[ValueRange],false,
|
||||
Rubrics->Criterion.Values[ValueRange],
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
@ -230,7 +232,8 @@ static void RubCri_PutFormNewCriterion (struct Rub_Rubrics *Rubrics,
|
|||
RubCri_WEIGHT_MIN,
|
||||
RubCri_WEIGHT_MAX,
|
||||
RubCri_WEIGHT_STEP,
|
||||
Rubrics->Criterion.Weight,false,
|
||||
Rubrics->Criterion.Weight,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
@ -777,7 +780,8 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
|||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],
|
||||
0.0,DBL_MAX,RubCri_SCORE_STEP,
|
||||
Rubrics->Criterion.Values[ValueRange],false,
|
||||
Rubrics->Criterion.Values[ValueRange],
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -793,7 +797,8 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
|||
RubCri_WEIGHT_MIN,
|
||||
RubCri_WEIGHT_MAX,
|
||||
RubCri_WEIGHT_STEP,
|
||||
Rubrics->Criterion.Weight,false,
|
||||
Rubrics->Criterion.Weight,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -827,9 +832,6 @@ static void RubCri_ListOneOrMoreCriteriaInProject (struct Prj_Projects *Projects
|
|||
char *Anchor;
|
||||
double Score = 0.0;
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (5);
|
||||
|
||||
/***** Write the heading *****/
|
||||
RubCri_PutTableHeadingForCriteria (RubCri_DONT_PUT_COLUMN_FOR_ICONS,
|
||||
RubCri_PUT_COLUMNS_FOR_SCORE);
|
||||
|
@ -909,7 +911,8 @@ static void RubCri_ListOneOrMoreCriteriaInProject (struct Prj_Projects *Projects
|
|||
Criterion.Values[RubCri_MIN],
|
||||
Criterion.Values[RubCri_MAX],
|
||||
RubCri_SCORE_STEP,
|
||||
Score,false,
|
||||
Score,
|
||||
HTM_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
|
@ -929,9 +932,6 @@ static void RubCri_ListOneOrMoreCriteriaInProject (struct Prj_Projects *Projects
|
|||
/***** End row *****/
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
Loading…
Reference in New Issue