mirror of https://github.com/acanas/swad-core.git
Version 22.97: Apr 14, 2023 Changes in listing of rubrics.
This commit is contained in:
parent
a00eaad885
commit
d6cce8b198
|
@ -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.96.1 (2023-04-14)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 22.97 (2023-04-14)"
|
||||
#define CSS_FILE "swad22.95.css"
|
||||
#define JS_FILE "swad22.49.js"
|
||||
/*
|
||||
Version 22.97: Apr 14, 2023 Changes in listing of rubrics. (339029 lines)
|
||||
Version 22.96.1: Apr 14, 2023 Code refactoring in selectors. (338991 lines)
|
||||
Version 22.96: Apr 12, 2023 Changes in configuration of projects.
|
||||
Code refactoring in selectors. (338977 lines)
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#include "swad_parameter_code.h"
|
||||
#include "swad_project.h"
|
||||
#include "swad_record_database.h"
|
||||
#include "swad_rubric.h"
|
||||
#include "swad_search.h"
|
||||
#include "swad_setting.h"
|
||||
#include "swad_setting_database.h"
|
||||
|
@ -1754,12 +1755,29 @@ static void Crs_EmptyCourseCompletely (long CrsCod)
|
|||
before removing groups and projects *****/
|
||||
Brw_DB_RemoveCrsFiles (CrsCod);
|
||||
|
||||
/***** Remove assignments of the course *****/
|
||||
/***** Assessment tab *****/
|
||||
/* Remove assignments of the course */
|
||||
Asg_RemoveCrsAssignments (CrsCod);
|
||||
|
||||
/***** Remove projects of the course *****/
|
||||
/* Remove projects of the course */
|
||||
Prj_RemoveCrsProjects (CrsCod);
|
||||
|
||||
/* Remove tests of the course */
|
||||
TstPrn_RemoveCrsPrints (CrsCod);
|
||||
Tst_DB_RemoveTstConfig (CrsCod);
|
||||
|
||||
/* Remove all exams in the course */
|
||||
Exa_RemoveCrsExams (CrsCod);
|
||||
|
||||
/* Remove all games in the course */
|
||||
Gam_RemoveCrsGames (CrsCod);
|
||||
|
||||
/* Remove all questions in the course */
|
||||
Qst_RemoveCrsQsts (CrsCod);
|
||||
|
||||
/* Remove all rubrics in the course */
|
||||
Rub_RemoveCrsRubrics (CrsCod);
|
||||
|
||||
/***** Remove attendance events of the course *****/
|
||||
Att_RemoveCrsEvents (CrsCod);
|
||||
|
||||
|
@ -1772,21 +1790,6 @@ static void Crs_EmptyCourseCompletely (long CrsCod)
|
|||
/***** Remove all surveys in the course *****/
|
||||
Svy_RemoveSurveys (HieLvl_CRS,CrsCod);
|
||||
|
||||
/***** Remove all games in the course *****/
|
||||
Gam_RemoveCrsGames (CrsCod);
|
||||
|
||||
/***** Remove all exams in the course *****/
|
||||
Exa_RemoveCrsExams (CrsCod);
|
||||
|
||||
/***** Remove all test prints made in the course *****/
|
||||
TstPrn_RemoveCrsPrints (CrsCod);
|
||||
|
||||
/***** Remove test configuration of the course *****/
|
||||
Tst_DB_RemoveTstConfig (CrsCod);
|
||||
|
||||
/***** Remove all questions in the course *****/
|
||||
Qst_RemoveCrsQsts (CrsCod);
|
||||
|
||||
/***** Remove groups in the course *****/
|
||||
Grp_DB_RemoveCrsGrps (CrsCod);
|
||||
|
||||
|
|
|
@ -1538,7 +1538,7 @@ static void Grp_ListGroupsForEdition (const struct Roo_Rooms *Rooms)
|
|||
{
|
||||
RooInLst = &Rooms->Lst[NumRoo];
|
||||
HTM_OPTION (HTM_Type_LONG,&RooInLst->RooCod,
|
||||
RooInLst->RooCod == Grp->Room.RooCod, // Selected
|
||||
RooInLst->RooCod == Grp->Room.RooCod, // Selected?
|
||||
HTM_OPTION_ENABLED,
|
||||
"%s",RooInLst->ShrtName);
|
||||
}
|
||||
|
|
|
@ -338,8 +338,7 @@ void Rub_SeeOneRubric (void)
|
|||
Rub_GetRubricDataByCod (&Rubric);
|
||||
|
||||
/***** Show rubric *****/
|
||||
Rub_ShowOnlyOneRubric (&Rubrics,&Rubric,
|
||||
false); // Do not list rubric criteria
|
||||
Rub_ShowOnlyOneRubric (&Rubrics,&Rubric);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -347,16 +346,7 @@ void Rub_SeeOneRubric (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
void Rub_ShowOnlyOneRubric (struct Rub_Rubrics *Rubrics,
|
||||
const struct Rub_Rubric *Rubric,
|
||||
bool ListRubricCriteria)
|
||||
{
|
||||
Rub_ShowOnlyOneRubricBegin (Rubrics,Rubric,ListRubricCriteria);
|
||||
Rub_ShowOnlyOneRubricEnd ();
|
||||
}
|
||||
|
||||
void Rub_ShowOnlyOneRubricBegin (struct Rub_Rubrics *Rubrics,
|
||||
const struct Rub_Rubric *Rubric,
|
||||
bool ListRubricCriteria)
|
||||
const struct Rub_Rubric *Rubric)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Rubrics;
|
||||
extern const char *Txt_Rubric;
|
||||
|
@ -371,13 +361,8 @@ void Rub_ShowOnlyOneRubricBegin (struct Rub_Rubrics *Rubrics,
|
|||
true); // Show only this rubric
|
||||
|
||||
/***** Write criteria of this rubric *****/
|
||||
if (ListRubricCriteria)
|
||||
Ale_ShowAlert (Ale_INFO,"The criteria of the rubric should be listed here.");
|
||||
// Rub_ListRubricCriteria (Rubrics);
|
||||
}
|
||||
RubCri_ListCriteriaForSeeing (Rubrics);
|
||||
|
||||
void Rub_ShowOnlyOneRubricEnd (void)
|
||||
{
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
@ -733,33 +718,6 @@ void Rub_RemoveCrsRubrics (long CrsCod)
|
|||
Rub_DB_RemoveCrsRubrics (CrsCod);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************ List the criteria in a rubric **********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void Rub_ListRubric (void)
|
||||
{
|
||||
struct Rub_Rubrics Rubrics;
|
||||
struct Rub_Rubric Rubric;
|
||||
char Txt[Cns_MAX_BYTES_TEXT + 1];
|
||||
|
||||
/***** Reset rubrics context *****/
|
||||
Rub_ResetRubrics (&Rubrics);
|
||||
Rub_ResetRubric (&Rubric);
|
||||
|
||||
/***** Get parameters *****/
|
||||
Rub_GetPars (&Rubrics,true);
|
||||
Rubric.RubCod = Rubrics.RubCod;
|
||||
|
||||
/***** Get rubric data *****/
|
||||
Rub_GetRubricDataByCod (&Rubric);
|
||||
Rub_DB_GetRubricTxt (Rubric.RubCod,Txt);
|
||||
|
||||
/***** Show rubric *****/
|
||||
Rub_ShowOnlyOneRubric (&Rubrics,&Rubric,
|
||||
true); // List rubric criteria
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*************** Request the creation or edition of a rubric *****************/
|
||||
/*****************************************************************************/
|
||||
|
@ -833,7 +791,7 @@ void Rub_PutFormsOneRubric (struct Rub_Rubrics *Rubrics,
|
|||
{
|
||||
case Rub_EXISTING_RUBRIC:
|
||||
/* Show list of criteria */
|
||||
RubCri_ListCriteria (Rubrics,Criterion);
|
||||
RubCri_ListCriteriaForEdition (Rubrics,Criterion);
|
||||
break;
|
||||
case Rub_NEW_RUBRIC:
|
||||
/* Show rubrics again */
|
||||
|
|
|
@ -49,12 +49,7 @@ bool Rub_CheckIfICanEditRubrics (void);
|
|||
bool Rub_CheckIfEditable (void);
|
||||
void Rub_SeeOneRubric (void);
|
||||
void Rub_ShowOnlyOneRubric (struct Rub_Rubrics *Rubrics,
|
||||
const struct Rub_Rubric *Rubric,
|
||||
bool ListRubricCriteria);
|
||||
void Rub_ShowOnlyOneRubricBegin (struct Rub_Rubrics *Rubrics,
|
||||
const struct Rub_Rubric *Rubric,
|
||||
bool ListRubricCriteria);
|
||||
void Rub_ShowOnlyOneRubricEnd (void);
|
||||
const struct Rub_Rubric *Rubric);
|
||||
|
||||
void Rub_SetCurrentRubCod (long GamCod);
|
||||
void Rub_PutPars (void *Rubrics);
|
||||
|
@ -62,15 +57,12 @@ void Rub_GetPars (struct Rub_Rubrics *Rubrics,bool CheckRubCod);
|
|||
|
||||
void Rub_GetListRubrics (struct Rub_Rubrics *Rubrics);
|
||||
void Rub_GetRubricDataByCod (struct Rub_Rubric *Rubric);
|
||||
void Rub_GetRubricDataByFolder (struct Rub_Rubric *Rubric);
|
||||
void Rub_FreeListRubrics (struct Rub_Rubrics *Rubrics);
|
||||
|
||||
void Rub_AskRemRubric (void);
|
||||
void Rub_RemoveRubric (void);
|
||||
void Rub_RemoveCrsRubrics (long CrsCod);
|
||||
|
||||
void Rub_ListRubric (void);
|
||||
|
||||
void Rub_ReqCreatOrEditRubric (void);
|
||||
void Rub_PutFormsOneRubric (struct Rub_Rubrics *Rubrics,
|
||||
struct Rub_Rubric *Rubric,
|
||||
|
|
|
@ -83,11 +83,12 @@ static void RubCri_ChangeValueCriterion (RubCri_ValueRange_t ValueRange);
|
|||
|
||||
static void RubCri_CreateCriterion (struct RubCri_Criterion *Criterion);
|
||||
|
||||
static void RubCri_ListOneOrMoreCriteriaForSeeing (unsigned NumCriteria,
|
||||
MYSQL_RES *mysql_res);
|
||||
static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
||||
unsigned MaxCriInd,
|
||||
unsigned NumCriteria,
|
||||
MYSQL_RES *mysql_res,
|
||||
bool ICanEditCriteria);
|
||||
MYSQL_RES *mysql_res);
|
||||
|
||||
static void RubCri_GetCriterionDataFromRow (MYSQL_RES *mysql_res,
|
||||
struct RubCri_Criterion *Criterion);
|
||||
|
@ -476,11 +477,41 @@ static void RubCri_CreateCriterion (struct RubCri_Criterion *Criterion)
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** List the criteria of a rubric ************************/
|
||||
/***************** List the criteria of a rubric for seeing ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void RubCri_ListCriteria (struct Rub_Rubrics *Rubrics,
|
||||
struct RubCri_Criterion *Criterion)
|
||||
void RubCri_ListCriteriaForSeeing (const struct Rub_Rubrics *Rubrics)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Rubrics_criteria;
|
||||
extern const char *Txt_Criteria;
|
||||
MYSQL_RES *mysql_res;
|
||||
unsigned NumCriteria;
|
||||
|
||||
/***** Get data of rubric criteria from database *****/
|
||||
NumCriteria = Rub_DB_GetCriteria (&mysql_res,Rubrics->RubCod);
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,Txt_Criteria,
|
||||
NULL,NULL,
|
||||
Hlp_ASSESSMENT_Rubrics_criteria,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Show table with rubric criteria *****/
|
||||
if (NumCriteria)
|
||||
RubCri_ListOneOrMoreCriteriaForSeeing (NumCriteria,mysql_res);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** List the criteria of a rubric for edition ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void RubCri_ListCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
||||
struct RubCri_Criterion *Criterion)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Rubrics_criteria;
|
||||
extern const char *Txt_Criteria;
|
||||
|
@ -504,8 +535,7 @@ void RubCri_ListCriteria (struct Rub_Rubrics *Rubrics,
|
|||
if (NumCriteria)
|
||||
RubCri_ListOneOrMoreCriteriaForEdition (Rubrics,
|
||||
MaxCriInd,
|
||||
NumCriteria,mysql_res,
|
||||
ICanEditCriteria);
|
||||
NumCriteria,mysql_res);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
@ -522,11 +552,116 @@ void RubCri_ListCriteria (struct Rub_Rubrics *Rubrics,
|
|||
/********************** List rubric criteria for edition *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void RubCri_ListOneOrMoreCriteriaForSeeing (unsigned NumCriteria,
|
||||
MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Txt_Criteria;
|
||||
unsigned NumCriterion;
|
||||
struct RubCri_Criterion Criterion;
|
||||
RubCri_ValueRange_t ValueRange;
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (!NumCriteria)
|
||||
return;
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (5);
|
||||
|
||||
/***** Write the heading *****/
|
||||
RubCri_PutTableHeadingForCriteria ();
|
||||
|
||||
/***** Write rows *****/
|
||||
for (NumCriterion = 0, The_ResetRowColor ();
|
||||
NumCriterion < NumCriteria;
|
||||
NumCriterion++, The_ChangeRowColor ())
|
||||
{
|
||||
/***** Create criterion of questions *****/
|
||||
RubCri_ResetCriterion (&Criterion);
|
||||
|
||||
/***** Get criterion data *****/
|
||||
RubCri_GetCriterionDataFromRow (mysql_res,&Criterion);
|
||||
|
||||
/***** Begin first row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Icons *****/
|
||||
HTM_TD_Begin ("rowspan=\"2\" class=\"BT %s\"",
|
||||
The_GetColorRows ());
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Index *****/
|
||||
HTM_TD_Begin ("rowspan=\"2\" class=\"RT %s\"",
|
||||
The_GetColorRows ());
|
||||
Lay_WriteIndex (Criterion.CriInd,"BIG_INDEX");
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Title *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
HTM_Txt (Criterion.Title);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Link to resource *****/
|
||||
HTM_TD_Begin ("class=\"LT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
// TODO: Write source
|
||||
// Frm_BeginFormAnchor (ActChgLnkRubCri,Anchor);
|
||||
// RubCri_PutParsOneCriterion (Rubrics);
|
||||
// Rsc_ShowClipboardToChangeLink (&Criterion.Link);
|
||||
// Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** Minimum and maximum values of criterion *****/
|
||||
for (ValueRange = (RubCri_ValueRange_t) 0;
|
||||
ValueRange <= (RubCri_ValueRange_t) (RubCri_NUM_VALUES - 1);
|
||||
ValueRange++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
HTM_Unsigned (Criterion.Values[ValueRange]);
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
/***** Criterion weight *****/
|
||||
HTM_TD_Begin ("class=\"RT DAT_%s %s\"",
|
||||
The_GetSuffix (),
|
||||
The_GetColorRows ());
|
||||
HTM_Unsigned (Criterion.Weight);
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End first row *****/
|
||||
HTM_TR_End ();
|
||||
|
||||
/***** Begin second row *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
/***** Questions *****/
|
||||
HTM_TD_Begin ("colspan=\"5\" class=\"LT %s\"",
|
||||
The_GetColorRows ());
|
||||
|
||||
// Description here
|
||||
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End second row *****/
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/********************** List rubric criteria for edition *********************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
||||
unsigned MaxCriInd,
|
||||
unsigned NumCriteria,
|
||||
MYSQL_RES *mysql_res,
|
||||
bool ICanEditCriteria)
|
||||
MYSQL_RES *mysql_res)
|
||||
{
|
||||
extern const char *Txt_Criteria;
|
||||
extern const char *Txt_Movement_not_allowed;
|
||||
|
@ -577,14 +712,11 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
|||
The_GetColorRows ());
|
||||
|
||||
/* Put icon to remove the criterion */
|
||||
if (ICanEditCriteria)
|
||||
Ico_PutContextualIconToRemove (ActReqRemRubCri,NULL,
|
||||
RubCri_PutParsOneCriterion,Rubrics);
|
||||
else
|
||||
Ico_PutIconRemovalNotAllowed ();
|
||||
Ico_PutContextualIconToRemove (ActReqRemRubCri,NULL,
|
||||
RubCri_PutParsOneCriterion,Rubrics);
|
||||
|
||||
/* Put icon to move up the question */
|
||||
if (ICanEditCriteria && Criterion.CriInd > 1)
|
||||
if (Criterion.CriInd > 1)
|
||||
Lay_PutContextualLinkOnlyIcon (ActUp_RubCri,Anchor,
|
||||
RubCri_PutParsOneCriterion,Rubrics,
|
||||
"arrow-up.svg",Ico_BLACK);
|
||||
|
@ -593,7 +725,7 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
|||
Txt_Movement_not_allowed);
|
||||
|
||||
/* Put icon to move down the criterion */
|
||||
if (ICanEditCriteria && Criterion.CriInd < MaxCriInd)
|
||||
if (Criterion.CriInd < MaxCriInd)
|
||||
Lay_PutContextualLinkOnlyIcon (ActDwnRubCri,Anchor,
|
||||
RubCri_PutParsOneCriterion,Rubrics,
|
||||
"arrow-down.svg",Ico_BLACK);
|
||||
|
@ -612,24 +744,15 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
|||
/***** Title *****/
|
||||
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
|
||||
HTM_ARTICLE_Begin (Anchor);
|
||||
if (ICanEditCriteria)
|
||||
{
|
||||
Frm_BeginFormAnchor (ActChgTitRubCri,Anchor);
|
||||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_TEXT ("Title",RubCri_MAX_CHARS_TITLE,Criterion.Title,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
{
|
||||
HTM_SPAN_Begin ("class=\"EXA_SET_TITLE\"");
|
||||
HTM_Txt (Criterion.Title);
|
||||
HTM_SPAN_End ();
|
||||
}
|
||||
Frm_BeginFormAnchor (ActChgTitRubCri,Anchor);
|
||||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_TEXT ("Title",RubCri_MAX_CHARS_TITLE,Criterion.Title,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
HTM_ARTICLE_End ();
|
||||
HTM_TD_End ();
|
||||
|
||||
|
@ -647,48 +770,30 @@ static void RubCri_ListOneOrMoreCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
|||
ValueRange++)
|
||||
{
|
||||
HTM_TD_Begin ("class=\"RT %s\"",The_GetColorRows ());
|
||||
if (ICanEditCriteria)
|
||||
{
|
||||
Frm_BeginFormAnchor (RubCri_ActionsValues[ValueRange],Anchor);
|
||||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],0.0,DBL_MAX,0.1,
|
||||
Criterion.Values[ValueRange],false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
{
|
||||
HTM_SPAN_Begin ("class=\"CRI_VALUE\"");
|
||||
HTM_Unsigned (Criterion.Values[ValueRange]);
|
||||
HTM_SPAN_End ();
|
||||
}
|
||||
Frm_BeginFormAnchor (RubCri_ActionsValues[ValueRange],Anchor);
|
||||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_FLOAT (RubCri_ParValues[ValueRange],0.0,DBL_MAX,0.1,
|
||||
Criterion.Values[ValueRange],false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
}
|
||||
|
||||
/***** Criterion weight *****/
|
||||
HTM_TD_Begin ("class=\"RT %s\"",The_GetColorRows ());
|
||||
if (ICanEditCriteria)
|
||||
{
|
||||
Frm_BeginFormAnchor (ActChgWeiRubCri,Anchor);
|
||||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_FLOAT ("Weight",
|
||||
RubCri_WEIGHT_MIN,
|
||||
RubCri_WEIGHT_MAX,
|
||||
RubCri_WEIGHT_STEP,
|
||||
Criterion.Weight,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
}
|
||||
else
|
||||
{
|
||||
HTM_SPAN_Begin ("class=\"CRI_VALUE\"");
|
||||
HTM_Unsigned (Criterion.Weight);
|
||||
HTM_SPAN_End ();
|
||||
}
|
||||
Frm_BeginFormAnchor (ActChgWeiRubCri,Anchor);
|
||||
RubCri_PutParsOneCriterion (Rubrics);
|
||||
HTM_INPUT_FLOAT ("Weight",
|
||||
RubCri_WEIGHT_MIN,
|
||||
RubCri_WEIGHT_MAX,
|
||||
RubCri_WEIGHT_STEP,
|
||||
Criterion.Weight,false,
|
||||
" class=\"INPUT_FLOAT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
HTM_TD_End ();
|
||||
|
||||
/***** End first row *****/
|
||||
|
|
|
@ -41,8 +41,9 @@ void RubCri_ChangeMinValue (void);
|
|||
void RubCri_ChangeMaxValue (void);
|
||||
void RubCri_ChangeWeight (void);
|
||||
|
||||
void RubCri_ListCriteria (struct Rub_Rubrics *Rubrics,
|
||||
struct RubCri_Criterion *Criterion);
|
||||
void RubCri_ListCriteriaForSeeing (const struct Rub_Rubrics *Rubrics);
|
||||
void RubCri_ListCriteriaForEdition (struct Rub_Rubrics *Rubrics,
|
||||
struct RubCri_Criterion *Criterion);
|
||||
|
||||
void RubCri_ResetCriterion (struct RubCri_Criterion *Criterion);
|
||||
|
||||
|
|
|
@ -83,8 +83,6 @@ struct RubCri_Criterion
|
|||
long CriCod; // Criterion code
|
||||
unsigned CriInd; // Criterion index (position in the rubric)
|
||||
struct Rsc_Link Link;
|
||||
// Rsc_Type_t Source;
|
||||
// long Cod;
|
||||
double Values[RubCri_NUM_VALUES];
|
||||
double Weight; // Relative weight (from 0.0 to 1.0)
|
||||
char Title[RubCri_MAX_BYTES_TITLE + 1]; // Title of the criterion
|
||||
|
|
Loading…
Reference in New Issue