mirror of https://github.com/acanas/swad-core.git
Version 23.58: Jan 20, 2024 Responsive design and layout changes in exam sets.
This commit is contained in:
parent
ab54321c5e
commit
2c21ad6017
|
@ -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.57.3 (2024-01-19)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 23.58 (2024-01-20)"
|
||||
#define CSS_FILE "swad23.57.css"
|
||||
#define JS_FILE "swad23.53.6.js"
|
||||
/*
|
||||
Version 23.58: Jan 20, 2024 Responsive design and layout changes in exam sets. (335673 lines)
|
||||
Version 23.57.3: Jan 19, 2024 Responsive design in exam results. (335676 lines)
|
||||
Version 23.57.2: Jan 19, 2024 Responsive design in attendance. (335675 lines)
|
||||
Version 23.57.1: Jan 19, 2024 Responsive design in agenda. (335670 lines)
|
||||
|
|
38
swad_exam.c
38
swad_exam.c
|
@ -1214,7 +1214,6 @@ static void Exa_HideUnhideExam (HidVis_HiddenOrVisible_t HiddenOrVisible)
|
|||
void Exa_ReqCreatOrEditExam (void)
|
||||
{
|
||||
struct Exa_Exams Exams;
|
||||
struct ExaSet_Set Set;
|
||||
Exa_ExistingNewExam_t ExistingNewExam;
|
||||
|
||||
/***** Check if I can edit exams *****/
|
||||
|
@ -1224,7 +1223,6 @@ void Exa_ReqCreatOrEditExam (void)
|
|||
/***** Reset exams context *****/
|
||||
Exa_ResetExams (&Exams);
|
||||
Exa_ResetExam (&Exams.Exam);
|
||||
ExaSet_ResetSet (&Set);
|
||||
|
||||
/***** Get parameters *****/
|
||||
Exa_GetPars (&Exams,Exa_DONT_CHECK_EXA_COD);
|
||||
|
@ -1243,7 +1241,7 @@ void Exa_ReqCreatOrEditExam (void)
|
|||
}
|
||||
|
||||
/***** Put form to create/edit an exam and show sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,ExistingNewExam);
|
||||
Exa_PutFormsOneExam (&Exams,ExistingNewExam);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1251,7 +1249,6 @@ void Exa_ReqCreatOrEditExam (void)
|
|||
/*****************************************************************************/
|
||||
|
||||
void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
|
||||
struct ExaSet_Set *Set,
|
||||
Exa_ExistingNewExam_t ExistingNewExam)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Exams_edit_exam;
|
||||
|
@ -1281,9 +1278,8 @@ void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
|
|||
}
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin (NULL,
|
||||
Exams->Exam.Title[0] ? Exams->Exam.Title :
|
||||
Txt_Exam,
|
||||
Box_BoxBegin (NULL,Exams->Exam.Title[0] ? Exams->Exam.Title :
|
||||
Txt_Exam,
|
||||
FunctionToDrawContextualIcons[ExistingNewExam],Exams,
|
||||
*HelpLink[ExistingNewExam],Box_NOT_CLOSABLE);
|
||||
|
||||
|
@ -1292,7 +1288,7 @@ void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
|
|||
|
||||
/***** Show list of sets inside box *****/
|
||||
if (ExistingNewExam == Exa_EXISTING_EXAM)
|
||||
ExaSet_ListExamSets (Exams,Set);
|
||||
ExaSet_ListExamSets (Exams);
|
||||
|
||||
/***** End box ****/
|
||||
Box_BoxEnd ();
|
||||
|
@ -1343,14 +1339,14 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Title",Txt_Title);
|
||||
Frm_LabelColumn ("REC_C1_BOT RM","Title",Txt_Title);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
|
||||
HTM_INPUT_TEXT ("Title",Exa_MAX_CHARS_TITLE,Exams->Exam.Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
@ -1360,11 +1356,11 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
/***** Maximum grade *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TD_Begin ("class=\"RM FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TD_Begin ("class=\"REC_C1_BOT RM FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Maximum_grade);
|
||||
HTM_TD_End ();
|
||||
|
||||
HTM_TD_Begin ("class=\"LM\"");
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LM\"");
|
||||
HTM_INPUT_FLOAT ("MaxGrade",0.0,DBL_MAX,0.01,Exams->Exam.MaxGrade,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,false,
|
||||
" class=\"INPUT_%s\" required=\"required\"",
|
||||
|
@ -1375,8 +1371,10 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
|
||||
/***** Visibility of results *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_TxtColon (Txt_Result_visibility);
|
||||
HTM_TD_Begin ("class=\"LB\"");
|
||||
HTM_TD_Begin ("class=\"REC_C1_BOT RT FORM_IN_%s\"",The_GetSuffix ());
|
||||
HTM_TxtColon (Txt_Result_visibility);
|
||||
HTM_TD_End ();
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LB\"");
|
||||
TstVis_PutVisibilityCheckboxes (Exams->Exam.Visibility);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
|
@ -1385,12 +1383,12 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
HTM_TR_Begin (NULL);
|
||||
|
||||
/* Label */
|
||||
Frm_LabelColumn ("RT","Txt",Txt_Description);
|
||||
Frm_LabelColumn ("REC_C1_BOT RT","Txt",Txt_Description);
|
||||
|
||||
/* Data */
|
||||
HTM_TD_Begin ("class=\"LT\"");
|
||||
HTM_TD_Begin ("class=\"REC_C2_BOT LT\"");
|
||||
HTM_TEXTAREA_Begin ("id=\"Txt\" name=\"Txt\" rows=\"5\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\"",
|
||||
" class=\"REC_C2_BOT_INPUT INPUT_%s\"",
|
||||
The_GetSuffix ());
|
||||
HTM_Txt (Txt);
|
||||
HTM_TEXTAREA_End ();
|
||||
|
@ -1416,7 +1414,6 @@ static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
|
|||
void Exa_ReceiveFormExam (void)
|
||||
{
|
||||
struct Exa_Exams Exams;
|
||||
struct ExaSet_Set Set;
|
||||
Exa_ExistingNewExam_t ExistingNewExam;
|
||||
char Txt[Cns_MAX_BYTES_TEXT + 1];
|
||||
|
||||
|
@ -1427,7 +1424,6 @@ void Exa_ReceiveFormExam (void)
|
|||
/***** Reset exams context *****/
|
||||
Exa_ResetExams (&Exams);
|
||||
Exa_ResetExam (&Exams.Exam);
|
||||
ExaSet_ResetSet (&Set);
|
||||
|
||||
/***** Get parameters *****/
|
||||
Exa_GetPars (&Exams,Exa_DONT_CHECK_EXA_COD);
|
||||
|
@ -1465,7 +1461,7 @@ void Exa_ReceiveFormExam (void)
|
|||
Ale_ShowAlerts (NULL);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,ExistingNewExam);
|
||||
Exa_PutFormsOneExam (&Exams,ExistingNewExam);
|
||||
}
|
||||
|
||||
static void Exa_ReceiveExamFieldsFromForm (struct Exa_Exam *Exam,
|
||||
|
|
|
@ -66,7 +66,6 @@ void Exa_UnhideExam (void);
|
|||
|
||||
void Exa_ReqCreatOrEditExam (void);
|
||||
void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
|
||||
struct ExaSet_Set *Set,
|
||||
Exa_ExistingNewExam_t ExistingNewExam);
|
||||
|
||||
void Exa_ReceiveFormExam (void);
|
||||
|
|
|
@ -203,7 +203,7 @@ static void ExaSet_PutFormNewSet (struct Exa_Exams *Exams,
|
|||
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set->Title,
|
||||
HTM_DONT_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
HTM_TD_End ();
|
||||
|
@ -260,7 +260,7 @@ void ExaSet_ReceiveFormSet (void)
|
|||
ExaSet_CreateSet (&Set); // Add new set to database
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
static void ExaSet_ReceiveSetFieldsFromForm (struct ExaSet_Set *Set)
|
||||
|
@ -347,7 +347,7 @@ void ExaSet_ChangeSetTitle (void)
|
|||
}
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -393,7 +393,7 @@ void ExaSet_ChangeNumQstsToExam (void)
|
|||
}
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -438,7 +438,7 @@ void ExaSet_ReqSelectQstsToAddToSet (void)
|
|||
Qst_RequestSelectQstsForExamSet (&Exams);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -466,15 +466,14 @@ void ExaSet_ListQstsToAddToSet (void)
|
|||
Qst_ListQuestionsToSelectForExamSet (&Exams);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************* List the sets of an exam **************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
void ExaSet_ListExamSets (struct Exa_Exams *Exams,
|
||||
struct ExaSet_Set *Set)
|
||||
void ExaSet_ListExamSets (struct Exa_Exams *Exams)
|
||||
{
|
||||
extern const char *Hlp_ASSESSMENT_Exams_question_sets;
|
||||
extern const char *Txt_Sets_of_questions;
|
||||
|
@ -495,19 +494,14 @@ void ExaSet_ListExamSets (struct Exa_Exams *Exams,
|
|||
Hlp_ASSESSMENT_Exams_question_sets,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Show table with sets *****/
|
||||
if (NumSets)
|
||||
ExaSet_ListOneOrMoreSetsForEdition (Exams,
|
||||
MaxSetInd,
|
||||
NumSets,mysql_res,
|
||||
ICanEditSets);
|
||||
ExaSet_ListOneOrMoreSetsForEdition (Exams,
|
||||
MaxSetInd,
|
||||
NumSets,mysql_res,
|
||||
ICanEditSets);
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
DB_FreeMySQLResult (&mysql_res);
|
||||
|
||||
/***** Put forms to create/edit a set *****/
|
||||
if (ICanEditSets)
|
||||
ExaSet_PutFormNewSet (Exams,Set,MaxSetInd);
|
||||
|
||||
/***** End box *****/
|
||||
Box_BoxEnd ();
|
||||
}
|
||||
|
@ -555,21 +549,17 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
|||
MYSQL_RES *mysql_res,
|
||||
bool ICanEditSets)
|
||||
{
|
||||
extern const char *Txt_Sets_of_questions;
|
||||
extern const char *Txt_Movement_not_allowed;
|
||||
unsigned NumSet;
|
||||
struct ExaSet_Set Set;
|
||||
char *Anchor;
|
||||
|
||||
/***** Trivial check *****/
|
||||
if (!NumSets)
|
||||
return;
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (5);
|
||||
HTM_TABLE_Begin ("TBL_SCROLL");
|
||||
|
||||
/***** Write the heading *****/
|
||||
ExaSet_PutTableHeadingForSets ();
|
||||
if (NumSets)
|
||||
ExaSet_PutTableHeadingForSets ();
|
||||
|
||||
/***** Write rows *****/
|
||||
for (NumSet = 0, The_ResetRowColor ();
|
||||
|
@ -639,7 +629,7 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
|||
HTM_INPUT_TEXT ("Title",ExaSet_MAX_CHARS_TITLE,Set.Title,
|
||||
HTM_SUBMIT_ON_CHANGE,
|
||||
"id=\"Title\""
|
||||
" class=\"TITLE_DESCRIPTION_WIDTH INPUT_%s\""
|
||||
" class=\"REC_C2_BOT_INPUT INPUT_%s\""
|
||||
" required=\"required\"",
|
||||
The_GetSuffix ());
|
||||
Frm_EndForm ();
|
||||
|
@ -703,6 +693,17 @@ static void ExaSet_ListOneOrMoreSetsForEdition (struct Exa_Exams *Exams,
|
|||
Frm_FreeAnchorStr (&Anchor);
|
||||
}
|
||||
|
||||
/***** Put form to create a new set *****/
|
||||
if (ICanEditSets)
|
||||
{
|
||||
/* Put form to create new set */
|
||||
HTM_TR_Begin (NULL);
|
||||
HTM_TD_Begin ("colspan=\"5\" class=\"LT %s\"",The_GetColorRows ());
|
||||
ExaSet_PutFormNewSet (Exams,&Set,MaxSetInd);
|
||||
HTM_TD_End ();
|
||||
HTM_TR_End ();
|
||||
}
|
||||
|
||||
/***** End table *****/
|
||||
HTM_TABLE_End ();
|
||||
}
|
||||
|
@ -805,14 +806,14 @@ static void ExaSet_ListOneOrMoreQuestionsForEdition (struct Exa_Exams *Exams,
|
|||
};
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (5);
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
||||
/***** Write the heading *****/
|
||||
HTM_TR_Begin (NULL);
|
||||
|
||||
HTM_TH_Empty (1);
|
||||
HTM_TH (Txt_No_INDEX,HTM_HEAD_CENTER);
|
||||
HTM_TH (Txt_Question,HTM_HEAD_CENTER);
|
||||
HTM_TH (Txt_No_INDEX,HTM_HEAD_RIGHT);
|
||||
HTM_TH (Txt_Question,HTM_HEAD_LEFT);
|
||||
|
||||
HTM_TR_End ();
|
||||
|
||||
|
@ -1132,7 +1133,7 @@ void ExaSet_AddQstsToSet (void)
|
|||
ExaSet_FreeListsSelectedQuestions (&Exams);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1260,7 +1261,7 @@ void ExaSet_ReqRemSet (void)
|
|||
Set.Title);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1299,7 +1300,7 @@ void ExaSet_RemoveSet (void)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_Set_of_questions_removed);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1344,7 +1345,7 @@ void ExaSet_MoveUpSet (void)
|
|||
Ale_ShowAlert (Ale_WARNING,Txt_Movement_not_allowed);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1393,7 +1394,7 @@ void ExaSet_MoveDownSet (void)
|
|||
Ale_ShowAlert (Ale_WARNING,Txt_Movement_not_allowed);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1429,7 +1430,7 @@ void ExaSet_ReqRemQstFromSet (void)
|
|||
Frm_FreeAnchorStr (&Anchor);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1465,7 +1466,7 @@ void ExaSet_RemoveQstFromSet (void)
|
|||
Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -1540,7 +1541,7 @@ static void ExaSet_ChangeValidityQst (Qst_Validity_t Validity)
|
|||
Validity);
|
||||
|
||||
/***** Show current exam and its sets *****/
|
||||
Exa_PutFormsOneExam (&Exams,&Set,Exa_EXISTING_EXAM);
|
||||
Exa_PutFormsOneExam (&Exams,Exa_EXISTING_EXAM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -46,8 +46,7 @@ void ExaSet_ChangeNumQstsToExam (void);
|
|||
void ExaSet_ReqSelectQstsToAddToSet (void);
|
||||
void ExaSet_ListQstsToAddToSet (void);
|
||||
|
||||
void ExaSet_ListExamSets (struct Exa_Exams *Exams,
|
||||
struct ExaSet_Set *Set);
|
||||
void ExaSet_ListExamSets (struct Exa_Exams *Exams);
|
||||
|
||||
void ExaSet_ResetSet (struct ExaSet_Set *Set);
|
||||
void ExaSet_GetSetDataFromRow (MYSQL_RES *mysql_res,struct ExaSet_Set *Set);
|
||||
|
|
|
@ -41659,7 +41659,7 @@ const char *Txt_Sets_of_questions =
|
|||
#elif L==5 // fr
|
||||
"Ensembles de questions";
|
||||
#elif L==6 // gn
|
||||
"Conjuntos de preguntas"; // Okoteve traducción
|
||||
"Porandu ñemohenda";
|
||||
#elif L==7 // it
|
||||
"Set di domande";
|
||||
#elif L==8 // pl
|
||||
|
@ -41667,7 +41667,7 @@ const char *Txt_Sets_of_questions =
|
|||
#elif L==9 // pt
|
||||
"Conjuntos de perguntas";
|
||||
#elif L==10 // tr
|
||||
"Sets of questions"; // Çeviri lazim!
|
||||
"Soru setleri";
|
||||
#endif
|
||||
|
||||
const char *Txt_Settings =
|
||||
|
|
Loading…
Reference in New Issue