Version 22.107.3: May 06, 2023 Changes in edition of exam.

This commit is contained in:
acanas 2023-05-06 00:19:37 +02:00
parent 9962b9b2f0
commit 3ee4a1b136
5 changed files with 116 additions and 115 deletions

View File

@ -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.107.2 (2023-05-05)"
#define Log_PLATFORM_VERSION "SWAD 22.107.3 (2023-05-06)"
#define CSS_FILE "swad22.107.css"
#define JS_FILE "swad22.49.js"
/*
Version 22.107.3: May 06, 2023 Changes in edition of exam. (338045 lines)
Version 22.107.2: May 05, 2023 Removed unused action in exam sets. (338044 lines)
Version 22.107.1: May 05, 2023 Changes in list of users to follow. (338105 lines)
Version 22.107: May 05, 2023 Changes in layout institutional links and connected users. (338108 lines)

View File

@ -138,6 +138,9 @@ static void Exa_RemoveAllMedFilesFromAnsOfAllQstsFromCrs (long CrsCod);
static void Exa_HideUnhideExam (bool Hide);
static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
char Txt[Cns_MAX_BYTES_TEXT + 1],
Exa_ExistingNewExam_t ExistingNewExam);
static void Exa_ReceiveExamFieldsFromForm (struct Exa_Exam *Exam,
char Txt[Cns_MAX_BYTES_TEXT + 1]);
static bool Exa_CheckExamFieldsReceivedFromForm (const struct Exa_Exam *Exam);
@ -1259,6 +1262,19 @@ void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
struct ExaSet_Set *Set,
Exa_ExistingNewExam_t ExistingNewExam)
{
extern const char *Hlp_ASSESSMENT_Exams_edit_exam;
extern const char *Hlp_ASSESSMENT_Exams_new_exam;
extern const char *Txt_Exam;
static void (*FunctionToDrawContextualIcons[]) (void *Args) =
{
[Exa_EXISTING_EXAM] = Exa_PutIconsEditingOneExam,
[Exa_NEW_EXAM ] = NULL,
};
static const char **HelpLink[] =
{
[Exa_EXISTING_EXAM] = &Hlp_ASSESSMENT_Exams_edit_exam,
[Exa_NEW_EXAM ] = &Hlp_ASSESSMENT_Exams_new_exam,
};
char Txt[Cns_MAX_BYTES_TEXT + 1];
/***** Initialize text / get text from database *****/
@ -1272,6 +1288,13 @@ void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
break;
}
/***** Begin box *****/
Box_BoxBegin (NULL,
Exams->Exam.Title[0] ? Exams->Exam.Title :
Txt_Exam,
FunctionToDrawContextualIcons[ExistingNewExam],Exams,
*HelpLink[ExistingNewExam],Box_NOT_CLOSABLE);
/***** Put form to create/edit an exam *****/
Exa_PutFormEditionExam (Exams,Txt,ExistingNewExam);
@ -1287,30 +1310,25 @@ void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
Exa_ListAllExams (Exams);
break;
}
/***** End box ****/
Box_BoxEnd ();
}
/*****************************************************************************/
/********************* Put a form to create/edit an exam **********************/
/*****************************************************************************/
void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
static void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
char Txt[Cns_MAX_BYTES_TEXT + 1],
Exa_ExistingNewExam_t ExistingNewExam)
{
extern const char *Hlp_ASSESSMENT_Exams_edit_exam;
extern const char *Hlp_ASSESSMENT_Exams_new_exam;
extern const char *Txt_Exam;
extern const char *Txt_Title;
extern const char *Txt_Maximum_grade;
extern const char *Txt_Result_visibility;
extern const char *Txt_Description;
extern const char *Txt_Save_changes;
extern const char *Txt_Create_exam;
static void (*FunctionToDrawContextualIcons[]) (void *Args) =
{
[Exa_EXISTING_EXAM] = Exa_PutIconsEditingOneExam,
[Exa_NEW_EXAM ] = NULL,
};
static Act_Action_t NextAction[] =
{
[Exa_EXISTING_EXAM] = ActChgExa,
@ -1321,24 +1339,12 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
[Exa_EXISTING_EXAM] = Btn_CONFIRM_BUTTON,
[Exa_NEW_EXAM ] = Btn_CREATE_BUTTON,
};
const char *HelpLink[] =
{
[Exa_EXISTING_EXAM] = Hlp_ASSESSMENT_Exams_edit_exam,
[Exa_NEW_EXAM ] = Hlp_ASSESSMENT_Exams_new_exam,
};
const char *TxtButton[] =
{
[Exa_EXISTING_EXAM] = Txt_Save_changes,
[Exa_NEW_EXAM ] = Txt_Create_exam,
};
/***** Begin box *****/
Box_BoxBegin (NULL,
Exams->Exam.Title[0] ? Exams->Exam.Title :
Txt_Exam,
FunctionToDrawContextualIcons[ExistingNewExam],Exams,
HelpLink[ExistingNewExam],Box_NOT_CLOSABLE);
/***** Begin form *****/
Frm_BeginForm (NextAction[ExistingNewExam]);
Exa_PutPars (Exams);
@ -1419,9 +1425,6 @@ void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
/***** End form *****/
Frm_EndForm ();
/***** End box ****/
Box_BoxEnd ();
}
/*****************************************************************************/

View File

@ -71,9 +71,6 @@ void Exa_ReqCreatOrEditExam (void);
void Exa_PutFormsOneExam (struct Exa_Exams *Exams,
struct ExaSet_Set *Set,
Exa_ExistingNewExam_t ExistingNewExam);
void Exa_PutFormEditionExam (struct Exa_Exams *Exams,
char Txt[Cns_MAX_BYTES_TEXT + 1],
Exa_ExistingNewExam_t ExistingNewExam);
void Exa_ReceiveFormExam (void);

View File

@ -1796,25 +1796,25 @@ const char *Hlp_ASSESSMENT_Exams_new_exam =
const char *Hlp_ASSESSMENT_Exams_question_sets =
#if L==1
"ASSESSMENT.Exams.es#conjunto-de-preguntas";
"ASSESSMENT.Exams.es#conjuntos-de-preguntas";
#elif L==2
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#elif L==3
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#elif L==4
"ASSESSMENT.Exams.es#conjunto-de-preguntas";
"ASSESSMENT.Exams.es#conjuntos-de-preguntas";
#elif L==5
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#elif L==6
"ASSESSMENT.Exams.es#conjunto-de-preguntas";
"ASSESSMENT.Exams.es#conjuntos-de-preguntas";
#elif L==7
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#elif L==8
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#elif L==9
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#elif L==10 // tr
"ASSESSMENT.Exams.en#question-set";
"ASSESSMENT.Exams.en#question-sets";
#endif
const char *Hlp_ASSESSMENT_Exams_sessions =