Version 22.38: Oct 02, 2022 Code refactoring and changes in layout of surveys.

This commit is contained in:
acanas 2022-10-02 00:54:48 +02:00
parent cd24550b78
commit a33d4f9206
4 changed files with 220 additions and 224 deletions

View File

@ -606,10 +606,12 @@ TODO: Fix bug: error al enviar un mensaje a dos recipientes, error on duplicate
TODO: Attach pdf files in multimedia.
*/
#define Log_PLATFORM_VERSION "SWAD 22.37.2 (2022-10-01)"
#define Log_PLATFORM_VERSION "SWAD 22.38 (2022-10-02)"
#define CSS_FILE "swad22.35.css"
#define JS_FILE "swad21.100.js"
/*
Version 22.38.1: Oct 02, 2022 TODO: El botón de "Poner encuesta a cero" debería salir dentro del diálogo, igual que el de borrar encuesta. (? lines)
Version 22.38: Oct 02, 2022 Code refactoring and changes in layout of surveys. (332518 lines)
Version 22.37.2: Oct 01, 2022 Fixed minor issues in layout. (332526 lines)
Version 22.37.1: Oct 01, 2022 Fixed issues in exams and games. (332525 lines)
Version 22.37: Oct 01, 2022 Code refactoring and changes in layout of games. (? lines)

File diff suppressed because it is too large Load Diff

View File

@ -40,17 +40,6 @@
#define Svy_ORDER_DEFAULT Dat_STR_TIME
struct Svy_Surveys
{
bool LstIsRead; // Is the list already read from database, or it needs to be read?
unsigned Num; // Number of surveys
long *LstSvyCods; // List of survey codes
Dat_StartEndTime_t SelectedOrder;
unsigned CurrentPage;
long SvyCod;
long QstCod;
};
struct Svy_Survey
{
long SvyCod;
@ -75,6 +64,17 @@ struct Svy_Survey
} Status;
};
struct Svy_Surveys
{
bool LstIsRead; // Is the list already read from database, or it needs to be read?
unsigned Num; // Number of surveys
long *LstSvyCods; // List of survey codes
Dat_StartEndTime_t SelectedOrder;
unsigned CurrentPage;
struct Svy_Survey Svy; // Selected/current survey
long QstCod;
};
#define Svy_NUM_ANS_TYPES 2
typedef enum
{

View File

@ -47,13 +47,13 @@ void SvyRsc_GetLinkToSurvey (void)
Svy_ResetSurveys (&Surveys);
/***** Get survey code *****/
Surveys.SvyCod = Svy_GetParamSvyCod ();
Surveys.Svy.SvyCod = Svy_GetParamSvyCod ();
/***** Get survey title *****/
SvyRsc_GetTitleFromSvyCod (Surveys.SvyCod,Title,sizeof (Title) - 1);
SvyRsc_GetTitleFromSvyCod (Surveys.Svy.SvyCod,Title,sizeof (Title) - 1);
/***** Copy link to survey into resource clipboard *****/
Prg_DB_CopyToClipboard (PrgRsc_SURVEY,Surveys.SvyCod);
Prg_DB_CopyToClipboard (PrgRsc_SURVEY,Surveys.Svy.SvyCod);
/***** Write sucess message *****/
Ale_ShowAlert (Ale_SUCCESS,Txt_Link_to_resource_X_copied_into_clipboard,