Version19.136.1

This commit is contained in:
Antonio Cañas Vargas 2020-02-29 11:38:50 +01:00
parent a1be6c4aad
commit 30966b4471
2 changed files with 16 additions and 7 deletions

View File

@ -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.136 (2020-02-27)"
#define Log_PLATFORM_VERSION "SWAD 19.136.1 (2020-02-29)"
#define CSS_FILE "swad19.136.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.136.1: Feb 29, 2020 Fixed bugs in course program. (282301 lines)
Version 19.136: Feb 27, 2020 Indent items in course program. (282292 lines)
3 changes necessary in database:
DROP INDEX CrsCod ON prg_items;

View File

@ -1345,12 +1345,20 @@ static unsigned Prg_GetNextIndexNotChild (const struct ProgramItem *Item)
static void Prg_MoveItemAndChildrenToRight (unsigned Index,unsigned NextIndex)
{
DB_QueryUPDATE ("can not update items",
"UPDATE prg_items SET Level=Level+1"
" WHERE CrsCod=%ld"
" AND ItmInd>=%u AND ItmInd<%u",
Gbl.Hierarchy.Crs.CrsCod,
Index,NextIndex);
if (NextIndex == 0) // At the end, no more not-children items
DB_QueryUPDATE ("can not move to right (ident)",
"UPDATE prg_items SET Level=Level+1"
" WHERE CrsCod=%ld"
" AND ItmInd>=%u",
Gbl.Hierarchy.Crs.CrsCod,
Index);
else
DB_QueryUPDATE ("can not move to right (ident)",
"UPDATE prg_items SET Level=Level+1"
" WHERE CrsCod=%ld"
" AND ItmInd>=%u AND ItmInd<%u",
Gbl.Hierarchy.Crs.CrsCod,
Index,NextIndex);
}
/*****************************************************************************/