From e0e6ff7328c1047522f90233de49da5acaa0e6dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ca=C3=B1as=20Vargas?= Date: Wed, 26 Feb 2020 19:59:56 +0100 Subject: [PATCH] Version19.134.2 --- swad_changelog.h | 3 ++- swad_syllabus.c | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/swad_changelog.h b/swad_changelog.h index 5a13e0c8d..cc54716bf 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -497,7 +497,7 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - * En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 19.134.1 (2020-02-26)" +#define Log_PLATFORM_VERSION "SWAD 19.134.2 (2020-02-26)" #define CSS_FILE "swad19.133.1.css" #define JS_FILE "swad19.91.1.js" /* @@ -523,6 +523,7 @@ Param // TODO: Miguel Damas: por defecto, marcar "Permitir que los profesores..." en los test (que ya esté marcado en lugar de desmarcado) // TODO: Si el alumno ha marcado "Permitir que los profesores...", entonces pedir confirmación al pulsar el botón azul, para evitar que se envíe por error antes de tiempo + Version 19.134.2: Feb 26, 2020 Fixed bug in syllabus editor. (282021 lines) Version 19.134.1: Feb 26, 2020 Order course program items by indexes. (282022 lines) Version 19.134: Feb 26, 2020 Move up and down a course program item. Not finished. (281991 lines) 5 changes necessary in database: diff --git a/swad_syllabus.c b/swad_syllabus.c index c33b7e2fa..dad96f1e1 100644 --- a/swad_syllabus.c +++ b/swad_syllabus.c @@ -601,7 +601,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, else { Frm_StartForm (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDelItmSylLec : - ActDelItmSylPra); + ActDelItmSylPra); Syl_PutParamNumItem (); Ico_PutIconRemove (); Frm_EndForm (); @@ -614,7 +614,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, if (Subtree.MovAllowed) { Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActUp_IteSylLec : - ActUp_IteSylPra, + ActUp_IteSylPra, NULL,Syl_PutParamNumItem, "arrow-up.svg", Str_BuildStringStr (Syl_LstItemsSyllabus.Lst[NumItem].HasChildren ? Txt_Move_up_X_and_its_subsections : @@ -632,7 +632,7 @@ static void Syl_ShowRowSyllabus (unsigned NumItem, if (Subtree.MovAllowed) { Lay_PutContextualLinkOnlyIcon (Gbl.Crs.Info.Type == Inf_LECTURES ? ActDwnIteSylLec : - ActDwnIteSylPra, + ActDwnIteSylPra, NULL,Syl_PutParamNumItem, "arrow-down.svg", Str_BuildStringStr (Syl_LstItemsSyllabus.Lst[NumItem].HasChildren ? Txt_Move_down_X_and_its_subsections : @@ -823,18 +823,16 @@ static void Syl_PutFormItemSyllabus (bool NewItem,unsigned NumItem,int Level,int HTM_TD_Begin ("colspan=\"%d\" class=\"LM COLOR%u\"", Syl_LstItemsSyllabus.NumLevels - Level + 1,Gbl.RowEvenOdd); Frm_StartForm (NewItem ? (Gbl.Crs.Info.Type == Inf_LECTURES ? ActInsIteSylLec : - ActInsIteSylPra) : + ActInsIteSylPra) : (Gbl.Crs.Info.Type == Inf_LECTURES ? ActModIteSylLec : - ActModIteSylPra)); + ActModIteSylPra)); Gbl.Syllabus.ParamNumItem = NumItem; Syl_PutParamNumItem (); - HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,false, - "size=\"60\" placeholder=\"%s\"", - Txt_Enter_a_new_item_here); - if (NewItem) - HTM_Txt (" autofocus=\"autofocus\""); - HTM_TxtF (" onchange=\"document.getElementById('%s').submit();return false;\" />", - Gbl.Form.Id); + HTM_INPUT_TEXT ("Txt",Syl_MAX_CHARS_TEXT_ITEM,Text,true, + "size=\"60\" placeholder=\"%s\"%s", + Txt_Enter_a_new_item_here, + NewItem ? " autofocus=\"autofocus\"" : + ""); Frm_EndForm (); HTM_TD_End (); }