Version 23.82.2: May 17, 2024 Code refactoring related to hidden/visible stem.

This commit is contained in:
acanas 2024-05-17 00:04:18 +02:00
parent c5751e038b
commit 3e313d0de0
31 changed files with 69 additions and 64 deletions

View File

@ -1546,7 +1546,9 @@ void HTM_BUTTON_End (void)
/********************************* Text areas ********************************/
/*****************************************************************************/
void HTM_TEXTAREA_Begin (HTM_Disabled_t Disabled,HTM_Required_t Required,
void HTM_TEXTAREA_Begin (HTM_Disabled_t Disabled,
HTM_Readonly_t Readonly,
HTM_Required_t Required,
const char *fmt,...)
{
va_list ap;
@ -1571,6 +1573,7 @@ void HTM_TEXTAREA_Begin (HTM_Disabled_t Disabled,HTM_Required_t Required,
}
HTM_Txt (HTM_DisabledTxt[Disabled]);
HTM_Txt (HTM_ReadonlyTxt[Readonly]);
HTM_Txt (HTM_RequiredTxt[Required]);
HTM_Txt (">");

View File

@ -230,7 +230,9 @@ void HTM_BUTTON_Submit_Begin (const char *Title,const char *fmt,...);
void HTM_BUTTON_Begin (const char *Title,const char *fmt,...);
void HTM_BUTTON_End (void);
void HTM_TEXTAREA_Begin (HTM_Disabled_t Disabled,HTM_Required_t Required,
void HTM_TEXTAREA_Begin (HTM_Disabled_t Disabled,
HTM_Readonly_t Readonly,
HTM_Required_t Required,
const char *fmt,...);
void HTM_TEXTAREA_End (void);

View File

@ -1448,7 +1448,7 @@ void Agd_ReqCreatOrEditEvent (void)
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());

View File

@ -383,7 +383,7 @@ static void Ann_PutSubjectMessage (const char *Field,const char *Label,
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"%s\" name=\"%s\" cols=\"75\" rows=\"%u\""
" class=\"INPUT_%s\"",
Field,Field,Rows,The_GetSuffix ());

View File

@ -1267,7 +1267,7 @@ void Asg_ReqCreatOrEditAsg (void)
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"10\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());

View File

@ -1040,7 +1040,7 @@ void Att_ReqCreatOrEditEvent (void)
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());
@ -1770,7 +1770,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
switch (ICanEditStdComment)
{
case Usr_CAN: // Show with form
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"CommentStd%s\" cols=\"40\" rows=\"3\""
" class=\"INPUT_%s\"",
UsrDat->EnUsrCod,The_GetSuffix ());
@ -1795,7 +1795,7 @@ static void Att_WriteRowUsrToCallTheRoll (unsigned NumUsr,
switch (ICanEditTchComment)
{
case Usr_CAN: // Show with form
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"CommentTch%s\" cols=\"40\" rows=\"3\""
" class=\"INPUT_%s\"",
UsrDat->EnUsrCod,The_GetSuffix ());

View File

@ -1230,7 +1230,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Place\" name=\"Place\" rows=\"4\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());
@ -1261,7 +1261,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"ExamMode\" name=\"ExamMode\" rows=\"2\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());
@ -1292,7 +1292,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Structure\" name=\"Structure\""
" rows=\"8\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
@ -1324,7 +1324,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"DocRequired\" name=\"DocRequired\""
" rows=\"2\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
@ -1356,7 +1356,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"MatRequired\" name=\"MatRequired\""
" rows=\"4\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
@ -1388,7 +1388,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"MatAllowed\" name=\"MatAllowed\""
" rows=\"4\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
@ -1420,7 +1420,7 @@ static void Cfe_ShowCallForExam (struct Cfe_CallsForExams *CallsForExams,
HTM_TD_Begin ("class=\"Frm_C2 LB DAT_STRONG_%s\"",The_GetSuffix ());
if (ViewType == Vie_EDIT)
{
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"OtherInfo\" name=\"OtherInfo\""
" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",

View File

@ -475,7 +475,7 @@ static void CtrCfg_Photo (Vie_ViewType_t ViewType,
case Frm_PUT_FORM:
HTM_DIV_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgCtrPhoAtt);
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"AttributionArea\" name=\"Attribution\""
" rows=\"3\""
" onchange=\"this.form.submit();return false;\"");

View File

@ -633,10 +633,11 @@ Me sale este error, no s
"can npt create received message (duplicated entry '243218-2160773' for key 'UsrCod_MsgCod')
*/
#define Log_PLATFORM_VERSION "SWAD 23.82.1 (2024-05-16)"
#define Log_PLATFORM_VERSION "SWAD 23.82.2 (2024-05-17)"
#define CSS_FILE "swad23.67.2.css"
#define JS_FILE "swad23.79.js"
/*
Version 23.82.2: May 17, 2024 Code refactoring related to hidden/visible stem. (335855 lines)
Version 23.82.1: May 16, 2024 Code refactoring related to absent/present users in attendance. (335850 lines)
Version 23.82: May 15, 2024 Fixed issue in groups. Reported by Mancia Anguita López and Christian Agustín Morillas Gutiérrez. (335841 lines)
Version 23.81: May 14, 2024 Code refactoring in HTML related to required field in forms. (335782 lines)

View File

@ -345,7 +345,7 @@ static void CtyCfg_MapImage (Vie_ViewType_t ViewType,Hie_PutLink_t PutLink)
{
HTM_DIV_Begin ("class=\"CM\"");
Frm_BeginForm (ActChgCtyMapAtt);
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"AttributionArea\" name=\"Attribution\""
" rows=\"3\""
" onchange=\"this.form.submit();return false;\"");

View File

@ -786,7 +786,7 @@ static void Enr_PutAreaToEnterUsrsIDs (void)
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"UsrsIDs\" name=\"UsrsIDs\""
" cols=\"60\" rows=\"10\" class=\"INPUT_%s\"",
The_GetSuffix ());

View File

@ -1395,7 +1395,7 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());

View File

@ -714,7 +714,7 @@ static void ExaPrn_WriteQstAndAnsToFill (const struct ExaPrn_Print *Print,
HTM_TD_Begin ("class=\"LT\"");
/* Stem */
Qst_WriteQstStem (Question->Stem,"Qst_TXT",true);
Qst_WriteQstStem (Question->Stem,"Qst_TXT",HidVis_VISIBLE);
/* Media */
Med_ShowMedia (&Question->Media,

View File

@ -1960,7 +1960,8 @@ static void ExaRes_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
/* Stem */
Qst_WriteQstStem (Question->Stem,ClassTxt[Question->Validity],
ICanView[TstVis_VISIBLE_QST_ANS_TXT] == Usr_CAN);
ICanView[TstVis_VISIBLE_QST_ANS_TXT] == Usr_CAN ? HidVis_VISIBLE :
HidVis_HIDDEN);
/* Media */
if (ICanView[TstVis_VISIBLE_QST_ANS_TXT] == Usr_CAN)

View File

@ -1066,7 +1066,7 @@ static void ExaSet_ListQuestionForEdition (struct Qst_Question *Question,
/* Write stem */
Qst_WriteQstStem (Question->Stem,ClassTxt[Question->Validity],
true); // Visible
HidVis_VISIBLE);
/* Show media */
Med_ShowMedia (&Question->Media,

View File

@ -2859,7 +2859,7 @@ static void For_WriteFormForumPst (struct For_Forums *Forums,
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Content\" name=\"Content\""
" rows=\"10\""
" class=\"Frm_C2_INPUT INPUT_%s\"",

View File

@ -1403,7 +1403,7 @@ static void Gam_PutFormEditionGame (struct Gam_Games *Games,
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());

View File

@ -1574,7 +1574,7 @@ void Inf_EditPlainTxtInfo (void)
/***** Edition area *****/
HTM_DIV_Begin ("class=\"CM\"");
Lay_HelpPlainEditor ();
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"Txt\" cols=\"80\" rows=\"20\""
" class=\"INPUT_%s\"",
The_GetSuffix ());
@ -1658,7 +1658,7 @@ void Inf_EditRichTxtInfo (void)
/***** Edition area *****/
HTM_DIV_Begin ("class=\"CM\"");
Lay_HelpRichEditor ();
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"Txt\" cols=\"80\" rows=\"20\""
" class=\"INPUT_%s\"",
The_GetSuffix ());

View File

@ -2764,8 +2764,7 @@ static void Mch_ShowQuestionAndAnswersTch (const struct Mch_Match *Match)
HTM_DIV_Begin ("class=\"MCH_BOTTOM\""); // Bottom
/* Write stem */
Qst_WriteQstStem (Question.Stem,"MCH_TCH_STEM",
true); // Visible
Qst_WriteQstStem (Question.Stem,"MCH_TCH_STEM",HidVis_VISIBLE);
/* Show media */
Med_ShowMedia (&Question.Media,

View File

@ -546,7 +546,7 @@ static void Msg_WriteFormUsrsIDsOrNicksOtherRecipients (void)
/***** Textarea with users' @nicknames, emails or IDs *****/
HTM_TR_Begin (NULL);
HTM_TD_Begin ("colspan=\"%u\" class=\"LM\"",ColSpan);
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"OtherRecipients\" name=\"OtherRecipients\""
" class=\"Frm_C2_INPUT INPUT_%s\" rows=\"2\""
" placeholder=\"%s\"",
@ -593,7 +593,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"MsgSubject\" name=\"Subject\""
" class=\"Frm_C2_INPUT INPUT_%s\" rows=\"2\"",
The_GetSuffix ());
@ -634,7 +634,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"MsgContent\" name=\"Content\""
" class=\"Frm_C2_INPUT INPUT_%s\""
" rows=\"20\"",
@ -671,7 +671,7 @@ static void Msg_WriteFormSubjectAndContentMsgToUsrs (struct Msg_Messages *Messag
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"MsgContent\" name=\"Content\""
" class=\"Frm_C2_INPUT INPUT_%s\""
" rows=\"20\"",

View File

@ -114,7 +114,7 @@ void Not_ShowFormNotice (void)
Hlp_COMMUNICATION_Notices,Box_NOT_CLOSABLE);
/***** Message body *****/
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_REQUIRED,
"name=\"Content\" cols=\"30\" rows=\"10\""
" class=\"INPUT_%s\" autofocus=\"autofocus\"",
The_GetSuffix ());

View File

@ -1986,7 +1986,7 @@ static void Prg_ShowFormItem (const struct Prg_Item *Item,
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"10\""
" class=\"PRG_TITLE_DESCRIPTION_WIDTH INPUT_%s\"",
The_GetSuffix ());

View File

@ -1825,7 +1825,7 @@ static void Prj_ShowReviewStatus (struct Prj_Projects *Projects,
case Frm_PUT_FORM:
/* Show text form */
HTM_BR ();
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"ReviewTxt\" rows=\"2\""
" class=\"Frm_C2_INPUT INPUT_%s\""
" placeholder=\"%s…\""
@ -3966,7 +3966,7 @@ static void Prj_EditOneProjectTxtArea (const char *Id,
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,Required,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,Required,
"id=\"%s\" name=\"%s\" rows=\"%u\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
Id,Id,NumRows,The_GetSuffix ());

View File

@ -522,8 +522,7 @@ void Qst_ListQuestionForEdition (struct Qst_Question *Question,
if (QuestionExists)
{
/* Write stem */
Qst_WriteQstStem (Question->Stem,"Qst_TXT",
true); // Visible
Qst_WriteQstStem (Question->Stem,"Qst_TXT",HidVis_VISIBLE);
/* Show media */
Med_ShowMedia (&Question->Media,
@ -564,7 +563,8 @@ void Qst_WriteAnswerType (Qst_AnswerType_t AnswerType,const char *Class)
/********************* Write the stem of a test question *********************/
/*****************************************************************************/
void Qst_WriteQstStem (const char *Stem,const char *ClassStem,bool Visible)
void Qst_WriteQstStem (const char *Stem,const char *ClassStem,
HidVis_HiddenOrVisible_t HiddenOrVisible)
{
unsigned long StemLength;
char *StemRigorousHTML;
@ -573,7 +573,7 @@ void Qst_WriteQstStem (const char *Stem,const char *ClassStem,bool Visible)
HTM_DIV_Begin ("class=\"%s_%s\"",ClassStem,The_GetSuffix ());
/***** Write stem *****/
if (Stem && Visible)
if (Stem && HiddenOrVisible == HidVis_VISIBLE)
{
if (Stem[0])
{
@ -1000,8 +1000,7 @@ void Qst_WriteQuestionListing (struct Qst_Questions *Questions,unsigned QstInd)
/* Stem (row[3]) */
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
Qst_WriteQstStem (Questions->Question.Stem,"Qst_TXT",
true); // Visible
Qst_WriteQstStem (Questions->Question.Stem,"Qst_TXT",HidVis_VISIBLE);
/***** Get and show media (row[5]) *****/
Med_ShowMedia (&Questions->Question.Media,
@ -1316,8 +1315,7 @@ void Qst_WriteQuestionRowForSelection (unsigned QstInd,
/* Write stem */
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
Qst_WriteQstStem (Question->Stem,"Qst_TXT",
true); // Visible
Qst_WriteQstStem (Question->Stem,"Qst_TXT",HidVis_VISIBLE);
/***** Get and show media *****/
Med_ShowMedia (&Question->Media,
@ -1987,7 +1985,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_REQUIRED,
"id=\"Stem\" name=\"Stem\" rows=\"5\""
" class=\"Qst_STEM_TXT INPUT_%s\"",
The_GetSuffix ());
@ -2001,7 +1999,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
The_GetSuffix ());
HTM_TxtF ("%s (%s):",Txt_Feedback,Txt_optional);
HTM_BR ();
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"Feedback\" rows=\"2\""
" class=\"Qst_STEM_TXT INPUT_%s\"",
The_GetSuffix ());
@ -2197,7 +2195,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
" style=\"display:none;\""); // Answer does not have content ==> Hide column
/* Answer text */
HTM_TEXTAREA_Begin (Disabled,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (Disabled,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"AnsStr%u\" rows=\"5\""
" class=\"Qst_ANS_TXT INPUT_%s\"",
NumOpt,The_GetSuffix ());
@ -2214,7 +2212,7 @@ void Qst_PutFormEditOneQst (struct Qst_Question *Question)
The_GetSuffix ());
HTM_TxtF ("%s (%s):",Txt_Feedback,Txt_optional);
HTM_BR ();
HTM_TEXTAREA_Begin (Disabled,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (Disabled,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"FbStr%u\" rows=\"2\""
" class=\"Qst_ANS_TXT INPUT_%s\"",
NumOpt,The_GetSuffix ());

View File

@ -148,7 +148,8 @@ void Qst_ListQuestionForEdition (struct Qst_Question *Question,
unsigned QstInd,bool QuestionExists,
const char *Anchor);
void Qst_WriteAnswerType (Qst_AnswerType_t AnswerType,const char *Class);
void Qst_WriteQstStem (const char *Stem,const char *ClassStem,bool Visible);
void Qst_WriteQstStem (const char *Stem,const char *ClassStem,
HidVis_HiddenOrVisible_t HiddenOrVisible);
void Qst_WriteQstFeedback (const char *Feedback,const char *ClassFeedback);
void Qst_ListQuestionsToEdit (void);

View File

@ -481,9 +481,9 @@ static void QstImp_ImportQuestionsFromXMLBuffer (const char *XMLBuffer)
/***** Print XML tree *****/
HTM_DIV_Begin ("class=\"Tst_FILE_CONTENT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READONLY,HTM_NOT_REQUIRED,
"title=\"%s\" cols=\"60\" rows=\"5\""
" spellcheck=\"false\" readonly",
" spellcheck=\"false\"",
Txt_XML_file_content);
XML_PrintTree (RootElem);
HTM_TEXTAREA_End ();
@ -948,8 +948,7 @@ static void QstImp_WriteRowImportedQst (struct XMLElement *StemElem,
/***** Write the stem and the answers *****/
HTM_TD_Begin ("class=\"LT %s\"",The_GetColorRows ());
Qst_WriteQstStem (Stem,ClassStem,
true); // Visible
Qst_WriteQstStem (Stem,ClassStem,HidVis_VISIBLE);
Qst_WriteQstFeedback (Feedback,"Qst_TXT_LIGHT");
switch (Question->Answer.Type)
{

View File

@ -1740,7 +1740,7 @@ static void Rec_ShowCrsRecord (Rec_CourseRecordViewType_t TypeOfView,
switch (ICanEditThisField)
{
case Usr_CAN: // Show with form
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"Field%ld\" rows=\"%u\""
" class=\"REC_C2_BOT_INPUT INPUT_%s\"",
Gbl.Crs.Records.LstFields.Lst[NumField].FieldCod,
@ -3404,7 +3404,7 @@ static void Rec_ShowComments (struct Usr_Data *UsrDat,bool ShowData,
}
break;
case Vie_EDIT:
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Comments\" name=\"Comments\""
" rows=\"4\""
" class=\"REC_C2_BOT_INPUT INPUT_%s\"",

View File

@ -874,7 +874,7 @@ static void Rub_PutFormEditionRubric (struct Rub_Rubrics *Rubrics,
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());

View File

@ -1679,7 +1679,7 @@ void Svy_ReqCreatOrEditSvy (void)
/* Data */
HTM_TD_Begin ("class=\"Frm_C2 LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\" rows=\"5\""
" class=\"Frm_C2_INPUT INPUT_%s\"",
The_GetSuffix ());
@ -2267,7 +2267,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"Txt\" name=\"Txt\""
" cols=\"60\" rows=\"4\""
" class=\"INPUT_%s\"",
@ -2323,7 +2323,7 @@ static void Svy_ShowFormEditOneQst (struct Svy_Surveys *Surveys,
/* Answer text */
HTM_TD_Begin ("class=\"RT\"");
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"id=\"AnsStr%u\" name=\"AnsStr%u\""
" cols=\"50\" rows=\"1\"",
NumAns,NumAns);
@ -2983,7 +2983,7 @@ static void Svy_WriteCommentsOfAQst (struct Svy_Survey *Svy,
}
break;
case Frm_PUT_FORM:
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"Com%010u\""
" cols=\"60\" rows=\"4\""
" class=\"INPUT_%s\" placeholder=\"%s…\"",

View File

@ -299,7 +299,7 @@ static void TstPrn_WriteQstAndAnsToFill (struct TstPrn_PrintedQuestion *PrintedQ
Qst_WriteParQstCod (QstInd,Question->QstCod);
/* Stem */
Qst_WriteQstStem (Question->Stem,"Qst_TXT",true);
Qst_WriteQstStem (Question->Stem,"Qst_TXT",HidVis_VISIBLE);
/* Media */
Med_ShowMedia (&Question->Media,
@ -672,7 +672,8 @@ static void TstPrn_WriteQstAndAnsExam (struct Usr_Data *UsrDat,
{
/* Stem */
Qst_WriteQstStem (Question->Stem,"Qst_TXT",
ICanView[TstVis_VISIBLE_QST_ANS_TXT]);
ICanView[TstVis_VISIBLE_QST_ANS_TXT] ? HidVis_VISIBLE :
HidVis_HIDDEN);
/* Media */
if (ICanView[TstVis_VISIBLE_QST_ANS_TXT] == Usr_CAN)

View File

@ -226,7 +226,7 @@ void TmlPst_PutTextarea (const char *Placeholder,const char *ClassTextArea)
Frm_SetUniqueId (IdDivImgButton);
/***** Textarea to write the content *****/
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_NOT_REQUIRED,
HTM_TEXTAREA_Begin (HTM_ENABLED,HTM_READWRITE,HTM_NOT_REQUIRED,
"name=\"Txt\" rows=\"1\" maxlength=\"%u\""
" placeholder=\"%s…\" class=\"%s\""
" onfocus=\"expandTextarea(this,'%s','6');\"",