mirror of https://github.com/acanas/swad-core.git
Version19.137
This commit is contained in:
parent
6a4f1c0292
commit
915d6fbda9
|
@ -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.3 (2020-02-29)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.137 (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.137: Feb 27, 2020 Removed pagination in course program. (282305 lines)
|
||||
Version 19.136.3: Feb 27, 2020 Fixed bugs in numeration of items in course program. (282363 lines)
|
||||
Version 19.136.2: Feb 27, 2020 Move to left items in course program. (282330 lines)
|
||||
Version 19.136.1: Feb 29, 2020 Fixed bugs in course program. (282301 lines)
|
||||
|
|
|
@ -543,7 +543,6 @@ struct Globals
|
|||
bool LstIsRead; // Is the list already read from database, or it needs to be read?
|
||||
unsigned Num; // Number of items
|
||||
long *LstItmCods; // List of items codes
|
||||
unsigned CurrentPage;
|
||||
} Prg;
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -54,7 +54,6 @@ extern const Act_Action_t For_ActionsSeePstFor[For_NUM_TYPES_FORUM];
|
|||
|
||||
static const char *Pag_ParamNumPag[Pag_NUM_WHAT_PAGINATE] =
|
||||
{
|
||||
[Pag_COURSE_PROGRAM ] = "NumPagPrg",
|
||||
[Pag_ASSIGNMENTS ] = "NumPagAsg",
|
||||
[Pag_PROJECTS ] = "NumPagPrj",
|
||||
[Pag_GAMES ] = "NumPagGam",
|
||||
|
@ -167,11 +166,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_COURSE_PROGRAM:
|
||||
Frm_StartFormAnchor (ActSeePrg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Grp_PutParamWhichGrps ();
|
||||
break;
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
|
@ -286,11 +280,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_COURSE_PROGRAM:
|
||||
Frm_StartFormAnchor (ActSeePrg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
Grp_PutParamWhichGrps ();
|
||||
break;
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,1);
|
||||
|
@ -391,11 +380,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_COURSE_PROGRAM:
|
||||
Frm_StartFormAnchor (ActSeePrg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
Grp_PutParamWhichGrps ();
|
||||
break;
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->LeftPage);
|
||||
|
@ -508,11 +492,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
{
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_COURSE_PROGRAM:
|
||||
Frm_StartFormAnchor (ActSeePrg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
Grp_PutParamWhichGrps ();
|
||||
break;
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,NumPage);
|
||||
|
@ -612,11 +591,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
}
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_COURSE_PROGRAM:
|
||||
Frm_StartFormAnchor (ActSeePrg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
Grp_PutParamWhichGrps ();
|
||||
break;
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->RightPage);
|
||||
|
@ -717,11 +691,6 @@ void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
|||
}
|
||||
switch (WhatPaginate)
|
||||
{
|
||||
case Pag_COURSE_PROGRAM:
|
||||
Frm_StartFormAnchor (ActSeePrg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
Grp_PutParamWhichGrps ();
|
||||
break;
|
||||
case Pag_ASSIGNMENTS:
|
||||
Frm_StartFormAnchor (ActSeeAsg,Pagination->Anchor);
|
||||
Pag_PutHiddenParamPagNum (WhatPaginate,Pagination->NumPags);
|
||||
|
|
|
@ -37,21 +37,20 @@
|
|||
/******************************** Public types *******************************/
|
||||
/*****************************************************************************/
|
||||
|
||||
#define Pag_NUM_WHAT_PAGINATE 12
|
||||
#define Pag_NUM_WHAT_PAGINATE 11
|
||||
typedef enum
|
||||
{
|
||||
Pag_COURSE_PROGRAM = 0,
|
||||
Pag_ASSIGNMENTS = 1,
|
||||
Pag_PROJECTS = 2,
|
||||
Pag_GAMES = 3,
|
||||
Pag_SURVEYS = 4,
|
||||
Pag_ATT_EVENTS = 5,
|
||||
Pag_THREADS_FORUM = 6,
|
||||
Pag_POSTS_FORUM = 7,
|
||||
Pag_MESSAGES_RECEIVED = 8,
|
||||
Pag_MESSAGES_SENT = 9,
|
||||
Pag_MY_AGENDA = 10,
|
||||
Pag_ANOTHER_AGENDA = 11,
|
||||
Pag_ASSIGNMENTS = 0,
|
||||
Pag_PROJECTS = 1,
|
||||
Pag_GAMES = 2,
|
||||
Pag_SURVEYS = 3,
|
||||
Pag_ATT_EVENTS = 4,
|
||||
Pag_THREADS_FORUM = 5,
|
||||
Pag_POSTS_FORUM = 6,
|
||||
Pag_MESSAGES_RECEIVED = 7,
|
||||
Pag_MESSAGES_SENT = 8,
|
||||
Pag_MY_AGENDA = 9,
|
||||
Pag_ANOTHER_AGENDA = 10,
|
||||
} Pag_WhatPaginate_t;
|
||||
|
||||
struct Pagination // Used for threads and messages pagination
|
||||
|
|
|
@ -87,7 +87,6 @@ static bool Prg_CheckIfICanCreateItems (void);
|
|||
static void Prg_PutIconsListItems (void);
|
||||
static void Prg_PutIconToCreateNewItem (void);
|
||||
static void Prg_PutButtonToCreateNewItem (void);
|
||||
static void Prg_ParamsWhichGroupsToShow (void);
|
||||
static void Prg_ShowOneItem (long ItmCod,unsigned MaxIndex,bool PrintView);
|
||||
|
||||
static void Prg_CreateNumbers (unsigned MaxLevel);
|
||||
|
@ -141,7 +140,6 @@ void Prg_SeeCourseProgram (void)
|
|||
{
|
||||
/***** Get parameters *****/
|
||||
Grp_GetParamWhichGrps ();
|
||||
Gbl.Prg.CurrentPage = Pag_GetParamPagNum (Pag_COURSE_PROGRAM);
|
||||
|
||||
/***** Show all the program items *****/
|
||||
Prg_ShowAllItems ();
|
||||
|
@ -156,7 +154,6 @@ static void Prg_ShowAllItems (void)
|
|||
extern const char *Hlp_COURSE_Program;
|
||||
extern const char *Txt_Course_program;
|
||||
extern const char *Txt_No_items;
|
||||
struct Pagination Pagination;
|
||||
unsigned NumItem;
|
||||
|
||||
/***** Get list of program items *****/
|
||||
|
@ -169,12 +166,6 @@ static void Prg_ShowAllItems (void)
|
|||
else
|
||||
Prg_MaxLevel = 0;
|
||||
|
||||
/***** Compute variables related to pagination *****/
|
||||
Pagination.NumItems = Gbl.Prg.Num;
|
||||
Pagination.CurrentPage = (int) Gbl.Prg.CurrentPage;
|
||||
Pag_CalculatePagination (&Pagination);
|
||||
Gbl.Prg.CurrentPage = (unsigned) Pagination.CurrentPage;
|
||||
|
||||
/***** Begin box *****/
|
||||
Box_BoxBegin ("100%",Txt_Course_program,Prg_PutIconsListItems,
|
||||
Hlp_COURSE_Program,Box_NOT_CLOSABLE);
|
||||
|
@ -183,23 +174,18 @@ static void Prg_ShowAllItems (void)
|
|||
if (Gbl.Crs.Grps.NumGrps)
|
||||
{
|
||||
Set_StartSettingsHead ();
|
||||
Grp_ShowFormToSelWhichGrps (ActSeePrg,Prg_ParamsWhichGroupsToShow);
|
||||
Grp_ShowFormToSelWhichGrps (ActSeePrg,NULL);
|
||||
Set_EndSettingsHead ();
|
||||
}
|
||||
|
||||
/***** Write links to pages *****/
|
||||
Pag_WriteLinksToPagesCentered (Pag_COURSE_PROGRAM,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
if (Gbl.Prg.Num)
|
||||
{
|
||||
/***** Table head *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (2);
|
||||
|
||||
/***** Write all the program items *****/
|
||||
for (NumItem = Pagination.FirstItemVisible;
|
||||
NumItem <= Pagination.LastItemVisible;
|
||||
for (NumItem = 1;
|
||||
NumItem <= Gbl.Prg.Num;
|
||||
NumItem++)
|
||||
Prg_ShowOneItem (Gbl.Prg.LstItmCods[NumItem - 1],
|
||||
Gbl.Prg.Num,
|
||||
|
@ -211,11 +197,6 @@ static void Prg_ShowAllItems (void)
|
|||
else // No program items created
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_items);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
Pag_WriteLinksToPagesCentered (Pag_COURSE_PROGRAM,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Button to create a new program item *****/
|
||||
if (Prg_CheckIfICanCreateItems ())
|
||||
Prg_PutButtonToCreateNewItem ();
|
||||
|
@ -285,15 +266,6 @@ static void Prg_PutButtonToCreateNewItem (void)
|
|||
Frm_EndForm ();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/**************** Put params to select which groups to show ******************/
|
||||
/*****************************************************************************/
|
||||
|
||||
static void Prg_ParamsWhichGroupsToShow (void)
|
||||
{
|
||||
Pag_PutHiddenParamPagNum (Pag_COURSE_PROGRAM,Gbl.Prg.CurrentPage);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/************************** Show one program item ****************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -611,7 +583,6 @@ static void Prg_PutParams (void)
|
|||
if (CurrentItmInd > 0)
|
||||
Prg_PutParamItmInd (CurrentItmInd);
|
||||
Grp_PutParamWhichGrps ();
|
||||
Pag_PutHiddenParamPagNum (Pag_COURSE_PROGRAM,Gbl.Prg.CurrentPage);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -919,7 +890,6 @@ void Prg_ReqRemPrgItem (void)
|
|||
|
||||
/***** Get parameters *****/
|
||||
Grp_GetParamWhichGrps ();
|
||||
Gbl.Prg.CurrentPage = Pag_GetParamPagNum (Pag_COURSE_PROGRAM);
|
||||
|
||||
/***** Get program item code *****/
|
||||
if ((Item.ItmCod = Prg_GetParamItmCod ()) == -1L)
|
||||
|
@ -1525,7 +1495,6 @@ void Prg_RequestCreatOrEditPrgItem (void)
|
|||
|
||||
/***** Get parameters *****/
|
||||
Grp_GetParamWhichGrps ();
|
||||
Gbl.Prg.CurrentPage = Pag_GetParamPagNum (Pag_COURSE_PROGRAM);
|
||||
|
||||
/***** Get the code of the program item *****/
|
||||
ItsANewItem = ((Item.ItmCod = Prg_GetParamItmCod ()) == -1L);
|
||||
|
|
Loading…
Reference in New Issue