Version 22.89.1: Apr 04, 2023 Code refactoring in projects configuration.

This commit is contained in:
acanas 2023-04-04 09:05:36 +02:00
parent 9eac8bf86d
commit feffae7ee3
3 changed files with 59 additions and 44 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.89 (2023-04-01)"
#define Log_PLATFORM_VERSION "SWAD 22.89.1 (2023-04-04)"
#define CSS_FILE "swad22.88.css"
#define JS_FILE "swad22.49.js"
/*
Version 22.89.1: Apr 04, 2023 Code refactoring in projects configuration. (338622 lines)
Version 22.89: Apr 01, 2023 New module swad_project_config for projects configuration. (338613 lines)
Version 22.88: Mar 31, 2023 Code refactoring in resources. (338538 lines)
Version 22.87.1: Mar 31, 2023 Some messages translated. (338610 lines)

View File

@ -47,6 +47,8 @@ extern struct Globals Gbl;
/***************************** Private prototypes ****************************/
/*****************************************************************************/
static void PrjCfg_ShowFormConfigEditableByNET (const struct Prj_Projects *Projects);
static void PrjCfg_GetCrsPrjsConfig (struct Prj_Projects *Projects);
static void PrjCfg_GetConfigDataFromRow (MYSQL_RES *mysql_res,
struct Prj_Projects *Projects);
@ -75,8 +77,6 @@ void PrjCfg_ShowFormConfig (void)
{
extern const char *Hlp_ASSESSMENT_Projects;
extern const char *Txt_Configure_projects;
extern const char *Txt_Editable;
extern const char *Txt_Editable_by_non_editing_teachers;
extern const char *Txt_Save_changes;
struct Prj_Projects Projects;
@ -94,23 +94,11 @@ void PrjCfg_ShowFormConfig (void)
/***** Begin form *****/
Frm_BeginForm (ActRcvCfgPrj);
/***** Projects are editable by non-editing teachers? *****/
HTM_TABLE_BeginCenterPadding (2);
HTM_TR_Begin (NULL);
/* Label */
Frm_LabelColumn ("RT","Editable",Txt_Editable);
/***** Projects are editable by non-editing teachers? *****/
PrjCfg_ShowFormConfigEditableByNET (&Projects);
/* Data */
HTM_TD_Begin ("class=\"LT\"");
HTM_INPUT_CHECKBOX ("Editable",HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Editable\" value=\"Y\"%s",
Projects.Config.Editable ? " checked=\"checked\"" :
"");
HTM_Txt (Txt_Editable_by_non_editing_teachers);
HTM_TD_End ();
HTM_TR_End ();
HTM_TABLE_End ();
/***** Send button *****/
@ -123,6 +111,32 @@ void PrjCfg_ShowFormConfig (void)
Box_BoxEnd ();
}
/*****************************************************************************/
/************** Projects are editable by non-editing teachers? ***************/
/*****************************************************************************/
static void PrjCfg_ShowFormConfigEditableByNET (const struct Prj_Projects *Projects)
{
extern const char *Txt_Editable;
extern const char *Txt_Editable_by_non_editing_teachers;
HTM_TR_Begin (NULL);
/***** Label *****/
Frm_LabelColumn ("RT","Editable",Txt_Editable);
/***** Data *****/
HTM_TD_Begin ("class=\"LT\"");
HTM_INPUT_CHECKBOX ("Editable",HTM_DONT_SUBMIT_ON_CHANGE,
"id=\"Editable\" value=\"Y\"%s",
Projects->Config.Editable ? " checked=\"checked\"" :
"");
HTM_Txt (Txt_Editable_by_non_editing_teachers);
HTM_TD_End ();
HTM_TR_End ();
}
/*****************************************************************************/
/************** Get configuration of projects for current course *************/
/*****************************************************************************/

View File

@ -12020,7 +12020,7 @@ const char *Txt_Editable =
#elif L==5 // fr
"Éditables";
#elif L==6 // gn
"Editables"; // Okoteve traducción
"Ojeeditákuaa";
#elif L==7 // it
"Modificabili";
#elif L==8 // pl
@ -12028,7 +12028,7 @@ const char *Txt_Editable =
#elif L==9 // pt
"Editáveis";
#elif L==10 // tr
"Editable"; // Çeviri lazim!
"Düzenlenebilir";
#endif
const char *Txt_Editable_by_non_editing_teachers =
@ -12043,7 +12043,7 @@ const char *Txt_Editable_by_non_editing_teachers =
#elif L==5 // fr
"Éditables par des enseignants non-éditeurs";
#elif L==6 // gn
"Editables por profesores no editores"; // Okoteve traducción
"Omohendakuaa mbo'ehára ndaha'éiva edición";
#elif L==7 // it
"Modificabili da professori non-editing";
#elif L==8 // pl
@ -12051,53 +12051,53 @@ const char *Txt_Editable_by_non_editing_teachers =
#elif L==9 // pt
"Editáveis por professores não editores";
#elif L==10 // tr
"Editable by non-editing teachers"; // Çeviri lazim!
"Düzenleme yapmayan öğretmenler tarafından düzenlenebilir";
#endif
const char *Txt_eg_A_B =
#if L==1 // ca
"per ex.: A, B,…";
"per ex.: A, B…";
#elif L==2 // de
"z. B.: A, B,…";
"z. B.: A, B…";
#elif L==3 // en
"e.g., A, B,…";
"e.g., A, B…";
#elif L==4 // es
"por ej.: A, B,…";
"por ej.: A, B…";
#elif L==5 // fr
"par exemple: A, B,…";
"par exemple: A, B…";
#elif L==6 // gn
"por ej.: A, B,…"; // Okoteve traducción
"techapyrã ramo: A, B…";
#elif L==7 // it
"ad esempio: A, B,…";
"ad esempio: A, B…";
#elif L==8 // pl
"np. A, B, …";
"np. A, B…";
#elif L==9 // pt
"ex.: A, B,…";
"ex.: A, B…";
#elif L==10 // tr
"e.g., A, B,…"; // Çeviri lazim!
"örneğin: A, B…";
#endif
const char *Txt_eg_Lectures_Practicals =
#if L==1 // ca
"per ex.: Teoria, Pràctiques,…";
"per ex.: Teoria, Pràctiques…";
#elif L==2 // de
"z. B.: Vorlesung, Übung,…";
"z. B.: Vorlesung, Übung…";
#elif L==3 // en
"e.g., Lectures, Practicals,…";
"e.g., Lectures, Practicals…";
#elif L==4 // es
"por ej.: Teoría, Prácticas,…";
"por ej.: Teoría, Prácticas…";
#elif L==5 // fr
"par exemple: Théorie, Pratique,…";
"par exemple: Théorie, Pratique…";
#elif L==6 // gn
"por ej.: Teoría, Prácticas,…"; // Okoteve traducción
"techapyrã ramo: Teoría, Prácticas rehegua…"; // Okoteve traducción
#elif L==7 // it
"ad esempio: Teoria, Pratica,…";
"ad esempio: Teoria, Pratica…";
#elif L==8 // pl
"np. Wyklady, Praktyki …";
#elif L==9 // pt
"ex.: Teoria, Prática,…";
"ex.: Teoria, Prática…";
#elif L==10 // tr
"e.g., Lectures, Practicals,…"; // Çeviri lazim!
"örneğin: Teori, Uygulamalar…";
#endif
const char *Txt_ELAPSED_TIME =
@ -12112,7 +12112,7 @@ const char *Txt_ELAPSED_TIME =
#elif L==5 // fr
"Y a";
#elif L==6 // gn
"Hace"; // Okoteve traducción
"Ojapo";
#elif L==7 // it
"Fa";
#elif L==8 // pl
@ -12120,7 +12120,7 @@ const char *Txt_ELAPSED_TIME =
#elif L==9 // pt
"Atrás";
#elif L==10 // tr
"Ago"; // Çeviri lazim!
"Önce";
#endif
const char *Txt_Eliminate =
@ -12135,7 +12135,7 @@ const char *Txt_Eliminate =
#elif L==5 // fr
"Éliminer";
#elif L==6 // gn
"Mbogue";
"Pe'a";
#elif L==7 // it
"Rimuovere";
#elif L==8 // pl
@ -12143,7 +12143,7 @@ const char *Txt_Eliminate =
#elif L==9 // pt
"Eliminar";
#elif L==10 // tr
"Eliminate"; // Çeviri lazim!
"Elemek";
#endif
const char *Txt_Eliminate_all_courses_whithout_users_PART_1_OF_2 =