diff --git a/swad_changelog.h b/swad_changelog.h index 6b7a5a32..aed7a7bf 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -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.78.6 (2023-03-23)" +#define Log_PLATFORM_VERSION "SWAD 22.78.7 (2023-03-23)" #define CSS_FILE "swad22.57.1.css" #define JS_FILE "swad22.49.js" /* + Version 22.78.7: Mar 22, 2023 Code refactoring in exam sets. (337671 lines) Version 22.78.6: Mar 22, 2023 Code refactoring in departments. (337691 lines) Version 22.78.5: Mar 22, 2023 Code refactoring in buildings. (337696 lines) Version 22.78.4: Mar 22, 2023 Code refactoring in file browser. (337693 lines) diff --git a/swad_exam_set.c b/swad_exam_set.c index 28dd01be..c78d50fc 100644 --- a/swad_exam_set.c +++ b/swad_exam_set.c @@ -153,7 +153,6 @@ static void ExaSet_PutParsOneQst (void *Exams) void ExaSet_GetSetDataByCod (struct ExaSet_Set *Set) { MYSQL_RES *mysql_res; - MYSQL_ROW row; /***** Trivial check *****/ if (Set->SetCod <= 0) @@ -165,31 +164,7 @@ void ExaSet_GetSetDataByCod (struct ExaSet_Set *Set) /***** Get data of set of questions from database *****/ if (Exa_DB_GetSetDataByCod (&mysql_res,Set->SetCod)) // Set found... - { - /* Get row */ - row = mysql_fetch_row (mysql_res); - /* - row[0] SetCod - row[1] ExaCod - row[2] SetInd - row[3] NumQstsToPrint - row[4] Title - */ - /* Get set code (row[0]) */ - Set->SetCod = Str_ConvertStrCodToLongCod (row[0]); - - /* Get exam code (row[1]) */ - Set->ExaCod = Str_ConvertStrCodToLongCod (row[1]); - - /* Get set index (row[2]) */ - Set->SetInd = Str_ConvertStrToUnsigned (row[2]); - - /* Get set index (row[3]) */ - Set->NumQstsToPrint = Str_ConvertStrToUnsigned (row[3]); - - /* Get the title of the set (row[4]) */ - Str_Copy (Set->Title,row[4],sizeof (Set->Title) - 1); - } + ExaSet_GetSetDataFromRow (mysql_res,Set); else /* Initialize to empty set */ ExaSet_ResetSet (Set);