mirror of https://github.com/acanas/swad-core.git
Version19.89.1
This commit is contained in:
parent
05db22eb5e
commit
031bfc97e2
|
@ -461,10 +461,9 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
|
|||
Gbl.Agenda.CurrentPage = (unsigned) Pagination.CurrentPage;
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
if (Gbl.Agenda.Num)
|
||||
{
|
||||
|
@ -487,10 +486,9 @@ static void Agd_ShowEvents (Agd_AgendaType_t AgendaType)
|
|||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[AgendaType],
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Button to create a new event *****/
|
||||
if (AgendaType == Agd_MY_AGENDA)
|
||||
|
|
|
@ -151,10 +151,9 @@ static void Asg_ShowAllAssignments (void)
|
|||
}
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
if (Gbl.Asgs.Num)
|
||||
{
|
||||
|
@ -176,10 +175,9 @@ static void Asg_ShowAllAssignments (void)
|
|||
Ale_ShowAlert (Ale_INFO,Txt_No_assignments);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_ASSIGNMENTS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Button to create a new assignment *****/
|
||||
if (Asg_CheckIfICanCreateAssignments ())
|
||||
|
|
|
@ -212,10 +212,9 @@ static void Att_ShowAllAttEvents (void)
|
|||
}
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
if (Gbl.AttEvents.Num)
|
||||
{
|
||||
|
@ -263,10 +262,9 @@ static void Att_ShowAllAttEvents (void)
|
|||
Ale_ShowAlert (Ale_INFO,Txt_No_events);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_ATT_EVENTS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Button to create a new attendance event *****/
|
||||
if (ICanEdit)
|
||||
|
|
|
@ -490,13 +490,14 @@ enscript -2 --landscape --color --file-align=2 --highlight --line-numbers -o - *
|
|||
En OpenSWAD:
|
||||
ps2pdf source.ps destination.pdf
|
||||
*/
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.89 (2019-12-10)"
|
||||
#define Log_PLATFORM_VERSION "SWAD 19.89.1 (2019-12-11)"
|
||||
#define CSS_FILE "swad19.88.5.css"
|
||||
#define JS_FILE "swad19.70.js"
|
||||
/*
|
||||
// TODO: Hacer un nuevo rol en los TFG: tutor externo (profesor de áreas no vinculadas con el centro, profesionales de empresas, etc.)
|
||||
// TODO: Impedir la creación y edición de proyectos si no son editables.
|
||||
|
||||
Version 19.89.1: Dec 11, 2019 Code refactoring in pagination. (248171 lines)
|
||||
Version 19.89: Dec 10, 2019 Game dates are in red colour if all their matches are finished or ot don't have matches. (248186 lines)
|
||||
4 changes necessary in database:
|
||||
ALTER TABLE mch_matches CHANGE COLUMN Showing Showing ENUM('nothing','stem','answers','results','start','end') NOT NULL DEFAULT 'nothing';
|
||||
|
|
30
swad_forum.c
30
swad_forum.c
|
@ -1037,10 +1037,9 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
|
|||
Gbl.Forum.CurrentPagePsts = (unsigned) PaginationPsts.CurrentPage;
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (PaginationPsts.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
||||
Gbl.Forum.ForumSelected.ThrCod,
|
||||
&PaginationPsts);
|
||||
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
||||
&PaginationPsts,
|
||||
Gbl.Forum.ForumSelected.ThrCod);
|
||||
|
||||
/***** Begin table *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
@ -1098,10 +1097,9 @@ static void For_ShowPostsOfAThread (Ale_AlertType_t AlertType,const char *Messag
|
|||
HTM_TABLE_End ();
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (PaginationPsts.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
||||
Gbl.Forum.ForumSelected.ThrCod,
|
||||
&PaginationPsts);
|
||||
Pag_WriteLinksToPagesCentered (Pag_POSTS_FORUM,
|
||||
&PaginationPsts,
|
||||
Gbl.Forum.ForumSelected.ThrCod);
|
||||
}
|
||||
|
||||
/***** Free structure that stores the query result *****/
|
||||
|
@ -2476,10 +2474,9 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
|||
if (NumThrs)
|
||||
{
|
||||
/***** Write links to all the pages in the listing of threads *****/
|
||||
if (PaginationThrs.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
||||
0,
|
||||
&PaginationThrs);
|
||||
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
||||
&PaginationThrs,
|
||||
0);
|
||||
|
||||
/***** Heading row *****/
|
||||
HTM_TABLE_BeginWideMarginPadding (2);
|
||||
|
@ -2530,10 +2527,9 @@ static void For_ShowForumThreadsHighlightingOneThread (long ThrCodHighlighted,
|
|||
HTM_TABLE_End ();
|
||||
|
||||
/***** Write links to all the pages in the listing of threads *****/
|
||||
if (PaginationThrs.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
||||
0,
|
||||
&PaginationThrs);
|
||||
Pag_WriteLinksToPagesCentered (Pag_THREADS_FORUM,
|
||||
&PaginationThrs,
|
||||
0);
|
||||
}
|
||||
|
||||
/***** Put a form to write the first post of a new thread *****/
|
||||
|
@ -3360,8 +3356,8 @@ static void For_ListForumThrs (long ThrCods[Pag_ITEMS_PER_PAGE],
|
|||
Pag_CalculatePagination (&PaginationPsts);
|
||||
PaginationPsts.Anchor = For_FORUM_POSTS_SECTION_ID;
|
||||
Pag_WriteLinksToPages (Pag_POSTS_FORUM,
|
||||
Thr.ThrCod,
|
||||
&PaginationPsts,
|
||||
Thr.ThrCod,
|
||||
Thr.Enabled[For_FIRST_MSG],
|
||||
Thr.Subject,
|
||||
Thr.NumUnreadPosts ? The_ClassFormInBoxBold[Gbl.Prefs.Theme] :
|
||||
|
|
14
swad_game.c
14
swad_game.c
|
@ -212,10 +212,9 @@ static void Gam_ListAllGames (void)
|
|||
Hlp_ASSESSMENT_Games,Box_NOT_CLOSABLE);
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
if (Gbl.Games.Num)
|
||||
{
|
||||
|
@ -272,10 +271,9 @@ static void Gam_ListAllGames (void)
|
|||
Ale_ShowAlert (Ale_INFO,Txt_No_games);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_GAMES,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Button to create a new game *****/
|
||||
if (Gam_CheckIfICanEditGames ())
|
||||
|
|
|
@ -1816,10 +1816,9 @@ static void Msg_ShowSentOrReceivedMessages (void)
|
|||
Gbl.Msg.CurrentPage);
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Show received / sent messages in this page *****/
|
||||
HTM_TABLE_BeginWidePadding (2);
|
||||
|
@ -1840,10 +1839,9 @@ static void Msg_ShowSentOrReceivedMessages (void)
|
|||
HTM_TABLE_End ();
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (WhatPaginate[Gbl.Msg.TypeOfMessages],
|
||||
&Pagination,
|
||||
0);
|
||||
}
|
||||
|
||||
/***** End box *****/
|
||||
|
|
|
@ -128,14 +128,16 @@ void Pag_CalculatePagination (struct Pagination *Pagination)
|
|||
/*****************************************************************************/
|
||||
|
||||
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||
long ThrCod,
|
||||
struct Pagination *Pagination)
|
||||
struct Pagination *Pagination,
|
||||
long ThrCod)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Pag_WriteLinksToPages (WhatPaginate,
|
||||
ThrCod,
|
||||
Pagination,true,NULL,"PAG_TXT",false);
|
||||
HTM_DIV_End ();
|
||||
if (Pagination->MoreThanOnePage)
|
||||
{
|
||||
HTM_DIV_Begin ("class=\"CM\"");
|
||||
Pag_WriteLinksToPages (WhatPaginate,Pagination,ThrCod,
|
||||
true,NULL,"PAG_TXT",false);
|
||||
HTM_DIV_End ();
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -143,8 +145,8 @@ void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
|||
/*****************************************************************************/
|
||||
|
||||
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||
long ThrCod,
|
||||
struct Pagination *Pagination,
|
||||
long ThrCod,
|
||||
bool FirstMsgEnabled,
|
||||
const char *Subject,const char *ClassTxt,
|
||||
bool LinkToPagCurrent)
|
||||
|
|
|
@ -74,11 +74,11 @@ struct Pagination // Used for threads and messages pagination
|
|||
|
||||
void Pag_CalculatePagination (struct Pagination *Pagination);
|
||||
void Pag_WriteLinksToPagesCentered (Pag_WhatPaginate_t WhatPaginate,
|
||||
long ThrCod,
|
||||
struct Pagination *Pagination);
|
||||
struct Pagination *Pagination,
|
||||
long ThrCod);
|
||||
void Pag_WriteLinksToPages (Pag_WhatPaginate_t WhatPaginate,
|
||||
long ThrCod,
|
||||
struct Pagination *Pagination,
|
||||
long ThrCod,
|
||||
bool FirstMsgEnabled,
|
||||
const char *Subject,const char *ClassTxt,
|
||||
bool LinkToPagCurrent);
|
||||
|
|
|
@ -425,10 +425,9 @@ static void Prj_ShowPrjsInCurrentPage (void)
|
|||
if (Gbl.Prjs.Num)
|
||||
{
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Allocate memory for the project *****/
|
||||
Prj_AllocMemProject (&Prj);
|
||||
|
@ -471,10 +470,9 @@ static void Prj_ShowPrjsInCurrentPage (void)
|
|||
Prj_FreeMemProject (&Prj);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_PROJECTS,
|
||||
&Pagination,
|
||||
0);
|
||||
}
|
||||
else // No projects created
|
||||
Ale_ShowAlert (Ale_INFO,Txt_No_projects);
|
||||
|
|
|
@ -229,10 +229,9 @@ static void Svy_ListAllSurveys (void)
|
|||
}
|
||||
|
||||
/***** Write links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
if (Gbl.Svys.Num)
|
||||
{
|
||||
|
@ -284,10 +283,9 @@ static void Svy_ListAllSurveys (void)
|
|||
Ale_ShowAlert (Ale_INFO,Txt_No_surveys);
|
||||
|
||||
/***** Write again links to pages *****/
|
||||
if (Pagination.MoreThanOnePage)
|
||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
||||
0,
|
||||
&Pagination);
|
||||
Pag_WriteLinksToPagesCentered (Pag_SURVEYS,
|
||||
&Pagination,
|
||||
0);
|
||||
|
||||
/***** Button to create a new survey *****/
|
||||
if (Svy_CheckIfICanCreateSvy ())
|
||||
|
|
Loading…
Reference in New Issue